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

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


        request.setBlockContent(parameterBlock);
        request.processUtilCloseTag();
        final ObjectAdapter[] parameters = parameterBlock.getParameters(request);

        if (!MethodsUtils.isVisibleAndUsable(object, action, where)) {
            throw new ForbiddenException(action, ForbiddenException.VISIBLE_AND_USABLE);
        }

        // swap null parameter of the object's type to run a contributed method
        if (false /*action.isContributed()*/) {
            final List<ObjectActionParameter> parameterSpecs = action.getParameters();
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 method = context.getParameter(METHOD);
        final String name = context.getParameter(NAME);
        final String view = context.getParameter(VIEW);
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, Where.ANYWHERE).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, where).isVetoed()) {
            throw new ForbiddenException(field, ForbiddenException.VISIBLE);
        }
        request.appendAsHtmlEncoded(field.getName());
    }
View Full Code Here

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

            ((OneToManyAssociation) field).removeElement(parent, row);

            // TODO duplicated in EditAction
View Full Code Here

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

            ((OneToManyAssociation) field).removeElement(parent, row);

            // TODO duplicated in EditAction
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);
        }
        request.appendAsHtmlEncoded(field.getName());
    }
View Full Code Here

        if (fieldName == null) {
            titleString = object.titleString();
        } else {
            final ObjectAssociation field = object.getSpecification().getAssociation(fieldName);
            if (field.isVisible(IsisContext.getAuthenticationSession(), object).isVetoed()) {
                throw new ForbiddenException(field, ForbiddenException.VISIBLE);
            }
            final ObjectAdapter fieldReference = field.get(object);
            if (fieldReference != null) {
                titleString = fieldReference.titleString();
            } else {
View Full Code Here

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

        request.setBlockContent(parameterBlock);
        request.processUtilCloseTag();
        final ObjectAdapter[] parameters = parameterBlock.getParameters(request);

        if (!MethodsUtils.isVisibleAndUsable(object, action)) {
            throw new ForbiddenException(action, ForbiddenException.VISIBLE_AND_USABLE);
        }

        // swap null parameter of the object's type to run a contributed method
        if (action.isContributed()) {
            final List<ObjectActionParameter> parameterSpecs = action.getParameters();
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.