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

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


            final ObjectAdapter row = context.getMappedObject(rowId);

            final String fieldName = context.getParameter(FIELD);
            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);
            }
View Full Code Here


    @Override
    public PrintWriter getWriter() {
        try {
            return response.getWriter();
        } catch (final IOException e) {
            throw new ScimpiException(e);
        }
    }
View Full Code Here

                return null;
            } else {
                return fileName;
            }
        } catch (final MalformedURLException e) {
            throw new ScimpiException(e);
        }
    }
View Full Code Here

        if (in == null) {
            servletContext.getResourcePaths("/");
            try {
                servletContext.getResource(path);
            } catch (final MalformedURLException e) {
                throw new ScimpiException(e);
            }

            throw new ScimpiNotFoundException("Cannot find file " + path);
        }
        return in;
View Full Code Here

            final ObjectAdapter row = context.getMappedObject(rowId);

            final String fieldName = context.getParameter(FIELD);
            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);
            }
View Full Code Here

        if (id.equals("collection")) {
            return collection;
        }
        final ObjectAdapter object = mappedObject(id);
        if (object == null) {
            throw new ScimpiException("No object for " + id);
        } else {
            return object;
        }
    }
View Full Code Here

    public ObjectAdapter getMappedObjectOrVariable(String id, final String name) {
        if (id == null) {
            id = (String) getVariable(name);
            if (id == null) {
                throw new ScimpiException("No variable for " + name);
            }
        }
        if (id.equals("collection")) {
            return collection;
        }
View Full Code Here

    }

    public void addVariable(String name, final Object value, final Scope scope) {
        name = name != null ? name : RESULT;
        if (scope == Scope.SESSION && !(value instanceof Serializable)) {
            throw new ScimpiException("SESSION scoped variable (" + name + ") must be serializable: " + value);
        }
        removeExistingVariable(name);
        variables.get(scope).put(name, value);
    }
View Full Code Here

    // /////////////////////////////
    // Parameters
    // /////////////////////////////
    public void addParameter(final String name, final String parameter) {
        if (name == null) {
            throw new ScimpiException("Name must be specified for parameter " + parameter);
        }
        addVariable(name, parameter, Scope.REQUEST);
    }
View Full Code Here

            LOG.debug("requested file set = " + filePath);

        } else {
            final int lastSlash = filePath.lastIndexOf('/');
            if (lastSlash == -1) {
                throw new ScimpiException("No slash in request path: " + filePath);
            }
            final String path = filePath.substring(0, lastSlash + 1);
            LOG.debug("requested path set = " + path);
            this.requestedParentPath = path;
View Full Code Here

TOP

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

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.