|
||||||||||
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.vrs.VCompositeNode
nl.uva.vlet.vrs.MyVLe
public class MyVLe
MyVLe is the toplevel object for all resources, like My Computer is on Windows. It's childs are configured locations and settings, etc.
Field Summary | |
---|---|
static java.lang.String |
MYVLE_TYPE
|
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 |
Method Summary | |
---|---|
LinkNode |
addNode(VNode sourceNode,
java.lang.String optNewName,
boolean isMove)
Auto linkdrops node on this resource, returned node is alway of LinkNode type. |
VNode |
createChild(java.lang.String type,
java.lang.String name,
boolean force)
VNode method to create new Child. |
boolean |
delete()
Delete specified resource. |
boolean |
delete(boolean recurse)
Recursive delete. |
boolean |
delNode(VNode node)
VRS method to delete specified resource Node |
VAttribute |
getAttribute(java.lang.String name)
This is the single method a Node has to implement so that attributes can be fetched. |
java.lang.String[] |
getAttributeNames()
Get the names of the attributes this resource has |
VNode |
getChild(int nodeNr)
|
VNode[] |
getChilds()
Returns Child Nodes. |
VRL |
getHelp()
Returns simple text file or complete HTML page. |
java.lang.String |
getName()
Returns the short name of the resource. The default is the basename of the resource or the last part of the path part in the URI. |
long |
getNrOfChilds()
Returns number of child nodes. |
java.lang.String[] |
getResourceTypes()
Returns allowed resource types which this node can have as child and/or create. |
java.lang.String |
getType()
Returns resource type, if it has one |
static VNode |
getVLeRoot(VRSContext vrsContext)
|
java.io.File[] |
getWindowsDrives()
Returns all root partitians on this system. |
boolean |
hasChild(java.lang.String name)
Checks whether this node has a child with the specified name |
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 |
boolean |
isEditable()
returns true is the caller has the permissions to edit this resource. |
boolean |
isVirtual()
MyVle is 'virtual' it is not mapped to a 'real' resource, or an resource which has an implementation. |
static VNode |
openLocation(VRSContext vrs,
VRL location)
Get "myvle:///" location. |
boolean |
setAttribute(VAttribute attr)
Set single attribute. |
boolean |
setAttributes(VAttribute[] attrs)
Sets a list of attributes |
Methods inherited from class nl.uva.vlet.vrs.VCompositeNode |
---|
addNode, addNodes, delNodes, exists, getChild, getChildAttributes, getChildAttributes, getParents, isAccessable |
Methods inherited from class nl.uva.vlet.vrs.VNode |
---|
compareTo, getAttributes, getAttributes, getAttributeSet, getBasename, getCharSet, getHostname, getIconURL, getID, getLocation, getMimeType, getParent, getPath, getPort, getScheme, getServerAttributes, getURI, getVRL, getVRSContext, isComposite, isVLink, mergedGetAttributes, setLocation, setVRL, toLinkNode, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String MYVLE_TYPE
Method Detail |
---|
public java.lang.String getName()
VNode
getName
in class VNode
public java.lang.String getType()
VNode
getType
in class VNode
public VRL getHelp()
VNode
getHelp
in class VCompositeNode
public java.lang.String[] getAttributeNames()
VNode
getAttributeNames
in class VNode
public VAttribute getAttribute(java.lang.String name)
VNode
getAttribute
in class VNode
public boolean setAttribute(VAttribute attr) throws VlException
VEditable
setAttribute
in interface VEditable
VlException
public boolean delete() throws VlException
VEditable
delete
in interface VEditable
VlException
public java.lang.String[] getResourceTypes()
VComposite
getResourceTypes
in interface VComposite
public long getNrOfChilds() throws VlException
VComposite
getNrOfChilds
in interface VComposite
getNrOfChilds
in class VCompositeNode
VlException
public VNode[] getChilds() throws VlException
VComposite
getChilds
in interface VComposite
VlException
public LinkNode addNode(VNode sourceNode, java.lang.String optNewName, boolean isMove) throws VlException
addNode
in interface VComposite
addNode
in class VCompositeNode
VlException
public boolean delNode(VNode node)
VComposite
delNode
in interface VComposite
delNode
in class VCompositeNode
public VNode createChild(java.lang.String type, java.lang.String name, boolean force) throws VlException
VComposite
createChild
in interface VComposite
createChild
in class VCompositeNode
type
- must be on of the types getResourceTypes() returns.name
- may be null. The implementation might choose a default name
or prompt the user.force
- means to create the child even if it already exists.
VlException
public boolean delete(boolean recurse) throws VlException
VComposite
delete
in interface VComposite
delete
in class VCompositeNode
recurse
- whether to delete its children also.
VlException
public boolean hasChild(java.lang.String name) throws VlException
VComposite
hasChild
in interface VComposite
hasChild
in class VCompositeNode
VlException
public static VNode getVLeRoot(VRSContext vrsContext) throws VlException
VlException
public boolean setAttributes(VAttribute[] attrs) throws VlException
VEditable
setAttributes
in interface VEditable
VlException
public boolean isDeletable() throws VlException
VEditable
isDeletable
in interface VComposite
isDeletable
in interface VEditable
isDeletable
in class VCompositeNode
VlException
public boolean isEditable() throws VlException
VEditable
isEditable
in interface VEditable
VlException
public static VNode openLocation(VRSContext vrs, VRL location) throws VlException
VlException
public VNode getChild(int nodeNr)
public java.io.File[] getWindowsDrives()
public boolean isVirtual()
isVirtual
in class VNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |