org.nakedobjects.metamodel.facets.propparam.validate.mandatory
Class MandatoryFacetDefault

java.lang.Object
  extended by org.nakedobjects.metamodel.facets.FacetAbstract
      extended by org.nakedobjects.metamodel.facets.MarkerFacetAbstract
          extended by org.nakedobjects.metamodel.facets.propparam.validate.mandatory.MandatoryFacetAbstract
              extended by org.nakedobjects.metamodel.facets.propparam.validate.mandatory.MandatoryFacetDefault
All Implemented Interfaces:
InteractionAdvisor, InteractionAdvisorFacet, Facet, MarkerFacet, MandatoryFacet, ValidatingInteractionAdvisor

public class MandatoryFacetDefault
extends MandatoryFacetAbstract

Whether a property or a parameter is mandatory (not optional).

For a mandatory property, the object cannot be saved/updated without the value being provided. For a mandatory parameter, the action cannot be invoked without the value being provided.

In the standard Naked Objects Programming Model, specify mandatory by omitting the @Optional annotation.


Field Summary
 
Fields inherited from interface org.nakedobjects.metamodel.consent.InteractionAdvisorFacet
NOOP
 
Constructor Summary
MandatoryFacetDefault(FacetHolder holder)
           
 
Method Summary
 boolean isInvertedSemantics()
          Indicates that the implementation is overridding the usual semantics, in other words that the FacetHolder to which this Facet is attached is not mandatory.
 boolean isRequiredButNull(NakedObject nakedObject)
          If not specified or, if a string, then zero length.
 
Methods inherited from class org.nakedobjects.metamodel.facets.propparam.validate.mandatory.MandatoryFacetAbstract
invalidates, type
 
Methods inherited from class org.nakedobjects.metamodel.facets.FacetAbstract
alwaysReplace, facetType, getFacetHolder, getIdentified, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacet, toString, toStringValues, 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.Facet
alwaysReplace, facetType, getFacetHolder, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacet
 

Constructor Detail

MandatoryFacetDefault

public MandatoryFacetDefault(FacetHolder holder)
Method Detail

isRequiredButNull

public boolean isRequiredButNull(NakedObject nakedObject)
If not specified or, if a string, then zero length.


isInvertedSemantics

public boolean isInvertedSemantics()
Description copied from interface: MandatoryFacet
Indicates that the implementation is overridding the usual semantics, in other words that the FacetHolder to which this Facet is attached is not mandatory.



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