public class CMISResourcesCollection extends Object implements ResourceCollection
ExplorerNode
, backed by a CMIS server.Modifier and Type | Field and Description |
---|---|
private static Logger |
__LOGGER |
private Folder |
_cmisFolder |
private AmetysObject |
_parent |
private CMISRootResourcesCollection |
_root |
static String |
APPLICATION_ID
Application id for resources collections.
|
Constructor and Description |
---|
CMISResourcesCollection(Folder folder,
CMISRootResourcesCollection root,
AmetysObject parent)
Creates a
CMISResourcesCollection |
Modifier and Type | Method and Description |
---|---|
String |
getApplicationId()
Returns the application id corresponding to this Node.
|
AmetysObject |
getChild(String path)
Retrieves a given child from its relative path.
|
CollectionIterable<AmetysObject> |
getChildren()
Retrieves children of the current object.
|
Folder |
getCmisFolder()
Retrieves the
Folder |
CMISRootResourcesCollection |
getCmisRoot()
Retrieves the
CMISRootResourcesCollection |
String |
getDescription()
Get the description of the application
|
String |
getExplorerPath()
Returns the path of this explorer node in the explorer hierarchy (which is a subset of the whole repository).
If this collection is the root explorer node, "" is returned. |
String |
getIconCls()
Returns the icon css class for this Node.
|
String |
getId()
Retrieves the unique identifier of this AmetysObject.
It must be unique in the whole repository and must never be null. It must conform to the URI syntax: <protocol>://<protocol-specific-part> |
String |
getName()
Retrieves the name of the current object.
|
AmetysObject |
getParent()
Returns the parent object in the Ametys hierarchy.
|
String |
getParentPath()
Returns the path of the parent object in the Ametys hierarchy.
|
String |
getPath()
Retrieves the path of the current object.
|
String |
getResourcePath()
Returns the path of this resource collection in its hierarchy (which is a subset of the whole repository).
If this collection is the root collection, "" is returned. |
boolean |
hasChild(String name)
Tests if this Object has at least one child with the given name.
|
boolean |
hasChildExplorerNodes()
Returns true if this explorer node contains child explorer nodes.
|
boolean |
hasChildResources()
Returns true if this explorer node contains resources.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChildAt, getChildPosition
equals, hashCode
public static final String APPLICATION_ID
private final Folder _cmisFolder
private final CMISRootResourcesCollection _root
private AmetysObject _parent
public CMISResourcesCollection(Folder folder, CMISRootResourcesCollection root, AmetysObject parent)
CMISResourcesCollection
folder
- The CMIS folderroot
- The root of the virtual treeparent
- the parent AmetysObject
if knownpublic String getApplicationId()
ExplorerNode
getApplicationId
in interface ExplorerNode
public String getIconCls()
ExplorerNode
getIconCls
in interface ExplorerNode
public String getId() throws AmetysRepositoryException
AmetysObject
<protocol>://<protocol-specific-part>
getId
in interface AmetysObject
AmetysRepositoryException
- if an error occurs.public String getName() throws AmetysRepositoryException
AmetysObject
getName
in interface AmetysObject
AmetysRepositoryException
- if an error occurs.public CMISRootResourcesCollection getCmisRoot()
CMISRootResourcesCollection
CMISRootResourcesCollection
public Folder getCmisFolder()
Folder
Folder
public AmetysObject getParent() throws AmetysRepositoryException
AmetysObject
getParent
in interface AmetysObject
null
if current object
is the root.AmetysRepositoryException
- if an error occurs.public String getParentPath() throws AmetysRepositoryException
AmetysObject
getParentPath
in interface AmetysObject
AmetysRepositoryException
- if an error occurs.public String getPath() throws AmetysRepositoryException
AmetysObject
getPath
in interface AmetysObject
AmetysRepositoryException
- if an error occurs.public AmetysObject getChild(String path) throws AmetysRepositoryException, UnknownAmetysObjectException
TraversableAmetysObject
null
, empty nor begin with a '/'
.getChild
in interface TraversableAmetysObject
path
- the path of the child which can contains a position with.
[n]
if same name sibling is allowed.AmetysRepositoryException
- if an error occurs.UnknownAmetysObjectException
- if the object does not exist.public CollectionIterable<AmetysObject> getChildren() throws AmetysRepositoryException
TraversableAmetysObject
getChildren
in interface TraversableAmetysObject
AmetysObjectIterable
.AmetysRepositoryException
- if an error occurs.public boolean hasChild(String name) throws AmetysRepositoryException
TraversableAmetysObject
hasChild
in interface TraversableAmetysObject
name
- the name to test. Cannot be null
nor empty nor
begin with a '/'
and it cannot contain '/'
.true
if the named child exists,
false
otherwise.AmetysRepositoryException
- if an error occurs.public boolean hasChildResources() throws AmetysRepositoryException
ResourceCollection
hasChildResources
in interface ResourceCollection
AmetysRepositoryException
- if an error occurs.public boolean hasChildExplorerNodes() throws AmetysRepositoryException
ExplorerNode
hasChildExplorerNodes
in interface ExplorerNode
AmetysRepositoryException
- if an error occurs.public String getExplorerPath()
ExplorerNode
getExplorerPath
in interface ExplorerNode
public String getResourcePath() throws AmetysRepositoryException
ResourceCollection
getResourcePath
in interface ResourceCollection
AmetysRepositoryException
- if an error occurs.public String getDescription()
ExplorerNode
getDescription
in interface ExplorerNode