|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.portal.resolver.webdav.tree.helper.DefaultWebdavTreeModel<T>
public class DefaultWebdavTreeModel<T>
Convenience base class for WebdavTreeModel
implementations
This interface is designed to be implemented by clients. |
Constructor Summary | |
---|---|
DefaultWebdavTreeModel()
|
Method Summary | |
---|---|
DataSource |
createDataSource(T item)
Creates a new DataSource for the given item. |
void |
dispose()
Indicate that the object will no longer be accessed |
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 WebdavTreeModel.getTreeModel() . |
java.lang.String |
getName(T item)
Returns the "friendly" name for for an arbitrary item out of those items available in the WebdavTreeModel.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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultWebdavTreeModel()
Method Detail |
---|
public DataSource createDataSource(T item) throws java.io.IOException
WebdavTreeModel
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.
createDataSource
in interface WebdavTreeModel<T>
item
- item, not null
null
java.io.IOException
public void dispose()
Disposable
dispose
in interface Disposable
public T getItem(java.net.URI uri) throws java.io.IOException
WebdavTreeModel
null
.
getItem
in interface WebdavTreeModel<T>
uri
- the URI of the item, not null
null
java.io.IOException
public Localized getLocalized(T item)
WebdavTreeModel
Returns an object that provides the localizations for an arbitrary item
out of those items available in the WebdavTreeModel.getTreeModel()
. If there are
not localizations available the method MAY return null
.
The Localized
object us used to compute the following WebDAV
properties:
getLocalized
in interface WebdavTreeModel<T>
item
- item, not null
null
public java.lang.String getName(T item)
WebdavTreeModel
Returns the "friendly" name for for an arbitrary item out of those items
available in the WebdavTreeModel.getTreeModel()
. This name should not contain
path separator characters. The final URL path is build from the hierarchy
of these names. The WebdavTreeModel.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".
getName
in interface WebdavTreeModel<T>
item
- item, not null
null
nor the empty stringpublic TreeModel<T> getTreeModel()
WebdavTreeModel
TreeModel
that describes the namespace hierarchy of
items.
getTreeModel
in interface WebdavTreeModel<T>
null
public boolean isCollection(T item)
WebdavTreeModel
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
WebdavTreeModel.isCollection(Object)
checks if a node MAY contain children.
This information is used to compute the following WebDAV properties:
isCollection
in interface WebdavTreeModel<T>
item
- the item, not null
true
if the item may contain children, else
false
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |