|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.runtimecontext.spec.feature.NakedObjectActionSet
public class NakedObjectActionSet
| Constructor Summary | |
|---|---|
NakedObjectActionSet(java.lang.String id,
java.lang.String name,
java.util.List<NakedObjectAction> actions,
RuntimeContext runtimeContext)
|
|
NakedObjectActionSet(java.lang.String id,
java.lang.String name,
NakedObjectAction[] actions,
RuntimeContext runtimeContext)
|
|
| Method Summary | ||
|---|---|---|
void |
addFacet(Facet facet)
Does nothing |
|
void |
addFacet(MultiTypedFacet facet)
Does nothing |
|
boolean |
containsFacet(java.lang.Class<? extends Facet> facetType)
Does nothing |
|
ActionInvocationContext |
createActionInvocationInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject object,
NakedObject[] candidateArguments)
Creates an interaction context representing an attempt to invoke this
action. |
|
UsabilityContext<?> |
createUsableInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject target)
Create an InteractionContext to represent an attempt to use this member (that is, to check if it is usable or not). |
|
VisibilityContext<?> |
createVisibleInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject targetNakedObject)
Does nothing, but shouldn't be called. |
|
java.lang.String |
debugData()
|
|
NakedObject |
execute(NakedObject target,
NakedObject[] parameters)
Invokes the action's method on the target object given the specified set of parameters. |
|
NakedObjectAction[] |
getActions()
Lists the sub-actions that are available under this name. |
|
NakedObject[][] |
getChoices(NakedObject target)
Returns a list of possible references/values for each parameter, which the user can choose from. |
|
NakedObject[] |
getDefaults(NakedObject target)
Returns the defaults references/values to be used for the action. |
|
java.lang.String |
getDescription()
Returns a description of how the member is used - this complements the help text. |
|
|
getFacet(java.lang.Class<T> cls)
Does nothing |
|
Facet[] |
getFacets(Filter<Facet> filter)
Does nothing |
|
java.lang.Class<? extends Facet>[] |
getFacetTypes()
Does nothing |
|
java.lang.String |
getHelp()
Return the help text for this member - the field or action - to complement the description. |
|
java.lang.String |
getId()
Returns the identifier of the member, which must not change. |
|
Identifier |
getIdentifier()
Identifier of this feature. |
|
Instance |
getInstance(NakedObject nakedObject)
Return an Instance of this Specification with respect
to the provided NakedObject. |
|
java.lang.String |
getName()
Return the name for this member - the field or action. |
|
NakedObjectSpecification |
getOnType()
Returns the specification for the type of object that this action can be invoked upon. |
|
int |
getParameterCount()
Returns the number of parameters used by this method. |
|
NakedObjectActionParameter[] |
getParameters()
Returns set of parameter information. |
|
NakedObjectActionParameter[] |
getParameters(Filter<NakedObjectActionParameter> filter)
Returns set of parameter information matching the supplied filter. |
|
NakedObjectSpecification[] |
getParameterTypes()
Returns the type of each of the
parameters. |
|
NakedObjectSpecification |
getReturnType()
Returns the specifications for the return type. |
|
RuntimeContext |
getRuntimeContext()
|
|
NakedObjectSpecification |
getSpecification()
Always returns null. |
|
Target |
getTarget()
Returns where the action should be executed: explicitly locally on the client; explicitly remotely on the server; or where it normally should be executed. |
|
NakedObjectActionType |
getType()
Returns the type of action: user, exploration or debug, or that it is a set of actions. |
|
boolean |
hasReturn()
Returns true if the represented action returns something, else returns false. |
|
boolean |
isAction()
Whether this member represents a NakedObjectAction. |
|
boolean |
isAssociation()
Whether this member represents a NakedObjectAssociation. |
|
boolean |
isContributed()
Return true if the action is run on a service object using the target object as a parameter. |
|
boolean |
isOneToManyAssociation()
Whether this member represents a OneToManyAssociation. |
|
boolean |
isOneToOneAssociation()
Whether this member represents a OneToOneAssociation. |
|
Consent |
isProposedArgumentSetValid(NakedObject object,
NakedObject[] parameters)
Whether the provided argument set is valid, represented as a Consent. |
|
Consent |
isUsable(AuthenticationSession session,
NakedObject target)
Determines whether this member is usable, represented as a Consent. |
|
Consent |
isVisible(AuthenticationSession session,
NakedObject target)
Determines if this member is visible, represented as a Consent. |
|
boolean |
promptForParameters(NakedObject target)
|
|
NakedObject |
realTarget(NakedObject target)
Determine the real target for this action. |
|
void |
removeFacet(java.lang.Class<? extends Facet> facetType)
Does nothing |
|
void |
removeFacet(Facet facet)
Does nothing |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NakedObjectActionSet(java.lang.String id,
java.lang.String name,
NakedObjectAction[] actions,
RuntimeContext runtimeContext)
public NakedObjectActionSet(java.lang.String id,
java.lang.String name,
java.util.List<NakedObjectAction> actions,
RuntimeContext runtimeContext)
| Method Detail |
|---|
public NakedObjectAction[] getActions()
NakedObjectActionIf any actions are returned then this action is only a set and not an action itself.
getActions in interface NakedObjectActionpublic java.lang.String getDescription()
NamedAndDescribed
getDescription in interface NamedAndDescribed#getHelp()public Identifier getIdentifier()
Identified
getIdentifier in interface Identifiedpublic java.lang.String getHelp()
NakedObjectMember
getHelp in interface NakedObjectMemberNamedAndDescribed.getDescription()public java.lang.String getId()
NakedObjectMember
getId in interface NakedObjectMemberpublic java.lang.String getName()
NamedAndDescribed
getName in interface NamedAndDescribed#getIdentifier()public NakedObjectSpecification getOnType()
NakedObjectAction
getOnType in interface NakedObjectActionpublic NakedObjectSpecification getReturnType()
NakedObjectAction
getReturnType in interface NakedObjectActionpublic Target getTarget()
NakedObjectAction
getTarget in interface NakedObjectActionNakedObjectActionConstants.LOCAL,
NakedObjectActionConstants.REMOTE,
NakedObjectActionConstants.DEFAULTpublic NakedObjectActionType getType()
NakedObjectAction
getType in interface NakedObjectActionNakedObjectActionConstants.USER,
NakedObjectActionConstants.EXPLORATION,
NakedObjectActionConstants.DEBUG,
NakedObjectActionConstants.SETpublic boolean hasReturn()
NakedObjectAction
hasReturn in interface NakedObjectActionpublic boolean isContributed()
NakedObjectAction
isContributed in interface NakedObjectActionpublic NakedObjectSpecification getSpecification()
getSpecification in interface TypedSpecificationpublic NakedObject realTarget(NakedObject target)
NakedObjectAction
realTarget in interface NakedObjectAction
public NakedObject execute(NakedObject target,
NakedObject[] parameters)
NakedObjectAction
execute in interface NakedObjectActionpublic <T extends Facet> T getFacet(java.lang.Class<T> cls)
getFacet in interface FacetHolderpublic java.lang.Class<? extends Facet>[] getFacetTypes()
getFacetTypes in interface FacetHolderpublic Facet[] getFacets(Filter<Facet> filter)
getFacets in interface FacetHolderpublic void addFacet(Facet facet)
addFacet in interface FacetHolderpublic void addFacet(MultiTypedFacet facet)
addFacet in interface FacetHolderpublic void removeFacet(Facet facet)
removeFacet in interface FacetHolderpublic boolean containsFacet(java.lang.Class<? extends Facet> facetType)
containsFacet in interface FacetHolderpublic void removeFacet(java.lang.Class<? extends Facet> facetType)
removeFacet in interface FacetHolderpublic int getParameterCount()
NakedObjectAction
getParameterCount in interface NakedObjectActionpublic NakedObjectActionParameter[] getParameters()
NakedObjectActionImplementations may build this array lazily or eagerly as required.
getParameters in interface NakedObjectActionpublic NakedObjectSpecification[] getParameterTypes()
NakedObjectActiontype of each of the
parameters.
getParameterTypes in interface NakedObjectActionpublic NakedObjectActionParameter[] getParameters(Filter<NakedObjectActionParameter> filter)
NakedObjectAction
getParameters in interface NakedObjectActionpublic boolean promptForParameters(NakedObject target)
promptForParameters in interface NakedObjectAction
public VisibilityContext<?> createVisibleInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject targetNakedObject)
createVisibleInteractionContext in interface NakedObjectMember
public Consent isVisible(AuthenticationSession session,
NakedObject target)
NakedObjectMemberConsent.
isVisible in interface NakedObjectMembertarget - may be null if just checking for authorization.#isVisibleResult(AuthenticationSession, NakedObject)
public UsabilityContext<?> createUsableInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject target)
NakedObjectMemberInteractionContext to represent an attempt to use this member (that is, to check if it is usable or not).
Typically it is easier to just call NakedObjectMember.isUsable(AuthenticationSession, NakedObject) or
#isUsableResult(AuthenticationSession, NakedObject); this is provided as API for symmetry with interactions
(such as AccessContext accesses) have no corresponding vetoing methods.
createUsableInteractionContext in interface NakedObjectMember
public Consent isUsable(AuthenticationSession session,
NakedObject target)
NakedObjectMemberConsent.
isUsable in interface NakedObjectMembertarget - may be null if just checking for authorization.#isUsableResult(AuthenticationSession, NakedObject)
public ActionInvocationContext createActionInvocationInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject object,
NakedObject[] candidateArguments)
NakedObjectActioninteraction context representing an attempt to invoke this
action.
Typically it is easier to just call #isProposedArgumentSetValid(NakedObject, NakedObject[]) {@link #isProposedArgumentSetValidResultSet(NakedObject, NakedObject[])}; this is provided as API for symmetry with interactions (such as {@link AccessContext} accesses) have no corresponding vetoing methods.
createActionInvocationInteractionContext in interface NakedObjectAction
public Consent isProposedArgumentSetValid(NakedObject object,
NakedObject[] parameters)
NakedObjectActionConsent.
isProposedArgumentSetValid in interface NakedObjectActionpublic NakedObject[] getDefaults(NakedObject target)
NakedObjectAction
getDefaults in interface NakedObjectActionpublic NakedObject[][] getChoices(NakedObject target)
NakedObjectAction
getChoices in interface NakedObjectActionpublic boolean isAction()
NakedObjectMemberNakedObjectAction.
If so, can be safely downcast to NakedObjectAction.
isAction in interface NakedObjectMemberpublic boolean isAssociation()
NakedObjectMemberNakedObjectAssociation.
If so, can be safely downcast to NakedObjectAssociation.
isAssociation in interface NakedObjectMemberpublic boolean isOneToManyAssociation()
NakedObjectMemberOneToManyAssociation.
If so, can be safely downcast to OneToManyAssociation.
isOneToManyAssociation in interface NakedObjectMemberpublic boolean isOneToOneAssociation()
NakedObjectMemberOneToOneAssociation.
If so, can be safely downcast to OneToOneAssociation.
isOneToOneAssociation in interface NakedObjectMemberpublic java.lang.String debugData()
debugData in interface NakedObjectMemberpublic Instance getInstance(NakedObject nakedObject)
SpecificationInstance of this Specification with respect
to the provided NakedObject.
For example, if the Specification is a OneToOneAssociation,
then is an Instance implementation representing the { NakedObject/ OneToOneAssociation } tuple.
Implementations are expected to use a double-dispatch back to the provided
NakedObject (passing themselves as a parameter), using
NakedObjectMM.getInstance(Specification).
Note: this method may throw an UnsupportedOperationException;
see NakedObjectMM.getInstance(Specification) for details.
getInstance in interface Specificationpublic RuntimeContext getRuntimeContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||