Class UserRequestServiceImpl
- java.lang.Object
-
- org.apache.syncope.core.rest.cxf.service.AbstractService
-
- org.apache.syncope.core.rest.cxf.service.UserRequestServiceImpl
-
- All Implemented Interfaces:
JAXRSService
,UserRequestService
@Service public class UserRequestServiceImpl extends AbstractService implements UserRequestService
-
-
Field Summary
Fields Modifier and Type Field Description protected UserRequestLogic
logic
protected UserDAO
userDAO
-
Fields inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
LOG, messageContext, OPTIONS_ALLOW, searchContext, uriInfo
-
Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService
CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
-
-
Constructor Summary
Constructors Constructor Description UserRequestServiceImpl(UserRequestLogic logic, UserDAO userDAO)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelRequest(String executionId, String reason)
Cancel a running user request.UserRequestForm
claimForm(String taskId)
Requests to manage the form for the given task id.UserRequestForm
getForm(String username, String taskId)
Returns a user request form matching the given task id.PagedResult<UserRequestForm>
listForms(UserRequestQuery query)
Returns a list of user request forms matching the given query.PagedResult<UserRequest>
listRequests(UserRequestQuery query)
Returns a list of running user requests matching the given query.UserRequest
startRequest(String bpmnProcess, String user, WorkflowTaskExecInput inputVariables)
Starts a new request for the given BPMN Process and user (if provided) or requesting user (if not provided).javax.ws.rs.core.Response
submitForm(UserRequestForm form)
Submits a user request form.UserRequestForm
unclaimForm(String taskId)
Cancels request to manage the form for the given task id.-
Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
applyPreference, buildPagedResult, checkETag, createResponse, findActualKey, getOrderByClauses, getPreference, isNullPriorityAsync, modificationResponse
-
-
-
-
Field Detail
-
logic
protected final UserRequestLogic logic
-
userDAO
protected final UserDAO userDAO
-
-
Constructor Detail
-
UserRequestServiceImpl
public UserRequestServiceImpl(UserRequestLogic logic, UserDAO userDAO)
-
-
Method Detail
-
listRequests
public PagedResult<UserRequest> listRequests(UserRequestQuery query)
Description copied from interface:UserRequestService
Returns a list of running user requests matching the given query.- Specified by:
listRequests
in interfaceUserRequestService
- Parameters:
query
- query conditions- Returns:
- list of all running user requests
-
startRequest
public UserRequest startRequest(String bpmnProcess, String user, WorkflowTaskExecInput inputVariables)
Description copied from interface:UserRequestService
Starts a new request for the given BPMN Process and user (if provided) or requesting user (if not provided).- Specified by:
startRequest
in interfaceUserRequestService
- Parameters:
bpmnProcess
- BPMN processuser
- if value looks like a UUID then it is interpreted as key otherwise as a usernameinputVariables
- initial request variables- Returns:
- data about the started request service, including execution id
-
cancelRequest
public void cancelRequest(String executionId, String reason)
Description copied from interface:UserRequestService
Cancel a running user request.- Specified by:
cancelRequest
in interfaceUserRequestService
- Parameters:
executionId
- execution idreason
- reason to cancel the user request
-
claimForm
public UserRequestForm claimForm(String taskId)
Description copied from interface:UserRequestService
Requests to manage the form for the given task id.- Specified by:
claimForm
in interfaceUserRequestService
- Parameters:
taskId
- workflow task id- Returns:
- the form for the given task id
-
unclaimForm
public UserRequestForm unclaimForm(String taskId)
Description copied from interface:UserRequestService
Cancels request to manage the form for the given task id.- Specified by:
unclaimForm
in interfaceUserRequestService
- Parameters:
taskId
- workflow task id- Returns:
- the workflow form for the given task id
-
getForm
public UserRequestForm getForm(String username, String taskId)
Description copied from interface:UserRequestService
Returns a user request form matching the given task id.- Specified by:
getForm
in interfaceUserRequestService
- Parameters:
username
- username of the logged usertaskId
- workflow task id- Returns:
- the form for the given task id
-
listForms
public PagedResult<UserRequestForm> listForms(UserRequestQuery query)
Description copied from interface:UserRequestService
Returns a list of user request forms matching the given query.- Specified by:
listForms
in interfaceUserRequestService
- Parameters:
query
- query conditions- Returns:
- list of all available user request forms
-
submitForm
public javax.ws.rs.core.Response submitForm(UserRequestForm form)
Description copied from interface:UserRequestService
Submits a user request form.- Specified by:
submitForm
in interfaceUserRequestService
- Parameters:
form
- user request form.- Returns:
- Response object featuring the updated user enriched with propagation status information
-
-