org.exoplatform.services.wcm.publication
Interface WCMPublicationService

All Known Implementing Classes:
WCMPublicationServiceImpl

public interface WCMPublicationService

Created by The eXo Platform SAS Author : Hoa Pham (hoa.pham@exoplatform.com) Sep 29, 2008 Modified : Jul 29, 2009 - Benjamin Paillereau (benjamin.paillereau@exoplatform.com) - added enrollNodeInLifecycle by context - added updateLifecyleOnChangeContent by context


Field Summary
static java.lang.String UPDATE_EVENT
           
 
Method Summary
 void addPublicationPlugin(WebpagePublicationPlugin p)
          Add a Web Publication Plugin to the service.
 void enrollNodeInLifecycle(javax.jcr.Node node, java.lang.String lifecycleName)
          Enroll in a web page publication lifecycle.
 void enrollNodeInLifecycle(javax.jcr.Node node, java.lang.String siteName, java.lang.String remoteUser)
          Enroll this node in the default publication lifecycle.
 java.lang.String getContentState(javax.jcr.Node node)
          returns the current state of the content.
 java.util.Map<java.lang.String,WebpagePublicationPlugin> getWebpagePublicationPlugins()
          Retrieves all added web page publication plugins.
 boolean isEnrolledInWCMLifecycle(javax.jcr.Node node)
          Checks if is enrolled in wcm lifecycle.
 void publishContentCLV(javax.jcr.Node content, org.exoplatform.portal.config.model.Page page, java.lang.String clvPortletId, java.lang.String portalOwnerName, java.lang.String remoteUser)
          Publish content to a portal page when the node is in a publication lifecyle.
 void publishContentSCV(javax.jcr.Node content, org.exoplatform.portal.config.model.Page page, java.lang.String portalOwnerName)
          Publish content to a portal page when the node is in a publication lifecyle.
 void suspendPublishedContentFromPage(javax.jcr.Node content, org.exoplatform.portal.config.model.Page page, java.lang.String remoteUser)
          Suspend a published content from a portal page.
 void unsubcribeLifecycle(javax.jcr.Node node)
          Unsubcribe node from a lifecycle plugin.
 void updateLifecycleOnChangeNavigation(org.exoplatform.portal.config.model.PageNavigation navigation, java.lang.String remoteUser)
          Retrieves all web page lifecycles and update the publication lifecycle when a navigation is changed.
 void updateLifecycleOnRemovePage(org.exoplatform.portal.config.model.Page page, java.lang.String remoteUser)
          Retrieves all web page lifecycles and update the publication lifecycle when a page is removed.
 void updateLifecyleOnChangeContent(javax.jcr.Node node, java.lang.String siteName, java.lang.String remoteUser)
          Called by create and edit listeners.
 void updateLifecyleOnChangeContent(javax.jcr.Node node, java.lang.String siteName, java.lang.String remoteUser, java.lang.String newState)
          It allows to update the lifecycle of the content with a new state.
 void updateLifecyleOnChangePage(org.exoplatform.portal.config.model.Page page, java.lang.String remoteUser)
          Retrieves all web page lifecycles and update the publication lifecycle when a page is changed.
 void updateLifecyleOnCreateNavigation(org.exoplatform.portal.config.model.PageNavigation navigation)
          Retrieves all web page lifecycles and update the publication lifecycle when a navigation is created.
 void updateLifecyleOnCreatePage(org.exoplatform.portal.config.model.Page page, java.lang.String remoteUser)
          Retrieves all web page lifecycles and update the publication lifecycle when a page is created.
 void updateLifecyleOnRemoveNavigation(org.exoplatform.portal.config.model.PageNavigation navigation)
          Retrieves all web page lifecycles and update the publication lifecycle when a navigation is removed.
 

Field Detail

UPDATE_EVENT

static final java.lang.String UPDATE_EVENT
See Also:
Constant Field Values
Method Detail

addPublicationPlugin

void addPublicationPlugin(WebpagePublicationPlugin p)
Add a Web Publication Plugin to the service. The method caches all added plugins.

Parameters:
p - the plugin to add

publishContentSCV

void publishContentSCV(javax.jcr.Node content,
                       org.exoplatform.portal.config.model.Page page,
                       java.lang.String portalOwnerName)
                       throws org.exoplatform.services.ecm.publication.NotInPublicationLifecycleException,
                              java.lang.Exception
Publish content to a portal page when the node is in a publication lifecyle.

Parameters:
content - the content
page - the page
portalOwnerName -
Throws:
org.exoplatform.services.ecm.publication.NotInPublicationLifecycleException - the not in publication lifecycle exception
java.lang.Exception - the exception

publishContentCLV

void publishContentCLV(javax.jcr.Node content,
                       org.exoplatform.portal.config.model.Page page,
                       java.lang.String clvPortletId,
                       java.lang.String portalOwnerName,
                       java.lang.String remoteUser)
                       throws java.lang.Exception
Publish content to a portal page when the node is in a publication lifecyle.

Parameters:
content - the content
page - the page
clvPortletId - the clv portlet id
portalOwnerName - the portal owner name
remoteUser - the remote user
Throws:
java.lang.Exception - the exception

suspendPublishedContentFromPage

void suspendPublishedContentFromPage(javax.jcr.Node content,
                                     org.exoplatform.portal.config.model.Page page,
                                     java.lang.String remoteUser)
                                     throws org.exoplatform.services.ecm.publication.NotInPublicationLifecycleException,
                                            java.lang.Exception
Suspend a published content from a portal page.

Parameters:
content - the jcr content node
page - the portal page
remoteUser -
Throws:
org.exoplatform.services.ecm.publication.NotInPublicationLifecycleException - the not in publication lifecycle exception
java.lang.Exception - the exception

getWebpagePublicationPlugins

java.util.Map<java.lang.String,WebpagePublicationPlugin> getWebpagePublicationPlugins()
Retrieves all added web page publication plugins. This method is notably used to enumerate possible lifecycles.

Returns:
the map of web page publication plugin

isEnrolledInWCMLifecycle

boolean isEnrolledInWCMLifecycle(javax.jcr.Node node)
                                 throws org.exoplatform.services.ecm.publication.NotInPublicationLifecycleException,
                                        java.lang.Exception
Checks if is enrolled in wcm lifecycle.

Parameters:
node - the node
Returns:
true, if is enrolled in wcm lifecycle
Throws:
org.exoplatform.services.ecm.publication.NotInPublicationLifecycleException - the not in publication lifecycle exception
java.lang.Exception - the exception

enrollNodeInLifecycle

void enrollNodeInLifecycle(javax.jcr.Node node,
                           java.lang.String lifecycleName)
                           throws java.lang.Exception
Enroll in a web page publication lifecycle. The method will be retrieve the web page publication lifecycle by lifecycle name and enroll to lifecycle

Parameters:
node - the node
lifecycleName - the lifecycle name
Throws:
java.lang.Exception - the exception

enrollNodeInLifecycle

void enrollNodeInLifecycle(javax.jcr.Node node,
                           java.lang.String siteName,
                           java.lang.String remoteUser)
                           throws java.lang.Exception
Enroll this node in the default publication lifecycle. Depending on implementation, the default lifecycle could be based on : - lifecycle per site (site provided as a parameter) - lifecycle per author (remoteUser provided as a parameter) - lifecycle per content type (based on the node primary nodetype or its jcr path)

Parameters:
node -
siteName -
author -
Throws:
java.lang.Exception

unsubcribeLifecycle

void unsubcribeLifecycle(javax.jcr.Node node)
                         throws org.exoplatform.services.ecm.publication.NotInPublicationLifecycleException,
                                java.lang.Exception
Unsubcribe node from a lifecycle plugin. After unsubcribe, the node can enroll to other publication lifecycle

Parameters:
node - the node
Throws:
org.exoplatform.services.ecm.publication.NotInPublicationLifecycleException - the not in publication lifecycle exception
java.lang.Exception - the exception

updateLifecyleOnCreatePage

void updateLifecyleOnCreatePage(org.exoplatform.portal.config.model.Page page,
                                java.lang.String remoteUser)
                                throws java.lang.Exception
Retrieves all web page lifecycles and update the publication lifecycle when a page is created.

Parameters:
page - the page
remoteUser -
Throws:
java.lang.Exception - the exception

updateLifecyleOnChangePage

void updateLifecyleOnChangePage(org.exoplatform.portal.config.model.Page page,
                                java.lang.String remoteUser)
                                throws java.lang.Exception
Retrieves all web page lifecycles and update the publication lifecycle when a page is changed.

Parameters:
page - the page
remoteUser -
Throws:
java.lang.Exception - the exception

updateLifecycleOnRemovePage

void updateLifecycleOnRemovePage(org.exoplatform.portal.config.model.Page page,
                                 java.lang.String remoteUser)
                                 throws java.lang.Exception
Retrieves all web page lifecycles and update the publication lifecycle when a page is removed.

Parameters:
page - the page
remoteUser -
Throws:
java.lang.Exception - the exception

updateLifecyleOnCreateNavigation

void updateLifecyleOnCreateNavigation(org.exoplatform.portal.config.model.PageNavigation navigation)
                                      throws java.lang.Exception
Retrieves all web page lifecycles and update the publication lifecycle when a navigation is created.

Parameters:
navigation - the navigation
Throws:
java.lang.Exception - the exception

updateLifecycleOnChangeNavigation

void updateLifecycleOnChangeNavigation(org.exoplatform.portal.config.model.PageNavigation navigation,
                                       java.lang.String remoteUser)
                                       throws java.lang.Exception
Retrieves all web page lifecycles and update the publication lifecycle when a navigation is changed.

Parameters:
navigation - the navigation
remoteUser -
Throws:
java.lang.Exception - the exception

updateLifecyleOnRemoveNavigation

void updateLifecyleOnRemoveNavigation(org.exoplatform.portal.config.model.PageNavigation navigation)
                                      throws java.lang.Exception
Retrieves all web page lifecycles and update the publication lifecycle when a navigation is removed.

Parameters:
navigation - the navigation
Throws:
java.lang.Exception - the exception

updateLifecyleOnChangeContent

void updateLifecyleOnChangeContent(javax.jcr.Node node,
                                   java.lang.String siteName,
                                   java.lang.String remoteUser)
                                   throws java.lang.Exception
Called by create and edit listeners. It allows to update the lifecycle of the content depending of its current state.

Parameters:
node -
currentSite -
remoteUser -
Throws:
java.lang.Exception
See Also:
PostCreateContentEventListener, PostEditContentEventListener

updateLifecyleOnChangeContent

void updateLifecyleOnChangeContent(javax.jcr.Node node,
                                   java.lang.String siteName,
                                   java.lang.String remoteUser,
                                   java.lang.String newState)
                                   throws java.lang.Exception
It allows to update the lifecycle of the content with a new state.

Parameters:
node -
currentSite -
remoteUser -
newState -
Throws:
java.lang.Exception

getContentState

java.lang.String getContentState(javax.jcr.Node node)
                                 throws java.lang.Exception
returns the current state of the content. We consider the publication:currentState property mandatory in all lifecycles.

Parameters:
node -
Returns:
the revision state stored in publication:currentState property
Throws:
java.lang.Exception


Copyright © 2011 eXo Platform SAS. All Rights Reserved.