Package org.modeshape.web.jcr.rest.model

Examples of org.modeshape.web.jcr.rest.model.RestException


                               @QueryParam( "mimeType" ) String mimeType,
                               @QueryParam( "contentDisposition" ) String contentDisposition ) throws RepositoryException {
        Property binaryProperty = binaryHandler.getBinaryProperty(request, repositoryName, workspaceName, path);
        if (binaryProperty.getType() != PropertyType.BINARY) {
            return Response.status(Response.Status.NOT_FOUND)
                           .entity(new RestException("The property " + binaryProperty.getPath() + " is not a binary")).build();
        }
        Binary binary = binaryProperty.getBinary();
        if (StringUtil.isBlank(mimeType)) {
            mimeType = binaryHandler.getDefaultMimeType(binaryProperty);
        }
View Full Code Here


            default: {
                LOGGER.error(t, "Server error");
                break;
            }
        }
        return Response.status(status).entity(new RestException(t)).build();
    }
View Full Code Here

        boolean multiValued = property.isMultiple();
        return new RestProperty(property.getName(), url, parentUrl, values, multiValued);
    }

    protected Response exceptionResponse(String message) {
        return Response.status(Response.Status.BAD_REQUEST).entity(new RestException(message)).build();
    }
View Full Code Here

TOP

Related Classes of org.modeshape.web.jcr.rest.model.RestException

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.