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
Modifier and TypeFieldDescriptionprotected CopySiteComponent
The site copy component.protected CurrentUserProvider
The current user provider.protected ObservationManager
The observation manager.protected AmetysObjectResolver
The ametys object resolver.static final String
The avalon role. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyContentData
(DefaultContent originalContent, DefaultSharedContent content) Copy the data of a content into a shared content.protected DefaultSharedContent
createContent
(String desiredContentName, ModifiableTraversableAmetysObject contentsNode) Create a shared content in the given contents root.createSharedContent
(Site site, DefaultContent originalContent) Create aSharedContent
from an original content.getSharedContents
(Content content) Get the list of shared contents created from the given content.boolean
hasSharedContents
(Content content) Test if there are shared contents created from the given content.protected void
Unpublish a shared content.protected void
Validate a shared content.void
Invalidate a shared content.protected void
removeAllChildren
(ModifiableTraversableAmetysObject rootObject) Remove all children of aModifiableTraversableAmetysObject
.protected void
Remove all data of a model aware data holder.protected void
removeAllModelLessData
(ModifiableModelLessDataHolder dataHolder) Remove all data of a model less data holder.void
removeSharedContentReferences
(Content content) Remove the list of shared contents created from the given content.void
service
(ServiceManager serviceManager) void
switchSharedContentReferences
(Content content) Switch all shared contents created from the given content into default contentsvoid
validateContent
(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:
service
in 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.
-