Class SharedContentManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.web.repository.content.shared.SharedContentManager
- All Implemented Interfaces:
Component,LogEnabled,Serviceable
Component which provides methods to manage shared contents (creation, validation, and so on).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CopySiteComponentThe site copy component.protected CurrentUserProviderThe current user provider.protected ObservationManagerThe observation manager.protected AmetysObjectResolverThe ametys object resolver.static final StringThe avalon role. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyContentData(DefaultContent originalContent, DefaultSharedContent content) Copy the data of a content into a shared content.protected DefaultSharedContentcreateContent(String desiredContentName, ModifiableTraversableAmetysObject contentsNode) Create a shared content in the given contents root.createSharedContent(Site site, DefaultContent originalContent) Create aSharedContentfrom an original content.getSharedContents(Content content) Get the list of shared contents created from the given content.booleanhasSharedContents(Content content) Test if there are shared contents created from the given content.protected voidUnpublish a shared content.protected voidValidate a shared content.voidInvalidate a shared content.protected voidremoveAllChildren(ModifiableTraversableAmetysObject rootObject) Remove all children of aModifiableTraversableAmetysObject.protected voidRemove all data of a model aware data holder.protected voidremoveAllModelLessData(ModifiableModelLessDataHolder dataHolder) Remove all data of a model less data holder.voidremoveSharedContentReferences(Content content) Remove the list of shared contents created from the given content.voidservice(ServiceManager serviceManager) voidswitchSharedContentReferences(Content content) Switch all shared contents created from the given content into default contentsvoidvalidateContent(DefaultSharedContent content) Validate a shared content.Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
The avalon role. -
_resolver
The ametys object resolver. -
_observationManager
The observation manager. -
_currentUserProvider
The current user provider. -
_copySiteComponent
The site copy component.
-
-
Constructor Details
-
SharedContentManager
public SharedContentManager()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
createContent
protected DefaultSharedContent createContent(String desiredContentName, ModifiableTraversableAmetysObject contentsNode) Create a shared content in the given contents root.- Parameters:
desiredContentName- the desired content name.contentsNode- the contents root.- Returns:
- the created content.
-
removeAllChildren
Remove all children of aModifiableTraversableAmetysObject.- Parameters:
rootObject- the traversable ametys object to empty.
-
removeAllModelAwareData
Remove all data of a model aware data holder.- Parameters:
dataHolder- the model aware data holder to empty.
-
removeAllModelLessData
Remove all data of a model less data holder.- Parameters:
dataHolder- the model less data holder to empty.
-