public abstract class ObjectMemberAbstract extends Object implements ObjectMember
| Modifier and Type | Field and Description |
|---|---|
protected String |
defaultName |
| Modifier | Constructor and Description |
|---|---|
protected |
ObjectMemberAbstract(FacetedMethod facetedMethod,
FeatureType featureType,
ObjectMemberContext objectMemberContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFacet(Facet facet)
Adds the facet, extracting its
type as the key. |
void |
addFacet(MultiTypedFacet facet)
Adds the
multi-typed facet, extracting each of
its types as keys. |
boolean |
containsDoOpFacet(Class<? extends Facet> facetType)
Whether there is a facet registered of the specified type that is not a
no-op. |
boolean |
containsFacet(Class<? extends Facet> facetType)
Whether there is a facet registered of the specified type.
|
AdapterManager |
getAdapterManager() |
protected AuthenticationSession |
getAuthenticationSession()
The current
AuthenticationSession (can change over time so do not
cache). |
AuthenticationSessionProvider |
getAuthenticationSessionProvider() |
CollectionTypeRegistry |
getCollectionTypeRegistry() |
DeploymentCategory |
getDeploymentCategory() |
String |
getDescription()
Returns a description of how the member is used - this complements the
help text.
|
<T extends Facet> |
getFacet(Class<T> cls)
Get the facet of the specified type (as per the type it reports from
Facet.facetType()). |
FacetedMethod |
getFacetedMethod() |
List<Facet> |
getFacets(org.apache.isis.applib.filter.Filter<Facet> filter)
Returns all
Facets matching the specified FacetFilter. |
Class<? extends Facet>[] |
getFacetTypes()
Get the list of all facet types that are supported by objects of
this specification.
|
FeatureType |
getFeatureType() |
String |
getHelp()
Return the help text for this member - the field or action - to
complement the description.
|
String |
getId()
Returns the identifier of the member, which must not change.
|
org.apache.isis.applib.Identifier |
getIdentifier()
Identifier of this feature.
|
String |
getName()
Return the default label for this member.
|
QuerySubmitter |
getQuerySubmitter() |
ServicesProvider |
getServicesProvider() |
static ObjectSpecification |
getSpecification(SpecificationLoader specificationLookup,
Class<?> type) |
SpecificationLoader |
getSpecificationLookup() |
boolean |
isAction()
Whether this member represents a
ObjectAction. |
boolean |
isAlwaysHidden()
When the member is always hidden.
|
boolean |
isOneToManyAssociation()
Whether this member represents a
OneToManyAssociation. |
boolean |
isOneToOneAssociation()
Whether this member represents a
OneToOneAssociation. |
boolean |
isPropertyOrCollection()
Whether this member represents a
ObjectAssociation. |
Consent |
isUsable(AuthenticationSession session,
ObjectAdapter target,
org.apache.isis.applib.annotation.Where where)
Loops over all
DisablingInteractionAdvisor Facets and
returns true only if none disables the member. |
Consent |
isVisible(AuthenticationSession session,
ObjectAdapter target,
org.apache.isis.applib.annotation.Where where)
Loops over all
HidingInteractionAdvisor Facets and
returns true only if none hide the member. |
void |
removeFacet(Class<? extends Facet> facetType)
Remove the facet of the specified type.
|
void |
removeFacet(Facet facet)
Remove the facet whose type is that reported by
Facet.facetType()
. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateUsableInteractionContext, createVisibleInteractionContext, debugDatagetSpecificationgetInstanceprotected final String defaultName
protected ObjectMemberAbstract(FacetedMethod facetedMethod, FeatureType featureType, ObjectMemberContext objectMemberContext)
public static ObjectSpecification getSpecification(SpecificationLoader specificationLookup, Class<?> type)
public DeploymentCategory getDeploymentCategory()
public String getId()
ObjectFeaturegetId in interface ObjectFeaturepublic FacetedMethod getFacetedMethod()
public org.apache.isis.applib.Identifier getIdentifier()
IdentifiedHoldergetIdentifier in interface IdentifiedHolderpublic FeatureType getFeatureType()
getFeatureType in interface Specificationpublic boolean containsFacet(Class<? extends Facet> facetType)
FacetHoldercontainsFacet in interface FacetHolderpublic boolean containsDoOpFacet(Class<? extends Facet> facetType)
FacetHolderno-op.
Convenience; saves having to FacetHolder.getFacet(Class) and then check if
null and not a no-op.
containsDoOpFacet in interface FacetHolderpublic <T extends Facet> T getFacet(Class<T> cls)
FacetHolderFacet.facetType()).getFacet in interface FacetHolderpublic Class<? extends Facet>[] getFacetTypes()
FacetHoldergetFacetTypes in interface FacetHolderpublic List<Facet> getFacets(org.apache.isis.applib.filter.Filter<Facet> filter)
FacetHolderFacets matching the specified FacetFilter.getFacets in interface FacetHolderpublic void addFacet(Facet facet)
FacetHoldertype as the key.
If there are any facet of the same type, they will be overwritten
provided that either the Facet specifies to
always replace or if the existing
Facet is a no-op.
addFacet in interface FacetHolderpublic void addFacet(MultiTypedFacet facet)
FacetHoldermulti-typed facet, extracting each of
its types as keys.
If there are any facet of the same type, they will be overwritten
provided that either the Facet specifies to
always replace or if the existing
Facet is a no-op.
addFacet in interface FacetHolderpublic void removeFacet(Facet facet)
FacetHolderFacet.facetType()
.removeFacet in interface FacetHolderpublic void removeFacet(Class<? extends Facet> facetType)
FacetHolderremoveFacet in interface FacetHolderpublic String getName()
getName in interface ObjectFeaturegetId()public String getDescription()
ObjectFeaturegetDescription in interface ObjectFeaturegetDescription in interface Specification#getHelp()public String getHelp()
ObjectMembergetHelp in interface ObjectMemberObjectFeature.getDescription()public boolean isAlwaysHidden()
ObjectMember
Determined as per the HiddenFacet being present and
WhenValueFacet.when() returning When.ALWAYS, and
WhenAndWhereValueFacet.where() returning When#ANYWHERE.
isAlwaysHidden in interface ObjectMemberpublic Consent isVisible(AuthenticationSession session, ObjectAdapter target, org.apache.isis.applib.annotation.Where where)
HidingInteractionAdvisor Facets and
returns true only if none hide the member.
TODO: currently this method is hard-coded to assume all interactions are
initiated by user.
isVisible in interface ObjectMembertarget - may be null if just checking for authorization.where - the member is being rendered in the UI#isVisibleResult(AuthenticationSession, ObjectAdapter)public Consent isUsable(AuthenticationSession session, ObjectAdapter target, org.apache.isis.applib.annotation.Where where)
DisablingInteractionAdvisor Facets and
returns true only if none disables the member.
TODO: currently this method is hard-coded to assume all interactions are
initiated by user.
isUsable in interface ObjectMembertarget - may be null if just checking for authorization.where - the member is being rendered in the UI#isUsableResult(AuthenticationSession, ObjectAdapter)public boolean isAction()
ObjectMemberObjectAction.
If so, can be safely downcast to ObjectAction.
isAction in interface ObjectMemberpublic boolean isPropertyOrCollection()
ObjectMemberObjectAssociation.
If so, can be safely downcast to ObjectAssociation.
isPropertyOrCollection in interface ObjectMemberpublic boolean isOneToManyAssociation()
ObjectMemberOneToManyAssociation.
If so, can be safely downcast to OneToManyAssociation.
isOneToManyAssociation in interface ObjectMemberpublic boolean isOneToOneAssociation()
ObjectMemberOneToOneAssociation.
If so, can be safely downcast to OneToOneAssociation.
isOneToOneAssociation in interface ObjectMemberprotected AuthenticationSession getAuthenticationSession()
AuthenticationSession (can change over time so do not
cache).public AuthenticationSessionProvider getAuthenticationSessionProvider()
public SpecificationLoader getSpecificationLookup()
public AdapterManager getAdapterManager()
public ServicesProvider getServicesProvider()
public QuerySubmitter getQuerySubmitter()
public CollectionTypeRegistry getCollectionTypeRegistry()
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.