Package org.ametys.plugins.explorer.cmis
Class CMISRootResourcesCollection
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.explorer.cmis.CMISRootResourcesCollection
- All Implemented Interfaces:
- ExplorerNode,- ResourceCollection,- AmetysObject,- DataAwareAmetysObject,- ModelLessDataAwareAmetysObject,- ModifiableModelLessDataAwareAmetysObject,- DataHolder,- ModelLessDataHolder,- ModifiableDataHolder,- ModifiableModelLessDataHolder,- JCRAmetysObject,- MetadataAwareAmetysObject,- ModifiableMetadataAwareAmetysObject,- ModifiableAmetysObject,- RemovableAmetysObject,- TraversableAmetysObject
public class CMISRootResourcesCollection
extends AbstractAmetysObject
implements JCRAmetysObject, ResourceCollection, ModifiableModelLessDataAwareAmetysObject
AmetysObject implementing the root of CMISResourcesCollections- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Stringapplication id for resources collections.static final StringAttribute for repository root pathstatic final StringMetadata for user passwordstatic final StringMetadata for repository idstatic final StringMetadata for repository urlstatic final StringMetadata for user login
- 
Constructor SummaryConstructorsConstructorDescriptionCMISRootResourcesCollection(javax.jcr.Node node, String parentPath, CMISTreeFactory factory) Creates aCMISRootResourcesCollection.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the application id corresponding to this Node.Retrieves a given child from its relative path.Retrieves children of the current object.Returns theDataHolderof thisAmetysObject.Get 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>Returns the rootCompositeMetadataof thisAmetysObject.Get the CMIS mount pointgetName()Retrieves the name of the current object.javax.jcr.NodegetNode()Gives access to the underlying JCR node.<A extends AmetysObject>
 AReturns the parent object in the Ametys hierarchy.Returns the path of the parent object in the Ametys hierarchy.Get the password to connect to CMIS repositorygetPath()Retrieves the path of the current object.Get the CMIS repository idGet the CMIS repository URLReturns 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.getUser()Get the user to connect to CMIS repositorybooleanTests 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.booleanReturns true if there is pending changes.voidremove()Removes thisAmetysObjectfrom the Ametys tree.voidRename theAmetysObjectvoidDiscard pending changes and revert to the currently persisted version.voidPersists pending changes.
 If the underlying Node is new, the Session is globally saved.voidsetMountPoint(String mountPoint) Set a mount point for the CMIS RepositoryvoidsetPassword(String password) Set a password for the CMIS RepositoryvoidSet the id of the CMIS repositoryvoidsetRepositoryUrl(String url) Set the URL of the CMIS repositoryvoidSet a user name for the CMIS RepositoryMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObjectequals, hashCode, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObjectequals, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObjectcopyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNamesMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObjectdataToJSON, dataToSAX, getModelItemTypeExtensionPoint, getType, getValue, getValue, getValueOfType, getValueOfType, hasDifferences, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultipleMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolderdataToJSON, dataToSAX, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObjectgetComposite, getComposite, getParentDataHolder, getRepositoryData, getRootDataHolder, removeValue, setValue, setValue, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.TraversableAmetysObjectgetChildAt, getChildPosition
- 
Field Details- 
APPLICATION_IDapplication id for resources collections.- See Also:
 
- 
DATA_REPOSITORY_IDMetadata for repository id- See Also:
 
- 
DATA_REPOSITORY_URLMetadata for repository url- See Also:
 
- 
DATA_MOUNT_POINTAttribute for repository root path- See Also:
 
- 
DATA_USERMetadata for user login- See Also:
 
- 
DATA_PASSWORDMetadata for user password- See Also:
 
 
- 
- 
Constructor Details- 
CMISRootResourcesCollectionCreates aCMISRootResourcesCollection.- Parameters:
- node- the node backing this- AmetysObject
- parentPath- the parentPath in the Ametys hierarchy
- factory- the CMISRootResourcesCollectionFactory which created this AmetysObject
 
 
- 
- 
Method Details- 
getChildpublic 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 interface- TraversableAmetysObject
- 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.
 
- 
getChildrenDescription copied from interface:TraversableAmetysObjectRetrieves children of the current object.- Specified by:
- getChildrenin interface- TraversableAmetysObject
- Returns:
- the children or an empty AmetysObjectIterable.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
hasChildDescription copied from interface:TraversableAmetysObjectTests if this Object has at least one child with the given name.- Specified by:
- hasChildin interface- TraversableAmetysObject
- Parameters:
- name- the name to test. Cannot be- nullnor empty nor begin with a- '/'and it cannot contain- '/'.
- Returns:
- trueif the named child exists,- falseotherwise.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
getDataHolderDescription copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
- getDataHolderin interface- DataAwareAmetysObject
- Specified by:
- getDataHolderin interface- ModelLessDataAwareAmetysObject
- Specified by:
- getDataHolderin interface- ModifiableModelLessDataAwareAmetysObject
- Returns:
- the DataHolderof thisAmetysObject
 
- 
getMetadataHolderDescription copied from interface:MetadataAwareAmetysObjectReturns the rootCompositeMetadataof thisAmetysObject.- Specified by:
- getMetadataHolderin interface- MetadataAwareAmetysObject
- Specified by:
- getMetadataHolderin interface- ModifiableMetadataAwareAmetysObject
- Returns:
- the root CompositeMetadataof thisAmetysObject
 
- 
getIconClsDescription copied from interface:ExplorerNodeReturns the icon css class for this Node.- Specified by:
- getIconClsin interface- ExplorerNode
- Returns:
- the icon css class for this Node for rendering in the tree.
 
- 
getApplicationIdDescription copied from interface:ExplorerNodeReturns the application id corresponding to this Node.- Specified by:
- getApplicationIdin interface- ExplorerNode
- Returns:
- the application id corresponding to this Node.
 
- 
getNameDescription copied from interface:AmetysObjectRetrieves the name of the current object.- Specified by:
- getNamein interface- AmetysObject
- Returns:
- the name.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
getParentPathDescription copied from interface:AmetysObjectReturns the path of the parent object in the Ametys hierarchy.- Specified by:
- getParentPathin interface- AmetysObject
- Returns:
- the path of the parent object.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
getPathDescription copied from interface:AmetysObjectRetrieves the path of the current object.- Specified by:
- getPathin interface- AmetysObject
- Returns:
- the path.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
getNodeDescription copied from interface:JCRAmetysObjectGives access to the underlying JCR node.- Specified by:
- getNodein interface- JCRAmetysObject
- Returns:
- the JCR node backing this AmetysObject.
 
- 
getIdDescription 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 interface- AmetysObject
- Returns:
- the unique identifier of this AmetysObject
 
- 
hasChildResourcesDescription copied from interface:ResourceCollectionReturns true if this explorer node contains resources.- Specified by:
- hasChildResourcesin interface- ResourceCollection
- Returns:
- true if this explorer node contains resources.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
hasChildExplorerNodesDescription copied from interface:ExplorerNodeReturns true if this explorer node contains child explorer nodes.- Specified by:
- hasChildExplorerNodesin interface- ExplorerNode
- Returns:
- true if this explorer node contains child explorer nodes.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
renameDescription copied from interface:ModifiableAmetysObjectRename theAmetysObject- Specified by:
- renamein interface- ModifiableAmetysObject
- Parameters:
- newName- the new name of the ametys object
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
removeDescription copied from interface:RemovableAmetysObjectRemoves thisAmetysObjectfrom the Ametys tree.- Specified by:
- removein interface- RemovableAmetysObject
- Throws:
- AmetysRepositoryException- if an error occurs.
- RepositoryIntegrityViolationException- if this- AmetysObjectis referenced by another objects.
 
- 
getParentDescription copied from interface:AmetysObjectReturns the parent object in the Ametys hierarchy.- Specified by:
- getParentin interface- AmetysObject
- Type Parameters:
- A- the type of the parent- AmetysObject.
- Returns:
- the parent object or nullif current object is the root.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
saveChangesDescription copied from interface:ModifiableAmetysObjectPersists pending changes.
 If the underlying Node is new, the Session is globally saved.- Specified by:
- saveChangesin interface- ModifiableAmetysObject
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
revertChangesDescription copied from interface:ModifiableAmetysObjectDiscard pending changes and revert to the currently persisted version.- Specified by:
- revertChangesin interface- ModifiableAmetysObject
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
needsSaveDescription copied from interface:ModifiableAmetysObjectReturns true if there is pending changes.- Specified by:
- needsSavein interface- ModifiableAmetysObject
- Returns:
- true if there is pending changes.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
getResourcePathDescription 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 interface- ResourceCollection
- Returns:
- the path of this collection in its hierarchy.
- Throws:
- AmetysRepositoryException- if an error occurs.
 
- 
getExplorerPathDescription 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 interface- ExplorerNode
- Returns:
- the path of this node in its hierarchy.
 
- 
getUserGet the user to connect to CMIS repository- Returns:
- the user login
- Throws:
- AmetysRepositoryException- if an error occurred
 
- 
getPasswordGet the password to connect to CMIS repository- Returns:
- the user password
- Throws:
- AmetysRepositoryException- if an error occurred
 
- 
getRepositoryUrlGet the CMIS repository URL- Returns:
- the CMIS repository URL
- Throws:
- AmetysRepositoryException- if an error occurred
 
- 
getRepositoryIdGet the CMIS repository id- Returns:
- the CMIS repository id
- Throws:
- AmetysRepositoryException- if an error occurred
 
- 
getMountPointGet the CMIS mount point- Returns:
- the mount point
- Throws:
- AmetysRepositoryException- if an error occurred
 
- 
setRepositoryUrlSet the URL of the CMIS repository- Parameters:
- url- the CMIS repository URL
- Throws:
- AmetysRepositoryException- if an error occurred
 
- 
setRepositoryIdSet the id of the CMIS repository- Parameters:
- id- the CMIS repository id
- Throws:
- AmetysRepositoryException- if an error occurred
 
- 
setMountPointSet a mount point for the CMIS Repository- Parameters:
- mountPoint- the mount point path
 
- 
setUserSet a user name for the CMIS Repository- Parameters:
- user- the login
 
- 
setPasswordSet a password for the CMIS Repository- Parameters:
- password- the password
 
- 
getDescriptionDescription copied from interface:ExplorerNodeGet the description of the application- Specified by:
- getDescriptionin interface- ExplorerNode
- Returns:
- the description
 
 
-