org.nakedobjects.metamodel.specloader.internal
Class NakedObjectActionParameterParseable

java.lang.Object
  extended by org.nakedobjects.metamodel.specloader.internal.NakedObjectActionParameterAbstract
      extended by org.nakedobjects.metamodel.specloader.internal.NakedObjectActionParameterParseable
All Implemented Interfaces:
FacetHolder, CurrentHolder, NakedObjectActionParameter, NakedObjectFeature, OneToOneActionParameter, OneToOneFeature, ParseableEntryActionParameter, ParseableEntryFeature, Identified, NamedAndDescribed, Specification, TypedSpecification

public class NakedObjectActionParameterParseable
extends NakedObjectActionParameterAbstract
implements ParseableEntryActionParameter


Constructor Summary
NakedObjectActionParameterParseable(int index, NakedObjectActionImpl action, NakedObjectActionParamPeer peer)
           
 
Method Summary
 boolean canWrap()
          Determines if a multi-line value can be wrapped when displayed.
 NakedObject get(NakedObject owner)
          Gets the proposed value of the Instance (downcast as a MutableProposed, wrapping the proposed value into a NakedObject.
 Instance getInstance(NakedObject nakedObject)
          Return an Instance of this Specification with respect to the provided NakedObject.
 int getMaximumLength()
          Returns the maximum number of characters for a value of this type.
 int getNoLines()
          Returns the number of lines for a multi-line value.
 int getTypicalLineLength()
          The typical length of each line for this value, as a number of characters.
 java.lang.String isValid(NakedObject nakedObject, java.lang.Object proposedValue)
          Invoked when tab away, disables the OK button.
 void set(NakedObject owner, NakedObject newValue)
          Sets the proposed value of the Instance (downcast as a MutableProposed, unwrapped the proposed value from a NakedObject.
 
Methods inherited from class org.nakedobjects.metamodel.specloader.internal.NakedObjectActionParameterAbstract
addFacet, addFacet, checkChoicesType, containsFacet, createProposedArgumentInteractionContext, getAction, getAuthenticationSession, getChoices, getDefault, getDescription, getFacet, getFacets, getFacetTypes, getIdentifier, getName, getNumber, getRuntimeContext, getSpecification, isCollection, isObject, isOptional, isUsable, removeFacet, removeFacet
 
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
createProposedArgumentInteractionContext, getAction, getChoices, getDefault, getNumber, isCollection, isObject, isOptional
 
Methods inherited from interface org.nakedobjects.metamodel.spec.TypedSpecification
getSpecification
 
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

NakedObjectActionParameterParseable

public NakedObjectActionParameterParseable(int index,
                                           NakedObjectActionImpl action,
                                           NakedObjectActionParamPeer peer)
Method Detail

getNoLines

public int getNoLines()
Description copied from interface: ParseableEntryFeature
Returns the number of lines for a multi-line value.

Specified by:
getNoLines in interface ParseableEntryFeature

canWrap

public boolean canWrap()
Description copied from interface: ParseableEntryFeature
Determines if a multi-line value can be wrapped when displayed.

Specified by:
canWrap in interface ParseableEntryFeature

getMaximumLength

public int getMaximumLength()
Description copied from interface: ParseableEntryFeature
Returns the maximum number of characters for a value of this type.

Specified by:
getMaximumLength in interface ParseableEntryFeature

getTypicalLineLength

public int getTypicalLineLength()
Description copied from interface: ParseableEntryFeature
The typical length of each line for this value, as a number of characters.

Specified by:
getTypicalLineLength in interface ParseableEntryFeature

isValid

public java.lang.String isValid(NakedObject nakedObject,
                                java.lang.Object proposedValue)
Invoked when tab away, disables the OK button.

Assumed to be invoked by user.

Specified by:
isValid in interface NakedObjectActionParameter
Returns:

getInstance

public Instance getInstance(NakedObject nakedObject)
Description copied from interface: Specification
Return an Instance 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.

Specified by:
getInstance in interface Specification

get

public NakedObject get(NakedObject owner)
Gets the proposed value of the Instance (downcast as a MutableProposed, wrapping the proposed value into a NakedObject.

Specified by:
get in interface CurrentHolder

set

public void set(NakedObject owner,
                NakedObject newValue)
Sets the proposed value of the Instance (downcast as a MutableProposed, unwrapped the proposed value from a NakedObject.



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