public abstract class BaseAction
extends java.lang.Object
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,
LiveRelationship relation,
ActionConfig config,
boolean autoSave)
Deprecated.
|
void |
execute(ResourceResolver resolver,
LiveRelationship relation,
ActionConfig config,
boolean autoSave,
boolean isResetRollout)
Deprecated.
|
void |
execute(Resource source,
Resource target,
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
Page The 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 actionpublic void execute(Resource source, Resource target, LiveRelationship relation, boolean autoSave, boolean isResetRollout) throws 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.WCMException
public static boolean resourceHasNode(Resource resource)
Node
resource
- in questionpublic static boolean isPage(Node node) throws RepositoryException
Page
com.day.cq.wcm.msm.api.RolloutManager
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, LiveRelationship relation, ActionConfig config, boolean autoSave) throws WCMException
WCMException
@Deprecated public void execute(ResourceResolver resolver, LiveRelationship relation, ActionConfig config, boolean autoSave, boolean isResetRollout) throws WCMException
WCMException
@Deprecated public java.lang.String getParameterName()
@Deprecated public int getRank()
@Deprecated public java.lang.String getTitle()
@Deprecated public java.lang.String[] getPropertiesNames()
@Deprecated public void write(JSONWriter jsonWriter) throws JSONException
JSONException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"