Class JCRResourcesCollection<F extends JCRResourcesCollectionFactory>
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<F>
org.ametys.plugins.explorer.resources.jcr.JCRResourcesCollection<F>
- Type Parameters:
F- the actual type of factory.
- 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,TrashableAmetysObject,TraversableAmetysObject
- Direct Known Subclasses:
Folder
public class JCRResourcesCollection<F extends JCRResourcesCollectionFactory>
extends DefaultTraversableAmetysObject<F>
implements ModifiableResourceCollection, CopiableAmetysObject, ModifiableModelLessDataAwareAmetysObject, TrashableAmetysObject
ExplorerNode representing a collection of resources.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJCRResourcesCollection(javax.jcr.Node node, String parentPath, F factory) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncopyTo(ModifiableTraversableAmetysObject parent, String name) Copy the currentAmetysObjectto the given object.copyTo(ModifiableTraversableAmetysObject parent, String name, List<String> restrictTo) Copy the currentAmetysObjectto 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 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.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 resourcesbooleanReturns true if this explorer node contains child explorer nodes.booleanReturns true if this explorer node contains resources.Move thisAmetysObjectto the trash.Restore thisAmetysObjectfrom the trash.voidsetDescription(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, removeDeniedUsersMethods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNamesMethods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToJSON, dataToSAX, getModelItemTypeExtensionPoint, getType, getValue, getValue, getValueOfType, getValueOfType, hasDifferences, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultipleMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToJSON, dataToSAX, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObject
getComposite, getComposite, getParentDataHolder, getRepositoryData, getRootDataHolder, removeValue, setValue, setValue, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.ModifiableTraversableAmetysObject
createChildMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
removeMethods 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
Constructor- Parameters:
node- The jcr nodeparentPath- The parent pathfactory- The factory
-
-
Method Details
-
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.
-
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.
-
getCollectionType
Description copied from interface:ModifiableResourceCollectionGet the type of child collection- Specified by:
getCollectionTypein interfaceModifiableResourceCollection- Returns:
- the type of child collection
-
getResourceType
Description copied from interface:ModifiableResourceCollectionGet the type of child resources- Specified by:
getResourceTypein interfaceModifiableResourceCollection- Returns:
- the type of child resources
-
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.
-
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.
-
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.
-
copyTo
public AmetysObject copyTo(ModifiableTraversableAmetysObject parent, String name) throws AmetysRepositoryException Description copied from interface:CopiableAmetysObjectCopy the currentAmetysObjectto the given object. Be careful, this method save changes.- Specified by:
copyToin 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:CopiableAmetysObjectCopy the currentAmetysObjectto the given object if it is not in the restriction list. Be careful, this method save changes.- Specified by:
copyToin 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 ofCopiableAmetysObjectauthorized to be copied- Returns:
- the created object
- Throws:
AmetysRepositoryException- if an error occurs.
-
getDescription
Description copied from interface:ExplorerNodeGet the description of the application- Specified by:
getDescriptionin interfaceExplorerNode- Returns:
- the description
-
setDescription
Description copied from interface:ModifiableExplorerNodeSet the description of the application- Specified by:
setDescriptionin interfaceModifiableExplorerNode- Parameters:
description- the description
-
getDataHolder
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelLessDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelLessDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-
moveToTrash
Description copied from interface:TrashableAmetysObjectMove thisAmetysObjectto the trash.- Specified by:
moveToTrashin interfaceTrashableAmetysObject- Returns:
- the created trash element that represents the object in the trash
-
restoreFromTrash
Description copied from interface:TrashableAmetysObjectRestore thisAmetysObjectfrom the trash.- Specified by:
restoreFromTrashin interfaceTrashableAmetysObject- Returns:
- the restored ametys object
- Throws:
UnknownParentException- if it's not possible to determine a location to restore the object
-