RSE
Release 3.0

org.eclipse.rse.dstore.universal.miners
Class UniversalFileSystemMiner

java.lang.Object
  extended by java.lang.Thread
      extended by org.eclipse.dstore.core.server.SecuredThread
          extended by org.eclipse.dstore.core.model.Handler
              extended by org.eclipse.dstore.core.miners.Miner
                  extended by org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner
All Implemented Interfaces:
Runnable, org.eclipse.dstore.core.model.ISchemaExtender

public class UniversalFileSystemMiner
extends org.eclipse.dstore.core.miners.Miner

This miner allows for remote file browsing and management.


Field Summary
protected  ArchiveHandlerManager _archiveHandlerManager
           
protected  HashMap _cancellableThreads
           
static String CLASSNAME
           
protected  String filterString
           
protected  boolean showHidden
           
 
Fields inherited from class org.eclipse.dstore.core.miners.Miner
_commandQueue, _dependencies, _minerData, _minerElement, _minerTransient, _name, _resourceBundle, _value
 
Fields inherited from class org.eclipse.dstore.core.model.Handler
_keepRunning, _waitIncrement
 
Fields inherited from class org.eclipse.dstore.core.server.SecuredThread
_dataStore
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
UniversalFileSystemMiner()
           
 
Method Summary
 void extendSchema(org.eclipse.dstore.core.model.DataElement schemaRoot)
           
 void finish()
           
 AbsoluteVirtualPath getAbsoluteVirtualPath(org.eclipse.dstore.core.model.DataElement subject)
           
 AbsoluteVirtualPath getAbsoluteVirtualPath(String path)
           
 ISystemArchiveHandler getArchiveHandlerFor(String archivePath)
           
protected  String getClassificationString(String s)
          Method to obtain the classification string of file or folder.
protected  int getDepth(String s)
          Method to obtain the depth for a search
protected  org.eclipse.dstore.core.model.DataElement getFileElement(org.eclipse.dstore.core.model.DataElement subject, File file)
           
protected  String getFilterString(String s)
          Method to obtain the filter string of file or folder.
protected  InputStream getInputStreamForFile(String filename)
           
protected  boolean getShowHiddenFlag(String s)
          Method to obtain the show Hidden flag for file or folder.
 String getVersion()
           
 org.eclipse.dstore.core.model.DataElement handleCancel(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
           
 org.eclipse.dstore.core.model.DataElement handleCommand(org.eclipse.dstore.core.model.DataElement theElement)
           
 org.eclipse.dstore.core.model.DataElement handleCopy(org.eclipse.dstore.core.model.DataElement targetFolder, org.eclipse.dstore.core.model.DataElement sourceFile, org.eclipse.dstore.core.model.DataElement nameObj, org.eclipse.dstore.core.model.DataElement status)
           
 org.eclipse.dstore.core.model.DataElement handleCreateFile(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status, String queryType)
          Method to create a new file.
 org.eclipse.dstore.core.model.DataElement handleCreateFolder(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status, String queryType)
          Method to create a new folder.
 org.eclipse.dstore.core.model.DataElement handleDelete(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status, boolean refreshDataStore)
          Method to Delete a file or folder.
protected  org.eclipse.dstore.core.model.DataElement handleDownload(org.eclipse.dstore.core.model.DataElement theElement, org.eclipse.dstore.core.model.DataElement status)
          Method to download a file.
 org.eclipse.dstore.core.model.DataElement handleGetOSType(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Method to retrieve the OS that the miner is running.
protected  org.eclipse.dstore.core.model.DataElement handleQueryAdvanceProperty(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Method to query advance properties.
 org.eclipse.dstore.core.model.DataElement handleQueryAll(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement attributes, org.eclipse.dstore.core.model.DataElement status, String queryType, boolean caseSensitive)
          Method to list the files and folders for a given filter.
 org.eclipse.dstore.core.model.DataElement handleQueryAllArchive(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement attributes, org.eclipse.dstore.core.model.DataElement status, boolean caseSensitive, boolean foldersOnly)
           
protected  org.eclipse.dstore.core.model.DataElement handleQueryBasicProperty(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Method to Retrieve properties of the file or folder.
protected  org.eclipse.dstore.core.model.DataElement handleQuerycanWriteProperty(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Method to Retrieve canWrite property of the file or folder.
protected  org.eclipse.dstore.core.model.DataElement handleQueryClassName(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Retrieve the fully qualified class name (including package) for the specified .class file.
protected  org.eclipse.dstore.core.model.DataElement handleQueryEncoding(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Get the system encoding
protected  org.eclipse.dstore.core.model.DataElement handleQueryExists(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status, String queryType)
          Method to query existence of the file or folder.
 org.eclipse.dstore.core.model.DataElement handleQueryFiles(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement attributes, org.eclipse.dstore.core.model.DataElement status, String queryType, boolean caseSensitive)
          Method to list the files for a given filter.
 org.eclipse.dstore.core.model.DataElement handleQueryFolders(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement attributes, org.eclipse.dstore.core.model.DataElement status, String queryType, boolean caseSensitive)
          Method to list the folders for a given filter.
 org.eclipse.dstore.core.model.DataElement handleQueryGetRemoteObject(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status, String queryType)
          Method to get remote object
protected  org.eclipse.dstore.core.model.DataElement handleQueryQualifiedClassName(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Retrieve the fully qualified class name (including package) for a class file.
 org.eclipse.dstore.core.model.DataElement handleQueryRoots(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Method to list the roots.
protected  org.eclipse.dstore.core.model.DataElement handleQueryUnusedPort(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Get an unused port number.
 org.eclipse.dstore.core.model.DataElement handleRename(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Method to Rename a file or folder.
 org.eclipse.dstore.core.model.DataElement handleSearch(org.eclipse.dstore.core.model.DataElement theElement, org.eclipse.dstore.core.model.DataElement status, String queryType, boolean fileNamesCaseSensitive)
          Method to do a search.
 org.eclipse.dstore.core.model.DataElement handleSetLastModified(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Method to set LastModified to a file or folder.
 org.eclipse.dstore.core.model.DataElement handleSetReadOnly(org.eclipse.dstore.core.model.DataElement subject, org.eclipse.dstore.core.model.DataElement status)
          Method to set ReadOnly to a file or folder.
protected  void internalQueryAll(org.eclipse.dstore.core.model.DataElement subject, File fileobj, String queryType, String filter, boolean caseSensitive, int inclusion, org.eclipse.dstore.core.model.DataElement status)
           
 void load()
           
 String setProperties(File fileObj)
           
 String setProperties(File fileObj, boolean doArchiveProperties)
          Method to obtain the properties of file or folder.
 String setProperties(VirtualChild fileObj)
           
 org.eclipse.dstore.core.model.DataElement statusCancelled(org.eclipse.dstore.core.model.DataElement status)
          Cancel status.
 org.eclipse.dstore.core.model.DataElement statusDone(org.eclipse.dstore.core.model.DataElement status)
          Complete status.
 
Methods inherited from class org.eclipse.dstore.core.miners.Miner
command, createAbstractCommandDescriptor, createAbstractObjectDescriptor, createAbstractObjectDescriptor, createAbstractRelationship, createCommandDescriptor, createCommandDescriptor, createObjectDescriptor, createObjectDescriptor, createReference, createRelationDescriptor, getCommandArgument, getCommandName, getCommandStatus, getDependencies, getExternalLoader, getMinerData, getMinerDependencies, getMinerElement, getMinerName, getMinerTransient, getNumberOfCommandArguments, getResourceBundle, getSchemaRoot, getValue, handle, initMiner, isConnected, isInitialized, load, makeTransient, requestCommand, setDataStore, setExternalLoader, updateMinerInfo, waitForInput
 
Methods inherited from class org.eclipse.dstore.core.model.Handler
getWaitTime, isFinished, notifyInput, run, setWaitTime
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

filterString

protected String filterString

_archiveHandlerManager

protected ArchiveHandlerManager _archiveHandlerManager

showHidden

protected boolean showHidden

CLASSNAME

public static final String CLASSNAME
See Also:
Constant Field Values

_cancellableThreads

protected HashMap _cancellableThreads
Constructor Detail

UniversalFileSystemMiner

public UniversalFileSystemMiner()
Method Detail

handleCommand

public org.eclipse.dstore.core.model.DataElement handleCommand(org.eclipse.dstore.core.model.DataElement theElement)
                                                        throws SystemMessageException
Specified by:
handleCommand in class org.eclipse.dstore.core.miners.Miner
Throws:
SystemMessageException
See Also:
Miner.handleCommand(DataElement)

handleSearch

public org.eclipse.dstore.core.model.DataElement handleSearch(org.eclipse.dstore.core.model.DataElement theElement,
                                                              org.eclipse.dstore.core.model.DataElement status,
                                                              String queryType,
                                                              boolean fileNamesCaseSensitive)
Method to do a search.


handleCancel

public org.eclipse.dstore.core.model.DataElement handleCancel(org.eclipse.dstore.core.model.DataElement subject,
                                                              org.eclipse.dstore.core.model.DataElement status)

handleQueryAll

public org.eclipse.dstore.core.model.DataElement handleQueryAll(org.eclipse.dstore.core.model.DataElement subject,
                                                                org.eclipse.dstore.core.model.DataElement attributes,
                                                                org.eclipse.dstore.core.model.DataElement status,
                                                                String queryType,
                                                                boolean caseSensitive)
                                                         throws SystemMessageException
Method to list the files and folders for a given filter.

Throws:
SystemMessageException

internalQueryAll

protected void internalQueryAll(org.eclipse.dstore.core.model.DataElement subject,
                                File fileobj,
                                String queryType,
                                String filter,
                                boolean caseSensitive,
                                int inclusion,
                                org.eclipse.dstore.core.model.DataElement status)

handleQueryFiles

public org.eclipse.dstore.core.model.DataElement handleQueryFiles(org.eclipse.dstore.core.model.DataElement subject,
                                                                  org.eclipse.dstore.core.model.DataElement attributes,
                                                                  org.eclipse.dstore.core.model.DataElement status,
                                                                  String queryType,
                                                                  boolean caseSensitive)
                                                           throws SystemMessageException
Method to list the files for a given filter.

Throws:
SystemMessageException

handleQueryFolders

public org.eclipse.dstore.core.model.DataElement handleQueryFolders(org.eclipse.dstore.core.model.DataElement subject,
                                                                    org.eclipse.dstore.core.model.DataElement attributes,
                                                                    org.eclipse.dstore.core.model.DataElement status,
                                                                    String queryType,
                                                                    boolean caseSensitive)
                                                             throws SystemMessageException
Method to list the folders for a given filter.

Throws:
SystemMessageException

handleQueryRoots

public org.eclipse.dstore.core.model.DataElement handleQueryRoots(org.eclipse.dstore.core.model.DataElement subject,
                                                                  org.eclipse.dstore.core.model.DataElement status)
                                                           throws SystemMessageException
Method to list the roots.

Throws:
SystemMessageException

handleDelete

public org.eclipse.dstore.core.model.DataElement handleDelete(org.eclipse.dstore.core.model.DataElement subject,
                                                              org.eclipse.dstore.core.model.DataElement status,
                                                              boolean refreshDataStore)
Method to Delete a file or folder.


handleRename

public org.eclipse.dstore.core.model.DataElement handleRename(org.eclipse.dstore.core.model.DataElement subject,
                                                              org.eclipse.dstore.core.model.DataElement status)
Method to Rename a file or folder.


handleCreateFile

public org.eclipse.dstore.core.model.DataElement handleCreateFile(org.eclipse.dstore.core.model.DataElement subject,
                                                                  org.eclipse.dstore.core.model.DataElement status,
                                                                  String queryType)
Method to create a new file.


handleCreateFolder

public org.eclipse.dstore.core.model.DataElement handleCreateFolder(org.eclipse.dstore.core.model.DataElement subject,
                                                                    org.eclipse.dstore.core.model.DataElement status,
                                                                    String queryType)
Method to create a new folder.


handleSetReadOnly

public org.eclipse.dstore.core.model.DataElement handleSetReadOnly(org.eclipse.dstore.core.model.DataElement subject,
                                                                   org.eclipse.dstore.core.model.DataElement status)
Method to set ReadOnly to a file or folder.


handleSetLastModified

public org.eclipse.dstore.core.model.DataElement handleSetLastModified(org.eclipse.dstore.core.model.DataElement subject,
                                                                       org.eclipse.dstore.core.model.DataElement status)
Method to set LastModified to a file or folder.


handleQueryBasicProperty

protected org.eclipse.dstore.core.model.DataElement handleQueryBasicProperty(org.eclipse.dstore.core.model.DataElement subject,
                                                                             org.eclipse.dstore.core.model.DataElement status)
                                                                      throws SystemMessageException
Method to Retrieve properties of the file or folder.

Throws:
SystemMessageException

handleQuerycanWriteProperty

protected org.eclipse.dstore.core.model.DataElement handleQuerycanWriteProperty(org.eclipse.dstore.core.model.DataElement subject,
                                                                                org.eclipse.dstore.core.model.DataElement status)
Method to Retrieve canWrite property of the file or folder.


handleQueryAdvanceProperty

protected org.eclipse.dstore.core.model.DataElement handleQueryAdvanceProperty(org.eclipse.dstore.core.model.DataElement subject,
                                                                               org.eclipse.dstore.core.model.DataElement status)
Method to query advance properties.


handleQueryExists

protected org.eclipse.dstore.core.model.DataElement handleQueryExists(org.eclipse.dstore.core.model.DataElement subject,
                                                                      org.eclipse.dstore.core.model.DataElement status,
                                                                      String queryType)
                                                               throws SystemMessageException
Method to query existence of the file or folder.

Throws:
SystemMessageException

handleQueryGetRemoteObject

public org.eclipse.dstore.core.model.DataElement handleQueryGetRemoteObject(org.eclipse.dstore.core.model.DataElement subject,
                                                                            org.eclipse.dstore.core.model.DataElement status,
                                                                            String queryType)
                                                                     throws SystemMessageException
Method to get remote object

Throws:
SystemMessageException

getFileElement

protected org.eclipse.dstore.core.model.DataElement getFileElement(org.eclipse.dstore.core.model.DataElement subject,
                                                                   File file)

getClassificationString

protected String getClassificationString(String s)
Method to obtain the classification string of file or folder.


getFilterString

protected String getFilterString(String s)
Method to obtain the filter string of file or folder.


getShowHiddenFlag

protected boolean getShowHiddenFlag(String s)
Method to obtain the show Hidden flag for file or folder.


getDepth

protected int getDepth(String s)
Method to obtain the depth for a search


handleDownload

protected org.eclipse.dstore.core.model.DataElement handleDownload(org.eclipse.dstore.core.model.DataElement theElement,
                                                                   org.eclipse.dstore.core.model.DataElement status)
Method to download a file.


handleQueryEncoding

protected org.eclipse.dstore.core.model.DataElement handleQueryEncoding(org.eclipse.dstore.core.model.DataElement subject,
                                                                        org.eclipse.dstore.core.model.DataElement status)
Get the system encoding


handleQueryUnusedPort

protected org.eclipse.dstore.core.model.DataElement handleQueryUnusedPort(org.eclipse.dstore.core.model.DataElement subject,
                                                                          org.eclipse.dstore.core.model.DataElement status)
Get an unused port number.


statusDone

public org.eclipse.dstore.core.model.DataElement statusDone(org.eclipse.dstore.core.model.DataElement status)
Complete status.


statusCancelled

public org.eclipse.dstore.core.model.DataElement statusCancelled(org.eclipse.dstore.core.model.DataElement status)
Cancel status.


load

public void load()
Overrides:
load in class org.eclipse.dstore.core.miners.Miner
See Also:
Miner.load()

finish

public void finish()
Overrides:
finish in class org.eclipse.dstore.core.miners.Miner

handleQueryClassName

protected org.eclipse.dstore.core.model.DataElement handleQueryClassName(org.eclipse.dstore.core.model.DataElement subject,
                                                                         org.eclipse.dstore.core.model.DataElement status)
Retrieve the fully qualified class name (including package) for the specified .class file. This information is required by the distributed debugger.


handleQueryQualifiedClassName

protected org.eclipse.dstore.core.model.DataElement handleQueryQualifiedClassName(org.eclipse.dstore.core.model.DataElement subject,
                                                                                  org.eclipse.dstore.core.model.DataElement status)
Retrieve the fully qualified class name (including package) for a class file.


handleGetOSType

public org.eclipse.dstore.core.model.DataElement handleGetOSType(org.eclipse.dstore.core.model.DataElement subject,
                                                                 org.eclipse.dstore.core.model.DataElement status)
Method to retrieve the OS that the miner is running.


getInputStreamForFile

protected InputStream getInputStreamForFile(String filename)
                                     throws IOException
Throws:
IOException

extendSchema

public void extendSchema(org.eclipse.dstore.core.model.DataElement schemaRoot)
See Also:
ISchemaExtender.extendSchema(DataElement)

getAbsoluteVirtualPath

public AbsoluteVirtualPath getAbsoluteVirtualPath(org.eclipse.dstore.core.model.DataElement subject)
Since:
3.0 made private method public

getAbsoluteVirtualPath

public AbsoluteVirtualPath getAbsoluteVirtualPath(String path)

handleQueryAllArchive

public org.eclipse.dstore.core.model.DataElement handleQueryAllArchive(org.eclipse.dstore.core.model.DataElement subject,
                                                                       org.eclipse.dstore.core.model.DataElement attributes,
                                                                       org.eclipse.dstore.core.model.DataElement status,
                                                                       boolean caseSensitive,
                                                                       boolean foldersOnly)

getArchiveHandlerFor

public ISystemArchiveHandler getArchiveHandlerFor(String archivePath)
                                           throws SystemMessageException
Throws:
SystemMessageException

handleCopy

public org.eclipse.dstore.core.model.DataElement handleCopy(org.eclipse.dstore.core.model.DataElement targetFolder,
                                                            org.eclipse.dstore.core.model.DataElement sourceFile,
                                                            org.eclipse.dstore.core.model.DataElement nameObj,
                                                            org.eclipse.dstore.core.model.DataElement status)

setProperties

public String setProperties(File fileObj,
                            boolean doArchiveProperties)
                     throws SystemMessageException
Method to obtain the properties of file or folder.

Throws:
SystemMessageException

setProperties

public String setProperties(VirtualChild fileObj)

setProperties

public String setProperties(File fileObj)
                     throws SystemMessageException
Throws:
SystemMessageException

getVersion

public String getVersion()
Specified by:
getVersion in class org.eclipse.dstore.core.miners.Miner

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.