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

Examples of org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacetAlwaysEverywhere


    @Test(expected = DisabledException.class)
    public void shouldNotBeAbleToModifyProperty() {

        // given
        final DisabledFacet disabledFacet = new DisabledFacetAlwaysEverywhere(mockPasswordMember);
        facets = Arrays.asList((Facet)disabledFacet, new PropertySetterFacetViaSetterMethod(setPasswordMethod, mockPasswordMember));

        final Consent visibilityConsent = new Allow(new InteractionResult(new PropertyVisibilityEvent(employeeDO, null)));

        final InteractionResult usabilityInteractionResult = new InteractionResult(new PropertyUsabilityEvent(employeeDO, null));
View Full Code Here


            // already known to be modifiable
            return;
        }

        // else, infer that this is not modifiable
        FacetUtil.addFacet(new DisabledFacetAlwaysEverywhere(property));
    }
View Full Code Here

        if (!protectMethodReturnValue.booleanValue()) {
            return;
        }

        final FacetHolder facetedMethod = processMethodContext.getFacetHolder();
        FacetUtil.addFacet(new DisabledFacetAlwaysEverywhere(facetedMethod));
    }
View Full Code Here

        facetFactory.process(new ProcessMethodContext(CustomerStatic.class, null, null, collectionAccessorMethod, methodRemover, facetedMethod));

        final Facet facet = facetedMethod.getFacet(DisabledFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof DisabledFacetAlwaysEverywhere);
        final DisabledFacetAlwaysEverywhere disabledFacetAlways = (DisabledFacetAlwaysEverywhere) facet;
        assertEquals(When.ALWAYS, disabledFacetAlways.when());

        assertTrue(methodRemover.getRemovedMethodMethodCalls().contains(protectMethod));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.members.disabled.DisabledFacetAlwaysEverywhere

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.