org.nakedobjects.metamodel.facets.object.validate
Interface ValidateObjectFacet

All Superinterfaces:
Facet, InteractionAdvisor, InteractionAdvisorFacet, ValidatingInteractionAdvisor
All Known Implementing Classes:
ValidateObjectFacetAbstract, ValidateObjectFacetViaValidateMethod

public interface ValidateObjectFacet
extends Facet, ValidatingInteractionAdvisor

Mechanism for determining whether this object is in a valid state, for example so that it can be persisted or updated.

Even though all the properties of an object may themselves be valid, there could be inter-property dependencies which are invalid. For example fromDate > toDate would probably represent an invalid state.

In the standard Naked Objects Programming Model, typically corresponds to the validate method.

See Also:
PersistingCallbackFacet, UpdatingCallbackFacet

Field Summary
 
Fields inherited from interface org.nakedobjects.metamodel.consent.InteractionAdvisorFacet
NOOP
 
Method Summary
 java.lang.String invalidReason(NakedObject nakedObject)
          The reason the object is 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

invalidReason

java.lang.String invalidReason(NakedObject nakedObject)
The reason the object is invalid.

. If the object is actually valid, should return null.



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