org.nakedobjects.metamodel.java5
Interface ImperativeFacet

All Known Subinterfaces:
CallbackFacet, CreatedCallbackFacet, ImperativeFacetMulti, LoadedCallbackFacet, LoadingCallbackFacet, PersistedCallbackFacet, PersistingCallbackFacet, RemovedCallbackFacet, RemovingCallbackFacet, UpdatedCallbackFacet, UpdatingCallbackFacet
All Known Implementing Classes:
ActionChoicesFacetViaMethod, ActionDefaultsFacetViaMethod, ActionInvocationFacetViaMethod, ActionParameterChoicesFacetViaMethod, ActionParameterDefaultsFacetViaMethod, ActionValidationFacetViaMethod, CallbackFacetAbstract, ClearDirtyObjectFacetViaMethod, CollectionAddToFacetViaAccessor, CollectionAddToFacetViaMethod, CollectionClearFacetViaAccessor, CollectionClearFacetViaMethod, CollectionRemoveFromFacetViaAccessor, CollectionRemoveFromFacetViaMethod, CollectionValidateAddToFacetViaMethod, CollectionValidateRemoveFromFacetViaMethod, CreatedCallbackFacetAbstract, CreatedCallbackFacetViaMethod, DescribedAsFacetViaMethod, DisableForContextFacetViaMethod, DisableForSessionFacetViaMethod, HideForContextFacetViaMethod, HideForSessionFacetViaMethod, IsDirtyObjectFacetViaMethod, LoadedCallbackFacetAbstract, LoadedCallbackFacetViaMethod, LoadingCallbackFacetAbstract, LoadingCallbackFacetViaMethod, MarkDirtyObjectFacetViaMethod, NamedFacetViaMethod, PersistedCallbackFacetAbstract, PersistedCallbackFacetViaMethod, PersistingCallbackFacetAbstract, PersistingCallbackFacetViaMethod, PropertyAccessorFacetViaAccessor, PropertyChoicesFacetViaMethod, PropertyClearFacetViaClearMethod, PropertyClearFacetViaSetterMethod, PropertyDefaultFacetViaMethod, PropertyInitializationFacetViaSetterMethod, PropertySetterFacetViaModifyMethod, PropertySetterFacetViaSetterMethod, PropertyValidateFacetViaMethod, RemovedCallbackFacetAbstract, RemovedCallbackFacetViaMethod, RemovingCallbackFacetAbstract, RemovingCallbackFacetViaMethod, TitleFacetViaTitleMethod, TitleFacetViaToStringMethod, UpdatedCallbackFacetAbstract, UpdatedCallbackFacetViaMethod, UpdatingCallbackFacetAbstract, UpdatingCallbackFacetViaMethod, ValidateObjectFacetViaValidateMethod

public interface ImperativeFacet

A Facet implementation that ultimately wraps a Method or possibly several equivalent methods, for a Java implementation of a NakedObjectMember.

Used by JavaSpecification#getMember(Method) in order to reverse lookup NakedObjectMembers from underlying Methods. So, for example, the facets that represents an action xxx, or an validateXxx method, or an addToXxx collection, can all be used to lookup the member.

Note that Facets relating to the class itself (ie for NakedObjectSpecification) should not implement this interface.


Field Summary
static Filter<Facet> FILTER
          For use by FacetHolder#getFacets(org.nakedobjects.metamodel.facets.org.nakedobjects.nof.arch.facets.Facet.Filter)
 
Method Summary
 java.util.List<java.lang.reflect.Method> getMethods()
          The Methods invoked by this Facet.
 boolean impliesObjectChanged()
          Whether invoking this method requires an DomainObjectContainer.objectChanged(Object) to occur afterwards.
 boolean impliesResolve()
          Whether invoking this requires a DomainObjectContainer.resolve(Object) to occur first.
 

Field Detail

FILTER

static final Filter<Facet> FILTER
For use by FacetHolder#getFacets(org.nakedobjects.metamodel.facets.org.nakedobjects.nof.arch.facets.Facet.Filter)

Method Detail

getMethods

java.util.List<java.lang.reflect.Method> getMethods()
The Methods invoked by this Facet.

In the vast majority of cases there is only a single Method (eg wrapping a property's getter). However, some Facets, such as those for callbacks, could map to multiple Methods. Implementations that will return multiple Methods should implement the ImperativeFacetMulti sub-interface that provides the ability to add Methods as part of the interface API. For example:

 if (someFacet instanceof ImperativeFacetMulti) {
     ImperativeFacetMulti ifm = (ImperativeFacetMulti)someFacet;
     ifm.addMethod(...);
 }
 


impliesResolve

boolean impliesResolve()
Whether invoking this requires a DomainObjectContainer.resolve(Object) to occur first.


impliesObjectChanged

boolean impliesObjectChanged()
Whether invoking this method requires an DomainObjectContainer.objectChanged(Object) to occur afterwards.

Returns:


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