|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.uva.vlet.vrs.VNode
nl.uva.vlet.vfs.VFSNode
public abstract class VFSNode
Super class of the all VFS Nodes.
Represents shared methods for (Virtual) Directories and Files.
VDir
,
VFile
Field Summary | |
---|---|
static java.lang.String |
ATTR_ACCESS_TIME
|
static java.lang.String |
ATTR_CREATION_TIME
Creation time in millis since Epoch (01-01-1970) |
static java.lang.String |
ATTR_DATA_TYPE
SRB Data Type attribute |
static java.lang.Object |
ATTR_DIRNAME
Ambiguos 'dirname' can be both parent directory of file or directory name itself |
static java.lang.String |
ATTR_EXISTS
|
static java.lang.String |
ATTR_GID
|
static java.lang.String |
ATTR_GROUP
|
static java.lang.String |
ATTR_ISDIR
|
static java.lang.String |
ATTR_ISFILE
|
static java.lang.String |
ATTR_ISHIDDEN
|
static java.lang.String |
ATTR_ISREADABLE
|
static java.lang.String |
ATTR_ISSOFTLINK
|
static java.lang.String |
ATTR_ISWRITABLE
|
static java.lang.String |
ATTR_LENGTH
|
static java.lang.String |
ATTR_LINKTARGET
|
static java.lang.String |
ATTR_MODIFICATION_TIME
Modification time in millis since Epoch (01-01-1970) |
static java.lang.String |
ATTR_NRACLENTRIES
|
static java.lang.String |
ATTR_NRCHILDS
|
static java.lang.String |
ATTR_OWNER
|
static java.lang.String |
ATTR_PARENT_DIRNAME
Unambigous Parent directory attribute for both files and directores |
static java.lang.String |
ATTR_PERMISSIONS_STRING
|
static java.lang.String |
ATTR_RESOURCE
SRB attribute,but moved up level for visibility ! |
static java.lang.String |
ATTR_UID
|
static java.lang.String |
ATTR_UNIQUE
|
static java.lang.String[] |
attributeNames
Default attributes names for all VFSNodes |
static int |
defaultStreamBufferSize
Default buffer for streamCopy to use |
Fields inherited from class nl.uva.vlet.vrs.VNode |
---|
ATTR_CHARSET, ATTR_HOSTNAME, ATTR_ICON, ATTR_ISVLINK, ATTR_LOCATION, ATTR_MIMETYPE, ATTR_NAME, ATTR_PATH, ATTR_PORT, ATTR_SCHEME, ATTR_TYPE, location, vrsContext |
Fields inherited from interface nl.uva.vlet.vfs.VACL |
---|
GROUP_ENTITY, PERM_ACCESSABLE, PERM_EXECUTABLE, PERM_READABLE, PERM_WRITABLE, USER_ENTITY, WORLD_ENTITY |
Constructor Summary | |
---|---|
VFSNode(VRSContext context,
VRL vrl)
|
Method Summary | |
---|---|
VFSTransfer |
asyncCopyMoveTo(VDir dest,
java.lang.String optNewName,
boolean isMove)
Asynchronous transfer method to iniate a copy or a move. |
abstract VFSNode |
copyTo(VDir dest)
|
abstract VFSNode |
copyTo(VDir dest,
java.lang.String newName)
|
boolean |
create()
Create this Resource. |
VAttribute[] |
createACLRecord(VAttribute entity,
boolean writeThrough)
Create a new ACL Record for the given ACL Entry, that is, a new row in the ACL[][] matrix returned in getACL(). |
protected static VFSTransfer |
createTransfer(VNode source,
VDir dest,
java.lang.String optNewName,
boolean isMove)
|
protected VFSTransfer |
createTransferTo(VDir dest,
java.lang.String optNewName,
boolean isMove)
|
boolean |
deleteACLEntity(VAttribute entity)
Delete entry in the ACL list or set permissions to none |
abstract boolean |
exists()
Returns true if the VRL points to an existing object. |
VAttribute[][] |
getACL()
Experimental ACL method: Default return simplist ACL of all. |
VAttribute[] |
getACLEntities()
Returns all possible ACL entities (users,groups, etc); |
VAttribute |
getAttribute(java.lang.String name)
Returns single atttribute triplet |
java.lang.String[] |
getAttributeNames()
Returns all default attributes names |
java.lang.String |
getLinkTarget()
Optional method to resolve (soft) links if this VFS Implementation supports it. |
VRL |
getLinkTargetVRL()
Return LinkTarget is VRL |
abstract long |
getModificationTime()
Return time of last modification in milli seconds after 'epoch' epoch = (1-jan-1970 GMT). |
VDir |
getParent()
VFSnode implements getParent by calling VFSNode.getParentDir |
VNode[] |
getParents()
Returns array whith one parent. |
VFSNode |
getPath(java.lang.String path)
Fetch any VFSNode (VFile or VDir) with the specified absolute path |
java.lang.String |
getPermissionsString()
Return unix-style permissions string |
VDir |
getRoot()
Returns root directory of this directory/file system |
VFSTransfer |
getTranferInfo()
Returns TransferInfo Object of ongoing or finished transfer. |
boolean |
isDeletable()
returns true is the caller has the permissions to delete this resource The default implementation for a VFSNode is to check whether it is writable |
abstract boolean |
isDir()
Returns true if the node is a Directory |
boolean |
isEditable()
returns true is the caller has the permissions to edit this resource. |
abstract boolean |
isFile()
Returns true if the node is a file. |
boolean |
isHidden()
Optional method for filesystems who support hidden files. |
boolean |
isLink()
Optional method for filesystems who support soft links. |
boolean |
isLocal()
Whether the location points to a local available path ! To get the actual local path, do a getPath(). |
boolean |
isRandomAccessable()
RandomAccessable methods: |
abstract boolean |
isReadable()
Returns whether the object is readable using current user credentials. |
boolean |
isRenamable()
Returns true is the resource is renamble whit the current credentials. |
abstract boolean |
isWritable()
Returns whether the object is writable using current user credentials. |
abstract VFSNode |
moveTo(VDir dest)
|
abstract VFSNode |
moveTo(VDir dest,
java.lang.String newName)
|
static VFSNode[] |
returnAsArray(java.util.Vector<VFSNode> nodes)
|
void |
setACL(VAttribute[][] acl)
Set the modified ACL list |
boolean |
setAttribute(VAttribute attr)
Set atribute. |
boolean |
setAttributes(VAttribute[] attrs)
Sets a list of attributes |
VFSNode |
startCopyMoveTo(VDir dest,
java.lang.String optNewName,
boolean isMove)
|
protected VFSNode |
startCopyMoveTo(VFSTransfer transfer,
VDir dest,
java.lang.String optNewName,
boolean isMove)
Initiate a Copy or Move with the specified Transfer Information object. |
Methods inherited from class nl.uva.vlet.vrs.VNode |
---|
compareTo, getAttributes, getAttributes, getAttributeSet, getBasename, getCharSet, getHelp, getHostname, getIconURL, getID, getLocation, getMimeType, getName, getPath, getPort, getScheme, getServerAttributes, getType, getURI, getVRL, getVRSContext, isComposite, isVirtual, isVLink, mergedGetAttributes, setLocation, setVRL, toLinkNode, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface nl.uva.vlet.vrs.VRenamable |
---|
renameTo |
Methods inherited from interface nl.uva.vlet.vrs.VEditable |
---|
delete |
Field Detail |
---|
public static final java.lang.String ATTR_EXISTS
public static final java.lang.String ATTR_ISREADABLE
public static final java.lang.String ATTR_ISWRITABLE
public static final java.lang.String ATTR_ISHIDDEN
public static final java.lang.String ATTR_ISSOFTLINK
public static final java.lang.String ATTR_LINKTARGET
public static final java.lang.String ATTR_ISFILE
public static final java.lang.String ATTR_ISDIR
public static final java.lang.String ATTR_NRCHILDS
public static final java.lang.String ATTR_LENGTH
public static final java.lang.String ATTR_ACCESS_TIME
public static final java.lang.String ATTR_MODIFICATION_TIME
public static final java.lang.String ATTR_CREATION_TIME
public static final java.lang.String ATTR_PERMISSIONS_STRING
public static final java.lang.String ATTR_PARENT_DIRNAME
public static final java.lang.Object ATTR_DIRNAME
public static final java.lang.String ATTR_OWNER
public static final java.lang.String ATTR_GROUP
public static final java.lang.String ATTR_UNIQUE
public static final java.lang.String ATTR_UID
public static final java.lang.String ATTR_GID
public static final java.lang.String ATTR_NRACLENTRIES
public static final java.lang.String ATTR_RESOURCE
public static final java.lang.String ATTR_DATA_TYPE
public static final java.lang.String[] attributeNames
public static int defaultStreamBufferSize
Constructor Detail |
---|
public VFSNode(VRSContext context, VRL vrl)
Method Detail |
---|
public boolean create() throws VlException
VlException
public VDir getRoot() throws VlException
VlException
public VFSNode getPath(java.lang.String path) throws VlException
VlException
public boolean isHidden()
public boolean isLink() throws VlException
VlException
public java.lang.String getLinkTarget() throws VlException
VlException
public VRL getLinkTargetVRL() throws VlException
VlException
public boolean isLocal()
public java.lang.String[] getAttributeNames()
getAttributeNames
in class VNode
public VAttribute getAttribute(java.lang.String name) throws VlException
getAttribute
in class VNode
VlException
public java.lang.String getPermissionsString() throws VlException
VlException
public VDir getParent() throws VlException
getParent
in class VNode
VlException
VNode.getParents()
public VNode[] getParents() throws VlException
getParents
in class VNode
VlException
public boolean isRandomAccessable()
public boolean isEditable() throws VlException
VEditable
isEditable
in interface VEditable
VlException
public boolean isDeletable() throws VlException
VEditable
isDeletable
in interface VEditable
VlException
public boolean setAttributes(VAttribute[] attrs) throws VlException
VEditable
setAttributes
in interface VEditable
VlException
public boolean setAttribute(VAttribute attr) throws VlException
SubClass.setAttribute(VAtribute attr) { if (super.setAttribute(attr)==true) return true; if (isMyAttribute(attr)) return setMyAttribute(attr); else return false; }
setAttribute
in interface VEditable
VlException
public boolean isRenamable() throws VlException
VRenamable
isRenamable
in interface VRenamable
VlException
VFSNode.isRenamable();
public static VFSNode[] returnAsArray(java.util.Vector<VFSNode> nodes)
public abstract VFSNode copyTo(VDir dest) throws VlException
VlException
public abstract VFSNode copyTo(VDir dest, java.lang.String newName) throws VlException
VlException
public abstract VFSNode moveTo(VDir dest) throws VlException
VlException
public abstract VFSNode moveTo(VDir dest, java.lang.String newName) throws VlException
VlException
public abstract boolean isFile()
VFile
public abstract boolean isDir()
VDir
public abstract boolean exists() throws VlException
exists
in class VNode
VlException
public abstract long getModificationTime() throws VlException
VlException
public abstract boolean isReadable() throws VlException
VlException
exists
,
isWritable
public abstract boolean isWritable() throws VlException
VlException
exists
,
isReadable
public void setACL(VAttribute[][] acl) throws VlException
VACL
setACL
in interface VACL
VlException
public VAttribute[][] getACL() throws VlException
getACL
in interface VACL
VlException
public VAttribute[] getACLEntities() throws VlIOException
getACLEntities
in interface VACL
VlIOException
public VAttribute[] createACLRecord(VAttribute entity, boolean writeThrough) throws VlException
createACLRecord
in interface VACL
writeThrough
-
NotImplementedException
VlException
public boolean deleteACLEntity(VAttribute entity) throws VlException
deleteACLEntity
in interface VACL
VlException
public final VFSTransfer asyncCopyMoveTo(VDir dest, java.lang.String optNewName, boolean isMove) throws VlException
VlException
protected VFSTransfer createTransferTo(VDir dest, java.lang.String optNewName, boolean isMove) throws VlException
VlException
protected static VFSTransfer createTransfer(VNode source, VDir dest, java.lang.String optNewName, boolean isMove) throws VlException
VlException
public final VFSNode startCopyMoveTo(VDir dest, java.lang.String optNewName, boolean isMove) throws VlException
VlException
protected final VFSNode startCopyMoveTo(VFSTransfer transfer, VDir dest, java.lang.String optNewName, boolean isMove) throws VlException
transfer
- TransferInfo object which must be updated during transferdest
- optNewName
- isMove
-
VlException
public final VFSTransfer getTranferInfo()
Note that in the current implementation the source VFile will initiate a transfer, so the source file has the TransferInfo Object. The (newly created) destination File object won't have a Trasnfer object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |