Package org.ametys.web.repository.page
Class CopySiteComponent
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.web.repository.page.CopySiteComponent
- All Implemented Interfaces:
Component,LogEnabled,Serviceable
Component for copying site or pages
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ServiceManagerThe service manager.static final StringAvalon Role -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidservice(ServiceManager serviceManager) voidupdateContentsAfterCopy(Site initialSite, Site createdSite) This method re-initializes workflow, updates the site name for web content and updates references to ametys objects on metadata after a site copyvoidupdateLinksInRichText(TraversableAmetysObject initialAO, TraversableAmetysObject createdAO, Content initialContent, Content createdContent) This method analyzes content rich texts and update links if necessaryvoidupdatePagesAfterCopy(Site originalSite, Site createdSite) This method updates the site name of pages and updates references to ametys objects on page's metadata after a site copyvoidupdateReferencesAfterCopy(Page originalPage, Page createdPage) This methods must be used after callingcopyToon a Page.voidupdateSharedContent(WebContent initialContent, WebContent destContent) Updates references all references in a content to another one.voidupdateSharedContent(WebContent initialContent, WebContent destContent, boolean reinitWorkflow) Updates references all references in a content to another one.voidupdateSiteAfterCopy(Site originalSite, Site createdSite) This method must be used after callingcopyToon a Site.Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
ROLE
Avalon Role -
_manager
The service manager.
-
-
Constructor Details
-
CopySiteComponent
public CopySiteComponent()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
updateReferencesAfterCopy
public void updateReferencesAfterCopy(Page originalPage, Page createdPage) throws AmetysRepositoryException This methods must be used after callingcopyToon a Page. Its updates references to ametys objects for metadata of new created pages and contents- Parameters:
originalPage- the original pagecreatedPage- the created page after a copy- Throws:
AmetysRepositoryException- if an error occurs
-
updateSiteAfterCopy
public void updateSiteAfterCopy(Site originalSite, Site createdSite) throws AmetysRepositoryException This method must be used after callingcopyToon a Site. Its updates contents and pages after a site copy- Parameters:
originalSite- the original sitecreatedSite- the created site after copy- Throws:
AmetysRepositoryException- if an error occurs
-
updateContentsAfterCopy
public void updateContentsAfterCopy(Site initialSite, Site createdSite) throws AmetysRepositoryException This method re-initializes workflow, updates the site name for web content and updates references to ametys objects on metadata after a site copy- Parameters:
initialSite- the original sitecreatedSite- the created site after copy- Throws:
AmetysRepositoryException- if an error occurs
-
updateLinksInRichText
public void updateLinksInRichText(TraversableAmetysObject initialAO, TraversableAmetysObject createdAO, Content initialContent, Content createdContent) throws AmetysRepositoryException This method analyzes content rich texts and update links if necessary- Parameters:
initialAO- The initial object copiedcreatedAO- The target objectinitialContent- The initial contentcreatedContent- The created content after copy to update- Throws:
AmetysRepositoryException- if an error occurs
-
updatePagesAfterCopy
public void updatePagesAfterCopy(Site originalSite, Site createdSite) throws AmetysRepositoryException This method updates the site name of pages and updates references to ametys objects on page's metadata after a site copy- Parameters:
originalSite- the original sitecreatedSite- the created site after copy- Throws:
AmetysRepositoryException- if an error occurs
-