Package org.apache.isis.core.metamodel.facets.describedas

Examples of org.apache.isis.core.metamodel.facets.describedas.DescribedAsFacet


    @Override
    public void process(final ProcessMethodContext processMethodContext) {

        // look for annotation on the property
        final DescribedAs annotation = Annotations.getAnnotation(processMethodContext.getMethod(), DescribedAs.class);
        DescribedAsFacet facet = create(annotation, processMethodContext.getFacetHolder());
        if (facet != null) {
            FacetUtil.addFacet(facet);
            return;
        }

        // otherwise, look for annotation on the type
        final Class<?> returnType = processMethodContext.getMethod().getReturnType();
        final DescribedAsFacet returnTypeDescribedAsFacet = getDescribedAsFacet(returnType);
        if (returnTypeDescribedAsFacet != null) {
            facet = new DescribedAsFacetForMemberDerivedFromType(returnTypeDescribedAsFacet, processMethodContext.getFacetHolder());
            FacetUtil.addFacet(facet);
        }
    }
View Full Code Here


     * Expect to be populated using {@link #setDescribedAs(String)} but has
     * default name as well.
     */
    @Override
    public String getDescription() {
        final DescribedAsFacet describedAsFacet = getFacet(DescribedAsFacet.class);
        final String describedAs = describedAsFacet.value();
        return describedAs == null ? "" : describedAs;
    }
View Full Code Here

        final String actionLabel = linkAndLabel.getLabel();

        final Consent usability = objectAction.isUsable(session, adapter, where);
        final String reasonDisabledIfAny = usability.getReason();
       
        final DescribedAsFacet describedAsFacet = objectAction.getFacet(DescribedAsFacet.class);
        final String descriptionIfAny = describedAsFacet != null? describedAsFacet.value(): null;
       
        final CssClassFacet cssClassFacet = objectAction.getFacet(CssClassFacet.class);

        final boolean blobOrClob = returnsBlobOrClob(objectAction);
        final boolean prototype = isExplorationOrPrototype(objectAction);
View Full Code Here

        return name;
    }

    @Override
    public String getDescription() {
        final DescribedAsFacet facet = getFacet(DescribedAsFacet.class);
        final String description = facet.value();
        return description == null ? "" : description;
    }
View Full Code Here

        return name;
    }

    @Override
    public String getDescription() {
        final DescribedAsFacet facet = getFacet(DescribedAsFacet.class);
        return facet.value();
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.describedas.DescribedAsFacet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.