public interface ImperativeFacet
Facet implementation that ultimately wraps a Method or
possibly several equivalent methods, for a Java implementation of a
ObjectMember.
Used by ObjectSpecificationDefault#getMember(Method) in order to
reverse lookup ObjectMembers 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
ObjectSpecification) should not implement this interface.
| Modifier and Type | Interface and Description |
|---|---|
static class |
ImperativeFacet.Flags |
static class |
ImperativeFacet.Intent |
static class |
ImperativeFacet.Util |
| Modifier and Type | Field and Description |
|---|---|
static org.apache.isis.applib.filter.Filter<Facet> |
FILTER
For use by
FacetHolder#getFacets(org.apache.isis.core.metamodel.facetapi.progmodel.facets.org.apache.isis.nof.arch.facets.Facet.Filter) |
| Modifier and Type | Method and Description |
|---|---|
ImperativeFacet.Intent |
getIntent(Method method)
The intent of this method, so that the
WrapperFactory knows whether to delegate on or to reject. |
List<Method> |
getMethods()
|
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. |
List<Method> getMethods()
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(...);
}
ImperativeFacet.Intent getIntent(Method method)
WrapperFactory knows whether to delegate on or to reject.method - - one of the methods returned from getMethods()boolean impliesResolve()
DomainObjectContainer.resolve(Object) to occur first.boolean impliesObjectChanged()
DomainObjectContainer.objectChanged(Object) to occur afterwards.Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.