Package org.nuxeo.ecm.user.invite
Interface UserInvitationService
- All Known Implementing Classes:
UserInvitationComponent
public interface UserInvitationService
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
acceptRegistrationRequest
(String requestId, Map<String, Serializable> additionnalInfo) accept the registration requestvoid
checkRequestId
(String requestId) The method checks if the request id is a valid one.createUser
(CoreSession session, DocumentModel registrationDoc) void
deleteRegistrationRequests
(CoreSession session, List<DocumentModel> registrationDoc) Delete a registration documentgetConfiguration
(String name) Return specific configuration for the specified namegetConfiguration
(DocumentModel requestDoc) List all registered onfiguration namegetRegistrationRules
(String configurationName) Get registration rules adaptergetRegistrationRulesDocument
(CoreSession session, String configurationName) Get documentmodel that stores request configuration using RegistrationConfiguration facet.getRegistrationsForUser
(String docId, String username, String configurationName) Retrieve registrations for a document givent the usernamegetUserRegistrationModel
(String configurationName) Create a document model for the UserRegistration doctype.void
rejectRegistrationRequest
(String requestId, Map<String, Serializable> additionnalInfo) reject the registration requestvoid
reviveRegistrationRequests
(CoreSession session, List<DocumentModel> registrationDocs) Send a mail to the invited user to revive his invitation If an error occured while sending an email, it logs it and continue.submitRegistrationRequest
(String configurationName, DocumentModel userRegistrationModel, Map<String, Serializable> additionnalInfo, UserInvitationService.ValidationMethod validationMethod, boolean autoAccept) Stores a resgitration request like submitRegistrationRequest with Document informationsubmitRegistrationRequest
(DocumentModel userRegistrationModel, Map<String, Serializable> additionnalInfo, UserInvitationService.ValidationMethod validationMethod, boolean autoAccept) Stores a registration request and return a unique ID for itvalidateRegistration
(String requestId, Map<String, Serializable> additionnalInfo) Validate a registration request and generate the target UservalidateRegistrationAndSendEmail
(String requestId, Map<String, Serializable> additionnalInfo) Validate a registration request and generate the target User
-
Field Details
-
REGISTRATION_CONFIGURATION_NAME
- See Also:
-
REGISTRATION_DATA_DOC
- See Also:
-
REGISTRATION_DATA_USER
- See Also:
-
-
Method Details
-
getUserRegistrationModel
Create a document model for the UserRegistration doctype.- Parameters:
configurationName
- The name of the configuration.- Returns:
- The document model
- Since:
- 5.9.3
-
submitRegistrationRequest
String submitRegistrationRequest(DocumentModel userRegistrationModel, Map<String, Serializable> additionnalInfo, UserInvitationService.ValidationMethod validationMethod, boolean autoAccept) throws UserRegistrationExceptionStores a registration request and return a unique ID for it- Throws:
UserRegistrationException
-
acceptRegistrationRequest
void acceptRegistrationRequest(String requestId, Map<String, Serializable> additionnalInfo) throws UserRegistrationExceptionaccept the registration request- Throws:
UserRegistrationException
-
rejectRegistrationRequest
void rejectRegistrationRequest(String requestId, Map<String, Serializable> additionnalInfo) throws UserRegistrationExceptionreject the registration request- Throws:
UserRegistrationException
-
validateRegistration
Map<String,Serializable> validateRegistration(String requestId, Map<String, Serializable> additionnalInfo) Validate a registration request and generate the target User -
validateRegistrationAndSendEmail
Map<String,Serializable> validateRegistrationAndSendEmail(String requestId, Map<String, Serializable> additionnalInfo) throws UserRegistrationExceptionValidate a registration request and generate the target User- Throws:
UserRegistrationException
-
createUser
NuxeoPrincipal createUser(CoreSession session, DocumentModel registrationDoc) throws UserRegistrationException - Throws:
UserRegistrationException
-
reviveRegistrationRequests
Send a mail to the invited user to revive his invitation If an error occured while sending an email, it logs it and continue.- Since:
- 5.6
-
deleteRegistrationRequests
Delete a registration document- Since:
- 5.6
-
getConfiguration
UserRegistrationConfiguration getConfiguration() -
getRegistrationsForUser
Retrieve registrations for a document givent the username- Since:
- 5.6
-
getConfiguration
Return specific configuration for the specified name- Parameters:
name
- configuration name- Since:
- 5.6
-
getConfiguration
- Since:
- 5.6
-
getRegistrationRulesDocument
Get documentmodel that stores request configuration using RegistrationConfiguration facet. -
submitRegistrationRequest
String submitRegistrationRequest(String configurationName, DocumentModel userRegistrationModel, Map<String, Serializable> additionnalInfo, UserInvitationService.ValidationMethod validationMethod, boolean autoAccept) throws UserRegistrationExceptionStores a resgitration request like submitRegistrationRequest with Document information- Returns:
- a unique ID for it
- Throws:
UserRegistrationException
- Since:
- 5.6
-
getRegistrationRules
Get registration rules adapter- Since:
- 5.6
-
getConfigurationsName
List all registered onfiguration name -
checkRequestId
The method checks if the request id is a valid one.- Parameters:
requestId
- The value of the request id.- Throws:
UserRegistrationException
- Since:
- 5.9.3
-
getNameEventRegistrationSubmitted
String getNameEventRegistrationSubmitted()- Returns:
- The name of the event when the registration is submitted.
- Since:
- 5.9.3
-
getNameEventRegistrationAccepted
String getNameEventRegistrationAccepted()- Returns:
- The name of the event when the registration is accepted.
- Since:
- 5.9.3
-
getNameEventRegistrationRejected
String getNameEventRegistrationRejected()- Returns:
- The name of the event when the registration is rejected.
- Since:
- 5.9.3
-
getNameEventRegistrationValidated
String getNameEventRegistrationValidated()- Returns:
- The name of the event when the registration is validated.
- Since:
- 5.9.3
-