Command

Represents the intention to invoke either an action or modify a property. There can be only one such intention per (web) request, so a command is in effect interaction-scoped.

Each Command holds a CommandDto (see Apache Isiscmdschema) which reifies all the details in a serializable form.

It also captures details of the corresponding action invocation (or property edit), specifically when that action/edit Command#getStartedAt() started or Command#getCompletedAt() completed , and its result, either a Command#getResult() return value or an Command#getException() exception . Also captures a stack of ActionDomainEvent s.

Note that when invoking an action, other actions may be invoked courtesy of the WrapperFactory . These "sub-actions" do not modify the contents of the current command object; in other words think of the command object as representing the outer-most originating action.

That said, if the sub-action is invoked asynchronously (using WrapperFactory#asyncWrap(Object, AsyncControl) or WrapperFactory#asyncWrapMixin(Class, Object, AsyncControl) ), then a separate Command object is created, and the originating Command is set to be its Command#getParent() parent .

API

Command.java
class Command {
  String getUsername()     (1)
  Timestamp getTimestamp()     (2)
  Bookmark getTarget()     (3)
  String getLogicalMemberIdentifier()     (4)
  Updater updater()     (5)
}
1 getUsername()

The user that created the command.

2 getTimestamp()

The date/time at which this command was created.

3 getTarget()

Derived from #getCommandDto() , is the Bookmark of the target object (entity or service) on which this action/edit was performed.

4 getLogicalMemberIdentifier()

Derived from #getCommandDto() , holds a string representation of the invoked action, or the edited property.

5 updater()
*NOT API* : intended to be called only by the framework.

Members

getUsername()

The user that created the command.

Derived from #getCommandDto() 's CommandDto#getUser()

getTimestamp()

The date/time at which this command was created.

Derived from #getCommandDto() 's CommandDto#getTimestamp() .

getTarget()

Derived from #getCommandDto() , is the Bookmark of the target object (entity or service) on which this action/edit was performed.

getLogicalMemberIdentifier()

Derived from #getCommandDto() , holds a string representation of the invoked action, or the edited property.

updater()

*NOT API* : intended to be called only by the framework.