InteractionDtoFactory

Used to serialize the execution of an action invocation or property edit as an org.apache.causeway.schema.ixn.v2.InteractionDto , for example that it can be published to downstream systems.

There are some similarities to org.apache.causeway.core.metamodel.services.command.CommandDtoFactory , which is used to instantiate an org.apache.causeway.schema.cmd.v2.CommandDto that represents the intention to invoke an action or edit a property.

API

InteractionDtoFactory.java
interface InteractionDtoFactory {
  ActionInvocationDto asActionInvocationDto(ObjectAction objectAction, InteractionHead head, Can<ManagedObject> argumentAdapters)     (1)
  PropertyEditDto asPropertyEditDto(OneToOneAssociation property, InteractionHead interactionHead, ManagedObject newValueAdapterIfAny)     (2)
  ActionInvocationDto updateResult(ActionInvocationDto actionInvocationDto, ObjectAction objectAction, ManagedObject resultObject)     (3)
}
1 asActionInvocationDto(ObjectAction, InteractionHead, Can)

Called by the framework when invoking an action, to create an ActionInvocationDto capturing the details of the action invocation (target, arguments etc).

2 asPropertyEditDto(OneToOneAssociation, InteractionHead, ManagedObject)

Called by the framework when editing a property, to create an PropertyEditDto capturing the details of the action invocation (target, arguments etc).

3 updateResult(ActionInvocationDto, ObjectAction, ManagedObject)

Called by the framework to attach the result of an action invocation to the aforementioned ActionInvocationDto .

Members

asActionInvocationDto(ObjectAction, InteractionHead, Can)

Called by the framework when invoking an action, to create an ActionInvocationDto capturing the details of the action invocation (target, arguments etc).

ActionInvocationDto is a subtype of org.apache.causeway.schema.ixn.v2.MemberExecutionDto that is in turn a part of the overall org.apache.causeway.schema.ixn.v2.InteractionDto .

asPropertyEditDto(OneToOneAssociation, InteractionHead, ManagedObject)

Called by the framework when editing a property, to create an PropertyEditDto capturing the details of the action invocation (target, arguments etc).

PropertyEditDto is a subtype of org.apache.causeway.schema.ixn.v2.MemberExecutionDto that is in turn a part of the overall org.apache.causeway.schema.ixn.v2.InteractionDto .

updateResult(ActionInvocationDto, ObjectAction, ManagedObject)

Called by the framework to attach the result of an action invocation to the aforementioned ActionInvocationDto .