Package org.apache.isis.core.metamodel.interactions

Examples of org.apache.isis.core.metamodel.interactions.PropertyModifyContext


    // Validate
    // /////////////////////////////////////////////////////////////

    @Override
    public ValidityContext<?> createValidateInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod interactionMethod, final ObjectAdapter ownerAdapter, final ObjectAdapter proposedToReferenceAdapter) {
        return new PropertyModifyContext(getDeploymentCategory(), session, interactionMethod, ownerAdapter, getIdentifier(), proposedToReferenceAdapter);
    }
View Full Code Here


    @Override
    public String invalidates(final ValidityContext<? extends ValidityEvent> context) {
        if (!(context instanceof PropertyModifyContext)) {
            return null;
        }
        final PropertyModifyContext propertyModifyContext = (PropertyModifyContext) context;
        ObjectAdapter proposed = propertyModifyContext.getProposed();
        if(proposed == null) {
            // skip validation if null value and optional property.
            MandatoryFacet mandatoryFacet = getFacetHolder().getFacet(MandatoryFacet.class);
            if(mandatoryFacet == null || mandatoryFacet.isNoop() || mandatoryFacet.isInvertedSemantics()) {
                return null;
            }
        }
        return invalidReason(propertyModifyContext.getTarget(), proposed);
    }
View Full Code Here

    @Override
    public String invalidates(final ValidityContext<? extends ValidityEvent> context) {
        if (!(context instanceof PropertyModifyContext)) {
            return null;
        }
        final PropertyModifyContext propertyModifyContext = (PropertyModifyContext) context;
        ObjectAdapter proposed = propertyModifyContext.getProposed();
        if(proposed == null) {
            // skip validation if null value and optional property.
            MandatoryFacet mandatoryFacet = getFacetHolder().getFacet(MandatoryFacet.class);
            if(mandatoryFacet == null || mandatoryFacet.isNoop() || mandatoryFacet.isInvertedSemantics()) {
                return null;
            }
        }
        return invalidReason(propertyModifyContext.getTarget(), proposed);
    }
View Full Code Here

    // Validate
    // /////////////////////////////////////////////////////////////

    @Override
    public ValidityContext<?> createValidateInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod interactionMethod, final ObjectAdapter ownerAdapter, final ObjectAdapter proposedToReferenceAdapter) {
        return new PropertyModifyContext(getDeploymentCategory(), session, interactionMethod, ownerAdapter, getIdentifier(), proposedToReferenceAdapter);
    }
View Full Code Here

    @Override
    public String invalidates(final ValidityContext<? extends ValidityEvent> context) {
        if (!(context instanceof PropertyModifyContext)) {
            return null;
        }
        final PropertyModifyContext propertyModifyContext = (PropertyModifyContext) context;
        return invalidReason(propertyModifyContext.getTarget(), propertyModifyContext.getProposed());
    }
View Full Code Here

    // Validate
    // /////////////////////////////////////////////////////////////

    @Override
    public ValidityContext<?> createValidateInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod interactionMethod, final ObjectAdapter ownerAdapter, final ObjectAdapter proposedToReferenceAdapter) {
        return new PropertyModifyContext(session, interactionMethod, ownerAdapter, getIdentifier(), proposedToReferenceAdapter);
    }
View Full Code Here

    @Override
    public String invalidates(final ValidityContext<? extends ValidityEvent> context) {
        if (!(context instanceof PropertyModifyContext)) {
            return null;
        }
        final PropertyModifyContext propertyModifyContext = (PropertyModifyContext) context;
        return invalidReason(propertyModifyContext.getTarget(), propertyModifyContext.getProposed());
    }
View Full Code Here

    @Override
    public ValidityContext<?> createValidateInteractionContext(final AuthenticationSession session,
        final InteractionInvocationMethod interactionMethod, final ObjectAdapter ownerAdapter,
        final ObjectAdapter proposedToReferenceAdapter) {
        return new PropertyModifyContext(session, interactionMethod, ownerAdapter, getIdentifier(),
            proposedToReferenceAdapter);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.interactions.PropertyModifyContext

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.