|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.runtimecontext.spec.feature.NakedObjectMemberAbstract
org.nakedobjects.metamodel.specloader.internal.NakedObjectActionImpl
public class NakedObjectActionImpl
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.nakedobjects.metamodel.runtimecontext.spec.feature.NakedObjectMemberAbstract |
|---|
NakedObjectMemberAbstract.MemberType |
| Field Summary |
|---|
| Fields inherited from class org.nakedobjects.metamodel.runtimecontext.spec.feature.NakedObjectMemberAbstract |
|---|
defaultName |
| Constructor Summary | |
|---|---|
NakedObjectActionImpl(java.lang.String methodId,
NakedObjectActionPeer nakedObjectActionPeer,
RuntimeContext runtimeContext)
|
|
| Method Summary | |
|---|---|
ActionInvocationContext |
createActionInvocationInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject targetObject,
NakedObject[] proposedArguments)
Creates an interaction context representing an attempt to invoke this
action. |
UsabilityContext<?> |
createUsableInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject targetNakedObject)
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)
Create an InteractionContext to represent an attempt to view this member (that is, to check if
it is visible or not). |
java.lang.String |
debugData()
|
NakedObject |
execute(NakedObject object,
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. |
Instance |
getInstance(NakedObject nakedObject)
Return an Instance of this Specification with respect
to the provided NakedObject. |
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()
Build lazily by getParameters(). |
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. |
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. |
static NakedObjectActionType |
getType(java.lang.String typeStr)
|
boolean |
hasReturn()
Returns true if the represented action returns something, else returns false. |
boolean |
isContributed()
Return true if the action is run on a service object using the target object as a parameter. |
Consent |
isProposedArgumentSetValid(NakedObject object,
NakedObject[] proposedArguments)
TODO: currently this method is hard-coded to assume all interactions are initiated by user. |
Consent |
isUsable(AuthenticationSession session,
NakedObject target)
Loops over all DisablingInteractionAdvisor Facets and returns true only if
none disables the member. |
Consent |
isVisible(AuthenticationSession session,
NakedObject target)
Loops over all HidingInteractionAdvisor Facets and returns true only if none
hide the member. |
boolean |
promptForParameters(NakedObject target)
|
NakedObject |
realTarget(NakedObject target)
Previously (prior to 3.0.x) this method had a check to see if the action was on an instance. |
java.lang.String |
toString()
|
| Methods inherited from class org.nakedobjects.metamodel.runtimecontext.spec.feature.NakedObjectMemberAbstract |
|---|
addFacet, addFacet, containsFacet, getAuthenticationSession, getDescription, getFacet, getFacets, getFacetTypes, getHelp, getId, getIdentifier, getName, getRuntimeContext, isAction, isAssociation, isOneToManyAssociation, isOneToOneAssociation, removeFacet, removeFacet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.nakedobjects.metamodel.spec.feature.NakedObjectMember |
|---|
getHelp, getId, isAction, isAssociation, isOneToManyAssociation, isOneToOneAssociation |
| Methods inherited from interface org.nakedobjects.metamodel.spec.identifier.Identified |
|---|
getIdentifier |
| Methods inherited from interface org.nakedobjects.metamodel.facets.FacetHolder |
|---|
addFacet, addFacet, containsFacet, getFacet, getFacets, getFacetTypes, removeFacet, removeFacet |
| Methods inherited from interface org.nakedobjects.metamodel.spec.NamedAndDescribed |
|---|
getDescription, getName |
| Constructor Detail |
|---|
public NakedObjectActionImpl(java.lang.String methodId,
NakedObjectActionPeer nakedObjectActionPeer,
RuntimeContext runtimeContext)
| Method Detail |
|---|
public static NakedObjectActionType getType(java.lang.String typeStr)
public NakedObjectSpecification getSpecification()
getSpecification in interface TypedSpecificationpublic NakedObjectSpecification getReturnType()
NakedObjectAction
getReturnType in interface NakedObjectActionpublic boolean hasReturn()
hasReturn in interface NakedObjectActionpublic NakedObjectSpecification getOnType()
NakedObjectAction
getOnType in interface NakedObjectActionpublic NakedObjectAction[] getActions()
NakedObjectActionIf any actions are returned then this action is only a set and not an action itself.
getActions in interface NakedObjectActionpublic 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 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 isContributed()
NakedObjectAction
isContributed in interface NakedObjectActionpublic int getParameterCount()
NakedObjectAction
getParameterCount in interface NakedObjectActionpublic boolean promptForParameters(NakedObject target)
promptForParameters in interface NakedObjectActionpublic NakedObjectActionParameter[] getParameters()
getParameters().
Although this is lazily loaded, the method is also synchronized so there shouldn't be any thread race conditions.
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 NakedObjectAction
public VisibilityContext<?> createVisibleInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject targetNakedObject)
NakedObjectMemberInteractionContext to represent an attempt to view this member (that is, to check if
it is visible or not).
Typically it is easier to just call NakedObjectMember.isVisible(AuthenticationSession, NakedObject) or
#isVisibleResult(AuthenticationSession, NakedObject); this is provided as API for symmetry with interactions
(such as AccessContext accesses) have no corresponding vetoing methods.
createVisibleInteractionContext in interface NakedObjectMember
public Consent isVisible(AuthenticationSession session,
NakedObject target)
NakedObjectMemberAbstractHidingInteractionAdvisor Facets and returns true only if none
hide the member.
TODO: currently this method is hard-coded to assume all interactions are initiated
by user.
isVisible in interface NakedObjectMemberisVisible in class NakedObjectMemberAbstracttarget - may be null if just checking for authorization.#isVisibleResult(AuthenticationSession, NakedObject)
public UsabilityContext<?> createUsableInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject targetNakedObject)
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)
NakedObjectMemberAbstractDisablingInteractionAdvisor Facets and returns true only if
none disables the member.
TODO: currently this method is hard-coded to assume all interactions are initiated
by user.
isUsable in interface NakedObjectMemberisUsable in class NakedObjectMemberAbstracttarget - may be null if just checking for authorization.#isUsableResult(AuthenticationSession, NakedObject)
public Consent isProposedArgumentSetValid(NakedObject object,
NakedObject[] proposedArguments)
by user.
isProposedArgumentSetValid in interface NakedObjectAction
public ActionInvocationContext createActionInvocationInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject targetObject,
NakedObject[] proposedArguments)
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 NakedObject execute(NakedObject object,
NakedObject[] parameters)
NakedObjectAction
execute in interface NakedObjectActionpublic NakedObject realTarget(NakedObject target)
realTarget in interface NakedObjectActionpublic NakedObject[] getDefaults(NakedObject target)
NakedObjectAction
getDefaults in interface NakedObjectActionpublic NakedObject[][] getChoices(NakedObject target)
NakedObjectAction
getChoices in interface NakedObjectActionpublic java.lang.String debugData()
debugData in interface NakedObjectMemberpublic java.lang.String toString()
toString in class NakedObjectMemberAbstract
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||