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

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


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

        collection.addElement(objectAdapter, argAdapter);

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

    @Override
View Full Code Here


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

        collection.addElement(objectAdapter, argAdapter);

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

    @Override
View Full Code Here

        final OneToManyAssociation field = internalCollectionContent.getOneToManyAssociation();
        final ObjectAdapter target = ((ObjectContent) getParent().getContent()).getObject();

        final Consent valid = field.isValidToAdd(target, result);
        if (valid.isAllowed()) {
            field.addElement(target, result);
        }
        super.objectActionResult(result, placement);
    }

    @Override
View Full Code Here

            final OneToManyAssociation field = internalCollectionContent.getOneToManyAssociation();
            final ObjectAdapter target = ((ObjectContent) getParent().getContent()).getObject();

            final Consent about = field.isValidToAdd(target, result);
            if (about.isAllowed()) {
                field.addElement(target, result);
            }
        }
        super.objectActionResult(result, placement);
    }
View Full Code Here

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

        collection.addElement(objectAdapter, argAdapter);

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

    @Override
View Full Code Here

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

        collection.addElement(objectAdapter, argAdapter);

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

    @Override
View Full Code Here

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

        collection.addElement(objectAdapter, argAdapter);

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

    @Override
View Full Code Here

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

        collection.addElement(objectAdapter, argAdapter);

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

    @Override
View Full Code Here

            final OneToManyAssociation field = internalCollectionContent.getOneToManyAssociation();
            final ObjectAdapter target = ((ObjectContent) getParent().getContent()).getObject();

            final Consent about = field.isValidToAdd(target, result);
            if (about.isAllowed()) {
                field.addElement(target, result);
            }
        }
        super.objectActionResult(result, placement);
    }
View Full Code Here

            final OneToManyAssociation field = internalCollectionContent.getOneToManyAssociation();
            final ObjectAdapter target = ((ObjectContent) getParent().getContent()).getObject();

            final Consent about = field.isValidToAdd(target, result);
            if (about.isAllowed()) {
                field.addElement(target, result);
            }
        }
        super.objectActionResult(result, placement);
    }
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.