Examples of where()


Examples of org.apache.isis.applib.annotation.Disabled.where()

    }

    private static DisabledFacet createFromAnnotationIfPossible(final ProcessMethodContext processMethodContext) {
        final Disabled annotation = Annotations.getAnnotation(processMethodContext.getMethod(), Disabled.class);
        return annotation != null
                ? new DisabledFacetAnnotation(annotation.when(), annotation.where(), annotation.reason(), processMethodContext.getFacetHolder())
                : null;
    }

    private static DisabledFacet createFromMetadataPropertiesIfPossible(
            final ProcessContextWithMetadataProperties<? extends FacetHolder> pcwmp) {
View Full Code Here

Examples of org.apache.isis.applib.annotation.Hidden.where()

    }
   
    private static HiddenFacet createFromAnnotationIfPossible(final ProcessMethodContext processMethodContext) {
        final Hidden hiddenAnnotation = Annotations.getAnnotation(processMethodContext.getMethod(), Hidden.class);
        return hiddenAnnotation != null
                ? new HiddenFacetOnMemberAnnotation(hiddenAnnotation.when(), hiddenAnnotation.where(), processMethodContext.getFacetHolder())
                : null;
    }

    private static HiddenFacet createFromMetadataPropertiesIfPossible(
            final ProcessContextWithMetadataProperties<? extends FacetHolder> pcwmp) {
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.all.hide.HiddenFacet.where()

        }
        HiddenFacet hiddenFacet = assoc.getFacet(HiddenFacet.class);
        if(hiddenFacet != null && !hiddenFacet.isNoop()) {
            HiddenFacetRepr hiddenFacetRepr = new HiddenFacetRepr();
            hiddenFacetRepr.when = whenAlwaysToNull(hiddenFacet.when());
            hiddenFacetRepr.where = whereAnywhereToNull(hiddenFacet.where());
            memberRepr.hidden = hiddenFacetRepr;
        }
        MultiLineFacet multiLineFacet = assoc.getFacet(MultiLineFacet.class);
        if(multiLineFacet != null && !multiLineFacet.isNoop()) {
            MultiLineFacetRepr multiLineFacetRepr = new MultiLineFacetRepr();
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.hide.HiddenFacet.where()

                public boolean accept(final ObjectAssociation association) {
                    final HiddenFacet facet = association.getFacet(HiddenFacet.class);
                    if(facet == null) {
                        return true;
                    }
                    return !(facet.where().includes(context) && facet.when() == When.ALWAYS);
                }
            };
        }

        /**
 
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.hide.HiddenFacet.where()

        }
        HiddenFacet hiddenFacet = assoc.getFacet(HiddenFacet.class);
        if(hiddenFacet != null && !hiddenFacet.isNoop()) {
            HiddenFacetRepr hiddenFacetRepr = new HiddenFacetRepr();
            hiddenFacetRepr.when = whenAlwaysToNull(hiddenFacet.when());
            hiddenFacetRepr.where = whereAnywhereToNull(hiddenFacet.where());
            memberRepr.hidden = hiddenFacetRepr;
        }
        MultiLineFacet multiLineFacet = assoc.getFacet(MultiLineFacet.class);
        if(multiLineFacet != null && !multiLineFacet.isNoop()) {
            MultiLineFacetRepr multiLineFacetRepr = new MultiLineFacetRepr();
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacet.where()

            if(disabledFacet instanceof DisabledFacetImpl) {
                DisabledFacetImpl disabledFacetImpl = (DisabledFacetImpl) disabledFacet;
                disabledFacetRepr.reason = Strings.emptyToNull(disabledFacetImpl.getReason());
            }
            disabledFacetRepr.when = whenAlwaysToNull(disabledFacet.when());
            disabledFacetRepr.where = whereAnywhereToNull(disabledFacet.where());
            memberRepr.disabled = disabledFacetRepr;
        }
        HiddenFacet hiddenFacet = assoc.getFacet(HiddenFacet.class);
        if(hiddenFacet != null && !hiddenFacet.isNoop()) {
            HiddenFacetRepr hiddenFacetRepr = new HiddenFacetRepr();
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.members.disabled.DisabledFacet.where()

            if(disabledFacet instanceof DisabledFacetImpl) {
                DisabledFacetImpl disabledFacetImpl = (DisabledFacetImpl) disabledFacet;
                disabledFacetRepr.reason = Strings.emptyToNull(disabledFacetImpl.getReason());
            }
            disabledFacetRepr.when = whenAlwaysToNull(disabledFacet.when());
            disabledFacetRepr.where = whereAnywhereToNull(disabledFacet.where());
            memberRepr.disabled = disabledFacetRepr;
        }
        HiddenFacet hiddenFacet = assoc.getFacet(HiddenFacet.class);
        if(hiddenFacet != null && !hiddenFacet.isNoop()) {
            HiddenFacetRepr hiddenFacetRepr = new HiddenFacetRepr();
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.members.disabled.DisabledFacetAbstract.where()

        final Facet facet = facetedMethod.getFacet(DisabledFacet.class);
        final DisabledFacetAbstract disabledFacetAbstract = (DisabledFacetAbstract) facet;

        assertEquals(When.UNTIL_PERSISTED, disabledFacetAbstract.when());
        assertEquals(Where.ANYWHERE, disabledFacetAbstract.where());
    }


    public void testDisabledWhereCollectionTableAnnotationPickedUpOn() {
        class Customer {
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.members.disabled.DisabledFacetAbstract.where()

        final Facet facet = facetedMethod.getFacet(DisabledFacet.class);
        final DisabledFacetAbstract disabledFacetAbstract = (DisabledFacetAbstract) facet;

        assertEquals(When.ALWAYS, disabledFacetAbstract.when());
        assertEquals(Where.PARENTED_TABLES, disabledFacetAbstract.where());
    }


    public void testDisabledWhenAndWhereAnnotationPickedUpOn() {
        class Customer {
View Full Code Here

Examples of org.apache.isis.core.progmodel.facets.members.disabled.DisabledFacetAbstract.where()

        final Facet facet = facetedMethod.getFacet(DisabledFacet.class);
        final DisabledFacetAbstract disabledFacetAbstract = (DisabledFacetAbstract) facet;

        assertEquals(When.UNTIL_PERSISTED, disabledFacetAbstract.when());
        assertEquals(Where.PARENTED_TABLES, disabledFacetAbstract.where());
    }


}
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.