Package org.apache.isis.core.metamodel.facets.properties.modify

Examples of org.apache.isis.core.metamodel.facets.properties.modify.PropertyClearFacet


        if(setterFacet != null) {
            final Class<? extends PropertyChangedEvent<?, ?>> changedEventType = annotation.value();
            FacetUtil.addFacet(new PostsPropertyChangedEventSetterFacetAnnotation(changedEventType, getterFacet, setterFacet, servicesInjector, holder));
        }
       
        final PropertyClearFacet clearFacet = holder.getFacet(PropertyClearFacet.class);
        if(clearFacet != null) {
            final Class<? extends PropertyChangedEvent<?, ?>> changedEventType = annotation.value();
            FacetUtil.addFacet(new PostsPropertyChangedEventClearFacetAnnotation(changedEventType, getterFacet, clearFacet, servicesInjector, holder));
        }
    }
View Full Code Here


            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }

        if (facetType == PropertyClearFacet.class) {
            final PropertyClearFacet decoratedFacet = (PropertyClearFacet) facet;
            final Facet decoratingFacet = new PropertyClearFacetWrapTransaction(decoratedFacet);
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }
View Full Code Here

    public void clearAssociation(final ObjectAdapter ownerAdapter) {
        clearValue(ownerAdapter);
    }

    private void clearValue(final ObjectAdapter ownerAdapter) {
        final PropertyClearFacet facet = getFacet(PropertyClearFacet.class);
        facet.clearProperty(ownerAdapter);
    }
View Full Code Here

        final ObjectMember nakedObjectMember = performContext.getObjectMember();

        final OneToOneAssociation otoa = (OneToOneAssociation) nakedObjectMember;

        // set
        final PropertyClearFacet clearFacet = otoa.getFacet(PropertyClearFacet.class);
        final CellBinding thatItBinding = performContext.getPeer().getThatItBinding();
        if (clearFacet == null) {
            throw ScenarioBoundValueException.current(thatItBinding, "(cannot clear)");
        }

        // validate setting to null
        final Consent validConsent = otoa.isAssociationValid(onAdapter, null);
        if (validConsent.isVetoed()) {
            throw ScenarioBoundValueException.current(thatItBinding, validConsent.getReason());
        }

        clearFacet.clearProperty(onAdapter);

    }
View Full Code Here

        // handle empty cell as null
        if (cellText == null || cellText.length() == 0) {

            // use clear facet if available
            final PropertyClearFacet clearFacet = association.getFacet(PropertyClearFacet.class);

            if (clearFacet != null) {
                clearFacet.clearProperty(adapter);
                return SetUpObjectResult.CLEARED;
            }

            // use setter facet otherwise
            final PropertySetterFacet setterFacet = association.getFacet(PropertySetterFacet.class);
View Full Code Here

            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }

        if (facetType == PropertyClearFacet.class) {
            final PropertyClearFacet propertyClearFacet = (PropertyClearFacet) facet;
            final PropertyClearFacetWrapProxy decoratingFacet = new PropertyClearFacetWrapProxy(propertyClearFacet, serverFacade, encoderDecoder, identifiedHolder.getIdentifier().getMemberName());
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }
View Full Code Here

            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }

        if (facetType == PropertyClearFacet.class) {
            final PropertyClearFacet decoratedFacet = (PropertyClearFacet) facet;
            final Facet decoratingFacet = new PropertyClearFacetWrapTransaction(decoratedFacet);
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }
View Full Code Here

    public void clearAssociation(final ObjectAdapter ownerAdapter) {
        clearValue(ownerAdapter);
    }

    private void clearValue(final ObjectAdapter ownerAdapter) {
        final PropertyClearFacet facet = getFacet(PropertyClearFacet.class);
        facet.clearProperty(ownerAdapter);
    }
View Full Code Here

        // handle empty cell as null
        if (cellText == null || cellText.length() == 0) {

            // use clear facet if available
            final PropertyClearFacet clearFacet = association.getFacet(PropertyClearFacet.class);

            if (clearFacet != null) {
                clearFacet.clearProperty(adapter);
                return SetUpObjectResult.CLEARED;
            }

            // use setter facet otherwise
            final PropertySetterFacet setterFacet = association.getFacet(PropertySetterFacet.class);
View Full Code Here

            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }

        if (facetType == PropertyClearFacet.class) {
            final PropertyClearFacet propertyClearFacet = (PropertyClearFacet) facet;
            final PropertyClearFacetWrapProxy decoratingFacet =
                new PropertyClearFacetWrapProxy(propertyClearFacet, serverFacade, encoderDecoder, identifiedHolder
                    .getIdentifier().getMemberName());
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.properties.modify.PropertyClearFacet

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.