Package org.apache.isis.core.metamodel.spec.feature

Examples of org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation.removeElement()


        final Consent consent = collection.isValidToRemove(objectAdapter, argAdapter);
        if (consent.isVetoed()) {
            throw RestfulObjectsApplicationException.createWithMessage(HttpStatusCode.UNAUTHORIZED, consent.getReason());
        }

        collection.removeElement(objectAdapter, argAdapter);

        return helper.collectionDetails(collectionId, MemberMode.MUTATING, Caching.NONE, getResourceContext().getWhere());
    }

    // //////////////////////////////////////////////////////////
View Full Code Here


        final ObjectAdapter target = context.getMappedObject(objectId);
        final ObjectAdapter element = context.getMappedObject(elementId);
        final ObjectSpecification specification = target.getSpecification();
        final OneToManyAssociation field = (OneToManyAssociation) specification.getAssociation(collectionField);
        field.removeElement(target, element);

        request.forward(ForwardRequest.viewObject(objectId, collectionField));
    }

    @Override
View Full Code Here

    @Override
    public void clear() {
        final ObjectAdapter parentObject = getParent();
        final OneToManyAssociation association = getOneToManyAssociation();
        LOG.debug("remove " + element + " from " + parentObject);
        association.removeElement(parentObject, element);
    }

    @Override
    public void debugDetails(final DebugBuilder debug) {
        field.debugDetails(debug);
View Full Code Here

        final Consent consent = collection.isValidToRemove(objectAdapter, argAdapter);
        if (consent.isVetoed()) {
            throw RestfulObjectsApplicationException.createWithMessage(HttpStatusCode.UNAUTHORIZED, consent.getReason());
        }

        collection.removeElement(objectAdapter, argAdapter);

        return helper.collectionDetails(collectionId, MemberReprMode.WRITE);
    }

    // //////////////////////////////////////////////////////////
View Full Code Here

        final Consent consent = collection.isValidToRemove(objectAdapter, argAdapter);
        if (consent.isVetoed()) {
            throw JsonApplicationException.create(HttpStatusCode.UNAUTHORIZED, consent.getReason());
        }

        collection.removeElement(objectAdapter, argAdapter);

        return helper.collectionDetails(objectAdapter, collectionId, MemberMode.MUTATING, Caching.NONE);
    }

    // //////////////////////////////////////////////////////////
View Full Code Here

    @Override
    public void clear() {
        final ObjectAdapter parentObject = getParent();
        final OneToManyAssociation association = getOneToManyAssociation();
        LOG.debug("remove " + element + " from " + parentObject);
        association.removeElement(parentObject, element);
    }

    @Override
    public void debugDetails(final DebugBuilder debug) {
        field.debugDetails(debug);
View Full Code Here

        // if valid, then set
        if (modification == CollectionModificationType.ADD_TO) {
            collection.addElement(objectAdapter, proposedValueNO);
        } else {
            collection.removeElement(objectAdapter, proposedValueNO);
        }

        return xhtml.toXML();
    }
View Full Code Here

    @Override
    public void clear() {
        final ObjectAdapter parentObject = getParent();
        final OneToManyAssociation association = getOneToManyAssociation();
        LOG.debug("remove " + element + " from " + parentObject);
        association.removeElement(parentObject, element);
    }

    @Override
    public void debugDetails(final DebugBuilder debug) {
        field.debugDetails(debug);
View Full Code Here

        final Consent consent = collection.isValidToRemove(objectAdapter, argAdapter);
        if (consent.isVetoed()) {
            throw RestfulObjectsApplicationException.createWithMessage(HttpStatusCode.UNAUTHORIZED, consent.getReason());
        }

        collection.removeElement(objectAdapter, argAdapter);

        return helper.collectionDetails(collectionId, MemberMode.MUTATING, Caching.NONE, getResourceContext().getWhere());
    }

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