public abstract class BaseAction
extends java.lang.Object
implements com.day.cq.wcm.msm.api.LiveAction
LiveAction interface.
This abstract class offers some basic configuration tasks for building a
LiveAction and also default implementations for the deprecated
methods. It will speed up the implementation of a LiveAction
by only implementing the handles and doExecute abstract methods.| Modifier and Type | Method and Description |
|---|---|
void |
execute(ResourceResolver resolver,
com.day.cq.wcm.msm.api.LiveRelationship relation,
com.day.cq.wcm.msm.api.ActionConfig config,
boolean autoSave)
Deprecated.
|
void |
execute(ResourceResolver resolver,
com.day.cq.wcm.msm.api.LiveRelationship relation,
com.day.cq.wcm.msm.api.ActionConfig config,
boolean autoSave,
boolean isResetRollout)
Deprecated.
|
void |
execute(Resource source,
Resource target,
com.day.cq.wcm.msm.api.LiveRelationship relation,
boolean autoSave,
boolean isResetRollout)
Executes the current action.
- checks the preconditions using handles()- if preconditions are met the doExecute() is called- changes will be saved automatically if the autoSave flag is set to true This method needs that at least one of the Resource parameters (source,target) to be non-null when used in conjunction with
the autoSave flag since a ResourceResolver will need to be obtained to save the changes. |
java.lang.String |
getName()
The name of this action.
|
java.lang.String |
getParameterName()
Deprecated.
|
java.lang.String[] |
getPropertiesNames()
Deprecated.
|
int |
getRank()
Deprecated.
|
java.lang.String |
getTitle()
Deprecated.
|
static boolean |
isPage(Node node)
Checks if the given Node is considered a
PageThe check considers the and its primary child the Node as being a Page. |
static boolean |
resourceHasNode(Resource resource)
Simple test if a Resource exists and is adaptable to
Node |
void |
write(JSONWriter jsonWriter)
Deprecated.
|
public java.lang.String getName()
createsAction() from LiveActionFactory
that creates this actiongetName in interface com.day.cq.wcm.msm.api.LiveActionpublic void execute(Resource source, Resource target, com.day.cq.wcm.msm.api.LiveRelationship relation, boolean autoSave, boolean isResetRollout) throws com.day.cq.wcm.api.WCMException
handles()doExecute() is calledResource parameters (source,target) to be non-null when used in conjunction with
the autoSave flag since a ResourceResolver will need to be obtained to save the changes.
A NonExistingResource should be used when dealing with non existing resources.execute in interface com.day.cq.wcm.msm.api.LiveActioncom.day.cq.wcm.api.WCMExceptionpublic static boolean resourceHasNode(Resource resource)
Noderesource - in questionpublic static boolean isPage(Node node) throws RepositoryException
PageRolloutManager calls the LiveActions
with the later. As modifications should only be written to its content. Pages should not be changed.
Pages are considered an aggregate of all the Nodes and sub-graph at its Node.
Thus Services may require special treatment of them. Eg. Replication, Revisions are bound to Pages.node - to TestRepositoryException - on errors accessing the Repository@Deprecated public void execute(ResourceResolver resolver, com.day.cq.wcm.msm.api.LiveRelationship relation, com.day.cq.wcm.msm.api.ActionConfig config, boolean autoSave) throws com.day.cq.wcm.api.WCMException
execute in interface com.day.cq.wcm.msm.api.LiveActioncom.day.cq.wcm.api.WCMException@Deprecated public void execute(ResourceResolver resolver, com.day.cq.wcm.msm.api.LiveRelationship relation, com.day.cq.wcm.msm.api.ActionConfig config, boolean autoSave, boolean isResetRollout) throws com.day.cq.wcm.api.WCMException
execute in interface com.day.cq.wcm.msm.api.LiveActioncom.day.cq.wcm.api.WCMException@Deprecated public java.lang.String getParameterName()
getParameterName in interface com.day.cq.wcm.msm.api.LiveAction@Deprecated public int getRank()
getRank in interface com.day.cq.wcm.msm.api.LiveAction@Deprecated public java.lang.String getTitle()
getTitle in interface com.day.cq.wcm.msm.api.LiveAction@Deprecated public java.lang.String[] getPropertiesNames()
getPropertiesNames in interface com.day.cq.wcm.msm.api.LiveAction@Deprecated public void write(JSONWriter jsonWriter) throws JSONException
JSONItemwrite in interface JSONItemwrite in interface com.day.cq.wcm.msm.api.LiveActionjsonWriter - json writerJSONException - if a JSON error occursCopyright © 2010 - 2019 Adobe. All Rights Reserved