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 voidRemove all data of the given contentvoidremoveSharedContentReferences(Content content) Remove the list of shared contents created from the given content.protected voidremoveUnversionedData(ModifiableDataHolder unversionedDataHolder) Remove all data of the given unversioned data holder.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.
-
removeContentData
Remove all data of the given content- Parameters:
content- the content to empty.
-
removeUnversionedData
Remove all data of the given unversioned data holder.- Parameters:
unversionedDataHolder- the unversioned data holder to empty.
-