1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-20 06:35:50 +02:00

[180562[ not implementing IUniversalDataStoreConstants or IServiceConstants or IClientServerConstants

This commit is contained in:
David McKnight 2007-04-03 14:28:59 +00:00
parent b54c04556b
commit 103e79173f
7 changed files with 358 additions and 358 deletions

View file

@ -44,7 +44,7 @@ import org.eclipse.rse.services.clientserver.processes.handlers.UniversalServerP
* Miner for getting process information from a remote system. * Miner for getting process information from a remote system.
* @author mjberger * @author mjberger
*/ */
public class UniversalProcessMiner extends Miner implements IUniversalDataStoreConstants public class UniversalProcessMiner extends Miner
{ {
public static final String MINER_ID = UniversalProcessMiner.class.getName(); public static final String MINER_ID = UniversalProcessMiner.class.getName();
@ -177,7 +177,7 @@ public class UniversalProcessMiner extends Miner implements IUniversalDataStoreC
public void load() public void load()
{ {
deKillInfoNode = _dataStore.createObject(_minerData, UNIVERSAL_NODE_DESCRIPTOR, "universal.killinfo"); //$NON-NLS-1$ deKillInfoNode = _dataStore.createObject(_minerData, IUniversalDataStoreConstants.UNIVERSAL_NODE_DESCRIPTOR, "universal.killinfo"); //$NON-NLS-1$
deKillInfoNode.setAttribute(DE.A_VALUE, getSignalTypes()); deKillInfoNode.setAttribute(DE.A_VALUE, getSignalTypes());
_dataStore.refresh(_minerData); _dataStore.refresh(_minerData);

View file

@ -16,7 +16,6 @@
package org.eclipse.rse.internal.dstore.universal.miners.filesystem; package org.eclipse.rse.internal.dstore.universal.miners.filesystem;
import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
import org.eclipse.rse.services.clientserver.FileTypeMatcher; import org.eclipse.rse.services.clientserver.FileTypeMatcher;
import org.eclipse.rse.services.clientserver.IClientServerConstants; import org.eclipse.rse.services.clientserver.IClientServerConstants;
import org.eclipse.rse.services.clientserver.IMatcher; import org.eclipse.rse.services.clientserver.IMatcher;
@ -24,7 +23,7 @@ import org.eclipse.rse.services.clientserver.NamePatternMatcher;
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
public class UniversalFileSystemFilter implements java.io.FilenameFilter, IUniversalDataStoreConstants, IClientServerConstants{ public class UniversalFileSystemFilter implements java.io.FilenameFilter {
protected String filter; protected String filter;
@ -67,17 +66,17 @@ public class UniversalFileSystemFilter implements java.io.FilenameFilter, IUnive
return false; return false;
if (allowDirs && allowFiles) if (allowDirs && allowFiles)
setListValues(INCLUDE_ALL, filter); setListValues(IClientServerConstants.INCLUDE_ALL, filter);
else if (allowDirs) else if (allowDirs)
setListValues(INCLUDE_FOLDERS_ONLY, filter); setListValues(IClientServerConstants.INCLUDE_FOLDERS_ONLY, filter);
else if (allowFiles) else if (allowFiles)
setListValues(INCLUDE_FILES_ONLY, filter); setListValues(IClientServerConstants.INCLUDE_FILES_ONLY, filter);
else else
return false; return false;
if ((matcher == null) && (folderNameMatcher == null)) if ((matcher == null) && (folderNameMatcher == null))
return true; return true;
if (includeFilesOrFolders != INCLUDE_ALL) if (includeFilesOrFolders != IClientServerConstants.INCLUDE_ALL)
match = matcher.matches(name); match = matcher.matches(name);
else { else {
if (file.isFile()) { if (file.isFile()) {

View file

@ -57,7 +57,7 @@ import org.eclipse.rse.services.dstore.util.FileSystemMessageUtil;
import org.eclipse.rse.services.files.IFileService; import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.services.files.IHostFile; import org.eclipse.rse.services.files.IHostFile;
public class DStoreFileService extends AbstractDStoreService implements IFileService, IUniversalDataStoreConstants public class DStoreFileService extends AbstractDStoreService implements IFileService
{ {
protected org.eclipse.dstore.core.model.DataElement _uploadLogElement = null; protected org.eclipse.dstore.core.model.DataElement _uploadLogElement = null;
@ -173,10 +173,10 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
protected DataElement getAttributes(String fileNameFilter, boolean showHidden) protected DataElement getAttributes(String fileNameFilter, boolean showHidden)
{ {
DataElement attributes = getDataStore().createTransientObject(_filterAttributes); DataElement attributes = getDataStore().createTransientObject(_filterAttributes);
String version = VERSION_1; String version = IServiceConstants.VERSION_1;
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer();
String filter = ((fileNameFilter == null) ? "*" : fileNameFilter); //$NON-NLS-1$ String filter = ((fileNameFilter == null) ? "*" : fileNameFilter); //$NON-NLS-1$
buffer.append(version).append(TOKEN_SEPARATOR).append(filter).append(TOKEN_SEPARATOR).append(showHidden); buffer.append(version).append(IServiceConstants.TOKEN_SEPARATOR).append(filter).append(IServiceConstants.TOKEN_SEPARATOR).append(showHidden);
attributes.setAttribute(DE.A_SOURCE, buffer.toString()); attributes.setAttribute(DE.A_SOURCE, buffer.toString());
return attributes; return attributes;
} }
@ -444,11 +444,11 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
StringBuffer totalSentBuf = new StringBuffer(); StringBuffer totalSentBuf = new StringBuffer();
totalSentBuf.append((totalSent / KB_IN_BYTES)); totalSentBuf.append((totalSent / IUniversalDataStoreConstants.KB_IN_BYTES));
totalSentBuf.append(" KB"); //$NON-NLS-1$ totalSentBuf.append(" KB"); //$NON-NLS-1$
StringBuffer totalBuf = new StringBuffer(); StringBuffer totalBuf = new StringBuffer();
totalBuf.append(totalBytes / KB_IN_BYTES); totalBuf.append(totalBytes / IUniversalDataStoreConstants.KB_IN_BYTES);
totalBuf.append(" KB"); //$NON-NLS-1$ totalBuf.append(" KB"); //$NON-NLS-1$
StringBuffer percentBuf = new StringBuffer(); StringBuffer percentBuf = new StringBuffer();
@ -583,11 +583,11 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
if (isBinary) if (isBinary)
{ {
mode = BINARY_MODE; mode = IUniversalDataStoreConstants.BINARY_MODE;
} }
else else
{ {
mode = TEXT_MODE; mode = IUniversalDataStoreConstants.TEXT_MODE;
} }
DataStore ds = getDataStore(); DataStore ds = getDataStore();
@ -611,7 +611,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement localElement = ds.createObject(universaltemp, de.getType(), localFile.getAbsolutePath(), encoding); DataElement localElement = ds.createObject(universaltemp, de.getType(), localFile.getAbsolutePath(), encoding);
DataElement bufferSizeElement = ds.createObject(universaltemp, "buffer_size", "" + getBufferDownloadSize(), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ DataElement bufferSizeElement = ds.createObject(universaltemp, "buffer_size", "" + getBufferDownloadSize(), ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
DataElement queryCmd = getCommandDescriptor(de,C_DOWNLOAD_FILE); DataElement queryCmd = getCommandDescriptor(de,IUniversalDataStoreConstants.C_DOWNLOAD_FILE);
ArrayList argList = new ArrayList(); ArrayList argList = new ArrayList();
argList.add(remoteElement); argList.add(remoteElement);
@ -669,17 +669,17 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
resultChild = (DataElement) resultList.get(i); resultChild = (DataElement) resultList.get(i);
if (resultChild.getType().equals(DOWNLOAD_RESULT_SUCCESS_TYPE)) if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_SUCCESS_TYPE))
{ {
return true; return true;
} }
else if (resultChild.getType().equals(DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION)) else if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION))
{ {
localFile.delete(); localFile.delete();
SystemMessage msg = getMessage("RSEF1001").makeSubstitution(DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION); //$NON-NLS-1$ SystemMessage msg = getMessage("RSEF1001").makeSubstitution(IUniversalDataStoreConstants.DOWNLOAD_RESULT_FILE_NOT_FOUND_EXCEPTION); //$NON-NLS-1$
throw new SystemMessageException(msg); throw new SystemMessageException(msg);
} }
else if (resultChild.getType().equals(DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION)) else if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_UNSUPPORTED_ENCODING_EXCEPTION))
{ {
//SystemMessage msg = getMessage(); //SystemMessage msg = getMessage();
//throw new SystemMessageException(msg); //throw new SystemMessageException(msg);
@ -688,10 +688,10 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
//throw new RemoteFileIOException(e); //throw new RemoteFileIOException(e);
} }
else if (resultChild.getType().equals(DOWNLOAD_RESULT_IO_EXCEPTION)) else if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION))
{ {
localFile.delete(); localFile.delete();
SystemMessage msg = getMessage("RSEF1001").makeSubstitution(DOWNLOAD_RESULT_IO_EXCEPTION); //$NON-NLS-1$ SystemMessage msg = getMessage("RSEF1001").makeSubstitution(IUniversalDataStoreConstants.DOWNLOAD_RESULT_IO_EXCEPTION); //$NON-NLS-1$
throw new SystemMessageException(msg); throw new SystemMessageException(msg);
//IOException e = new IOException(resultChild.getName()); //IOException e = new IOException(resultChild.getName());
//UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error reading file " + remotePath, e); //UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error reading file " + remotePath, e);
@ -720,7 +720,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
buf.append(name); buf.append(name);
de = getElementFor(buf.toString()); de = getElementFor(buf.toString());
} }
dsQueryCommand(monitor, de, C_QUERY_GET_REMOTE_OBJECT); dsQueryCommand(monitor, de, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT);
return new DStoreHostFile(de); return new DStoreHostFile(de);
} }
@ -792,7 +792,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
{ {
String type = element.getType(); String type = element.getType();
// filter files // filter files
if (type.equals(UNIVERSAL_FILE_DESCRIPTOR) || type.equals(UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR)) if (type.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) || type.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR))
{ {
if (filematcher.matches(element.getName())) if (filematcher.matches(element.getName()))
{ {
@ -821,7 +821,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
DataElement status = dsStatusCommand(monitor, de, C_CREATE_FILE); DataElement status = dsStatusCommand(monitor, de, IUniversalDataStoreConstants.C_CREATE_FILE);
if (status == null) return null; if (status == null) return null;
if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
@ -837,7 +837,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
String remotePath = remoteParent + getSeparator(remoteParent) + folderName; String remotePath = remoteParent + getSeparator(remoteParent) + folderName;
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
DataElement status = dsStatusCommand(monitor, de, C_CREATE_FOLDER); DataElement status = dsStatusCommand(monitor, de, IUniversalDataStoreConstants.C_CREATE_FOLDER);
if (status == null) return null; if (status == null) return null;
if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
@ -853,7 +853,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
{ {
String remotePath = remoteParent + getSeparator(remoteParent) + fileName; String remotePath = remoteParent + getSeparator(remoteParent) + fileName;
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
DataElement status = dsStatusCommand(monitor, de, C_DELETE); DataElement status = dsStatusCommand(monitor, de, IUniversalDataStoreConstants.C_DELETE);
if (status == null) return false; if (status == null) return false;
if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR)) if (de.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR))
{ {
@ -878,7 +878,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
if (de != null) dataElements.add(de); if (de != null) dataElements.add(de);
} }
DataElement status = dsStatusCommand(monitor, (DataElement) dataElements.get(0), dataElements, C_DELETE_BATCH); DataElement status = dsStatusCommand(monitor, (DataElement) dataElements.get(0), dataElements, IUniversalDataStoreConstants.C_DELETE_BATCH);
if (status == null) return false; if (status == null) return false;
if (FileSystemMessageUtil.getSourceMessage(status).startsWith(IServiceConstants.FAILED)) if (FileSystemMessageUtil.getSourceMessage(status).startsWith(IServiceConstants.FAILED))
throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$ throw new SystemMessageException(getMessage("RSEF1300").makeSubstitution(FileSystemMessageUtil.getSourceLocation(status))); //$NON-NLS-1$
@ -891,7 +891,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement de = getElementFor(remotePath); DataElement de = getElementFor(remotePath);
de.setAttribute(DE.A_SOURCE, newName); de.setAttribute(DE.A_SOURCE, newName);
DataElement status = dsStatusCommand(monitor, de, C_RENAME); DataElement status = dsStatusCommand(monitor, de, IUniversalDataStoreConstants.C_RENAME);
if (status == null) return false; if (status == null) return false;
if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS)) if (FileSystemMessageUtil.getSourceMessage(status).equals(IServiceConstants.SUCCESS))
@ -1033,10 +1033,10 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement tgtDE = getElementFor(tgtParent); DataElement tgtDE = getElementFor(tgtParent);
if (tgtDE.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR)) if (tgtDE.getType().equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR))
{ {
dsQueryCommand(monitor, tgtDE, C_QUERY_GET_REMOTE_OBJECT); dsQueryCommand(monitor, tgtDE, IUniversalDataStoreConstants.C_QUERY_GET_REMOTE_OBJECT);
} }
DataElement cpCmd = getCommandDescriptor(tgtDE, C_COPY); DataElement cpCmd = getCommandDescriptor(tgtDE, IUniversalDataStoreConstants.C_COPY);
if (cpCmd != null) if (cpCmd != null)
{ {
@ -1051,7 +1051,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
{ {
getStatusMonitor(ds).waitForUpdate(status, monitor); getStatusMonitor(ds).waitForUpdate(status, monitor);
if (status.getAttribute(DE.A_SOURCE).equals(FAILED)) { if (status.getAttribute(DE.A_SOURCE).equals(IServiceConstants.FAILED)) {
throw new SystemMessageException(getMessage("RSEF1306").makeSubstitution(srcName)); //$NON-NLS-1$ throw new SystemMessageException(getMessage("RSEF1306").makeSubstitution(srcName)); //$NON-NLS-1$
/* /*
@ -1083,7 +1083,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataStore ds = getDataStore(); DataStore ds = getDataStore();
DataElement tgtDE = getElementFor(tgtParent); DataElement tgtDE = getElementFor(tgtParent);
DataElement cpCmd = getCommandDescriptor(tgtDE, C_COPY_BATCH); DataElement cpCmd = getCommandDescriptor(tgtDE, IUniversalDataStoreConstants.C_COPY_BATCH);
if (cpCmd != null) if (cpCmd != null)
{ {
@ -1100,7 +1100,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
{ {
getStatusMonitor(ds).waitForUpdate(status, monitor); getStatusMonitor(ds).waitForUpdate(status, monitor);
if (status.getAttribute(DE.A_SOURCE).equals(FAILED)) { if (status.getAttribute(DE.A_SOURCE).equals(IServiceConstants.FAILED)) {
throw new SystemMessageException(getMessage("RSEF1306").makeSubstitution(srcNames[0])); //$NON-NLS-1$ throw new SystemMessageException(getMessage("RSEF1306").makeSubstitution(srcNames[0])); //$NON-NLS-1$
} }
} }
@ -1127,8 +1127,8 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataElement universaltemp = getMinerElement(); DataElement universaltemp = getMinerElement();
// create filter descriptor // create filter descriptor
DataElement deObj = ds.createObject(universaltemp, UNIVERSAL_FILTER_DESCRIPTOR, "", "", "", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ DataElement deObj = ds.createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, "", "", "", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
DataElement[] results = dsQueryCommand(monitor, deObj, C_QUERY_ROOTS); DataElement[] results = dsQueryCommand(monitor, deObj, IUniversalDataStoreConstants.C_QUERY_ROOTS);
return convertToHostFiles(results, "*"); //$NON-NLS-1$ return convertToHostFiles(results, "*"); //$NON-NLS-1$
} }
@ -1138,17 +1138,17 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
public IHostFile[] getFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) public IHostFile[] getFolders(IProgressMonitor monitor, String remoteParent, String fileFilter)
{ {
return fetch(monitor, remoteParent, fileFilter, C_QUERY_VIEW_FOLDERS); return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS);
} }
public IHostFile[] getFiles(IProgressMonitor monitor, String remoteParent, String fileFilter) public IHostFile[] getFiles(IProgressMonitor monitor, String remoteParent, String fileFilter)
{ {
return fetch(monitor, remoteParent, fileFilter, C_QUERY_VIEW_FILES); return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FILES);
} }
public IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String remoteParent, String fileFilter) public IHostFile[] getFilesAndFolders(IProgressMonitor monitor, String remoteParent, String fileFilter)
{ {
return fetch(monitor, remoteParent, fileFilter, C_QUERY_VIEW_ALL); return fetch(monitor, remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_ALL);
} }
protected DataElement getElementFor(String path) protected DataElement getElementFor(String path)
@ -1169,7 +1169,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
if (element == null || element.isDeleted()) if (element == null || element.isDeleted())
{ {
DataElement universaltemp = getMinerElement(); DataElement universaltemp = getMinerElement();
element = getDataStore().createObject(universaltemp, UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, "", false); //$NON-NLS-1$ element = getDataStore().createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, normalizedPath, normalizedPath, "", false); //$NON-NLS-1$
} }
return element; return element;
} }
@ -1184,7 +1184,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
if (deObj == null) if (deObj == null)
{ {
DataElement universaltemp = getMinerElement(); DataElement universaltemp = getMinerElement();
ds.createObject(universaltemp, UNIVERSAL_FILTER_DESCRIPTOR, remoteParent, remoteParent, "", false); //$NON-NLS-1$ ds.createObject(universaltemp, IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR, remoteParent, remoteParent, "", false); //$NON-NLS-1$
} }
DataElement attributes = getAttributes(fileFilter, true); DataElement attributes = getAttributes(fileFilter, true);
@ -1208,7 +1208,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataStore ds = de.getDataStore(); DataStore ds = de.getDataStore();
DataElement setCmd = getCommandDescriptor(de, C_SET_LASTMODIFIED); DataElement setCmd = getCommandDescriptor(de, IUniversalDataStoreConstants.C_SET_LASTMODIFIED);
if (setCmd != null) if (setCmd != null)
{ {
// first modify the source attribute to temporarily be the date field // first modify the source attribute to temporarily be the date field
@ -1228,7 +1228,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataStore ds = de.getDataStore(); DataStore ds = de.getDataStore();
DataElement setCmd = getCommandDescriptor(de, C_SET_READONLY); DataElement setCmd = getCommandDescriptor(de, IUniversalDataStoreConstants.C_SET_READONLY);
if (setCmd != null) if (setCmd != null)
{ {
String flag = readOnly ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$ String flag = readOnly ? "true" : "false"; //$NON-NLS-1$ //$NON-NLS-2$
@ -1258,9 +1258,9 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
DataStore ds = getDataStore(); DataStore ds = getDataStore();
DataElement encodingElement = ds.createObject(null, UNIVERSAL_TEMP_DESCRIPTOR, ""); //$NON-NLS-1$ DataElement encodingElement = ds.createObject(null, IUniversalDataStoreConstants.UNIVERSAL_TEMP_DESCRIPTOR, ""); //$NON-NLS-1$
DataElement queryCmd = ds.localDescriptorQuery(encodingElement.getDescriptor(), C_SYSTEM_ENCODING); DataElement queryCmd = ds.localDescriptorQuery(encodingElement.getDescriptor(),IUniversalDataStoreConstants.C_SYSTEM_ENCODING);
DataElement status = ds.command(queryCmd, encodingElement, true); DataElement status = ds.command(queryCmd, encodingElement, true);
@ -1286,11 +1286,11 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
if (isBinary) if (isBinary)
{ {
mode = BINARY_MODE; mode = IUniversalDataStoreConstants.BINARY_MODE;
} }
else else
{ {
mode = TEXT_MODE; mode = IUniversalDataStoreConstants.TEXT_MODE;
} }
DStoreInputStream inputStream = new DStoreInputStream(getDataStore(), remotePath, getMinerElement(), getEncoding(monitor), mode); DStoreInputStream inputStream = new DStoreInputStream(getDataStore(), remotePath, getMinerElement(), getEncoding(monitor), mode);
return inputStream; return inputStream;
@ -1305,11 +1305,11 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
if (isBinary) if (isBinary)
{ {
mode = BINARY_MODE; mode = IUniversalDataStoreConstants.BINARY_MODE;
} }
else else
{ {
mode = TEXT_MODE; mode = IUniversalDataStoreConstants.TEXT_MODE;
} }
DStoreOutputStream outputStream = new DStoreOutputStream(getDataStore(), remotePath, getEncoding(monitor), mode); DStoreOutputStream outputStream = new DStoreOutputStream(getDataStore(), remotePath, getEncoding(monitor), mode);
return outputStream; return outputStream;

View file

@ -24,6 +24,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.dstore.core.model.DE; import org.eclipse.dstore.core.model.DE;
import org.eclipse.dstore.core.model.DataElement; import org.eclipse.dstore.core.model.DataElement;
import org.eclipse.dstore.core.model.DataStore; import org.eclipse.dstore.core.model.DataStore;
import org.eclipse.rse.services.clientserver.IServiceConstants;
import org.eclipse.rse.services.clientserver.processes.IHostProcess; import org.eclipse.rse.services.clientserver.processes.IHostProcess;
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants; import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
@ -35,7 +36,7 @@ import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConst
* @author mjberger * @author mjberger
* *
*/ */
public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants, IAdaptable public class DStoreHostProcess implements IHostProcess, IAdaptable
{ {
public static final boolean ROOT_TRUE = true; public static final boolean ROOT_TRUE = true;
public static final boolean ROOT_FALSE = false; public static final boolean ROOT_FALSE = false;
@ -120,7 +121,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
if (s != null && s.length() > 0) if (s != null && s.length() > 0)
{ {
String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$ String[] str = s.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
int tokens = str.length; int tokens = str.length;
if (tokens > 1) if (tokens > 1)
{ {
@ -469,7 +470,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
if (s != null && s.length() > 0) if (s != null && s.length() > 0)
{ {
String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$ String[] str = s.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
if (attIndex >= str.length) return null; if (attIndex >= str.length) return null;
if (str[attIndex] == null || str[attIndex].equals("")) return null; //$NON-NLS-1$ if (str[attIndex] == null || str[attIndex].equals("")) return null; //$NON-NLS-1$
else return str[attIndex]; else return str[attIndex];
@ -494,7 +495,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
if (s != null && s.length() > 0) if (s != null && s.length() > 0)
{ {
String[] str = s.split("\\"+TOKEN_SEPARATOR); //$NON-NLS-1$ String[] str = s.split("\\"+IServiceConstants.TOKEN_SEPARATOR); //$NON-NLS-1$
if (attIndex >= str.length) if (attIndex >= str.length)
{ {
// SystemPlugin.logError("Error in UniversalProcessImpl.setSubAttribute: Attribute index out of bounds."); // SystemPlugin.logError("Error in UniversalProcessImpl.setSubAttribute: Attribute index out of bounds.");
@ -505,7 +506,7 @@ public class DStoreHostProcess implements IHostProcess, org.eclipse.rse.dstore.u
for (int i = 0; i < str.length; i++) for (int i = 0; i < str.length; i++)
{ {
if (i == str.length - 1) s = s + str[i]; if (i == str.length - 1) s = s + str[i];
else s = s + str[i] + TOKEN_SEPARATOR; else s = s + str[i] + IServiceConstants.TOKEN_SEPARATOR;
} }
deObj.setAttribute(DE.A_VALUE, s); deObj.setAttribute(DE.A_VALUE, s);
DataStore ds = deObj.getDataStore(); DataStore ds = deObj.getDataStore();

View file

@ -32,7 +32,7 @@ import org.eclipse.rse.internal.services.dstore.ServiceResources;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Display;
public class DownloadListener implements IDomainListener,IUniversalDataStoreConstants public class DownloadListener implements IDomainListener
{ {
private DataElement _status; private DataElement _status;
@ -145,11 +145,11 @@ public class DownloadListener implements IDomainListener,IUniversalDataStoreCons
StringBuffer current = new StringBuffer(); StringBuffer current = new StringBuffer();
current.append(currentLength /KB_IN_BYTES); current.append(currentLength /IUniversalDataStoreConstants.KB_IN_BYTES);
current.append(" KB"); //$NON-NLS-1$ current.append(" KB"); //$NON-NLS-1$
StringBuffer total = new StringBuffer(); StringBuffer total = new StringBuffer();
total.append(_totalLength / KB_IN_BYTES); total.append(_totalLength / IUniversalDataStoreConstants.KB_IN_BYTES);
total.append(" KB"); //$NON-NLS-1$ total.append(" KB"); //$NON-NLS-1$
StringBuffer percentBuf = new StringBuffer(); StringBuffer percentBuf = new StringBuffer();

View file

@ -30,7 +30,7 @@ import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
/** /**
* This class is the Java language utility for universal. * This class is the Java language utility for universal.
*/ */
public class DStoreJavaLanguageUtility extends AbstractJavaLanguageUtility implements IUniversalDataStoreConstants { public class DStoreJavaLanguageUtility extends AbstractJavaLanguageUtility {
/** /**
* Constructor. * Constructor.
@ -59,11 +59,11 @@ public class DStoreJavaLanguageUtility extends AbstractJavaLanguageUtility imple
DataElement deObj = ((DStoreHostFile)univFile.getHostFile()).getDataElement(); DataElement deObj = ((DStoreHostFile)univFile.getHostFile()).getDataElement();
DataStore ds = deObj.getDataStore(); DataStore ds = deObj.getDataStore();
DataElement queryCmd = ds.localDescriptorQuery(deObj.getDescriptor(), C_QUERY_QUALIFIED_CLASSNAME); DataElement queryCmd = ds.localDescriptorQuery(deObj.getDescriptor(), IUniversalDataStoreConstants.C_QUERY_QUALIFIED_CLASSNAME);
if (queryCmd != null) { if (queryCmd != null) {
DataElement status = ds.synchronizedCommand(queryCmd, deObj, true); DataElement status = ds.synchronizedCommand(queryCmd, deObj, true);
DataElement className = ds.find(status, DE.A_TYPE, TYPE_QUALIFIED_CLASSNAME, 1); DataElement className = ds.find(status, DE.A_TYPE, IUniversalDataStoreConstants.TYPE_QUALIFIED_CLASSNAME, 1);
if (className != null && !className.equals("null")) { //$NON-NLS-1$ if (className != null && !className.equals("null")) { //$NON-NLS-1$
return className.getName(); return className.getName();