org.exoplatform.services.wcm.publication.lifecycle.stageversion
Class StageAndVersionPublicationPlugin

java.lang.Object
  extended by org.exoplatform.container.component.BaseComponentPlugin
      extended by org.exoplatform.services.ecm.publication.PublicationPlugin
          extended by org.exoplatform.services.wcm.publication.WebpagePublicationPlugin
              extended by org.exoplatform.services.wcm.publication.lifecycle.stageversion.StageAndVersionPublicationPlugin
All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin

public class StageAndVersionPublicationPlugin
extends WebpagePublicationPlugin

The Class StageAndVersionPublicationPlugin.


Field Summary
 
Fields inherited from class org.exoplatform.container.component.BaseComponentPlugin
desc, name
 
Constructor Summary
StageAndVersionPublicationPlugin()
          Instantiates a new stage and version publication plugin.
 
Method Summary
 void addMixin(javax.jcr.Node node)
           
 boolean canAddMixin(javax.jcr.Node node)
           
 void changeState(javax.jcr.Node node, java.lang.String newState, java.util.HashMap<java.lang.String,java.lang.String> context)
           
 java.lang.String getLifecycleType()
          Gets the lifecycle type.
 java.util.List<java.lang.String> getListPageNavigationUri(org.exoplatform.portal.config.model.Page page, java.lang.String remoteUser)
          Gets the list page navigation uri.
 java.lang.String getLocalizedAndSubstituteMessage(java.util.Locale locale, java.lang.String key, java.lang.String[] values)
           
 javax.jcr.Node getNodeView(javax.jcr.Node node, java.util.Map<java.lang.String,java.lang.Object> context)
           
 java.lang.String[] getPossibleStates()
           
 byte[] getStateImage(javax.jcr.Node arg0, java.util.Locale arg1)
           
 org.exoplatform.webui.form.UIForm getStateUI(javax.jcr.Node node, org.exoplatform.webui.core.UIComponent component)
           
 java.lang.String getUserInfo(javax.jcr.Node arg0, java.util.Locale arg1)
           
 void publishContentToCLV(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 node to a portal page.
 void publishContentToSCV(javax.jcr.Node content, org.exoplatform.portal.config.model.Page page, java.lang.String portalOwnerName)
          Publish content node to a portal page.
 void suspendPublishedContentFromPage(javax.jcr.Node content, org.exoplatform.portal.config.model.Page page, java.lang.String remoteUser)
          Suspend published content from a portal page.
 void updateLifecycleOnChangeNavigation(org.exoplatform.portal.config.model.PageNavigation pageNavigation, java.lang.String remoteUser)
          Update lifecyle state of the any content relates to a navigation when the navigation is changed.
 void updateLifecycleOnRemovePage(org.exoplatform.portal.config.model.Page page, java.lang.String remoteUser)
          Update lifecyle state of the any content relates to the page when page is removed.
 void updateLifecyleOnChangeContent(javax.jcr.Node node, java.lang.String remoteUser)
          In this publication process, we put the content in Draft state when editing it.
 void updateLifecyleOnChangeContent(javax.jcr.Node node, java.lang.String remoteUser, java.lang.String newState)
          In this publication process, we put the content in Draft state when editing it.
 void updateLifecyleOnChangePage(org.exoplatform.portal.config.model.Page page, java.lang.String remoteUser)
          Update lifecyle state of the any content relates to the page when page is changed.
 void updateLifecyleOnCreateNavigation(org.exoplatform.portal.config.model.PageNavigation pageNavigation)
          Update lifecyle state of the any content relates to a navigation when the navigation is created.
 void updateLifecyleOnCreatePage(org.exoplatform.portal.config.model.Page page, java.lang.String remoteUser)
          Update lifecyle state of the any content relates to the page when page is created.
 void updateLifecyleOnRemoveNavigation(org.exoplatform.portal.config.model.PageNavigation pageNavigation)
          Update lifecyle state of the any content relates to a navigation when the navigation is removed.
 
Methods inherited from class org.exoplatform.services.ecm.publication.PublicationPlugin
getLifecycleName, getNodeLifecycleDesc
 
Methods inherited from class org.exoplatform.container.component.BaseComponentPlugin
getDescription, getName, setDescription, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StageAndVersionPublicationPlugin

public StageAndVersionPublicationPlugin()
Instantiates a new stage and version publication plugin.

Method Detail

getLifecycleType

public java.lang.String getLifecycleType()
Description copied from class: WebpagePublicationPlugin
Gets the lifecycle type.

Specified by:
getLifecycleType in class WebpagePublicationPlugin
Returns:
the lifecycle type

addMixin

public void addMixin(javax.jcr.Node node)
              throws java.lang.Exception
Specified by:
addMixin in class org.exoplatform.services.ecm.publication.PublicationPlugin
Throws:
java.lang.Exception

canAddMixin

public boolean canAddMixin(javax.jcr.Node node)
                    throws java.lang.Exception
Specified by:
canAddMixin in class org.exoplatform.services.ecm.publication.PublicationPlugin
Throws:
java.lang.Exception

changeState

public void changeState(javax.jcr.Node node,
                        java.lang.String newState,
                        java.util.HashMap<java.lang.String,java.lang.String> context)
                 throws org.exoplatform.services.ecm.publication.IncorrectStateUpdateLifecycleException,
                        java.lang.Exception
Specified by:
changeState in class org.exoplatform.services.ecm.publication.PublicationPlugin
Throws:
org.exoplatform.services.ecm.publication.IncorrectStateUpdateLifecycleException
java.lang.Exception

getLocalizedAndSubstituteMessage

public java.lang.String getLocalizedAndSubstituteMessage(java.util.Locale locale,
                                                         java.lang.String key,
                                                         java.lang.String[] values)
                                                  throws java.lang.Exception
Specified by:
getLocalizedAndSubstituteMessage in class org.exoplatform.services.ecm.publication.PublicationPlugin
Throws:
java.lang.Exception

getNodeView

public javax.jcr.Node getNodeView(javax.jcr.Node node,
                                  java.util.Map<java.lang.String,java.lang.Object> context)
                           throws java.lang.Exception
Specified by:
getNodeView in class org.exoplatform.services.ecm.publication.PublicationPlugin
Throws:
java.lang.Exception

getPossibleStates

public java.lang.String[] getPossibleStates()
Specified by:
getPossibleStates in class org.exoplatform.services.ecm.publication.PublicationPlugin

getStateImage

public byte[] getStateImage(javax.jcr.Node arg0,
                            java.util.Locale arg1)
                     throws java.io.IOException,
                            java.io.FileNotFoundException,
                            java.lang.Exception
Specified by:
getStateImage in class org.exoplatform.services.ecm.publication.PublicationPlugin
Throws:
java.io.IOException
java.io.FileNotFoundException
java.lang.Exception

getStateUI

public org.exoplatform.webui.form.UIForm getStateUI(javax.jcr.Node node,
                                                    org.exoplatform.webui.core.UIComponent component)
                                             throws java.lang.Exception
Specified by:
getStateUI in class org.exoplatform.services.ecm.publication.PublicationPlugin
Throws:
java.lang.Exception

getUserInfo

public java.lang.String getUserInfo(javax.jcr.Node arg0,
                                    java.util.Locale arg1)
                             throws java.lang.Exception
Specified by:
getUserInfo in class org.exoplatform.services.ecm.publication.PublicationPlugin
Throws:
java.lang.Exception

publishContentToSCV

public void publishContentToSCV(javax.jcr.Node content,
                                org.exoplatform.portal.config.model.Page page,
                                java.lang.String portalOwnerName)
                         throws java.lang.Exception
Description copied from class: WebpagePublicationPlugin
Publish content node to a portal page. Base of each publication lifecycle implementation,a new portlet can be added to the page and the lifecyle state will be created

Specified by:
publishContentToSCV in class WebpagePublicationPlugin
Parameters:
content - the jcr content node
page - the portal page
portalOwnerName - the portal owner name
Throws:
java.lang.Exception - the exception

publishContentToCLV

public void publishContentToCLV(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
Description copied from class: WebpagePublicationPlugin
Publish content node to a portal page.

Specified by:
publishContentToCLV in class WebpagePublicationPlugin
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

public void suspendPublishedContentFromPage(javax.jcr.Node content,
                                            org.exoplatform.portal.config.model.Page page,
                                            java.lang.String remoteUser)
                                     throws java.lang.Exception
Description copied from class: WebpagePublicationPlugin
Suspend published content from a portal page. Base of each publication lifecycle implementation, a portlet that is used to publish the content can be removed to the page and the lifecyle state will be created

Specified by:
suspendPublishedContentFromPage in class WebpagePublicationPlugin
Parameters:
content - the content
page - the page
remoteUser - the remote user
Throws:
java.lang.Exception - the exception

updateLifecycleOnChangeNavigation

public void updateLifecycleOnChangeNavigation(org.exoplatform.portal.config.model.PageNavigation pageNavigation,
                                              java.lang.String remoteUser)
                                       throws java.lang.Exception
Description copied from class: WebpagePublicationPlugin
Update lifecyle state of the any content relates to a navigation when the navigation is changed.

Specified by:
updateLifecycleOnChangeNavigation in class WebpagePublicationPlugin
Parameters:
pageNavigation - the navigation
remoteUser - the remote user
Throws:
java.lang.Exception - the exception

updateLifecycleOnRemovePage

public void updateLifecycleOnRemovePage(org.exoplatform.portal.config.model.Page page,
                                        java.lang.String remoteUser)
                                 throws java.lang.Exception
Description copied from class: WebpagePublicationPlugin
Update lifecyle state of the any content relates to the page when page is removed.

Specified by:
updateLifecycleOnRemovePage in class WebpagePublicationPlugin
Parameters:
page - the page
remoteUser - the remote user
Throws:
java.lang.Exception - the exception

updateLifecyleOnChangePage

public void updateLifecyleOnChangePage(org.exoplatform.portal.config.model.Page page,
                                       java.lang.String remoteUser)
                                throws java.lang.Exception
Description copied from class: WebpagePublicationPlugin
Update lifecyle state of the any content relates to the page when page is changed.

Specified by:
updateLifecyleOnChangePage in class WebpagePublicationPlugin
Parameters:
page - the page
remoteUser - the remote user
Throws:
java.lang.Exception - the exception

updateLifecyleOnCreateNavigation

public void updateLifecyleOnCreateNavigation(org.exoplatform.portal.config.model.PageNavigation pageNavigation)
                                      throws java.lang.Exception
Description copied from class: WebpagePublicationPlugin
Update lifecyle state of the any content relates to a navigation when the navigation is created.

Specified by:
updateLifecyleOnCreateNavigation in class WebpagePublicationPlugin
Parameters:
pageNavigation - the navigation
Throws:
java.lang.Exception - the exception

updateLifecyleOnCreatePage

public void updateLifecyleOnCreatePage(org.exoplatform.portal.config.model.Page page,
                                       java.lang.String remoteUser)
                                throws java.lang.Exception
Description copied from class: WebpagePublicationPlugin
Update lifecyle state of the any content relates to the page when page is created.

Specified by:
updateLifecyleOnCreatePage in class WebpagePublicationPlugin
Parameters:
page - the page
remoteUser - the remote user
Throws:
java.lang.Exception - the exception

updateLifecyleOnRemoveNavigation

public void updateLifecyleOnRemoveNavigation(org.exoplatform.portal.config.model.PageNavigation pageNavigation)
                                      throws java.lang.Exception
Description copied from class: WebpagePublicationPlugin
Update lifecyle state of the any content relates to a navigation when the navigation is removed.

Specified by:
updateLifecyleOnRemoveNavigation in class WebpagePublicationPlugin
Parameters:
pageNavigation - the navigation
Throws:
java.lang.Exception - the exception

getListPageNavigationUri

public java.util.List<java.lang.String> getListPageNavigationUri(org.exoplatform.portal.config.model.Page page,
                                                                 java.lang.String remoteUser)
                                                          throws java.lang.Exception
Gets the list page navigation uri.

Specified by:
getListPageNavigationUri in class WebpagePublicationPlugin
Parameters:
page - the page
remoteUser - the remote user
Returns:
the list page navigation uri
Throws:
java.lang.Exception - the exception

updateLifecyleOnChangeContent

public void updateLifecyleOnChangeContent(javax.jcr.Node node,
                                          java.lang.String remoteUser)
                                   throws java.lang.Exception
In this publication process, we put the content in Draft state when editing it.

Specified by:
updateLifecyleOnChangeContent in class WebpagePublicationPlugin
Parameters:
node - the node
remoteUser - the remote user
Throws:
java.lang.Exception - the exception
See Also:
PostCreateContentEventListener, PostEditContentEventListener

updateLifecyleOnChangeContent

public void updateLifecyleOnChangeContent(javax.jcr.Node node,
                                          java.lang.String remoteUser,
                                          java.lang.String newState)
                                   throws java.lang.Exception
In this publication process, we put the content in Draft state when editing it.

Specified by:
updateLifecyleOnChangeContent in class WebpagePublicationPlugin
Parameters:
node - the node
remoteUser - the remote user
newState - the new state
Throws:
java.lang.Exception - the exception
See Also:
PostCreateContentEventListener, PostEditContentEventListener


Copyright © 2011 eXo Platform SAS. All Rights Reserved.