| java.lang.Object org.openharmonise.vfs.AbstractVirtualFileSystem
All known Subclasses: org.openharmonise.vfs.AbstractVersioningVFS, org.openharmonise.localfilesystem.LocalFileSystem, org.openharmonise.ftp.client.FTPFileSystem,
AbstractVirtualFileSystem | abstract public class AbstractVirtualFileSystem (Code) | | This is the abstract class from which all Virtual File Systems
implementations should extend.
author: Matthew Large version: $Revision: 1.1 $ |
Method Summary | |
public void | addErrorListener(VirtualFileSystemErrorListener listener) | protected void | addFileAllowedMethod(VirtualFile vfFile, String sMethod) | abstract public ResourceStatusWrapper | addVirtualFile(String sPath, VirtualFile vfFile) | protected void | clearAllFileProperties(VirtualFile vfFile) | protected void | clearFileAllowedMethods(VirtualFile vfFile) | protected void | clearVirtualFileChildren(VirtualFile vfFile) | abstract public StatusData | copyVirtualFile(String sFromFullPath, String sToFullPath) | abstract public StatusData | createShortcut(String sFullPath, String sToFullPath) | abstract public StatusData | createVirtualDirectory(String sFullPath) | abstract public String | currentUserResourcePath(AuthInfo authInfo) | abstract public StatusData | deleteVirtualFile(String sFullPath) | public void | discardFileChanges(String sPath) | abstract public boolean | exists(String sFullPath) | protected void | fireErrorEvent(String sMessage, String sDetails) | abstract protected void | fullyPopulateFileAllowedMethods(VirtualFile vfFile) | abstract protected void | fullyPopulateFileChildren(VirtualFile vfFile) | abstract protected void | fullyPopulateFileMetadata(VirtualFile vfFile) | public AuthInfo | getAuthentication() Returns authentication information for the current user for this file system. | abstract public List | getChangedVirtualFiles() | public String | getInitialPath() Returns the initial path for the virtual file system, e.g. | abstract public ValueInstance | getNewValueInstance(PropertyInstance propInst) | abstract public List | getOptions() | protected String | getParentPath(String sFullPath) | public static List | getPathSegments(String sPath, String sPathSeparator) Utility method to return a List object of path segements
for a given path
Parameters: sPath - Path to split into segments Parameters: sPathSeparator - The separator for the path, e.g. | abstract public VirtualFile | getPropertyVirtualFile(String sPropPath) | public String | getRootPathSegment() Returns the root path segment for the virtual file system, e.g. | public URI | getURI() | abstract public ResourceStatusWrapper | getVirtualFile(String sFullPath) | abstract public byte[] | getVirtualFileContent(String sFullPath) | abstract public VirtualFileSystemView | getVirtualFileSystemView() Access to handler for GUI elements that view the file system, e.g. | protected boolean | isFileChildrenPopulated(VirtualFile vfFile) | protected boolean | isFileContentPopulated(VirtualFile vfFile) This method allows access to the VirtualFile
VirtualFile.isContentPopulated method. | protected boolean | isFileMetadataPopulated(VirtualFile vfFile) | abstract public StatusData | lockVirtualFile(String sFullPath) | abstract public StatusData | moveVirtualFile(String sFromFullPath, String sToFullPath) | abstract public StatusData | orderVirtualFileChildren(List aPaths, VirtualFile vfDir) | abstract protected void | refreshChildren(VirtualFile vfFile) | abstract public boolean | rejectAllChanges() Rejects all the changes to virtual files in the cache. | abstract public ResourceListStatusWrapper | search(Query query) | protected void | setFileChildrenPopulated(VirtualFile vfFile, boolean bChildrenPopulated) | protected void | setFileContentPopulated(VirtualFile vfFile, boolean bContentPopulated) | protected void | setFileIsVersionable(VirtualFile vfFile, boolean bVersionable) | protected void | setFileMetadataPopulated(VirtualFile vfFile, boolean bMetadataPopulated) | protected void | setFileState(VirtualFile vfFile, String sState) | protected void | setOrderableDirectory(VirtualFile vfFile, boolean bOrderableDirectory) | abstract public StatusData | synchroniseAllFiles() | abstract public StatusData | synchroniseFile(VirtualFile vfFile) | abstract public StatusData | unlockVirtualFile(String sFullPath) |
m_sInitialPath | protected String m_sInitialPath(Code) | | The initial path for the underlying file system, e.g. for 'http://localhost/temp/root' this would be '/temp/root/'.
|
m_sRootPathSegment | protected String m_sRootPathSegment(Code) | | The root path segment for the underlying file system, e.g. for 'http://localhost/temp/root' this would be 'root'.
|
AbstractVirtualFileSystem | public AbstractVirtualFileSystem(URI uri)(Code) | | Parameters: uri - URI to location file system to be connected to |
AbstractVirtualFileSystem | public AbstractVirtualFileSystem(URI uri, AuthInfo authInfo)(Code) | | Parameters: uri - URI to location file system to be connected to Parameters: authInfo - Authentication information |
AbstractVirtualFileSystem | public AbstractVirtualFileSystem(URI uri, AbstractAuthenticationStore authStore)(Code) | | Parameters: uri - URI to location file system to be connected to Parameters: authStore - Authentication Store from which to lookup authentication information |
addErrorListener | public void addErrorListener(VirtualFileSystemErrorListener listener)(Code) | | Adds an error listener to the virtual file system
Parameters: error - listener to be added |
addVirtualFile | abstract public ResourceStatusWrapper addVirtualFile(String sPath, VirtualFile vfFile)(Code) | | Adds a new virtual file to the virtual file system
Parameters: sPath - Full path for the new virtual file file Parameters: vfFile - Virtual file to be added to the virtual file system The virtual file that was added to the virtual file system |
clearVirtualFileChildren | protected void clearVirtualFileChildren(VirtualFile vfFile)(Code) | | Clears the children of a collection
Parameters: vfFile - Collection to have its children cleared |
copyVirtualFile | abstract public StatusData copyVirtualFile(String sFromFullPath, String sToFullPath)(Code) | | Copies a Virtual File specified by the first path to the second path
Parameters: sFromFullPath - Path of file to copy Parameters: sToFullPath - Path to copy file to true if the method was successful |
createShortcut | abstract public StatusData createShortcut(String sFullPath, String sToFullPath)(Code) | | Creates a shortcut to a Virtual File
Parameters: sFullPath - Path of shortcut to be created Parameters: sToFullPath - Path of file that the shortcut is to true if the method was successful |
createVirtualDirectory | abstract public StatusData createVirtualDirectory(String sFullPath)(Code) | | Creates a new Virtual Directory
Parameters: sFullPath - Path of directory to be created true if the method was successful |
currentUserResourcePath | abstract public String currentUserResourcePath(AuthInfo authInfo)(Code) | | Returns a path to the principal's virtual file for the user in the
AuthInfo object
Parameters: authInfo - Authentication information to use to find the user Path to the principal's virtual file |
deleteVirtualFile | abstract public StatusData deleteVirtualFile(String sFullPath)(Code) | | Deletes a Virtual File
Parameters: sFullPath - Path of file to delete true if the method was successful |
discardFileChanges | public void discardFileChanges(String sPath)(Code) | | This method allows access to the VirtualFile
VirtualFile.discardChanges method
Parameters: vfFile - Path of the virtual file to check |
exists | abstract public boolean exists(String sFullPath)(Code) | | Checks if the given path actually exists within this virtual file
system
Parameters: sFullPath - Path to check true if the path exists within this virtual file system |
fireErrorEvent | protected void fireErrorEvent(String sMessage, String sDetails)(Code) | | Creates and fires an error event to all the error listeners that
have been added to this virtual file system
Parameters: sMessage - Message for the error event Parameters: sDetails - Details of the error event |
fullyPopulateFileAllowedMethods | abstract protected void fullyPopulateFileAllowedMethods(VirtualFile vfFile)(Code) | | Populates the allowed method list for a given virtual file
Parameters: vfFile - Virtual file to have its allowed methods populated |
fullyPopulateFileChildren | abstract protected void fullyPopulateFileChildren(VirtualFile vfFile)(Code) | | Populates the complete list of children for a collection, use if
only the collection itself was fetched and not its children
Parameters: vfFile - Collection to have its children fully populated |
fullyPopulateFileMetadata | abstract protected void fullyPopulateFileMetadata(VirtualFile vfFile)(Code) | | Populates all the metadata for a given virtual file, use if a
virtual file was only partially populated for instance on its
initial fetch
Parameters: vfFile - Virtual file to have its metadata fully populated |
getAuthentication | public AuthInfo getAuthentication()(Code) | | Returns authentication information for the current user for this file system.
Authentication information, null if no authentication information can be found |
getChangedVirtualFiles | abstract public List getChangedVirtualFiles()(Code) | | |
getInitialPath | public String getInitialPath()(Code) | | Returns the initial path for the virtual file system, e.g.
if the uri for the virtual file system was http://localhost/temp/root
the returned path would be '/temp/root'
Initial path |
getOptions | abstract public List getOptions()(Code) | | Returns the methods that are supported by an implementation
Comma separated list of methods that are supported by an implementation |
getParentPath | protected String getParentPath(String sFullPath)(Code) | | Utility method to work out the parent path of passed in path
Parameters: sFullPath - |
getPathSegments | public static List getPathSegments(String sPath, String sPathSeparator)(Code) | | Utility method to return a List object of path segements
for a given path
Parameters: sPath - Path to split into segments Parameters: sPathSeparator - The separator for the path, e.g. '/' List of path segment Strings |
getRootPathSegment | public String getRootPathSegment()(Code) | | Returns the root path segment for the virtual file system, e.g.
if the uri for the virtual file system was http://localhost/temp/root
the returned path would be 'root'
|
getURI | public URI getURI()(Code) | | Returns the URI of the file system connected to
URI of the file system |
getVirtualFile | abstract public ResourceStatusWrapper getVirtualFile(String sFullPath)(Code) | | This method will return either the Virtual File that was requested by the path
or a new blank file initialised to that path
Parameters: sFullPath - Full path to the requested file VirtualFile |
getVirtualFileContent | abstract public byte[] getVirtualFileContent(String sFullPath)(Code) | | Return the content a path in a byte array
Parameters: sFullPath - Path to get content for byte array of content for the path |
getVirtualFileSystemView | abstract public VirtualFileSystemView getVirtualFileSystemView()(Code) | | Access to handler for GUI elements that view the file system, e.g. file icons,
display names etc
View of file system |
isFileChildrenPopulated | protected boolean isFileChildrenPopulated(VirtualFile vfFile)(Code) | | This method allows access to the VirtualFile
VirtualFile.isChildrenPopulated method
Parameters: vfFile - Virtual file to check true if the file's children are fully populated |
isFileContentPopulated | protected boolean isFileContentPopulated(VirtualFile vfFile)(Code) | | This method allows access to the VirtualFile
VirtualFile.isContentPopulated method.
Parameters: vfFile - Virtual file to check true if the file's content is fully populated |
isFileMetadataPopulated | protected boolean isFileMetadataPopulated(VirtualFile vfFile)(Code) | | This method allows access to the VirtualFile
VirtualFile.isMetadataPopulated method
Parameters: vfFile - Virtual file to check true if the file's metadata is fully populated |
lockVirtualFile | abstract public StatusData lockVirtualFile(String sFullPath)(Code) | | Locks a Virtual File
Parameters: sFullPath - Path of file to lock true if the method was successful |
moveVirtualFile | abstract public StatusData moveVirtualFile(String sFromFullPath, String sToFullPath)(Code) | | Moves a Virtual File specified by the first path to the second path
Parameters: sFromFullPath - Path of file to move Parameters: sToFullPath - Path to move file to true if the method was successful |
orderVirtualFileChildren | abstract public StatusData orderVirtualFileChildren(List aPaths, VirtualFile vfDir)(Code) | | Sets the order of the children of a collection
Parameters: aPaths - Ordered list of paths of the children of a collection Parameters: vfDir - Collection to have its children ordered true if the method was successful |
refreshChildren | abstract protected void refreshChildren(VirtualFile vfFile)(Code) | | Refreshes the children of a given collection, any children that do
not have current changes will be cleared from the cache and
property definitions for all children will be updated if required
Parameters: vfFile - Collection to have its children refreshed |
rejectAllChanges | abstract public boolean rejectAllChanges()(Code) | | Rejects all the changes to virtual files in the cache. These
virtual files will be removed from the cache to be replaced with
the current versions the next time they are requested using the
AbstractVirtualFileSystem.getVirtualFile(String) method
true if the method was successful |
search | abstract public ResourceListStatusWrapper search(Query query)(Code) | | Performs a search of the file system using a given query, returning a List of
Virtual File objects
Parameters: query - Query to use as conditions on the search List of Virtual File objects, empty List is none where found |
setFileChildrenPopulated | protected void setFileChildrenPopulated(VirtualFile vfFile, boolean bChildrenPopulated)(Code) | | This method allows access to the VirtualFile
VirtualFile.setChildrenPopulated(boolean) method
Parameters: vfFile - Virtual file to check Parameters: bChildrenPopulated - Set to true to set that the file's children are fully populated |
setFileContentPopulated | protected void setFileContentPopulated(VirtualFile vfFile, boolean bContentPopulated)(Code) | | This method allows access to the VirtualFile
VirtualFile.setContentPopulated(boolean) method
Parameters: vfFile - Virtual file to check Parameters: bContentPopulated - Set to true to set that the file's content is fully populated |
setFileIsVersionable | protected void setFileIsVersionable(VirtualFile vfFile, boolean bVersionable)(Code) | | This method allows access to the VirtualFile
VirtualFile.setVersionable(boolean) method
Parameters: vfFile - Virtual file to check Parameters: bVersionable - Set to true to set that the file is versionable |
setFileMetadataPopulated | protected void setFileMetadataPopulated(VirtualFile vfFile, boolean bMetadataPopulated)(Code) | | This method allows access to the VirtualFile
VirtualFile.setMetadataPopulated(boolean) method
Parameters: vfFile - Virtual file to check Parameters: bMetadataPopulated - Set to true to set that the file's metadata is fully populated |
setFileState | protected void setFileState(VirtualFile vfFile, String sState)(Code) | | This method allows access to the VirtualFile
VirtualFile.setState(String) method
Parameters: vfFile - Virtual file to check Parameters: sState - Stage to set on the virtual file |
setOrderableDirectory | protected void setOrderableDirectory(VirtualFile vfFile, boolean bOrderableDirectory)(Code) | | This method allows access to the VirtualFile
VirtualFile.setOrderableDirectory(boolean) method
for a collection
Parameters: vfFile - Path of the virtual file to check Parameters: bOrderableDirectory - True to set that the collection is orderable |
synchroniseAllFiles | abstract public StatusData synchroniseAllFiles()(Code) | | Submits all the changed virtual files in the cache back to the
virtual file system, the changes might be in the content or the
metadata
true if the method was successful |
synchroniseFile | abstract public StatusData synchroniseFile(VirtualFile vfFile)(Code) | | Submits a changed virtual file back to the virtual file system,
the changes might be in the content or the metadata
Parameters: vfFile - Virtual file to have its changes submitted true if the method was successful |
unlockVirtualFile | abstract public StatusData unlockVirtualFile(String sFullPath)(Code) | | Unlocks a Virtual File
Parameters: sFullPath - Path of file to unlock true if the method was successful |
|
|