@Override public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target) { return super.isVisible(session, realTarget(target)); }
@Override public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target) { return super.isUsable(session, realTarget(target)); }
/** * Returns true if the represented action returns something, else returns * false. */ @Override public boolean hasReturn() { return getReturnType() != null; }
@Override public void updateFromFacetValues() { clearDirtyObjectFacet = getFacet(ClearDirtyObjectFacet.class); markDirtyObjectFacet = getFacet(MarkDirtyObjectFacet.class); isDirtyObjectFacet = getFacet(IsDirtyObjectFacet.class); titleFacet = getFacet(TitleFacet.class); iconFacet = getFacet(IconFacet.class); final Persistability persistability = determinePersistability(); this.persistability = persistability; }
private FacetedMethod findActionMethodPeer(final MethodScope methodScope, final RecognisedHelpersStrategy recognisedHelpersStrategy, final Method actionMethod) { if (!representsAction(actionMethod, methodScope, recognisedHelpersStrategy)) { return null; } // build action return createActionFacetedMethod(actionMethod); }
@Override public void set(final ObjectAdapter ownerAdapter, final ObjectAdapter newReferencedAdapter) { if (newReferencedAdapter != null) { setValue(ownerAdapter, newReferencedAdapter); } else { clearValue(ownerAdapter); } }
@Override public ObjectSpecification getSpecification() { return ObjectMemberAbstract.getSpecification(getSpecificationLookup(), peer.getType()); }
@Override public boolean isCollection() { return containsFacet(CollectionFacet.class); }
@Override public boolean isContributed() { if (!knownWhetherContributed) { contributed = determineWhetherContributed(); knownWhetherContributed = true; } return contributed; }
/** * Returns a {@link List} of {@link FacetedMethod}s representing object * actions, lazily creating them first if required. */ public List<FacetedMethod> getAssociationFacetedMethods() { if (associationFacetMethods == null) { associationFacetMethods = createAssociationFacetedMethods(); } return associationFacetMethods; }
private ObjectAdapter[] realParameters(final ObjectAdapter target, final ObjectAdapter[] parameters) { if (parameters != null) { return parameters; } return isContributed() ? new ObjectAdapter[] { target } : new ObjectAdapter[0]; }
/** * Intended to be called within {@link #introspectTypeHierarchyAndMembers()} * . */ protected void addAsSubclassTo(final List<ObjectSpecification> supertypeSpecs) { for (final ObjectSpecification supertypeSpec : supertypeSpecs) { addAsSubclassTo(supertypeSpec); } }
@Override public Identifier getIdentifier() { return parentAction.getIdentifier(); }
/** * Intended to be called within {@link #introspectTypeHierarchyAndMembers()} * . */ protected void addAsSubclassTo(final ObjectSpecification supertypeSpec) { if (!(supertypeSpec instanceof ObjectSpecificationAbstract)) { return; } // downcast required because addSubclass is (deliberately) not public // API final ObjectSpecificationAbstract introspectableSpec = (ObjectSpecificationAbstract) supertypeSpec; introspectableSpec.addSubclass(this); }
@Override public boolean hasSubclasses() { return subclasses.hasSubclasses(); }
@Override public boolean isAlwaysHidden() { return containsFacet(HiddenFacet.class); }
@Override public boolean isEmpty(final ObjectAdapter ownerAdapter) { return get(ownerAdapter) == null; }
/** * Returns a {@link List} of {@link FacetedMethod}s representing object * actions, lazily creating them first if required. */ public List<FacetedMethod> getActionFacetedMethods() { if (actionFacetedMethods == null) { actionFacetedMethods = findActionFacetedMethods(MethodScope.OBJECT); } return actionFacetedMethods; }
@Override public boolean isOneToOneAssociation() { return !isOneToManyAssociation(); }
@Override public boolean isAggregated() { return containsFacet(AggregatedFacet.class); }