public interface PublicationService
| Modifier and Type | Field and Description |
|---|---|
static String |
CURRENT_STATE |
static String |
HISTORY |
static String |
LIFECYCLE_NAME |
static String |
PUBLICATION |
| Modifier and Type | Method and Description |
|---|---|
void |
addLog(javax.jcr.Node node,
String[] log)
Adds a log entry to the specified Node.
|
void |
addPublicationPlugin(PublicationPlugin p)
Add a Publication Plugin to the service.
|
void |
changeState(javax.jcr.Node node,
String newState,
HashMap<String,String> context)
Update the state of the specified node.
|
void |
enrollNodeInLifecycle(javax.jcr.Node node,
String lifecycle)
Enroll the specified Node to the specified lifecycle.
|
String |
getCurrentState(javax.jcr.Node node)
Retrieves the name of the publication state corresponding to the
specified Node.
|
String |
getLocalizedAndSubstituteLog(Locale locale,
String key,
String[] values)
Get localized log messages and substitute variables.
|
String |
getLocalizedAndSubstituteLog(javax.jcr.Node node,
Locale locale,
String key,
String[] values)
Gets the localized and substitute log for current node.
|
String[][] |
getLog(javax.jcr.Node node)
Retrieves the history of publication changes made to the specified Node.
|
String |
getNodeLifecycleDesc(javax.jcr.Node node)
Retrieves the description of the lifecycle in which the specified Node
has been enrolled.
|
String |
getNodeLifecycleName(javax.jcr.Node node)
Retrieves the name of the lifecycle in which the specified Node has
been enrolled.
|
javax.jcr.Node |
getNodePublish(javax.jcr.Node node,
String pluginName) |
Map<String,PublicationPlugin> |
getPublicationPlugins()
Retrieves all added publication plugins.
|
byte[] |
getStateImage(javax.jcr.Node node,
Locale locale)
Retrieves an image showing the lifecycle state of the specified Node.
|
String |
getUserInfo(javax.jcr.Node node,
Locale locale)
Retrieves description information explaining to the user the current
This method first inspects the specified Node.
|
boolean |
isNodeEnrolledInLifecycle(javax.jcr.Node node)
Determines whether the specified Node has been enrolled into a
lifecycle.
|
boolean |
isUnsubcribeLifecycle(javax.jcr.Node node)
Check current node is unsubcriber or nots
|
void |
unsubcribeLifecycle(javax.jcr.Node node)
Unsubcribe node that in publication lifecyle.
|
static final String PUBLICATION
static final String LIFECYCLE_NAME
static final String CURRENT_STATE
static final String HISTORY
void addPublicationPlugin(PublicationPlugin p)
p - the plugin to addMap<String,PublicationPlugin> getPublicationPlugins()
void changeState(javax.jcr.Node node,
String newState,
HashMap<String,String> context)
throws NotInPublicationLifecycleException,
IncorrectStateUpdateLifecycleException,
Exception
node - the Node whose state needs to be changednewState - the new state.context - a Hashmap containing contextual information needed
to change the state. The information set is defined on a State basis.
A typical example is information submitted by the user in a user
interface.NotInPublicationLifecycleException - in case the Node has not
been registered in any lifecycle yet (in other words, if no publication
mixin has been found).IncorrectStateUpdateLifecycleException - if the update is not
allowedException - the exceptionbyte[] getStateImage(javax.jcr.Node node,
Locale locale)
throws NotInPublicationLifecycleException,
Exception
node - the node from which the image should be obtainedlocale - the localeNotInPublicationLifecycleException - in case the Node has not
been registered in any lifecycle yet (in other words, if no publication
mixin has been found).Exception - the exceptionString getCurrentState(javax.jcr.Node node) throws NotInPublicationLifecycleException, Exception
node - the node from which the publication state should be retrievedNotInPublicationLifecycleException - in case the Node has not
been registered in any lifecycle yet (in other words, if no publication
mixin has been found).Exception - the exceptionString getUserInfo(javax.jcr.Node node, Locale locale) throws NotInPublicationLifecycleException, Exception
node - the Node from which user information should be retrievedlocale - the localeNotInPublicationLifecycleException - in case the Node has not
been registered in any lifecycle yet (in other words, if no publication
mixin has been found).Exception - the exceptionString[][] getLog(javax.jcr.Node node) throws NotInPublicationLifecycleException, Exception
node - the Node from which the history Log should be retrievedNotInPublicationLifecycleException - in case the Node has not
been registered in any lifecycle yet (in other words, if no publication
mixin has been found).Exception - the exceptionvoid addLog(javax.jcr.Node node,
String[] log)
throws NotInPublicationLifecycleException,
Exception
node - the Node from which the history Log should be updatedlog - the Log information to be added log contains : date, newState,
userInvolved, key for additionalInformation in locale with
possible subsitutions, values for substitutionsNotInPublicationLifecycleException - in case the Node has not been
registered in any lifecycle yet (in other words, if no
publication mixin has been found).Exception - the exceptionboolean isNodeEnrolledInLifecycle(javax.jcr.Node node)
throws Exception
node - the Node from which the enrollment should be evaluatedException - the exceptionString getNodeLifecycleName(javax.jcr.Node node) throws NotInPublicationLifecycleException, Exception
node - the Node from which the enrollment should be retrievedNotInPublicationLifecycleException - in case the Node has not
been registered in any lifecycle yet (in other words, if no publication
mixin has been found).Exception - the exceptionString getNodeLifecycleDesc(javax.jcr.Node node) throws NotInPublicationLifecycleException, Exception
node - the Node from which the enrollment should be retrievedNotInPublicationLifecycleException - in case the Node has not
been registered in any lifecycle yet (in other words, if no publication
mixin has been found).Exception - the exceptionvoid enrollNodeInLifecycle(javax.jcr.Node node,
String lifecycle)
throws AlreadyInPublicationLifecycleException,
Exception
node - the Node to be enrolled in the specified lifecyclelifecycle - the name of the lifecycle in which the Node should be
enrolledAlreadyInPublicationLifecycleException - the already in publication lifecycle exceptionException - the exceptionvoid unsubcribeLifecycle(javax.jcr.Node node)
throws NotInPublicationLifecycleException,
Exception
node - the nodeNotInPublicationLifecycleException - the not in publication lifecycle exceptionException - the exceptionboolean isUnsubcribeLifecycle(javax.jcr.Node node)
throws Exception
node - ExceptionString getLocalizedAndSubstituteLog(Locale locale, String key, String[] values)
locale - : the locale to usekey - : the key to translatevalues - : array of string to susbtitute in the stringString getLocalizedAndSubstituteLog(javax.jcr.Node node, Locale locale, String key, String[] values) throws NotInPublicationLifecycleException, Exception
node - the nodelocale - the localekey - the keyvalues - the valuesNotInPublicationLifecycleException - the not in publication lifecycle exceptionException - the exceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.