org.nakedobjects.metamodel.interactions
Interface ValidatingInteractionAdvisor

All Superinterfaces:
Facet, InteractionAdvisor, InteractionAdvisorFacet
All Known Subinterfaces:
ActionValidationFacet, BoundedFacet, CollectionValidateAddToFacet, CollectionValidateRemoveFromFacet, MandatoryFacet, MaskFacet, MaxLengthFacet, ObjectValidPropertiesFacet, PropertyValidateFacet, RegExFacet, ValidateObjectFacet
All Known Implementing Classes:
ActionValidationFacetAbstract, ActionValidationFacetViaMethod, BoundedFacetAbstract, BoundedFacetAnnotation, BoundedFacetImpl, BoundedFacetMarkerInterface, CollectionValidateAddToFacetAbstract, CollectionValidateAddToFacetViaMethod, CollectionValidateRemoveFromFacetAbstract, CollectionValidateRemoveFromFacetViaMethod, MandatoryFacetAbstract, MandatoryFacetDefault, MandatoryFacetOverriddenByMethod, MaskFacetAbstract, MaskFacetAnnotation, MaxLengthFacetAbstract, MaxLengthFacetAnnotation, MaxLengthFacetUnlimited, MustSatisfySpecificationFacet, ObjectValidPropertiesFacetAbstract, ObjectValidPropertiesFacetImpl, OptionalFacet, PropertyValidateFacetAbstract, PropertyValidateFacetDefault, PropertyValidateFacetNone, PropertyValidateFacetViaMethod, RegExFacetAbstract, RegExFacetAnnotation, ValidateObjectFacetAbstract, ValidateObjectFacetViaValidateMethod

public interface ValidatingInteractionAdvisor
extends InteractionAdvisorFacet

Mix-in interface for Facets that can advise as to whether a proposed value is valid.

For example, MaxLengthFacet does constrain the length of candidate values, whereas DebugFacet or MemberOrderFacet do not - they are basically just UI hints.

See Also:
DisablingInteractionAdvisor, HidingInteractionAdvisor

Field Summary
 
Fields inherited from interface org.nakedobjects.metamodel.consent.InteractionAdvisorFacet
NOOP
 
Method Summary
 java.lang.String invalidates(ValidityContext<? extends ValidityEvent> ic)
          Whether the validation represented by this facet passes or fails.
 
Methods inherited from interface org.nakedobjects.metamodel.facets.Facet
alwaysReplace, facetType, getFacetHolder, getUnderlyingFacet, isDerived, isNoop, setFacetHolder, setUnderlyingFacet
 

Method Detail

invalidates

java.lang.String invalidates(ValidityContext<? extends ValidityEvent> ic)
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.



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