org.millstone.base.data.util
Class FilesystemContainer.FileItem

java.lang.Object
  |
  +--org.millstone.base.data.util.FilesystemContainer.FileItem
All Implemented Interfaces:
Item
Enclosing class:
FilesystemContainer

public class FilesystemContainer.FileItem
extends java.lang.Object
implements Item

A Item wrapper for files in a filesystem.

Since:
3.0
Version:
3.0.3
Author:
IT Mill Ltd.

Nested Class Summary
 
Nested classes inherited from class org.millstone.base.data.Item
Item.Editor, Item.PropertySetChangeEvent, Item.PropertySetChangeListener, Item.PropertySetChangeNotifier, Item.Viewer
 
Method Summary
 boolean addItemProperty(java.lang.Object id, Property property)
          Filesystem container does not support adding new properties.
 boolean equals(java.lang.Object obj)
           
 Resource getIcon()
           
 Property getItemProperty(java.lang.Object id)
          Gets the Property corresponding to the given Property ID stored in the Item.
 java.util.Collection getItemPropertyIds()
          Gets the collection of IDs of all Properties stored in the Item.
 java.lang.String getName()
           
 long getSize()
           
 int hashCode()
           
 java.util.Date lastModified()
           
 boolean removeItemProperty(java.lang.Object id)
          Filesystem container does not support removing properties.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getItemProperty

public Property getItemProperty(java.lang.Object id)
Description copied from interface: Item
Gets the Property corresponding to the given Property ID stored in the Item. If the Item does not contain the Property, null is returned.

Specified by:
getItemProperty in interface Item
Parameters:
id - identifier of the Property to get
Returns:
the Property with the given ID or null

getItemPropertyIds

public java.util.Collection getItemPropertyIds()
Description copied from interface: Item
Gets the collection of IDs of all Properties stored in the Item.

Specified by:
getItemPropertyIds in interface Item
Returns:
unmodifiable collection containing IDs of the Properties stored the Item

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

lastModified

public java.util.Date lastModified()

getName

public java.lang.String getName()

getIcon

public Resource getIcon()

getSize

public long getSize()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

addItemProperty

public boolean addItemProperty(java.lang.Object id,
                               Property property)
                        throws java.lang.UnsupportedOperationException
Filesystem container does not support adding new properties.

Specified by:
addItemProperty in interface Item
Parameters:
id - ID of the new Property
property - the Property to be added and associated with id
Returns:
true if the operation succeeded, false if not
Throws:
java.lang.UnsupportedOperationException - if the operation is not supported.
See Also:
Item.addItemProperty(Object, Property)

removeItemProperty

public boolean removeItemProperty(java.lang.Object id)
                           throws java.lang.UnsupportedOperationException
Filesystem container does not support removing properties.

Specified by:
removeItemProperty in interface Item
Parameters:
id - ID of the Property to be removed
Returns:
true if the operation succeeded false if not
Throws:
java.lang.UnsupportedOperationException - if the operation is not supported.
See Also:
Item.removeItemProperty(Object)


Copyright © 2000,2001,2002 IT Mill Ltd. All Rights Reserved.