Package org.apache.isis.core.metamodel.facets.members.resolve

Examples of org.apache.isis.core.metamodel.facets.members.resolve.RenderFacet


        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, facetedMethod.getMethod(), methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(RenderFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof RenderFacetViaResolveAnnotation);
        RenderFacet resolveFacet = (RenderFacet) facet;
        assertThat(resolveFacet.value(), is(Render.Type.EAGERLY));

        assertNoMethodsRemoved();
    }
View Full Code Here


        }

        facetedMethod = FacetedMethod.createForProperty(Customer.class, "numberOfOrders");
        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, facetedMethod.getMethod(), methodRemover, facetedMethod));

        final RenderFacet facet = facetedMethod.getFacet(RenderFacet.class);
        assertThat(facet.value(), is(Render.Type.EAGERLY));
    }
View Full Code Here

        }

        facetedMethod = FacetedMethod.createForProperty(Customer.class, "numberOfOrders");
        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, facetedMethod.getMethod(), methodRemover, facetedMethod));

        final RenderFacet facet = facetedMethod.getFacet(RenderFacet.class);
        assertThat(facet.value(), is(Render.Type.LAZILY));
    }
View Full Code Here

        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, facetedMethod.getMethod(), methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(RenderFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof RenderFacetViaResolveAnnotation);
        RenderFacet resolveFacet = (RenderFacet) facet;
        assertThat(resolveFacet.value(), is(Render.Type.EAGERLY));

        assertNoMethodsRemoved();
    }
View Full Code Here

            }
        }
        facetedMethod = FacetedMethod.createForCollection(Customer.class, "orders");
        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, facetedMethod.getMethod(), methodRemover, facetedMethod));

        final RenderFacet facet = facetedMethod.getFacet(RenderFacet.class);
        assertThat(facet.value(), is(Render.Type.EAGERLY));
    }
View Full Code Here

            }
        }
        facetedMethod = FacetedMethod.createForCollection(Customer.class, "orders");
        facetFactory.process(new ProcessMethodContext(Customer.class, null, null, facetedMethod.getMethod(), methodRemover, facetedMethod));

        final RenderFacet facet = facetedMethod.getFacet(RenderFacet.class);
        assertThat(facet.value(), is(Render.Type.LAZILY));
    }
View Full Code Here

    }

    @Override
    public void process(final ProcessMethodContext processMethodContext) {
       
        RenderFacet renderFacet = createFromMetadataPropertiesIfPossible(processMethodContext);
        if(renderFacet == null) {
            renderFacet = createFromRenderAnnotationIfPossible(processMethodContext);
        }
        if(renderFacet == null) {
            renderFacet = createFromResolveAnnotationIfPossible(processMethodContext);
View Full Code Here

        FacetUtil.addFacet(renderFacet);
    }

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

            return false;
        }

        final OneToManyAssociation collection =
                entityCollectionModel.getCollectionMemento().getCollection();
        RenderFacet renderFacet = collection.getFacet(RenderFacet.class);
        return renderFacet != null && renderFacet.value() == Type.EAGERLY;
    }
View Full Code Here

        this.objectAction = serviceAction;

        // copy over facets from contributed to own.
        FacetUtil.copyFacets(serviceAction.getFacetedMethod(), facetHolder);
       
        final RenderFacet renderFacet = new RenderFacetAbstract(Render.Type.EAGERLY, this) {};
        final NotPersistedFacet notPersistedFacet = new NotPersistedFacetAbstract(this) {};
        final DisabledFacet disabledFacet = disabledFacet();
        final TypeOfFacet typeOfFacet = new TypeOfFacetAbstract(getSpecification().getCorrespondingClass(), this, objectMemberContext.getSpecificationLookup()) {};
       
        FacetUtil.addFacet(renderFacet);
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.members.resolve.RenderFacet

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.