Class JCRResourcesCollection
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<JCRResourcesCollectionFactory>
org.ametys.plugins.explorer.resources.jcr.JCRResourcesCollection
- All Implemented Interfaces:
ExplorerNode
,ModifiableExplorerNode
,ModifiableResourceCollection
,ResourceCollection
,ACLAmetysObject
,AmetysObject
,CopiableAmetysObject
,DataAwareAmetysObject
,ModelLessDataAwareAmetysObject
,ModifiableModelLessDataAwareAmetysObject
,DataHolder
,ModelLessDataHolder
,ModifiableDataHolder
,ModifiableModelLessDataHolder
,JCRAmetysObject
,JCRTraversableAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,ModifiableTraversableAmetysObject
,RemovableAmetysObject
,TraversableAmetysObject
public class JCRResourcesCollection
extends DefaultTraversableAmetysObject<JCRResourcesCollectionFactory>
implements ModifiableResourceCollection, CopiableAmetysObject, ModifiableModelLessDataAwareAmetysObject
ExplorerNode
representing a collection of resources.-
Field Summary
-
Constructor Summary
ConstructorDescriptionJCRResourcesCollection
(javax.jcr.Node node, String parentPath, JCRResourcesCollectionFactory factory) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncopyTo
(ModifiableTraversableAmetysObject parent, String name) Copy the currentAmetysObject
to the given object.copyTo
(ModifiableTraversableAmetysObject parent, String name, List<String> restrictTo) Copy the currentAmetysObject
to the given object if it is not in the restriction list.Returns the application id corresponding to this Node.Get the type of child collectionReturns theDataHolder
of 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.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.Get the type of child resourcesboolean
Returns true if this explorer node contains child explorer nodes.boolean
Returns true if this explorer node contains resources.void
setDescription
(String description) Set the description of the applicationMethods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, disallowInheritance, getChild, getChildren, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasChild, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNames
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToJSON, dataToSAX, getModelItemTypeExtensionPoint, getType, getValue, getValue, getValueOfType, getValueOfType, hasDifferences, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultiple
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToJSON, dataToSAX, hasValue, hasValueOrEmpty
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObject
getComposite, getComposite, getParentDataHolder, getRepositoryData, getRootDataHolder, removeValue, setValue, setValue, synchronizeValues
Methods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChild
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChild, getChildAt, getChildPosition, getChildren, hasChild
-
Field Details
-
APPLICATION_ID
application id for resources collections.- See Also:
-
DATA_DESCRIPTION
Constants for description metadata- See Also:
-
-
Constructor Details
-
JCRResourcesCollection
public JCRResourcesCollection(javax.jcr.Node node, String parentPath, JCRResourcesCollectionFactory factory) Constructor- Parameters:
node
- The jcr nodeparentPath
- The parent pathfactory
- The factory
-
-
Method Details
-
getIconCls
Description copied from interface:ExplorerNode
Returns the icon css class for this Node.- Specified by:
getIconCls
in interfaceExplorerNode
- Returns:
- the icon css class for this Node for rendering in the tree.
-
getApplicationId
Description copied from interface:ExplorerNode
Returns the application id corresponding to this Node.- Specified by:
getApplicationId
in interfaceExplorerNode
- Returns:
- the application id corresponding to this Node.
-
getCollectionType
Description copied from interface:ModifiableResourceCollection
Get the type of child collection- Specified by:
getCollectionType
in interfaceModifiableResourceCollection
- Returns:
- the type of child collection
-
getResourceType
Description copied from interface:ModifiableResourceCollection
Get the type of child resources- Specified by:
getResourceType
in interfaceModifiableResourceCollection
- Returns:
- the type of child resources
-
getResourcePath
Description copied from interface:ResourceCollection
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.- Specified by:
getResourcePath
in interfaceResourceCollection
- Returns:
- the path of this collection in its hierarchy.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getExplorerPath
Description copied from interface:ExplorerNode
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.- Specified by:
getExplorerPath
in interfaceExplorerNode
- Returns:
- the path of this node in its hierarchy.
-
hasChildResources
Description copied from interface:ResourceCollection
Returns true if this explorer node contains resources.- Specified by:
hasChildResources
in interfaceResourceCollection
- Returns:
- true if this explorer node contains resources.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
hasChildExplorerNodes
Description copied from interface:ExplorerNode
Returns true if this explorer node contains child explorer nodes.- Specified by:
hasChildExplorerNodes
in interfaceExplorerNode
- Returns:
- true if this explorer node contains child explorer nodes.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
copyTo
public AmetysObject copyTo(ModifiableTraversableAmetysObject parent, String name) throws AmetysRepositoryException Description copied from interface:CopiableAmetysObject
Copy the currentAmetysObject
to the given object. Be careful, this method save changes.- Specified by:
copyTo
in interfaceCopiableAmetysObject
- Parameters:
parent
- The parent of the new object. Can not be null.name
- Name of the new object. Can be null. If null, the new name will be get from the copied object- Returns:
- the created object
- Throws:
AmetysRepositoryException
- if an error occurs.
-
copyTo
public AmetysObject copyTo(ModifiableTraversableAmetysObject parent, String name, List<String> restrictTo) throws AmetysRepositoryException Description copied from interface:CopiableAmetysObject
Copy the currentAmetysObject
to the given object if it is not in the restriction list. Be careful, this method save changes.- Specified by:
copyTo
in interfaceCopiableAmetysObject
- Parameters:
parent
- The parent of the new object. Can not be null.name
- Name of the new object. Can be null. If null, the new name will be get from the copied objectrestrictTo
- A restrict list ofCopiableAmetysObject
authorized to be copied- Returns:
- the created object
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDescription
Description copied from interface:ExplorerNode
Get the description of the application- Specified by:
getDescription
in interfaceExplorerNode
- Returns:
- the description
-
setDescription
Description copied from interface:ModifiableExplorerNode
Set the description of the application- Specified by:
setDescription
in interfaceModifiableExplorerNode
- Parameters:
description
- the description
-
getDataHolder
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelLessDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelLessDataAwareAmetysObject
- Returns:
- the
DataHolder
of thisAmetysObject
-