|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WebdavTreeModel<T>
Model description of a WebDAV hierarchy. Information such as the content
type, the timestamps or the size of the data are retrieved via the
DataSource
interface returned by createDataSource(Object)
.
The items returned by the model should implement the
Object.equals(Object)
and Object.hashCode()
methods.
Implementations MAY in addition implement subclassed of
WebdavTreeModel
to expose advanced functionality:
WebdavLockableTreeModel
WebdavPropertiesTreeModel
WebdavLockableTreeModel
,
WebdavPropertiesTreeModel
This interface is designed to be implemented by clients. |
Method Summary | |
---|---|
DataSource |
createDataSource(T item)
Creates a new DataSource for the given item. |
T |
getItem(java.net.URI uri)
Returns an existing item that corresponds to the URI. |
Localized |
getLocalized(T item)
Returns an object that provides the localizations for an arbitrary item out of those items available in the getTreeModel() . |
java.lang.String |
getName(T item)
Returns the "friendly" name for for an arbitrary item out of those items available in the getTreeModel() . |
TreeModel<T> |
getTreeModel()
Returns the TreeModel that describes the namespace hierarchy of
items. |
boolean |
isCollection(T item)
Checks if any item is a collection or a 'file'. |
Methods inherited from interface com.ibm.portal.Disposable |
---|
dispose |
Method Detail |
---|
DataSource createDataSource(T item) throws java.io.IOException
Creates a new DataSource
for the given item. This information is
used to download a particular resource. The method may also return
null
to indicate that the item does not have a
representation. The data source can implement the
ContentDispositionDataSource
or ContentLengthDataSource
to indicate the size of the data.
Clients of this method must make sure that they call
Disposable.dispose()
on the created data source when it is no
longer needed.
The DataSource
is also used to compute the following WebDAV
properties:
DataSource
implements the
ContentDispositionDataSource
or ContentLengthDataSource
interface.DataSource
implements the
DataSourceChecksum
interface.
item
- item, not null
null
java.io.IOException
T getItem(java.net.URI uri) throws java.io.IOException
null
.
uri
- the URI of the item, not null
null
java.io.IOException
Localized getLocalized(T item) throws java.io.IOException
Returns an object that provides the localizations for an arbitrary item
out of those items available in the getTreeModel()
. If there are
not localizations available the method MAY return null
.
The Localized
object us used to compute the following WebDAV
properties:
item
- item, not null
null
java.io.IOException
java.lang.String getName(T item) throws java.io.IOException
Returns the "friendly" name for for an arbitrary item out of those items
available in the getTreeModel()
. This name should not contain
path separator characters. The final URL path is build from the hierarchy
of these names. The getItem(URI)
must be prepared to locate the
addressed item based on the path constructed from these names. The name
may contain all unicode characters and does not need to be URL encoded,
i.e. a name "a b" is perfectly valid and does not need to be encoded to
be "a%20b".
item
- item, not null
null
nor the empty string
java.io.IOException
TreeModel<T> getTreeModel()
TreeModel
that describes the namespace hierarchy of
items.
null
boolean isCollection(T item) throws java.io.IOException
Checks if any item is a collection or a 'file'. Collections may contain
children whereas non-collection resources cannot. This information is not
redundant to TreeModel.hasChildren(Object)
because the tree model
checks if a node actually contains children, whereas
isCollection(Object)
checks if a node MAY contain children.
This information is used to compute the following WebDAV properties:
item
- the item, not null
true
if the item may contain children, else
false
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |