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

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


        if(cssClassFacet != null && !cssClassFacet.isNoop()) {
            CssClassFacetRepr cssClassFacetRepr = new CssClassFacetRepr();
            cssClassFacetRepr.value = cssClassFacet.value();
            actionRepr.cssClass = cssClassFacetRepr;
        }
        DescribedAsFacet describedAsFacet = action.getFacet(DescribedAsFacet.class);
        if(describedAsFacet != null && !describedAsFacet.isNoop() && !Strings.isNullOrEmpty(describedAsFacet.value())) {
            DescribedAsFacetRepr describedAsFacetRepr = new DescribedAsFacetRepr();
            describedAsFacetRepr.value = describedAsFacet.value();
            actionRepr.describedAs = describedAsFacetRepr;
        }
        NamedFacet namedFacet = action.getFacet(NamedFacet.class);
        if(namedFacet != null && !namedFacet.isNoop()) {
            NamedFacetRepr namedFacetRepr = new NamedFacetRepr();
View Full Code Here


        if(cssClassFacet != null && !cssClassFacet.isNoop()) {
            CssClassFacetRepr cssClassFacetRepr = new CssClassFacetRepr();
            cssClassFacetRepr.value = cssClassFacet.value();
            memberRepr.cssClass = cssClassFacetRepr;
        }
        DescribedAsFacet describedAsFacet = assoc.getFacet(DescribedAsFacet.class);
        if(describedAsFacet != null && !describedAsFacet.isNoop() && !Strings.isNullOrEmpty(describedAsFacet.value())) {
            DescribedAsFacetRepr describedAsFacetRepr = new DescribedAsFacetRepr();
            describedAsFacetRepr.value = describedAsFacet.value();
            memberRepr.describedAs = describedAsFacetRepr;
        }
        NamedFacet namedFacet = assoc.getFacet(NamedFacet.class);
        if(namedFacet != null && !namedFacet.isNoop()) {
            NamedFacetRepr namedFacetRepr = new NamedFacetRepr();
View Full Code Here

            }
        }

        // otherwise, fall back to a description on the parameter's type, if
        // available
        final DescribedAsFacet parameterTypeDescribedAsFacet = getDescribedAsFacet(parameterType);
        if (parameterTypeDescribedAsFacet != null) {
            FacetUtil.addFacet(new DescribedAsFacetForParameterDerivedFromType(parameterTypeDescribedAsFacet, processParameterContext.getFacetHolder()));
            return;
        }
View Full Code Here

        return name + " " + (indexOf + 1);
    }

    @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 != null ? name : defaultName;
    }

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

    }

    @Override
    public void process(final ProcessMethodContext processMethodContext) {

        DescribedAsFacet facet = createFromMetadataPropertiesIfPossible(processMethodContext);
       
        if(facet == null) {
            facet = createFromAnnotationIfPossible(processMethodContext);
        }
        if (facet == null) {
View Full Code Here

        FacetUtil.addFacet(facet);
    }

    @Override
    public void process(ProcessContributeeMemberContext processMemberContext) {
        DescribedAsFacet facet = createFromMetadataPropertiesIfPossible(processMemberContext);
        // no-op if null
        FacetUtil.addFacet(facet);
    }
View Full Code Here

        return annotation == null ? null : new DescribedAsFacetOnMemberAnnotation(annotation.value(), processMethodContext.getFacetHolder());
    }

    private DescribedAsFacet createFromAnnotationOnReturnTypeIfPossible(final ProcessMethodContext processMethodContext) {
        final Class<?> returnType = processMethodContext.getMethod().getReturnType();
        final DescribedAsFacet returnTypeDescribedAsFacet = getDescribedAsFacet(returnType);
        return returnTypeDescribedAsFacet != null ? new DescribedAsFacetForMemberDerivedFromType(returnTypeDescribedAsFacet, processMethodContext.getFacetHolder()) : null;
    }
View Full Code Here

     * The description according to any available {@link org.apache.isis.core.metamodel.facets.object.plural.PluralFacet},
     * else empty string (<tt>""</tt>).
     */
    @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

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.