mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merging DEV_TEMPORARY to HEAD (RenditionService)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19103 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.alfresco.repo.action;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -34,72 +35,71 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
*/
|
||||
public class ActionImpl extends ParameterizedItemImpl
|
||||
implements Serializable, Action
|
||||
public class ActionImpl extends ParameterizedItemImpl implements Serializable, Action
|
||||
{
|
||||
/**
|
||||
* Serial version UID
|
||||
*/
|
||||
private static final long serialVersionUID = 3258135760426186548L;
|
||||
|
||||
|
||||
/** The node reference for the action */
|
||||
private NodeRef nodeRef;
|
||||
|
||||
|
||||
/**
|
||||
* The title
|
||||
* The title
|
||||
*/
|
||||
private String title;
|
||||
|
||||
|
||||
/**
|
||||
* The description
|
||||
* The description
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* Inidcates whether the action should be executed asynchronously or not
|
||||
*/
|
||||
private boolean executeAsynchronously = false;
|
||||
|
||||
/**
|
||||
* The compensating action
|
||||
*/
|
||||
private Action compensatingAction;
|
||||
|
||||
private boolean executeAsynchronously = false;
|
||||
|
||||
/**
|
||||
* The created date
|
||||
* The compensating action
|
||||
*/
|
||||
private Action compensatingAction;
|
||||
|
||||
/**
|
||||
* The created date
|
||||
*/
|
||||
private Date createdDate;
|
||||
|
||||
|
||||
/**
|
||||
* The creator
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
|
||||
/**
|
||||
* The modified date
|
||||
*/
|
||||
private Date modifiedDate;
|
||||
|
||||
|
||||
/**
|
||||
* The modifier
|
||||
*/
|
||||
private String modifier;
|
||||
|
||||
|
||||
/**
|
||||
* Rule action definition name
|
||||
*/
|
||||
private String actionDefinitionName;
|
||||
|
||||
|
||||
/**
|
||||
* The run as user name
|
||||
*/
|
||||
private String runAsUserName;
|
||||
|
||||
|
||||
/**
|
||||
* The chain of actions that have lead to this action
|
||||
*/
|
||||
private Set<String> actionChain;
|
||||
|
||||
|
||||
/**
|
||||
* Action conditions
|
||||
*/
|
||||
@@ -108,42 +108,62 @@ public class ActionImpl extends ParameterizedItemImpl
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param nodeRef the action node reference (null if not saved)
|
||||
* @param id the action id
|
||||
* @param actionDefinitionName the name of the action definition
|
||||
* @param nodeRef the action node reference (null if not saved)
|
||||
* @param id the action id
|
||||
* @param actionDefinitionName the name of the action definition
|
||||
*/
|
||||
public ActionImpl(NodeRef nodeRef, String id, String actionDefinitionName)
|
||||
{
|
||||
this(nodeRef, id, actionDefinitionName, null);
|
||||
this(nodeRef, id, actionDefinitionName, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Constructor
|
||||
*
|
||||
* @param nodeRef the action node reference (null if not saved)
|
||||
* @param id the action id
|
||||
* @param actionDefinitionName the action definition name
|
||||
* @param parameterValues the parameter values
|
||||
* @param nodeRef the action node reference (null if not saved)
|
||||
* @param id the action id
|
||||
* @param actionDefinitionName the action definition name
|
||||
* @param parameterValues the parameter values
|
||||
*/
|
||||
public ActionImpl(
|
||||
NodeRef nodeRef,
|
||||
String id,
|
||||
String actionDefinitionName,
|
||||
Map<String, Serializable> parameterValues)
|
||||
public ActionImpl(NodeRef nodeRef, String id, String actionDefinitionName, Map<String, Serializable> parameterValues)
|
||||
{
|
||||
super(id, parameterValues);
|
||||
this.nodeRef = nodeRef;
|
||||
this.actionDefinitionName = actionDefinitionName;
|
||||
}
|
||||
|
||||
|
||||
public ActionImpl(Action action, String actionDefinitionName)
|
||||
{
|
||||
super(action.getId(), action.getParameterValues());
|
||||
this.actionDefinitionName = actionDefinitionName;
|
||||
this.actionConditions = action.getActionConditions();
|
||||
this.compensatingAction = action.getCompensatingAction();
|
||||
this.createdDate = action.getCreatedDate();
|
||||
this.creator = action.getCreator();
|
||||
this.description = action.getDescription();
|
||||
this.executeAsynchronously = action.getExecuteAsychronously();
|
||||
this.modifiedDate = action.getModifiedDate();
|
||||
this.modifier = action.getModifier();
|
||||
this.nodeRef = action.getNodeRef();
|
||||
this.title = action.getTitle();
|
||||
if (action instanceof ActionImpl)
|
||||
{
|
||||
ActionImpl actionImpl = (ActionImpl) action;
|
||||
this.runAsUserName = actionImpl.getRunAsUser();
|
||||
this.actionChain = actionImpl.actionChain;
|
||||
}
|
||||
}
|
||||
|
||||
public ActionImpl(Action action)
|
||||
{
|
||||
this(action, action.getActionDefinitionName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Action")
|
||||
.append("[ id=").append(getId())
|
||||
.append(", node=").append(nodeRef)
|
||||
.append(" ]");
|
||||
sb.append("Action").append("[ id=").append(getId()).append(", node=").append(nodeRef).append(" ]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -151,232 +171,234 @@ public class ActionImpl extends ParameterizedItemImpl
|
||||
* @see org.alfresco.service.cmr.action.Action#getTitle()
|
||||
*/
|
||||
public String getTitle()
|
||||
{
|
||||
return this.title;
|
||||
}
|
||||
{
|
||||
return this.title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#setTitle(java.lang.String)
|
||||
*/
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getDescription()
|
||||
*/
|
||||
public String getDescription()
|
||||
{
|
||||
return this.description;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getDescription()
|
||||
*/
|
||||
public String getDescription()
|
||||
{
|
||||
return this.description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#setDescription(java.lang.String)
|
||||
*/
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getExecuteAsychronously()
|
||||
*/
|
||||
public boolean getExecuteAsychronously()
|
||||
{
|
||||
return this.executeAsynchronously ;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#setDescription(java.lang.String)
|
||||
*/
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#setExecuteAsynchronously(boolean)
|
||||
*/
|
||||
public void setExecuteAsynchronously(boolean executeAsynchronously)
|
||||
{
|
||||
this.executeAsynchronously = executeAsynchronously;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getCompensatingAction()
|
||||
*/
|
||||
public Action getCompensatingAction()
|
||||
{
|
||||
return this.compensatingAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#setCompensatingAction(org.alfresco.service.cmr.action.Action)
|
||||
*/
|
||||
public void setCompensatingAction(Action action)
|
||||
{
|
||||
this.compensatingAction = action;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getExecuteAsychronously()
|
||||
*/
|
||||
public boolean getExecuteAsychronously()
|
||||
{
|
||||
return this.executeAsynchronously;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getCreatedDate()
|
||||
*/
|
||||
public Date getCreatedDate()
|
||||
{
|
||||
return this.createdDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the created date
|
||||
*
|
||||
* @param createdDate the created date
|
||||
*/
|
||||
public void setCreatedDate(Date createdDate)
|
||||
{
|
||||
this.createdDate = createdDate;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#setExecuteAsynchronously(boolean)
|
||||
*/
|
||||
public void setExecuteAsynchronously(boolean executeAsynchronously)
|
||||
{
|
||||
this.executeAsynchronously = executeAsynchronously;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getCreator()
|
||||
*/
|
||||
public String getCreator()
|
||||
{
|
||||
return this.creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the creator
|
||||
*
|
||||
* @param creator the creator
|
||||
*/
|
||||
public void setCreator(String creator)
|
||||
{
|
||||
this.creator = creator;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getCompensatingAction()
|
||||
*/
|
||||
public Action getCompensatingAction()
|
||||
{
|
||||
return this.compensatingAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getModifiedDate()
|
||||
*/
|
||||
public Date getModifiedDate()
|
||||
{
|
||||
return this.modifiedDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the modified date
|
||||
*
|
||||
* @param modifiedDate the modified date
|
||||
*/
|
||||
public void setModifiedDate(Date modifiedDate)
|
||||
{
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#setCompensatingAction(org.alfresco.service.cmr.action.Action)
|
||||
*/
|
||||
public void setCompensatingAction(Action action)
|
||||
{
|
||||
this.compensatingAction = action;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getModifier()
|
||||
*/
|
||||
public String getModifier()
|
||||
{
|
||||
return this.modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the modifier
|
||||
*
|
||||
* @param modifier the modifier
|
||||
*/
|
||||
public void setModifier(String modifier)
|
||||
{
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getActionDefinitionName()
|
||||
*/
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getCreatedDate()
|
||||
*/
|
||||
public Date getCreatedDate()
|
||||
{
|
||||
return this.createdDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the created date
|
||||
*
|
||||
* @param createdDate the created date
|
||||
*/
|
||||
public void setCreatedDate(Date createdDate)
|
||||
{
|
||||
this.createdDate = createdDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getCreator()
|
||||
*/
|
||||
public String getCreator()
|
||||
{
|
||||
return this.creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the creator
|
||||
*
|
||||
* @param creator the creator
|
||||
*/
|
||||
public void setCreator(String creator)
|
||||
{
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getModifiedDate()
|
||||
*/
|
||||
public Date getModifiedDate()
|
||||
{
|
||||
return this.modifiedDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the modified date
|
||||
*
|
||||
* @param modifiedDate the modified date
|
||||
*/
|
||||
public void setModifiedDate(Date modifiedDate)
|
||||
{
|
||||
this.modifiedDate = modifiedDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getModifier()
|
||||
*/
|
||||
public String getModifier()
|
||||
{
|
||||
return this.modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the modifier
|
||||
*
|
||||
* @param modifier the modifier
|
||||
*/
|
||||
public void setModifier(String modifier)
|
||||
{
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getActionDefinitionName()
|
||||
*/
|
||||
public String getActionDefinitionName()
|
||||
{
|
||||
return this.actionDefinitionName;
|
||||
return this.actionDefinitionName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#hasActionConditions()
|
||||
*/
|
||||
public boolean hasActionConditions()
|
||||
{
|
||||
return (this.actionConditions.isEmpty() == false);
|
||||
}
|
||||
public boolean hasActionConditions()
|
||||
{
|
||||
return (this.actionConditions.isEmpty() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#indexOfActionCondition(org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public int indexOfActionCondition(ActionCondition actionCondition)
|
||||
{
|
||||
return this.actionConditions.indexOf(actionCondition);
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#indexOfActionCondition(org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public int indexOfActionCondition(ActionCondition actionCondition)
|
||||
{
|
||||
return this.actionConditions.indexOf(actionCondition);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getActionConditions()
|
||||
*/
|
||||
public List<ActionCondition> getActionConditions()
|
||||
{
|
||||
return this.actionConditions;
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getActionConditions()
|
||||
*/
|
||||
public List<ActionCondition> getActionConditions()
|
||||
{
|
||||
return this.actionConditions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getActionCondition(int)
|
||||
*/
|
||||
public ActionCondition getActionCondition(int index)
|
||||
{
|
||||
return this.actionConditions.get(index);
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#getActionCondition(int)
|
||||
*/
|
||||
public ActionCondition getActionCondition(int index)
|
||||
{
|
||||
return this.actionConditions.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#addActionCondition(org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public void addActionCondition(ActionCondition actionCondition)
|
||||
{
|
||||
this.actionConditions.add(actionCondition);
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#addActionCondition(org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public void addActionCondition(ActionCondition actionCondition)
|
||||
{
|
||||
this.actionConditions.add(actionCondition);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#addActionCondition(int, org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public void addActionCondition(int index, ActionCondition actionCondition)
|
||||
{
|
||||
this.actionConditions.add(index, actionCondition);
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#addActionCondition(int,
|
||||
* org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public void addActionCondition(int index, ActionCondition actionCondition)
|
||||
{
|
||||
this.actionConditions.add(index, actionCondition);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#setActionCondition(int, org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public void setActionCondition(int index, ActionCondition actionCondition)
|
||||
{
|
||||
this.actionConditions.set(index, actionCondition);
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#setActionCondition(int,
|
||||
* org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public void setActionCondition(int index, ActionCondition actionCondition)
|
||||
{
|
||||
this.actionConditions.set(index, actionCondition);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#removeActionCondition(org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public void removeActionCondition(ActionCondition actionCondition)
|
||||
{
|
||||
this.actionConditions.remove(actionCondition);
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#removeActionCondition(org.alfresco.service.cmr.action.ActionCondition)
|
||||
*/
|
||||
public void removeActionCondition(ActionCondition actionCondition)
|
||||
{
|
||||
this.actionConditions.remove(actionCondition);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#removeAllActionConditions()
|
||||
*/
|
||||
public void removeAllActionConditions()
|
||||
{
|
||||
this.actionConditions.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.service.cmr.action.Action#removeAllActionConditions()
|
||||
*/
|
||||
public void removeAllActionConditions()
|
||||
{
|
||||
this.actionConditions.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the action chain
|
||||
*
|
||||
* @param actionChain the list of actions that lead to this action
|
||||
* @param actionChain the list of actions that lead to this action
|
||||
*/
|
||||
public void setActionChain(Set<String> actionChain)
|
||||
{
|
||||
this.actionChain = actionChain;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the action chain
|
||||
* Get the action chain
|
||||
*
|
||||
* @return the list of actions that lead to this action
|
||||
* @return the list of actions that lead to this action
|
||||
*/
|
||||
public Set<String> getActionChain()
|
||||
{
|
||||
@@ -400,11 +422,11 @@ public class ActionImpl extends ParameterizedItemImpl
|
||||
{
|
||||
return this.nodeRef;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the node reference
|
||||
*
|
||||
* @param nodeRef the node reference
|
||||
* @param nodeRef the node reference
|
||||
*/
|
||||
public void setNodeRef(NodeRef nodeRef)
|
||||
{
|
||||
|
Reference in New Issue
Block a user