public class SharedContentManager extends AbstractLogEnabled implements Serviceable, Component
| Modifier and Type | Field and Description | 
|---|---|
protected CopySiteComponent | 
_copySiteComponent
The site copy component. 
 | 
protected CurrentUserProvider | 
_currentUserProvider
The current user provider. 
 | 
protected ObservationManager | 
_observationManager
The observation manager. 
 | 
protected AmetysObjectResolver | 
_resolver
The ametys object resolver. 
 | 
static String | 
ROLE
The avalon role. 
 | 
| Constructor and Description | 
|---|
SharedContentManager()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
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. 
 | 
DefaultSharedContent | 
createSharedContent(Site site,
                   DefaultContent originalContent)
Create a  
SharedContent from an original content. | 
Set<SharedContent> | 
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 | 
internalUnpublishContent(DefaultSharedContent content)
Unpublish a shared content. 
 | 
protected void | 
internalValidateContent(DefaultSharedContent content)
Validate a shared content. 
 | 
void | 
invalidateSharedContent(DefaultSharedContent content)
Invalidate a shared content. 
 | 
protected void | 
removeAllChildren(ModifiableTraversableAmetysObject rootObject)
Remove all children of a  
ModifiableTraversableAmetysObject. | 
protected void | 
removeAllMetadata(ModifiableCompositeMetadata compositeMetadata)
Remove all metadata of a composite. 
 | 
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 contents 
 | 
void | 
validateContent(DefaultSharedContent content)
Validate a shared content. 
 | 
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected AmetysObjectResolver _resolver
protected ObservationManager _observationManager
protected CurrentUserProvider _currentUserProvider
protected CopySiteComponent _copySiteComponent
public SharedContentManager()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface ServiceableServiceExceptionpublic DefaultSharedContent createSharedContent(Site site, DefaultContent originalContent)
SharedContent from an original content.site - the site in which to create the shared content.originalContent - the original content.public void copyContentData(DefaultContent originalContent, DefaultSharedContent content) throws AmetysRepositoryException
originalContent - the content to copy data from.content - the content to copy data to.AmetysRepositoryException - if an error occurs during copypublic void validateContent(DefaultSharedContent content)
content - the content to validate.public void invalidateSharedContent(DefaultSharedContent content)
content - the content to invalidate.public boolean hasSharedContents(Content content)
content - the content to test.public Set<SharedContent> getSharedContents(Content content)
content - the content of which to get referencing shared contents.public void removeSharedContentReferences(Content content)
content - the content of which to remove referencing shared content references.public void switchSharedContentReferences(Content content)
content - the initial content with shared content references.protected DefaultSharedContent createContent(String desiredContentName, ModifiableTraversableAmetysObject contentsNode)
desiredContentName - the desired content name.contentsNode - the contents root.protected void internalValidateContent(DefaultSharedContent content)
content - the content to validate.protected void internalUnpublishContent(DefaultSharedContent content)
content - the content to unpublish.protected void removeAllChildren(ModifiableTraversableAmetysObject rootObject)
ModifiableTraversableAmetysObject.rootObject - the traversable ametys object to empty.protected void removeAllMetadata(ModifiableCompositeMetadata compositeMetadata)
compositeMetadata - the composite metadata to empty.