|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.domain.Entity
ccc.domain.ActionEntity
public class ActionEntity
An action that will be performed for a resource.
Constructor Summary | |
---|---|
protected |
ActionEntity()
Constructor: for persistence only. |
|
ActionEntity(CommandType type,
java.util.Date executeAfter,
UserEntity actor,
ResourceEntity subject,
java.util.Map<java.lang.String,java.lang.String> parameters)
Constructor. |
Method Summary | |
---|---|
void |
cancel()
Mark the action as cancelled. |
void |
complete()
Mark the action as completed. |
void |
fail(Failure f)
Mark the action as failed. |
UserEntity |
getActor()
Accessor. |
FailureCode |
getCode()
Accessor. |
java.util.Date |
getExecuteAfter()
Accessor. |
java.lang.String |
getFailureId()
Accessor. |
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Accessor. |
java.util.Map<java.lang.String,java.lang.String> |
getParams()
Accessor. |
ActionStatus |
getStatus()
Accessor. |
ResourceEntity |
getSubject()
Accessor. |
CommandType |
getType()
Accessor. |
ActionSummary |
mapAction()
Create a summary for an action. |
static java.util.List<ActionSummary> |
mapActions(java.util.Collection<ActionEntity> actions)
Create summaries for a list of actions. |
void |
toJson(Json json)
Convert to JSON. |
Methods inherited from class ccc.domain.Entity |
---|
equals, getId, getVersion, hashCode, setId, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected ActionEntity()
public ActionEntity(CommandType type, java.util.Date executeAfter, UserEntity actor, ResourceEntity subject, java.util.Map<java.lang.String,java.lang.String> parameters)
type
- The type of action that will be performed.executeAfter
- The earliest the action may be executed.actor
- The user that scheduled the action.subject
- The resource the action will operate on.parameters
- Additional parameters required by the action.Method Detail |
---|
public CommandType getType()
public java.util.Map<java.lang.String,java.lang.String> getParameters()
public UserEntity getActor()
public java.util.Date getExecuteAfter()
public void complete()
public ActionStatus getStatus()
public FailureCode getCode()
public java.util.Map<java.lang.String,java.lang.String> getParams()
public java.lang.String getFailureId()
public void fail(Failure f)
f
- Details of the failure.public void cancel()
public ResourceEntity getSubject()
public static java.util.List<ActionSummary> mapActions(java.util.Collection<ActionEntity> actions)
actions
- The actions.
public ActionSummary mapAction()
public void toJson(Json json)
toJson
in interface Jsonable
toJson
in class Entity
json
- The JSON object to write to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |