Package pl.edu.icm.unity.engine.api
Interface RegistrationsManagement
public interface RegistrationsManagement
Registrations support: forms, submissions of requests and their processing.
- Author:
- K. Benedyczak
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addForm
(RegistrationForm form) Add a new registration form.getForms()
Lists all registration requests.boolean
void
processRegistrationRequest
(String id, RegistrationRequest finalRequest, RegistrationRequestAction action, String publicComment, String privateComment) Accepts, deletes or rejects a given registration request.void
removeForm
(String formId, boolean dropRequests) Remove an existing registration form.void
Remove an existing registration form with no dependency checkingsubmitRegistrationRequest
(RegistrationRequest request, RegistrationContext context) Submits a new registration request.void
updateForm
(RegistrationForm updatedForm, boolean ignoreRequestsAndInvitations) Updates an existing form.
-
Method Details
-
addForm
Add a new registration form.- Parameters:
form
-- Throws:
EngineException
-
removeForm
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
- Returns:
- all available forms.
- Throws:
EngineException
-
getForm
- Returns:
- form with given id.
- Throws:
EngineException
-
hasForm
- 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
Lists all registration requests.- Returns:
- Throws:
EngineException
-
getRegistrationRequest
- 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
- Returns:
- form automation support for a given form
-
removeFormWithoutDependencyChecking
Remove an existing registration form with no dependency checking- Parameters:
formId
-- Throws:
EngineException
-