org.olat.core.util.vfs
Interface VFSItem

All Known Subinterfaces:
VFSContainer, VFSLeaf
All Known Implementing Classes:
AbstractVirtualContainer, LocalFileImpl, LocalFolderImpl, LocalImpl, MergeSource, NamedContainerImpl, NamedLeaf, OlatNamedContainerImpl, OlatRootFileImpl, OlatRootFolderImpl, StreamedImpl, VirtualContainer

public interface VFSItem

Description:
TODO: Felix Jost Class Description for VFSItem

Initial Date: 23.06.2005

Author:
Felix Jost

Method Summary
 VFSStatus canCopy()
           
 VFSStatus canDelete()
           
 VFSStatus canRename()
           
 VFSStatus canWrite()
           
 VFSStatus delete()
          deltes the item.
 long getLastModified()
          Return the last modified date of this item or -1 if not available.
 VFSSecurityCallback getLocalSecurityCallback()
          Get the local security callback for this item.
 java.lang.String getName()
           
 VFSContainer getParentContainer()
          Get the parent of this vfsItem.
 boolean isSame(VFSItem vfsItem)
          Test if this is the same item as ourselves.
 VFSStatus rename(java.lang.String newname)
           
 VFSItem resolve(java.lang.String path)
          a relative path.
 void setLocalSecurityCallback(VFSSecurityCallback secCallback)
          Set a custom security callback for this item.
 void setParentContainer(VFSContainer parentContainer)
          Sets the parent container.
 

Method Detail

resolve

VFSItem resolve(java.lang.String path)
a relative path. the implementation will search all its children. e.g. bla/blu/bli.txt this vfsitem's name must thus be 'bla'

Parameters:
path -
Returns:

getParentContainer

VFSContainer getParentContainer()
Get the parent of this vfsItem.

Returns:

setParentContainer

void setParentContainer(VFSContainer parentContainer)
Sets the parent container. -> DO NOT CALL THIS METHOD... USED ONLY INTERNALLY!

Parameters:
parentContainer -

rename

VFSStatus rename(java.lang.String newname)
Parameters:
newname - e.g test.txt or myfolder (no path prepended)
Returns:
status

delete

VFSStatus delete()
deltes the item. if the item is a container, all children will be deleted recursively

Returns:
status

canRename

VFSStatus canRename()
Returns:
if can write

canDelete

VFSStatus canDelete()
Returns:
if can delete

getName

java.lang.String getName()
Returns:
the name

getLastModified

long getLastModified()
Return the last modified date of this item or -1 if not available.

Returns:

canCopy

VFSStatus canCopy()
Returns:
true if this container (and all its children recursively) can be copied to some other place. this is normally true for containers with a physical implementation, but not for virtual/named containers

canWrite

VFSStatus canWrite()
Returns:
true if a child can be added at all(only files and folder cab be copied to). the operation may still fail because e.g. of quota limitation.

getLocalSecurityCallback

VFSSecurityCallback getLocalSecurityCallback()
Get the local security callback for this item. NOTE: Usually you would not need to access local security callbacks directly. You'd rather want to get the inherited security callback of this item via getInheritedSecurityCallback. This will get you the local security callback if set aswell but also any inherited security callbacks from parent containers.

Returns:
SecurityCallback if any, or null if not set.
See Also:
VFSItem#getInheritedSecurityCallback()

setLocalSecurityCallback

void setLocalSecurityCallback(VFSSecurityCallback secCallback)
Set a custom security callback for this item.

Parameters:
secCallback -

isSame

boolean isSame(VFSItem vfsItem)
Test if this is the same item as ourselves.

Parameters:
vfsItem -
Returns: