Package org.ametys.plugins.explorer.cmis
Class CMISResourcesCollection
java.lang.Object
org.ametys.plugins.explorer.cmis.CMISResourcesCollection
- All Implemented Interfaces:
ExplorerNode,ResourceCollection,AmetysObject,TraversableAmetysObject
Implementation of an
ExplorerNode, backed by a CMIS server.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCMISResourcesCollection(Folder folder, CMISRootResourcesCollection root, AmetysObject parent) Creates aCMISResourcesCollection -
Method Summary
Modifier and TypeMethodDescriptionReturns the application id corresponding to this Node.Retrieves a given child from its relative path.Retrieves children of the current object.Retrieves theFolderRetrieves theCMISRootResourcesCollectionGet the description of the applicationReturns 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.Returns the icon css class for this Node.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>getName()Retrieves the name of the current object.Returns the parent object in the Ametys hierarchy.Returns the path of the parent object in the Ametys hierarchy.getPath()Retrieves the path of the current object.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.booleanTests if this Object has at least one child with the given name.booleanReturns true if this explorer node contains child explorer nodes.booleanReturns true if this explorer node contains resources.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, hashCodeMethods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
Field Details
-
APPLICATION_ID
Application id for resources collections.- See Also:
-
-
Constructor Details
-
CMISResourcesCollection
public CMISResourcesCollection(Folder folder, CMISRootResourcesCollection root, AmetysObject parent) Creates aCMISResourcesCollection- Parameters:
folder- The CMIS folderroot- The root of the virtual treeparent- the parentAmetysObjectif known
-
-
Method Details
-
getApplicationId
Description copied from interface:ExplorerNodeReturns the application id corresponding to this Node.- Specified by:
getApplicationIdin interfaceExplorerNode- Returns:
- the application id corresponding to this Node.
-
getIconCls
Description copied from interface:ExplorerNodeReturns the icon css class for this Node.- Specified by:
getIconClsin interfaceExplorerNode- Returns:
- the icon css class for this Node for rendering in the tree.
-
getId
Description copied from interface:AmetysObjectRetrieves 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>- Specified by:
getIdin interfaceAmetysObject- Returns:
- the unique identifier of this AmetysObject
- Throws:
AmetysRepositoryException- if an error occurs.
-
getName
Description copied from interface:AmetysObjectRetrieves the name of the current object.- Specified by:
getNamein interfaceAmetysObject- Returns:
- the name.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getCmisRoot
Retrieves theCMISRootResourcesCollection- Returns:
- the
CMISRootResourcesCollection
-
getCmisFolder
Retrieves theFolder- Returns:
- the
Folder
-
getParent
Description copied from interface:AmetysObjectReturns the parent object in the Ametys hierarchy.- Specified by:
getParentin interfaceAmetysObject- Returns:
- the parent object or
nullif current object is the root. - Throws:
AmetysRepositoryException- if an error occurs.
-
getParentPath
Description copied from interface:AmetysObjectReturns the path of the parent object in the Ametys hierarchy.- Specified by:
getParentPathin interfaceAmetysObject- Returns:
- the path of the parent object.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getPath
Description copied from interface:AmetysObjectRetrieves the path of the current object.- Specified by:
getPathin interfaceAmetysObject- Returns:
- the path.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getChild
public AmetysObject getChild(String path) throws AmetysRepositoryException, UnknownAmetysObjectException Description copied from interface:TraversableAmetysObjectRetrieves a given child from its relative path. The path cannot benull, empty nor begin with a'/'.- Specified by:
getChildin interfaceTraversableAmetysObject- Parameters:
path- the path of the child which can contains a position with.[n]if same name sibling is allowed.- Returns:
- the child found.
- Throws:
AmetysRepositoryException- if an error occurs.UnknownAmetysObjectException- if the object does not exist.
-
getChildren
Description copied from interface:TraversableAmetysObjectRetrieves children of the current object.- Specified by:
getChildrenin interfaceTraversableAmetysObject- Returns:
- the children or an empty
AmetysObjectIterable. - Throws:
AmetysRepositoryException- if an error occurs.
-
hasChild
Description copied from interface:TraversableAmetysObjectTests if this Object has at least one child with the given name.- Specified by:
hasChildin interfaceTraversableAmetysObject- Parameters:
name- the name to test. Cannot benullnor empty nor begin with a'/'and it cannot contain'/'.- Returns:
trueif the named child exists,falseotherwise.- Throws:
AmetysRepositoryException- if an error occurs.
-
hasChildResources
Description copied from interface:ResourceCollectionReturns true if this explorer node contains resources.- Specified by:
hasChildResourcesin interfaceResourceCollection- Returns:
- true if this explorer node contains resources.
- Throws:
AmetysRepositoryException- if an error occurs.
-
hasChildExplorerNodes
Description copied from interface:ExplorerNodeReturns true if this explorer node contains child explorer nodes.- Specified by:
hasChildExplorerNodesin interfaceExplorerNode- Returns:
- true if this explorer node contains child explorer nodes.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getExplorerPath
Description copied from interface:ExplorerNodeReturns 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.- Specified by:
getExplorerPathin interfaceExplorerNode- Returns:
- the path of this node in its hierarchy.
-
getResourcePath
Description copied from interface:ResourceCollectionReturns 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.- Specified by:
getResourcePathin interfaceResourceCollection- Returns:
- the path of this collection in its hierarchy.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getDescription
Description copied from interface:ExplorerNodeGet the description of the application- Specified by:
getDescriptionin interfaceExplorerNode- Returns:
- the description
-