Search in sources :

Example 1 with ErrorResponse

use of org.gluu.oxtrust.model.scim2.ErrorResponse in project oxTrust by GluuFederation.

the class BulkWebService method createErrorResponse.

private ErrorResponse createErrorResponse(Response.Status status, ErrorScimType scimType, String detail) {
    ErrorResponse errorResponse = new ErrorResponse();
    List<String> schemas = new ArrayList<String>();
    schemas.add(Constants.ERROR_RESPONSE_URI);
    errorResponse.setSchemas(schemas);
    errorResponse.setStatus(String.valueOf(status.getStatusCode()));
    errorResponse.setScimType(scimType);
    errorResponse.setDetail(detail);
    return errorResponse;
}
Also used : ArrayList(java.util.ArrayList) ErrorResponse(org.gluu.oxtrust.model.scim2.ErrorResponse)

Example 2 with ErrorResponse

use of org.gluu.oxtrust.model.scim2.ErrorResponse in project oxTrust by GluuFederation.

the class BaseScimWebService method getErrorResponse.

public static Response getErrorResponse(int statusCode, ErrorScimType scimType, String detail) {
    ErrorResponse errorResponse = new ErrorResponse();
    errorResponse.setStatus(String.valueOf(statusCode));
    errorResponse.setScimType(scimType);
    errorResponse.setDetail(detail);
    return Response.status(statusCode).entity(errorResponse).build();
}
Also used : ErrorResponse(org.gluu.oxtrust.model.scim2.ErrorResponse)

Aggregations

ErrorResponse (org.gluu.oxtrust.model.scim2.ErrorResponse)2 ArrayList (java.util.ArrayList)1