com.vaadin.data.util.
Class FilesystemContainer.FileItem
java.lang.Object
com.vaadin.data.util.FilesystemContainer.FileItem
All Implemented Interfaces:
Enclosing class:
A Item wrapper for files in a filesystem.
Since:
3.0
Version:
6.8.18
Author:
Vaadin Ltd.
See Also:
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.vaadin.data.Item |
---|
Item.Editor, Item.PropertySetChangeEvent, Item.PropertySetChangeListener, Item.PropertySetChangeNotifier, Item.Viewer |
Method Summary | |
---|---|
boolean |
addItemProperty(Object id,
Property property)
Filesystem container does not support adding new properties. |
boolean |
equals(Object obj)
Tests if the given object is the same as the this object. |
Resource |
getIcon()
Gets the icon of this file. |
Property |
getItemProperty(Object id)
Gets the Property corresponding to the given Property ID stored in the Item. |
Collection<String> |
getItemPropertyIds()
Gets the collection of IDs of all Properties stored in the Item. |
String |
getName()
Gets the name of this file. |
long |
getSize()
Gets the size of this file. |
int |
hashCode()
Calculates a integer hash-code for the Property that's unique inside the Item containing the Property. |
Date |
lastModified()
Gets the last modified date of this file. |
boolean |
removeItemProperty(Object id)
Filesystem container does not support removing properties. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
getItemProperty
public Property getItemProperty(Object id)
- Specified by:
getItemProperty
in interfaceItem
- Parameters:
id
- identifier of the Property to get- Returns:
- the Property with the given ID or
null
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.
getItemPropertyIds
public Collection<String> getItemPropertyIds()
- Specified by:
getItemPropertyIds
in interfaceItem
- Returns:
- unmodifiable collection containing IDs of the Properties stored the Item
Description copied from interface: Item
Gets the collection of IDs of all Properties stored in the Item.
hashCode
public int hashCode()
- Returns:
- A locally unique hash-code as integer
Calculates a integer hash-code for the Property that's unique inside the Item containing the Property. Two different Properties inside the same Item contained in the same list always have different hash-codes, though Properties in different Items may have identical hash-codes.
equals
public boolean equals(Object obj)
- Parameters:
obj
- an object to compare with this object.- Returns:
true
if the given object is the same as this object,false
if not
Tests if the given object is the same as the this object. Two Properties got from an Item with the same ID are equal.
lastModified
public Date lastModified()
- Returns:
- Date
Gets the last modified date of this file.
getName
public String getName()
- Returns:
- file name of this file.
Gets the name of this file.
getIcon
public Resource getIcon()
- Returns:
- the icon of this file.
Gets the icon of this file.
getSize
public long getSize()
- Returns:
- size
Gets the size of this file.
toString
public String toString()
- See Also:
Object.toString()
addItemProperty
public boolean addItemProperty(Object id,
Property property)
throws UnsupportedOperationException
- Specified by:
addItemProperty
in interfaceItem
- Parameters:
id
- ID of the new Propertyproperty
- the Property to be added and associated with the id- Returns:
true
if the operation succeeded,false
if not- Throws:
UnsupportedOperationException
- if the operation is not supported.- See Also:
Item.addItemProperty(Object, Property)
Filesystem container does not support adding new properties.
removeItemProperty
public boolean removeItemProperty(Object id)
throws UnsupportedOperationException
- Specified by:
removeItemProperty
in interfaceItem
- Parameters:
id
- ID of the Property to be removed- Returns:
true
if the operation succeeded- Throws:
UnsupportedOperationException
- if the operation is not supported.false
if not- See Also:
Item.removeItemProperty(Object)
Filesystem container does not support removing properties.