Examples of TypicalLengthFacet


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

        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

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

        FacetUtil.addFacet(facet);
    }

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

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

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

        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

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

                    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

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

        return maxLengthFacet().value();
    }

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

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

        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

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

    }

    @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

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

        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

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

        return facet.value();
    }

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

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

    private int determineSize() {
        final ScalarModel scalarModel = getModel();
        final ObjectSpecification noSpec = scalarModel.getTypeOfSpecification();

        final TypicalLengthFacet typicalLengthFacet = noSpec.getFacet(TypicalLengthFacet.class);
        if (typicalLengthFacet != null) {
            return typicalLengthFacet.value();
        }
        final MaxLengthFacet maxLengthFacet = noSpec.getFacet(MaxLengthFacet.class);
        if (maxLengthFacet != null) {
            return maxLengthFacet.value();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.