org.nakedobjects.metamodel.facets.propparam.validate.maxlength
Class MaxLengthFacetAbstract

java.lang.Object
  extended by org.nakedobjects.metamodel.facets.FacetAbstract
      extended by org.nakedobjects.metamodel.facets.SingleIntValueFacetAbstract
          extended by org.nakedobjects.metamodel.facets.propparam.validate.maxlength.MaxLengthFacetAbstract
All Implemented Interfaces:
InteractionAdvisor, InteractionAdvisorFacet, Facet, MaxLengthFacet, SingleIntValueFacet, ValidatingInteractionAdvisor
Direct Known Subclasses:
MaxLengthFacetAnnotation, MaxLengthFacetUnlimited

public abstract class MaxLengthFacetAbstract
extends SingleIntValueFacetAbstract
implements MaxLengthFacet


Field Summary
 
Fields inherited from interface org.nakedobjects.metamodel.consent.InteractionAdvisorFacet
NOOP
 
Constructor Summary
MaxLengthFacetAbstract(int value, FacetHolder holder)
           
 
Method Summary
 boolean exceeds(NakedObject nakedObject)
          Whether the provided argument exceeds the maximum length.
 java.lang.String invalidates(ValidityContext<? extends ValidityEvent> context)
          Whether the validation represented by this facet passes or fails.
protected  java.lang.String toStringValues()
           
static java.lang.Class<? extends Facet> type()
           
 
Methods inherited from class org.nakedobjects.metamodel.facets.SingleIntValueFacetAbstract
value
 
Methods inherited from class org.nakedobjects.metamodel.facets.FacetAbstract
alwaysReplace, facetType, getFacetHolder, getIdentified, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacet, toString, unwrapObject, unwrapString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.nakedobjects.metamodel.facets.SingleIntValueFacet
value
 
Methods inherited from interface org.nakedobjects.metamodel.facets.Facet
alwaysReplace, facetType, getFacetHolder, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacet
 

Constructor Detail

MaxLengthFacetAbstract

public MaxLengthFacetAbstract(int value,
                              FacetHolder holder)
Method Detail

type

public static java.lang.Class<? extends Facet> type()

exceeds

public boolean exceeds(NakedObject nakedObject)
Whether the provided argument exceeds the maximum length.

Specified by:
exceeds in interface MaxLengthFacet

invalidates

public java.lang.String invalidates(ValidityContext<? extends ValidityEvent> context)
Description copied from interface: ValidatingInteractionAdvisor
Whether the validation represented by this facet passes or fails.

Implementations should use the provided ValidityContext to determine whether they declare the interaction invalid. They must however guard against a null target and session - neither are guaranteed to be populated.

Specified by:
invalidates in interface ValidatingInteractionAdvisor

toStringValues

protected java.lang.String toStringValues()
Overrides:
toStringValues in class FacetAbstract


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