public class WCMPublicationServiceImpl extends Object implements WCMPublicationService, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
protected CmsService |
cmsService |
protected org.exoplatform.services.listener.ListenerService |
listenerService |
protected PublicationService |
publicationService
The publication service.
|
static String |
STATEVERSION_LIFECYCLE_NAME
The Constant STATEVERSION_LIFECYCLE_NAME.
|
UPDATE_EVENT| Constructor and Description |
|---|
WCMPublicationServiceImpl()
Instantiates a new WCM publication service.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPublicationPlugin(WebpagePublicationPlugin p)
Add a Web Publication Plugin to the service.
|
void |
enrollNodeInLifecycle(javax.jcr.Node node,
String lifecycleName)
Enroll in a web page publication lifecycle.
|
void |
enrollNodeInLifecycle(javax.jcr.Node node,
String siteName,
String remoteUser)
This default implementation uses "States and versions based publication" as
a default lifecycle for all sites and "Simple Publishing" for the root
user.
|
String |
getContentState(javax.jcr.Node node)
returns the current state of the content.
|
Map<String,WebpagePublicationPlugin> |
getWebpagePublicationPlugins()
Retrieves all added web page publication plugins.
|
boolean |
isEnrolledInWCMLifecycle(javax.jcr.Node node)
Checks if is enrolled in wcm lifecycle.
|
void |
start() |
void |
stop() |
void |
unsubcribeLifecycle(javax.jcr.Node node)
Unsubcribe node from a lifecycle plugin.
|
void |
updateLifecyleOnChangeContent(javax.jcr.Node node,
String siteName,
String remoteUser)
This default implementation simply delegates updates to the node WebpagePublicationPlugin.
|
void |
updateLifecyleOnChangeContent(javax.jcr.Node node,
String siteName,
String remoteUser,
String newState)
This default implementation checks if the state is valid then delegates the update to the node WebpagePublicationPlugin.
|
public static final String STATEVERSION_LIFECYCLE_NAME
protected PublicationService publicationService
protected org.exoplatform.services.listener.ListenerService listenerService
protected CmsService cmsService
public WCMPublicationServiceImpl()
public void addPublicationPlugin(WebpagePublicationPlugin p)
WCMPublicationServiceaddPublicationPlugin in interface WCMPublicationServicep - the plugin to addpublic void enrollNodeInLifecycle(javax.jcr.Node node,
String lifecycleName)
throws Exception
WCMPublicationServiceenrollNodeInLifecycle in interface WCMPublicationServicenode - the nodelifecycleName - the lifecycle nameException - the exceptionpublic void unsubcribeLifecycle(javax.jcr.Node node)
throws NotInPublicationLifecycleException,
Exception
WCMPublicationServiceunsubcribeLifecycle in interface WCMPublicationServicenode - the nodeNotInPublicationLifecycleException - the not in publication lifecycle exceptionException - the exceptionpublic Map<String,WebpagePublicationPlugin> getWebpagePublicationPlugins()
WCMPublicationServicegetWebpagePublicationPlugins in interface WCMPublicationServicepublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic boolean isEnrolledInWCMLifecycle(javax.jcr.Node node)
throws NotInPublicationLifecycleException,
Exception
WCMPublicationServiceisEnrolledInWCMLifecycle in interface WCMPublicationServicenode - the nodeNotInPublicationLifecycleException - the not in publication lifecycle exceptionException - the exceptionpublic void enrollNodeInLifecycle(javax.jcr.Node node,
String siteName,
String remoteUser)
throws Exception
enrollNodeInLifecycle in interface WCMPublicationServiceExceptionpublic void updateLifecyleOnChangeContent(javax.jcr.Node node,
String siteName,
String remoteUser)
throws Exception
updateLifecyleOnChangeContent in interface WCMPublicationServiceExceptionPostCreateContentEventListener,
PostEditContentEventListenerpublic void updateLifecyleOnChangeContent(javax.jcr.Node node,
String siteName,
String remoteUser,
String newState)
throws Exception
updateLifecyleOnChangeContent in interface WCMPublicationServiceExceptionpublic String getContentState(javax.jcr.Node node) throws Exception
WCMPublicationServicegetContentState in interface WCMPublicationServiceExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.