Package pl.edu.icm.unity.engine.api
Interface RegistrationsManagement
-
public interface RegistrationsManagementRegistrations support: forms, submissions of requests and their processing.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddForm(RegistrationForm form)Add a new registration form.RegistrationFormgetForm(String id)FormAutomationSupportgetFormAutomationSupport(RegistrationForm form)List<RegistrationForm>getForms()RegistrationRequestStategetRegistrationRequest(String id)List<RegistrationRequestState>getRegistrationRequests()Lists all registration requests.booleanhasForm(String id)voidprocessRegistrationRequest(String id, RegistrationRequest finalRequest, RegistrationRequestAction action, String publicComment, String privateComment)Accepts, deletes or rejects a given registration request.voidremoveForm(String formId, boolean dropRequests)Remove an existing registration form.voidremoveFormWithoutDependencyChecking(String formId)Remove an existing registration form with no dependency checkingStringsubmitRegistrationRequest(RegistrationRequest request, RegistrationContext context)Submits a new registration request.voidupdateForm(RegistrationForm updatedForm, boolean ignoreRequestsAndInvitations)Updates an existing form.
-
-
-
Method Detail
-
addForm
void addForm(RegistrationForm form) throws EngineException
Add a new registration form.- Parameters:
form-- Throws:
EngineException
-
removeForm
void removeForm(String formId, boolean dropRequests) throws EngineException
Remove an existing registration form.- Parameters:
formId-dropRequests- if true then all requests of this form are deleted. If false, the operation will throw exception if there are any requests for the form.- Throws:
EngineException
-
updateForm
void updateForm(RegistrationForm updatedForm, boolean ignoreRequestsAndInvitations) throws EngineException
Updates an existing form.- Parameters:
updatedForm-ignoreRequestsAndInvitations- if true then operation will ignore form requests and invitations. If false then it will fail if there are any pending requests of the form.- Throws:
EngineException
-
getForms
List<RegistrationForm> getForms() throws EngineException
- Returns:
- all available forms.
- Throws:
EngineException
-
getForm
RegistrationForm getForm(String id) throws EngineException
- Returns:
- form with given id.
- Throws:
EngineException
-
hasForm
boolean hasForm(String id)
- Returns:
- true if form with given name exists
-
submitRegistrationRequest
String submitRegistrationRequest(RegistrationRequest request, RegistrationContext context) throws EngineException
Submits a new registration request. It gets a pending state unless automatically processed by the form's automation. Note that the input parameter can be modified by the invocation: all the supplied credential secrets are transformed to the internal (typically hashed) form. Important: this API call requires high authZ privileges. This is because the operation trusts confirmation state of the passed arguments. In case such operation shall be exposed with a public, unprivileged API, then we need an other variant, forcing unconfirmed state of parameters. This can be problematic for mobile numbers.- Parameters:
request-context-- Returns:
- automatically assigned identifier of the request
- Throws:
EngineException
-
getRegistrationRequests
List<RegistrationRequestState> getRegistrationRequests() throws EngineException
Lists all registration requests.- Returns:
- Throws:
EngineException
-
getRegistrationRequest
RegistrationRequestState getRegistrationRequest(String id) throws EngineException
- Returns:
- registration request by id
- Throws:
EngineException
-
processRegistrationRequest
void processRegistrationRequest(String id, RegistrationRequest finalRequest, RegistrationRequestAction action, String publicComment, String privateComment) throws EngineException
Accepts, deletes or rejects a given registration request. The request can be freely modified at this time too, with one exception: the credentials originally submitted are always preserved.- Parameters:
id- request id to be processedfinalRequest- updated registration request with edits made by adminaction- what to do with the request.publicComment- comment to be recorded and sent to the requesterprivateComment- comment to be internally recored only.- Throws:
EngineException
-
getFormAutomationSupport
FormAutomationSupport getFormAutomationSupport(RegistrationForm form)
- Returns:
- form automation support for a given form
-
removeFormWithoutDependencyChecking
void removeFormWithoutDependencyChecking(String formId) throws EngineException
Remove an existing registration form with no dependency checking- Parameters:
formId-- Throws:
EngineException
-
-