Package org.apache.isis.viewer.scimpi.dispatcher

Examples of org.apache.isis.viewer.scimpi.dispatcher.ForbiddenException


            final ObjectAssociation field = adapter.getSpecification().getAssociation(fieldName);
            if (field == null) {
                throw new ScimpiException("No field " + fieldName + " in " + adapter.getSpecification().getFullIdentifier());
            }
            if (field.isVisible(IsisContext.getAuthenticationSession(), adapter).isVetoed()) {
                throw new ForbiddenException(field, ForbiddenException.VISIBLE);
            }
            IsisContext.getPersistenceSession().resolveField(adapter, field);
            adapter = field.get(adapter);
            if (adapter != null) {
                objectId = context.mapObject(adapter, Scope.INTERACTION);
View Full Code Here


        className = className == null ? "title-icon" : className;
        ObjectAdapter object = MethodsUtils.findObject(request.getContext(), id);
        if (fieldName != null) {
            final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
            if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
                throw new ForbiddenException(field, ForbiddenException.VISIBLE);
            }
            object = field.get(object);
        }

        if (object != null) {
View Full Code Here

        final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
        if (field == null) {
            throw new ScimpiException("No field " + fieldName + " in " + object.getSpecification().getFullIdentifier());
        }
        if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
            throw new ForbiddenException(field, ForbiddenException.VISIBLE);
        }
        final boolean isIconShowing = request.isRequested(SHOW_ICON, showIconByDefault());
        final int truncateTo = Integer.valueOf(request.getOptionalProperty(TRUNCATE, "0")).intValue();

        write(request, object, field, null, className, isIconShowing, truncateTo);
View Full Code Here

        final String fieldName = request.getOptionalProperty(FIELD);
        ObjectAdapter object = request.getContext().getMappedObjectOrResult(id);
        if (fieldName != null) {
            final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
            if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
                throw new ForbiddenException(field, ForbiddenException.VISIBLE);
            }
            object = field.get(object);
            id = request.getContext().mapObject(object, Scope.REQUEST);
        }
View Full Code Here

        }
        if (!field.isOneToManyAssociation()) {
            throw new ScimpiException("Field " + fieldName + " not a collection, in " + adapter.getSpecification().getFullIdentifier());
        }
        if (field.isVisible(IsisContext.getAuthenticationSession(), adapter).isVetoed()) {
            throw new ForbiddenException(field, ForbiddenException.VISIBLE);
        }
        IsisContext.getPersistenceSession().resolveField(adapter, field);

        Consent usable = field.isUsable(IsisContext.getAuthenticationSession(), adapter);
        if (usable.isAllowed()) {
View Full Code Here

        if (field == null) {
            throw new ScimpiException("No field " + fieldName + " in " + object.getSpecification().getFullIdentifier());
        }
        final AuthenticationSession session = IsisContext.getAuthenticationSession();
        if (field.isVisible(session, object).isVetoed()) {
            throw new ForbiddenException(field, ForbiddenException.VISIBLE);
        }

        String pattern = request.getOptionalProperty("decimal-format");
        Format format = null;
        if (pattern != null) {
View Full Code Here

        final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
        if (field == null) {
            throw new ScimpiException("No field " + fieldName + " in " + object.getSpecification().getFullIdentifier());
        }
        if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
            throw new ForbiddenException(field, ForbiddenException.VISIBLE);
        }
        String delimiter = request.getOptionalProperty("delimiter");
        if (delimiter == null) {
            delimiter = ": ";
        } else if (delimiter.equals("")) {
View Full Code Here

    }

    @Override
    public void process(final RequestContext context) throws IOException {
        if (context.isDebugDisabled()) {
            throw new ForbiddenException("Can't access debug action when debug is disabled");
        }

        final String action = context.getParameter("action");
        if ("list-i18n".equals(action)) {
            i18n(context, null);
View Full Code Here

        final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
        if (field == null) {
            throw new ScimpiException("No field " + fieldName + " in " + object.getSpecification().getFullIdentifier());
        }
        if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
            throw new ForbiddenException(field, ForbiddenException.VISIBLE);
        }
        String delimiter = request.getOptionalProperty("delimiter");
        if (delimiter == null) {
            delimiter = ": ";
        } else if (delimiter.equals("")) {
View Full Code Here

        if (!field.isOneToManyAssociation()) {
            throw new ScimpiException("Field " + fieldName + " not a collection, in "
                + adapter.getSpecification().getFullIdentifier());
        }
        if (field.isVisible(IsisContext.getAuthenticationSession(), adapter).isVetoed()) {
            throw new ForbiddenException(field, ForbiddenException.VISIBLE);
        }
        IsisContext.getPersistenceSession().resolveField(adapter, field);

        Consent usable = field.isUsable(IsisContext.getAuthenticationSession(), adapter);
        if (usable.isAllowed()) {
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.scimpi.dispatcher.ForbiddenException

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.