|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--au.com.prunge.jgenfile.impl.local.LocalItem
An item in the local file system.
Constructor Summary | |
LocalItem(au.com.prunge.jgenfile.FileSystem fileSystem,
File file)
Constructs a LocalItem that is not a
root. |
|
LocalItem(au.com.prunge.jgenfile.FileSystem fileSystem,
File file,
boolean isRoot)
Constructs a LocalItem . |
Method Summary | |
au.com.prunge.jgenfile.CanCopyItemOperation |
createCanCopyItemOperation()
Creates an operation that tests whether this item can be copied. |
au.com.prunge.jgenfile.CanCopyItemToDestinationOperation |
createCanCopyItemToDestinationOperation(au.com.prunge.jgenfile.Directory destination)
Creates an operation that tests whether this item can be copied into the specified directory keeping its current name. |
au.com.prunge.jgenfile.CanCopyItemToDestinationOperation |
createCanCopyItemToDestinationOperation(au.com.prunge.jgenfile.Directory destination,
String newName)
Creates an operation that tests whether this item can be copied into the specified directory using the specified name. |
au.com.prunge.jgenfile.CanDeleteItemOperation |
createCanDeleteOperation()
Creates an operation that tests whether this item can be deleted. |
au.com.prunge.jgenfile.CanGetAbsolutePathOperation |
createCanGetAbsolutePathOperation()
Creates an operation that tests whether the absolute path of this item can be acquired. |
au.com.prunge.jgenfile.CanGetMetadataOperation |
createCanGetMetadataOperation(Set metadataKeySet)
Creates an operation that tests whether the specified metadata is accessible for this item. |
au.com.prunge.jgenfile.CanGetParentOperation |
createCanGetParentOperation()
Creates an operation that will test whether the parent of this item can be acquired. |
au.com.prunge.jgenfile.CanGetRelativePathOperation |
createCanGetRelativePathOperation(au.com.prunge.jgenfile.Directory toAncestor)
Creates an operation that tests whether the relative path of this item up to and including toAncestor
can be acquired. |
au.com.prunge.jgenfile.CanSetMetadataOperation |
createCanSetMetadataOperation(Set metadataKeySet)
Creates an operation that tests whether the specified metadata can be set for this item. |
au.com.prunge.jgenfile.CanSetNameOperation |
createCanSetNameOperation()
Creates an operation that tests whether the name of this item can be changed. |
au.com.prunge.jgenfile.CanSetParentOperation |
createCanSetParentOperation()
Creates an operation that tests whether the parent of this item can be changed. |
au.com.prunge.jgenfile.CopyItemOperation |
createCopyOperation(au.com.prunge.jgenfile.Directory destination)
Creates an operation that copies this item to the specified destination directory. |
au.com.prunge.jgenfile.CopyItemOperation |
createCopyOperation(au.com.prunge.jgenfile.Directory destination,
String newName)
Creates an operation that copies this item to the specified destination directory giving the copied item a name of newName . |
au.com.prunge.jgenfile.DeleteItemOperation |
createDeleteItemOperation()
Creates an operation that will delete this item. |
au.com.prunge.jgenfile.GetAbsolutePathOperation |
createGetAbsolutePathOperation()
Creates an operation that gets the absolute path of this item. |
au.com.prunge.jgenfile.GetMetadataOperation |
createGetAllMetadataOperation()
Creates an operation that acquires all available metadata for this item. |
au.com.prunge.jgenfile.GetAllMetadataKeysOperation |
createGetMetadataKeysOperation()
Creates an operation that gets all the keys for the metadata of this item. |
au.com.prunge.jgenfile.GetMetadataOperation |
createGetMetadataOperation(Set metadataKeySet)
Creates an operation that acquires the specified metadata. |
au.com.prunge.jgenfile.GetParentOperation |
createGetParentOperation()
Creates an operation that will retrieve the parent of this item. |
au.com.prunge.jgenfile.GetRelativePathOperation |
createGetRelativePathOperation(au.com.prunge.jgenfile.Directory toAncestor)
Creates an operation that gets the relative path of this item up to and including toAncestor . |
protected String |
createName()
Creates the name of the item from the java.io.File object. |
au.com.prunge.jgenfile.SetMetadataOperation |
createSetMetadataOperation(Map metadataMap)
Creates an operation that sets the specified metadata for this item. |
au.com.prunge.jgenfile.SetNameOperation |
createSetNameOperation(String newName)
Creates an operation that will set the name of this item. |
au.com.prunge.jgenfile.SetParentOperation |
createSetParentOperation(au.com.prunge.jgenfile.Directory parent)
Creates an operation that will set the parent of (i.e. |
boolean |
equals(Object obj)
|
File |
getFile()
Returns the underlying file object of this item. |
au.com.prunge.jgenfile.FileSystem |
getFileSystem()
Returns the file system this item exists in. |
String |
getName()
Returns the name of the item. |
int |
hashCode()
|
protected boolean |
isRoot()
Returns whether this item is a root of the file system. |
void |
setFile(File file)
Sets the underlying file object of this item. |
protected void |
setupOperation(au.com.prunge.jgenfile.Operation op)
Sets up an operation with operation hints. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LocalItem(au.com.prunge.jgenfile.FileSystem fileSystem, File file)
LocalItem
that is not a
root.
fileSystem
- the file system to create this item in.file
- the underlying file object.
NullPointerException
- if file
is null.public LocalItem(au.com.prunge.jgenfile.FileSystem fileSystem, File file, boolean isRoot)
LocalItem
.
fileSystem
- the file system to create this item in.file
- the underlying file object.isRoot
- true if this item is a root, false if not.
NullPointerException
- if file
is null.Method Detail |
public File getFile()
public void setFile(File file) throws NullPointerException
file
- the new underlying file object of this item.
NullPointerException
- if file
is null.protected boolean isRoot()
protected String createName()
public String getName() throws JGenFileException
Item
getName
in interface Item
JGenFileException
- if an error occurs
getting the name of the
item.Item.getName()
protected void setupOperation(au.com.prunge.jgenfile.Operation op) throws JGenFileException
The default operation hints registered in the file system are added to the specified operation.
op
- the operation to set up.
JGenFileException
- if an error occurs.public au.com.prunge.jgenfile.SetNameOperation createSetNameOperation(String newName) throws JGenFileException
Item
createSetNameOperation
in interface Item
newName
- the new name of the item.
JGenFileException
- if the operation could
not be created.Item.createSetNameOperation(java.lang.String)
public au.com.prunge.jgenfile.CanSetNameOperation createCanSetNameOperation() throws JGenFileException
Item
createCanSetNameOperation
in interface Item
JGenFileException
- if the operation could not
be created.Item.createCanSetNameOperation()
public au.com.prunge.jgenfile.GetParentOperation createGetParentOperation() throws JGenFileException
Item
createGetParentOperation
in interface Item
JGenFileException
- if the operation could not
be created.Item.createGetParentOperation()
public au.com.prunge.jgenfile.CanGetParentOperation createCanGetParentOperation() throws JGenFileException
Item
createCanGetParentOperation
in interface Item
JGenFileException
- if the operation could not be
created.Item.createCanGetParentOperation()
public au.com.prunge.jgenfile.SetParentOperation createSetParentOperation(au.com.prunge.jgenfile.Directory parent) throws JGenFileException
Item
createSetParentOperation
in interface Item
parent
- the new parent to attempt to set with the
operation.
JGenFileException
- if the operation could not
be created.au.com.prunge.jgenfile.Item#createSetParentOperation(au.com.prunge.jgenfile.Item)
public au.com.prunge.jgenfile.CanSetParentOperation createCanSetParentOperation() throws JGenFileException
Item
createCanSetParentOperation
in interface Item
JGenFileException
- if the operation could not
be created.Item.createCanSetParentOperation()
public au.com.prunge.jgenfile.DeleteItemOperation createDeleteItemOperation() throws JGenFileException
Item
createDeleteItemOperation
in interface Item
JGenFileException
- if the operation could not be
created.Item.createDeleteItemOperation()
public au.com.prunge.jgenfile.CanDeleteItemOperation createCanDeleteOperation() throws JGenFileException
Item
createCanDeleteOperation
in interface Item
JGenFileException
- if the operation could not be
created.Item.createCanDeleteOperation()
public au.com.prunge.jgenfile.GetMetadataOperation createGetMetadataOperation(Set metadataKeySet) throws JGenFileException
Item
createGetMetadataOperation
in interface Item
metadataKeySet
- a set of MetadataKey
objects.
JGenFileException
- if the operation could not be
created.Item.createGetMetadataOperation(java.util.Set)
public au.com.prunge.jgenfile.GetMetadataOperation createGetAllMetadataOperation() throws JGenFileException
Item
createGetAllMetadataOperation
in interface Item
JGenFileException
- if the operation could not be
created.Item.createGetAllMetadataOperation()
public au.com.prunge.jgenfile.CanGetMetadataOperation createCanGetMetadataOperation(Set metadataKeySet) throws JGenFileException
Item
createCanGetMetadataOperation
in interface Item
metadataKeySet
- a set of MetadataKey
objects representing the
elements of metadata to test for.
JGenFileException
- if the operation could not be
created.Item.createCanGetMetadataOperation(java.util.Set)
public au.com.prunge.jgenfile.SetMetadataOperation createSetMetadataOperation(Map metadataMap) throws JGenFileException
Item
The map's keys should consist of MetadataKey objects, the values should be appropriate for each key.
createSetMetadataOperation
in interface Item
metadataMap
- a map of MetadataKeys to values.
JGenFileException
- if the operation could not be
created.Item.createSetMetadataOperation(java.util.Map)
public au.com.prunge.jgenfile.CanSetMetadataOperation createCanSetMetadataOperation(Set metadataKeySet) throws JGenFileException
Item
createCanSetMetadataOperation
in interface Item
metadataKeySet
- a set of MetadataKey
objects representing the
elements of metadata to test for.
JGenFileException
- if the operation could not be
created.Item.createCanSetMetadataOperation(java.util.Set)
public au.com.prunge.jgenfile.GetAllMetadataKeysOperation createGetMetadataKeysOperation() throws JGenFileException
Item
An element of metadata may be either readable, writable or both. If a key exists in the set returned by this operation, the corresponding element of metadata is either readable, writable or both.
createGetMetadataKeysOperation
in interface Item
JGenFileException
- if the operation could not
be created.Item.createGetMetadataKeysOperation()
public au.com.prunge.jgenfile.CopyItemOperation createCopyOperation(au.com.prunge.jgenfile.Directory destination) throws JGenFileException
Item
createCopyOperation
in interface Item
destination
- the destination directory.
JGenFileException
- if the operation could not be
created.Item.createCopyOperation(au.com.prunge.jgenfile.Directory)
public au.com.prunge.jgenfile.CopyItemOperation createCopyOperation(au.com.prunge.jgenfile.Directory destination, String newName) throws JGenFileException
Item
newName
.
createCopyOperation
in interface Item
destination
- the destination directory.newName
- the name to give the copied item.
JGenFileException
- if the operation could not be
created.Item.createCopyOperation(au.com.prunge.jgenfile.Directory, java.lang.String)
public au.com.prunge.jgenfile.CanCopyItemToDestinationOperation createCanCopyItemToDestinationOperation(au.com.prunge.jgenfile.Directory destination) throws JGenFileException
Item
createCanCopyItemToDestinationOperation
in interface Item
destination
- the destination directory.
JGenFileException
- if the operation could not
be created.Item.createCanCopyItemToDestinationOperation(au.com.prunge.jgenfile.Directory)
public au.com.prunge.jgenfile.CanCopyItemToDestinationOperation createCanCopyItemToDestinationOperation(au.com.prunge.jgenfile.Directory destination, String newName) throws JGenFileException
Item
createCanCopyItemToDestinationOperation
in interface Item
destination
- the destination directory.newName
- the name the copied item would have.
JGenFileException
- if the operation could not
be created.Item.createCanCopyItemToDestinationOperation(au.com.prunge.jgenfile.Directory, java.lang.String)
public au.com.prunge.jgenfile.CanCopyItemOperation createCanCopyItemOperation() throws JGenFileException
Item
createCanCopyItemOperation
in interface Item
JGenFileException
- if the operation could not
be created.Item.createCanCopyItemOperation()
public au.com.prunge.jgenfile.GetAbsolutePathOperation createGetAbsolutePathOperation() throws JGenFileException
Item
createGetAbsolutePathOperation
in interface Item
JGenFileException
- if the operation could not
be created.Item.createGetAbsolutePathOperation()
public au.com.prunge.jgenfile.CanGetAbsolutePathOperation createCanGetAbsolutePathOperation() throws JGenFileException
Item
createCanGetAbsolutePathOperation
in interface Item
JGenFileException
- if the operation could not
be created.Item.createCanGetAbsolutePathOperation()
public au.com.prunge.jgenfile.GetRelativePathOperation createGetRelativePathOperation(au.com.prunge.jgenfile.Directory toAncestor) throws JGenFileException
Item
toAncestor
.
createGetRelativePathOperation
in interface Item
toAncestor
- the ancestor to get the relative
path up to. The path will start
from this item and go up through
each parent of this item until
toAncestor
is hit.
toAncestor
will be
the most distant ancestor included
in the path.
JGenFileException
- if the operation could not
be created.Item.createGetRelativePathOperation(au.com.prunge.jgenfile.Directory)
public au.com.prunge.jgenfile.CanGetRelativePathOperation createCanGetRelativePathOperation(au.com.prunge.jgenfile.Directory toAncestor) throws JGenFileException
Item
toAncestor
can be acquired.
createCanGetRelativePathOperation
in interface Item
toAncestor
- the ancestor to get the relative
path up to. The path will start
from this item and go up through
each parent of this item until
toAncestor
is hit.
JGenFileException
- if the operation could not
be created.Item.createCanGetRelativePathOperation(au.com.prunge.jgenfile.Directory)
public au.com.prunge.jgenfile.FileSystem getFileSystem() throws JGenFileException
Item
getFileSystem
in interface Item
JGenFileException
- if an error occurs.Item.getFileSystem()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |