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

Examples of org.apache.isis.core.metamodel.facets.typicallen.TypicalLengthFacet


        if(renderFacet != null && !renderFacet.isNoop()) {
            RenderFacetRepr renderFacetRepr = new RenderFacetRepr();
            renderFacetRepr.value = renderFacet.value();
            memberRepr.render = renderFacetRepr;
        }
        TypicalLengthFacet typicalLengthFacet = assoc.getFacet(TypicalLengthFacet.class);
        if(typicalLengthFacet != null && !typicalLengthFacet.isNoop()) {
            TypicalLengthFacetRepr typicalLengthFacetRepr = new TypicalLengthFacetRepr();
            typicalLengthFacetRepr.value = typicalLengthFacet.value();
            memberRepr.typicalLength = typicalLengthFacetRepr;
        }

        final List<ObjectAction> actions = objectSpec.getObjectActions(
                ActionType.USER, Contributed.INCLUDED, ObjectAction.Filters.memberOrderOf(assoc));
View Full Code Here


        return facet.value();
    }

    @Override
    public int getTypicalLineLength() {
        final TypicalLengthFacet facet = getFacet(TypicalLengthFacet.class);
        return facet.value();
    }
View Full Code Here

        final FacetedMethodParameter facetHolder = processParameterContext.getFacetHolder();
        addFacetDerivedFromTypeIfPresent(facetHolder, type);
    }

    private void addFacetDerivedFromTypeIfPresent(final FacetHolder holder, final Class<?> type) {
        final TypicalLengthFacet facet = getTypicalLengthFacet(type);
        if (facet != null) {
            FacetUtil.addFacet(new TypicalLengthFacetForParameterDerivedFromType(facet, holder));
        }
    }
View Full Code Here

        super(FeatureType.PROPERTIES_ONLY);
    }

    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        TypicalLengthFacet facet = createFromMetadataPropertiesIfPossible(processMethodContext);
        if(facet == null) {
            facet = createFromAnnotationIfPossible(processMethodContext);
        }

        // no-op if null
View Full Code Here

        FacetUtil.addFacet(facet);
    }

    @Override
    public void process(ProcessContributeeMemberContext processMemberContext) {
        TypicalLengthFacet facet = createFromMetadataPropertiesIfPossible(processMemberContext);

        // no-op if null
        FacetUtil.addFacet(facet);
    }
View Full Code Here

        final FacetedMethod facetHolder = processMethodContext.getFacetHolder();
        addFacetDerivedFromTypeIfPresent(facetHolder, type);
    }

    private void addFacetDerivedFromTypeIfPresent(final FacetHolder holder, final Class<?> type) {
        final TypicalLengthFacet facet = getTypicalLengthFacet(type);
        if (facet != null) {
            FacetUtil.addFacet(new TypicalLengthFacetForPropertyDerivedFromType(facet, holder));
        }
    }
View Full Code Here

                    wraps[i] = !multilineFacet.preventWrapping();

                    final MaxLengthFacet maxLengthFacet = fld.getFacet(MaxLengthFacet.class);
                    maxLength[i] = maxLengthFacet.value();

                    final TypicalLengthFacet typicalLengthFacet = fld.getFacet(TypicalLengthFacet.class);
                    typicalLength[i] = typicalLengthFacet.value();
                }
            }
            i++;
        }
View Full Code Here

        return maxLengthFacet().value();
    }

    @Override
    public int getTypicalLineLength() {
        final TypicalLengthFacet facet = field.getObjectAssociation().getFacet(TypicalLengthFacet.class);
        return facet.value();
    }
View Full Code Here

        final FacetedMethodParameter facetHolder = processParameterContext.getFacetHolder();
        addFacetDerivedFromTypeIfPresent(facetHolder, type);
    }

    private void addFacetDerivedFromTypeIfPresent(final FacetHolder holder, final Class<?> type) {
        final TypicalLengthFacet facet = getTypicalLengthFacet(type);
        if (facet != null) {
            FacetUtil.addFacet(new TypicalLengthFacetForParameterDerivedFromType(facet, holder));
        }
    }
View Full Code Here

    }

    @Override
    public void process(final ProcessMethodContext processMethodContext) {
        final TypicalLength annotation = getAnnotation(processMethodContext.getMethod(), TypicalLength.class);
        final TypicalLengthFacet facet = create(annotation, processMethodContext.getFacetHolder());

        FacetUtil.addFacet(facet);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.typicallen.TypicalLengthFacet

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.