org.nakedobjects.metamodel.facets.propparam.validate.mandatory
Interface MandatoryFacet

All Superinterfaces:
Facet, InteractionAdvisor, InteractionAdvisorFacet, MarkerFacet, ValidatingInteractionAdvisor
All Known Implementing Classes:
MandatoryFacetAbstract, MandatoryFacetDefault, MandatoryFacetOverriddenByMethod, OptionalFacet

public interface MandatoryFacet
extends MarkerFacet, ValidatingInteractionAdvisor

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
 
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)
          Whether this value is required but has not been provided (and is therefore invalid).
 
Methods inherited from interface org.nakedobjects.metamodel.interactions.ValidatingInteractionAdvisor
invalidates
 
Methods inherited from interface org.nakedobjects.metamodel.facets.Facet
alwaysReplace, facetType, getFacetHolder, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacet
 

Method Detail

isRequiredButNull

boolean isRequiredButNull(NakedObject nakedObject)
Whether this value is required but has not been provided (and is therefore invalid).

If the value has been provided, or if the property or parameter is not required, then will return false.


isInvertedSemantics

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.



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