public class ObjectActionContributee extends ObjectActionImpl implements ContributeeMember
ContributeeMember.PredicatesObjectAction.Filters, ObjectAction.Predicates, ObjectAction.UtilsdefaultName| Constructor and Description |
|---|
ObjectActionContributee(ObjectAdapter serviceAdapter,
ObjectActionImpl serviceAction,
int contributeeParam,
ObjectSpecification contributeeType,
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.
|
ObjectAdapter |
execute(ObjectAdapter contributee,
ObjectAdapter[] arguments)
Invokes the action's method on the target object given the specified set
of parameters.
|
ObjectAdapter[][] |
getChoices(ObjectAdapter target)
Returns a list of possible references/values for each parameter, which
the user can choose from.
|
int |
getContributeeParam() |
ObjectAdapter[] |
getDefaults(ObjectAdapter target)
Returns the defaults references/values to be used for the action.
|
<T extends Facet> |
getFacet(Class<T> cls)
Get the facet of the specified type (as per the type it reports from
Facet.facetType()). |
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.
|
org.apache.isis.applib.Identifier |
getIdentifier()
Identifier of this feature.
|
ObjectSpecification |
getOnType()
Returns the specification for the type of object that this action can be
invoked upon.
|
int |
getParameterCount()
Returns the number of parameters used by this method.
|
List<ObjectActionParameter> |
getParameters()
Build lazily by
ObjectActionImpl.getParameters(). |
Consent |
isProposedArgumentSetValid(ObjectAdapter contributee,
ObjectAdapter[] proposedArguments)
TODO: currently this method is hard-coded to assume all interactions are
initiated
by user. |
Consent |
isUsable(AuthenticationSession session,
ObjectAdapter contributee,
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 contributee,
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()
. |
createActionInvocationInteractionContext, createUsableInteractionContext, createVisibleInteractionContext, debugData, getActionInvocationFacet, getInstance, getParameterById, getParameterByName, getParameters, getParameterTypes, getReturnType, getSemantics, getSpecification, getType, getType, hasReturn, promptForParameters, toStringgetAdapterManager, getAuthenticationSession, getAuthenticationSessionProvider, getCollectionTypeRegistry, getDeploymentCategory, getDescription, getFacetedMethod, getFeatureType, getHelp, getId, getName, getQuerySubmitter, getServicesProvider, getSpecification, getSpecificationLookup, isAction, isAlwaysHidden, isOneToManyAssociation, isOneToOneAssociation, isPropertyOrCollectionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetHelp, isAction, isAlwaysHidden, isOneToManyAssociation, isOneToOneAssociation, isPropertyOrCollectiongetDescription, getId, getNamegetFeatureTypepublic ObjectActionContributee(ObjectAdapter serviceAdapter, ObjectActionImpl serviceAction, int contributeeParam, ObjectSpecification contributeeType, ObjectMemberContext objectMemberContext)
contributeeParam - - the parameter number which corresponds to the contributee, and so should be suppressed.public ObjectSpecification getOnType()
ObjectActiongetOnType in interface ObjectActiongetOnType in class ObjectActionImplpublic int getParameterCount()
ObjectActiongetParameterCount in interface ObjectActiongetParameterCount in class ObjectActionImplpublic int getContributeeParam()
public List<ObjectActionParameter> getParameters()
ObjectActionImplObjectActionImpl.getParameters().
Although this is lazily loaded, the method is also synchronized so there shouldn't be any thread race conditions.
getParameters in interface ObjectActiongetParameters in class ObjectActionImplpublic Consent isVisible(AuthenticationSession session, ObjectAdapter contributee, org.apache.isis.applib.annotation.Where where)
ObjectMemberAbstractHidingInteractionAdvisor 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 ObjectMemberisVisible in class ObjectMemberAbstractcontributee - 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 contributee, org.apache.isis.applib.annotation.Where where)
ObjectMemberAbstractDisablingInteractionAdvisor 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 ObjectMemberisUsable in class ObjectMemberAbstractcontributee - may be null if just checking for authorization.where - the member is being rendered in the UI#isUsableResult(AuthenticationSession, ObjectAdapter)public ObjectAdapter[] getDefaults(ObjectAdapter target)
ObjectActiongetDefaults in interface ObjectActiongetDefaults in class ObjectActionImplpublic ObjectAdapter[][] getChoices(ObjectAdapter target)
ObjectActiongetChoices in interface ObjectActiongetChoices in class ObjectActionImplpublic Consent isProposedArgumentSetValid(ObjectAdapter contributee, ObjectAdapter[] proposedArguments)
ObjectActionImplby user.isProposedArgumentSetValid in interface ObjectActionisProposedArgumentSetValid in class ObjectActionImplpublic ObjectAdapter execute(ObjectAdapter contributee, ObjectAdapter[] arguments)
ObjectActionexecute in interface ObjectActionexecute in class ObjectActionImplpublic Class<? extends Facet>[] getFacetTypes()
FacetHoldergetFacetTypes in interface FacetHoldergetFacetTypes in class ObjectMemberAbstractpublic <T extends Facet> T getFacet(Class<T> cls)
FacetHolderFacet.facetType()).getFacet in interface FacetHoldergetFacet in class ObjectMemberAbstractpublic boolean containsFacet(Class<? extends Facet> facetType)
FacetHoldercontainsFacet in interface FacetHoldercontainsFacet in class ObjectMemberAbstractpublic 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 FacetHoldercontainsDoOpFacet in class ObjectMemberAbstractpublic List<Facet> getFacets(org.apache.isis.applib.filter.Filter<Facet> filter)
FacetHolderFacets matching the specified FacetFilter.getFacets in interface FacetHoldergetFacets in class ObjectMemberAbstractpublic 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 FacetHolderaddFacet in class ObjectMemberAbstractpublic 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 FacetHolderaddFacet in class ObjectMemberAbstractpublic void removeFacet(Facet facet)
FacetHolderFacet.facetType()
.removeFacet in interface FacetHolderremoveFacet in class ObjectMemberAbstractpublic void removeFacet(Class<? extends Facet> facetType)
FacetHolderremoveFacet in interface FacetHolderremoveFacet in class ObjectMemberAbstractpublic org.apache.isis.applib.Identifier getIdentifier()
IdentifiedHoldergetIdentifier in interface IdentifiedHoldergetIdentifier in class ObjectMemberAbstractCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.