Package org.libreplan.ws.common.api

Examples of org.libreplan.ws.common.api.InternalErrorDTO


    public final static InstanceConstraintViolationsDTO toDTO(
        InstanceConstraintViolationsDTOId instanceId,
        RuntimeException runtimeException) {

        InternalErrorDTO internalErrorDTO = new InternalErrorDTO(
            runtimeException.getMessage(),
            Util.getStackTrace(runtimeException));

        return new InstanceConstraintViolationsDTO(instanceId,
            internalErrorDTO);
View Full Code Here


public class IncompatibleTypeExceptionMapper implements
        ExceptionMapper<IncompatibleTypeException> {

    public Response toResponse(IncompatibleTypeException e) {
        return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
                new InternalErrorDTO(e.getMessage(), Util.getStackTrace(e)))
                .type("application/xml").build();
    }
View Full Code Here

public class InstanceNotFoundExceptionMapper implements
        ExceptionMapper<InstanceNotFoundException> {

    public Response toResponse(InstanceNotFoundException e) {
        return Response.status(Response.Status.NOT_FOUND).entity(
                new InternalErrorDTO(e.getMessage(), Util.getStackTrace(e)))
                .type("application/xml").build();
    }
View Full Code Here

public class RuntimeExceptionMapper
    implements ExceptionMapper<RuntimeException> {

    public Response toResponse(RuntimeException e) {
        return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(
                new InternalErrorDTO(e.getMessage(), Util.getStackTrace(e)))
                .type("application/xml").build();
    }
View Full Code Here

TOP

Related Classes of org.libreplan.ws.common.api.InternalErrorDTO

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.