org.nakedobjects.metamodel.spec.feature
Interface NakedObjectActionParameter

All Superinterfaces:
CurrentHolder, FacetHolder, Identified, NakedObjectFeature, NamedAndDescribed, Specification, TypedSpecification
All Known Subinterfaces:
OneToOneActionParameter, ParseableEntryActionParameter
All Known Implementing Classes:
NakedObjectActionParameterAbstract, NakedObjectActionParameterParseable, OneToOneActionParameterImpl

public interface NakedObjectActionParameter
extends NakedObjectFeature, NamedAndDescribed, CurrentHolder

Analogous to NakedObjectAssociation.


Method Summary
 ActionArgumentContext createProposedArgumentInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, NakedObject targetObject, NakedObject[] args, int position)
           
 NakedObjectAction getAction()
          Owning NakedObjectAction.
 NakedObject[] getChoices(NakedObject nakedObject)
           
 NakedObject getDefault(NakedObject nakedObject)
           
 int getNumber()
          Returns the 0-based index to this parameter.
 boolean isCollection()
          Only for symmetry with NakedObjectAssociation, however since the NOF does not support collections as actions all implementations should return false.
 boolean isObject()
          If true then can cast to a OneToOneActionParameter.
 boolean isOptional()
          Returns a flag indicating if it can be left unset when the action can be invoked.
 java.lang.String isValid(NakedObject nakedObject, java.lang.Object proposedValue)
          Whether proposed value for this parameter is valid.
 
Methods inherited from interface org.nakedobjects.metamodel.spec.TypedSpecification
getSpecification
 
Methods inherited from interface org.nakedobjects.metamodel.spec.Specification
getInstance
 
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
 
Methods inherited from interface org.nakedobjects.metamodel.spec.feature.CurrentHolder
get
 

Method Detail

isObject

boolean isObject()
If true then can cast to a OneToOneActionParameter.

Either this or isCollection() will be true.

Design note: modelled after NakedObjectAssociation#isObject()


isCollection

boolean isCollection()
Only for symmetry with NakedObjectAssociation, however since the NOF does not support collections as actions all implementations should return false.


getAction

NakedObjectAction getAction()
Owning NakedObjectAction.


isOptional

boolean isOptional()
Returns a flag indicating if it can be left unset when the action can be invoked.


getNumber

int getNumber()
Returns the 0-based index to this parameter.


createProposedArgumentInteractionContext

ActionArgumentContext createProposedArgumentInteractionContext(AuthenticationSession session,
                                                               InteractionInvocationMethod invocationMethod,
                                                               NakedObject targetObject,
                                                               NakedObject[] args,
                                                               int position)

isValid

java.lang.String isValid(NakedObject nakedObject,
                         java.lang.Object proposedValue)
Whether proposed value for this parameter is valid.

Parameters:
nakedObject -
proposedValue -
Returns:

getChoices

NakedObject[] getChoices(NakedObject nakedObject)

getDefault

NakedObject getDefault(NakedObject nakedObject)


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.