|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.specloader.internal.NakedObjectActionParameterAbstract
public abstract class NakedObjectActionParameterAbstract
| Constructor Summary | |
|---|---|
protected |
NakedObjectActionParameterAbstract(int number,
NakedObjectActionImpl nakedObjectAction,
NakedObjectActionParamPeer peer)
|
| Method Summary | ||
|---|---|---|
void |
addFacet(Facet facet)
Adds the facet, extracting its type as the key. |
|
void |
addFacet(MultiTypedFacet facet)
Adds the multi-typed facet, extracting each of its
types as keys. |
|
protected static void |
checkChoicesType(RuntimeContext runtimeContext,
java.lang.Object[] objects,
NakedObjectSpecification paramSpec)
|
|
boolean |
containsFacet(java.lang.Class<? extends Facet> facetType)
Whether there is a facet registered of the specified type. |
|
ActionArgumentContext |
createProposedArgumentInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject targetObject,
NakedObject[] proposedArguments,
int position)
|
|
NakedObjectAction |
getAction()
Owning NakedObjectAction. |
|
protected AuthenticationSession |
getAuthenticationSession()
|
|
NakedObject[] |
getChoices(NakedObject nakedObject)
|
|
NakedObject |
getDefault(NakedObject nakedObject)
|
|
java.lang.String |
getDescription()
Returns a description of how the member is used - this complements the help text. |
|
|
getFacet(java.lang.Class<T> cls)
Get the facet of the specified type (as per the type it reports from Facet.facetType()). |
|
Facet[] |
getFacets(Filter<Facet> filter)
Returns all Facets matching the specified FacetFilter. |
|
java.lang.Class<? extends Facet>[] |
getFacetTypes()
Get the list of all facet types that are supported by objects of this specification. |
|
Identifier |
getIdentifier()
Identifier of this feature. |
|
java.lang.String |
getName()
Return the name for this member - the field or action. |
|
int |
getNumber()
Parameter number, 0-based. |
|
protected RuntimeContext |
getRuntimeContext()
|
|
NakedObjectSpecification |
getSpecification()
The specification of the underlying type. |
|
boolean |
isCollection()
Subclasses should override either isObject() or isCollection(). |
|
boolean |
isObject()
Subclasses should override either isObject() or isCollection(). |
|
boolean |
isOptional()
Returns a flag indicating if it can be left unset when the action can be invoked. |
|
Consent |
isUsable()
|
|
void |
removeFacet(java.lang.Class<? extends Facet> facetType)
Remove the facet of the specified type. |
|
void |
removeFacet(Facet facet)
Remove the facet whose type is that reported by Facet.facetType(). |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.nakedobjects.metamodel.spec.feature.NakedObjectActionParameter |
|---|
isValid |
| Methods inherited from interface org.nakedobjects.metamodel.spec.Specification |
|---|
getInstance |
| Methods inherited from interface org.nakedobjects.metamodel.spec.feature.CurrentHolder |
|---|
get |
| Constructor Detail |
|---|
protected NakedObjectActionParameterAbstract(int number,
NakedObjectActionImpl nakedObjectAction,
NakedObjectActionParamPeer peer)
| Method Detail |
|---|
public boolean isObject()
isObject() or isCollection().
isObject in interface NakedObjectActionParameterpublic boolean isCollection()
isObject() or isCollection().
isCollection in interface NakedObjectActionParameterpublic int getNumber()
getNumber in interface NakedObjectActionParameterpublic NakedObjectAction getAction()
NakedObjectActionParameterNakedObjectAction.
getAction in interface NakedObjectActionParameterpublic NakedObjectSpecification getSpecification()
TypedSpecificationFor example:
property, will return the NakedObjectSpecification
of the type that the accessor returns.
collection it will be the type of element
the collection holds (not the type of collection).
action, will always return null. See instead NakedObjectAction.getReturnType() and NakedObjectAction.getParameterTypes().
action, will return the type of the parameter}.
getSpecification in interface TypedSpecificationpublic Identifier getIdentifier()
Identified
getIdentifier in interface Identifiedpublic java.lang.String getName()
NamedAndDescribed
getName in interface NamedAndDescribed#getIdentifier()public java.lang.String getDescription()
NamedAndDescribed
getDescription in interface NamedAndDescribed#getHelp()public boolean isOptional()
NakedObjectActionParameter
isOptional in interface NakedObjectActionParameterpublic Consent isUsable()
public boolean containsFacet(java.lang.Class<? extends Facet> facetType)
FacetHolder
Convenience; saves having to FacetHolder.getFacet(Class) and then check if null.
containsFacet in interface FacetHolderpublic <T extends Facet> T getFacet(java.lang.Class<T> cls)
FacetHolderFacet.facetType()).
getFacet in interface FacetHolderpublic java.lang.Class<? extends Facet>[] getFacetTypes()
FacetHolder
getFacetTypes in interface FacetHolderpublic Facet[] getFacets(Filter<Facet> filter)
FacetHolderFacets matching the specified FacetFilter.
getFacets in interface FacetHolderpublic void addFacet(Facet facet)
FacetHoldertype as the key.
If there are any facet of the same type, they will be overwritten provided that either the
Facet specifies to always replace or if the existing
Facet is a no-op.
addFacet in interface FacetHolderpublic void addFacet(MultiTypedFacet facet)
FacetHoldermulti-typed facet, extracting each of its
types as keys.
If there are any facet of the same type, they will be overwritten provided that either the
Facet specifies to always replace or if the existing
Facet is a no-op.
addFacet in interface FacetHolderpublic void removeFacet(Facet facet)
FacetHolderFacet.facetType().
removeFacet in interface FacetHolderpublic void removeFacet(java.lang.Class<? extends Facet> facetType)
FacetHolder
removeFacet in interface FacetHolder
public ActionArgumentContext createProposedArgumentInteractionContext(AuthenticationSession session,
InteractionInvocationMethod invocationMethod,
NakedObject targetObject,
NakedObject[] proposedArguments,
int position)
createProposedArgumentInteractionContext in interface NakedObjectActionParameterpublic NakedObject[] getChoices(NakedObject nakedObject)
getChoices in interface NakedObjectActionParameter
protected static void checkChoicesType(RuntimeContext runtimeContext,
java.lang.Object[] objects,
NakedObjectSpecification paramSpec)
public NakedObject getDefault(NakedObject nakedObject)
getDefault in interface NakedObjectActionParameterprotected RuntimeContext getRuntimeContext()
protected AuthenticationSession getAuthenticationSession()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||