Package org.nuxeo.ecm.user.invite
Interface UserInvitationService
-
- All Known Implementing Classes:
UserInvitationComponent
public interface UserInvitationService
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
UserInvitationService.ValidationMethod
-
Field Summary
Fields Modifier and Type Field Description static String
REGISTRATION_CONFIGURATION_NAME
static String
REGISTRATION_DATA_DOC
static String
REGISTRATION_DATA_USER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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.NuxeoPrincipal
createUser(CoreSession session, DocumentModel registrationDoc)
void
deleteRegistrationRequests(CoreSession session, List<DocumentModel> registrationDoc)
Delete a registration documentUserRegistrationConfiguration
getConfiguration()
UserRegistrationConfiguration
getConfiguration(String name)
Return specific configuration for the specified nameUserRegistrationConfiguration
getConfiguration(DocumentModel requestDoc)
Set<String>
getConfigurationsName()
List all registered onfiguration nameString
getNameEventRegistrationAccepted()
String
getNameEventRegistrationRejected()
String
getNameEventRegistrationSubmitted()
String
getNameEventRegistrationValidated()
RegistrationRules
getRegistrationRules(String configurationName)
Get registration rules adapterDocumentModel
getRegistrationRulesDocument(CoreSession session, String configurationName)
Get documentmodel that stores request configuration using RegistrationConfiguration facet.DocumentModelList
getRegistrationsForUser(String docId, String username, String configurationName)
Retrieve registrations for a document givent the usernameDocumentModel
getUserRegistrationModel(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.String
submitRegistrationRequest(String configurationName, DocumentModel userRegistrationModel, Map<String,Serializable> additionnalInfo, UserInvitationService.ValidationMethod validationMethod, boolean autoAccept)
Stores a resgitration request like submitRegistrationRequest with Document informationString
submitRegistrationRequest(DocumentModel userRegistrationModel, Map<String,Serializable> additionnalInfo, UserInvitationService.ValidationMethod validationMethod, boolean autoAccept)
Stores a registration request and return a unique ID for itMap<String,Serializable>
validateRegistration(String requestId, Map<String,Serializable> additionnalInfo)
Validate a registration request and generate the target UserMap<String,Serializable>
validateRegistrationAndSendEmail(String requestId, Map<String,Serializable> additionnalInfo)
Validate a registration request and generate the target User
-
-
-
Field Detail
-
REGISTRATION_CONFIGURATION_NAME
static final String REGISTRATION_CONFIGURATION_NAME
- See Also:
- Constant Field Values
-
REGISTRATION_DATA_DOC
static final String REGISTRATION_DATA_DOC
- See Also:
- Constant Field Values
-
REGISTRATION_DATA_USER
static final String REGISTRATION_DATA_USER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUserRegistrationModel
DocumentModel getUserRegistrationModel(String configurationName)
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 UserRegistrationException
Stores a registration request and return a unique ID for it- Throws:
UserRegistrationException
-
acceptRegistrationRequest
void acceptRegistrationRequest(String requestId, Map<String,Serializable> additionnalInfo) throws UserRegistrationException
accept the registration request- Throws:
UserRegistrationException
-
rejectRegistrationRequest
void rejectRegistrationRequest(String requestId, Map<String,Serializable> additionnalInfo) throws UserRegistrationException
reject 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 UserRegistrationException
Validate a registration request and generate the target User- Throws:
UserRegistrationException
-
createUser
NuxeoPrincipal createUser(CoreSession session, DocumentModel registrationDoc) throws UserRegistrationException
- Throws:
UserRegistrationException
-
reviveRegistrationRequests
void 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.- Since:
- 5.6
-
deleteRegistrationRequests
void deleteRegistrationRequests(CoreSession session, List<DocumentModel> registrationDoc)
Delete a registration document- Since:
- 5.6
-
getConfiguration
UserRegistrationConfiguration getConfiguration()
-
getRegistrationsForUser
DocumentModelList getRegistrationsForUser(String docId, String username, String configurationName)
Retrieve registrations for a document givent the username- Since:
- 5.6
-
getConfiguration
UserRegistrationConfiguration getConfiguration(String name)
Return specific configuration for the specified name- Parameters:
name
- configuration name- Since:
- 5.6
-
getConfiguration
UserRegistrationConfiguration getConfiguration(DocumentModel requestDoc)
- Since:
- 5.6
-
getRegistrationRulesDocument
DocumentModel getRegistrationRulesDocument(CoreSession session, String configurationName)
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 UserRegistrationException
Stores a resgitration request like submitRegistrationRequest with Document information- Returns:
- a unique ID for it
- Throws:
UserRegistrationException
- Since:
- 5.6
-
getRegistrationRules
RegistrationRules getRegistrationRules(String configurationName)
Get registration rules adapter- Since:
- 5.6
-
checkRequestId
void checkRequestId(String requestId) throws UserRegistrationException
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
-
-