Class RestServiceUtil
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.util.RestServiceUtil
-
public class RestServiceUtil extends Object
- Author:
- mederly (only copied existing code)
-
-
Field Summary
Fields Modifier and Type Field Description static String
APPLICATION_YAML
static String
MESSAGE_PROPERTY_TASK_NAME
static String
OPERATION_RESULT_MESSAGE
static String
OPERATION_RESULT_STATUS
-
Constructor Summary
Constructors Constructor Description RestServiceUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
createAbortMessage(javax.ws.rs.container.ContainerRequestContext requestCtx)
static javax.ws.rs.core.Response.ResponseBuilder
createErrorResponseBuilder(OperationResult result, Throwable t)
static javax.ws.rs.core.Response.ResponseBuilder
createErrorResponseBuilder(javax.ws.rs.core.Response.Status status, OperationResult result)
static javax.ws.rs.core.Response.ResponseBuilder
createErrorResponseBuilder(javax.ws.rs.core.Response.Status status, OperationResultType message)
static javax.ws.rs.core.Response
createResponse(javax.ws.rs.core.Response.Status statusCode, OperationResult result)
static javax.ws.rs.core.Response
createResponse(javax.ws.rs.core.Response.Status statusCode, URI location, OperationResult result)
static <T> javax.ws.rs.core.Response
createResponse(javax.ws.rs.core.Response.Status statusCode, T body, OperationResult result)
static <T> javax.ws.rs.core.Response
createResponse(javax.ws.rs.core.Response.Status statusCode, T body, OperationResult result, boolean sendOriginObjectIfNotSuccess)
static void
createSecurityQuestionAbortMessage(javax.ws.rs.container.ContainerRequestContext requestCtx, String secQChallenge)
static void
finishRequest(Task task, SecurityHelper securityHelper)
static ModelExecuteOptions
getOptions(javax.ws.rs.core.UriInfo uriInfo)
static javax.ws.rs.core.Response
handleException(OperationResult result, Throwable t)
static javax.ws.rs.core.Response
handleExceptionNoLog(OperationResult result, Throwable t)
static Task
initRequest(TaskManager taskManager)
static Task
initRequest(org.apache.cxf.jaxrs.ext.MessageContext mc)
-
-
-
Field Detail
-
MESSAGE_PROPERTY_TASK_NAME
public static final String MESSAGE_PROPERTY_TASK_NAME
- See Also:
- Constant Field Values
-
OPERATION_RESULT_STATUS
public static final String OPERATION_RESULT_STATUS
- See Also:
- Constant Field Values
-
OPERATION_RESULT_MESSAGE
public static final String OPERATION_RESULT_MESSAGE
- See Also:
- Constant Field Values
-
APPLICATION_YAML
public static final String APPLICATION_YAML
- See Also:
- Constant Field Values
-
-
Method Detail
-
handleException
public static javax.ws.rs.core.Response handleException(OperationResult result, Throwable t)
-
handleExceptionNoLog
public static javax.ws.rs.core.Response handleExceptionNoLog(OperationResult result, Throwable t)
-
createResponse
public static javax.ws.rs.core.Response createResponse(javax.ws.rs.core.Response.Status statusCode, OperationResult result)
-
createResponse
public static <T> javax.ws.rs.core.Response createResponse(javax.ws.rs.core.Response.Status statusCode, T body, OperationResult result)
-
createResponse
public static <T> javax.ws.rs.core.Response createResponse(javax.ws.rs.core.Response.Status statusCode, T body, OperationResult result, boolean sendOriginObjectIfNotSuccess)
-
createResponse
public static javax.ws.rs.core.Response createResponse(javax.ws.rs.core.Response.Status statusCode, URI location, OperationResult result)
-
createErrorResponseBuilder
public static javax.ws.rs.core.Response.ResponseBuilder createErrorResponseBuilder(OperationResult result, Throwable t)
-
createErrorResponseBuilder
public static javax.ws.rs.core.Response.ResponseBuilder createErrorResponseBuilder(javax.ws.rs.core.Response.Status status, OperationResult result)
-
createErrorResponseBuilder
public static javax.ws.rs.core.Response.ResponseBuilder createErrorResponseBuilder(javax.ws.rs.core.Response.Status status, OperationResultType message)
-
getOptions
public static ModelExecuteOptions getOptions(javax.ws.rs.core.UriInfo uriInfo)
-
initRequest
public static Task initRequest(org.apache.cxf.jaxrs.ext.MessageContext mc)
-
initRequest
public static Task initRequest(TaskManager taskManager)
-
finishRequest
public static void finishRequest(Task task, SecurityHelper securityHelper)
-
createAbortMessage
public static void createAbortMessage(javax.ws.rs.container.ContainerRequestContext requestCtx)
-
createSecurityQuestionAbortMessage
public static void createSecurityQuestionAbortMessage(javax.ws.rs.container.ContainerRequestContext requestCtx, String secQChallenge)
-
-