public class UserInvitationComponent extends DefaultComponent implements UserInvitationService
UserInvitationService.ValidationMethod
Modifier and Type | Field and Description |
---|---|
static String |
NUXEO_URL_KEY |
REGISTRATION_CONFIGURATION_NAME, REGISTRATION_DATA_DOC, REGISTRATION_DATA_USER
Constructor and Description |
---|
UserInvitationComponent() |
Modifier and Type | Method and Description |
---|---|
void |
acceptRegistrationRequest(String requestId,
Map<String,Serializable> additionnalInfo)
accept the registration request
|
void |
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> registrationDocs)
Delete a registration document
|
UserRegistrationConfiguration |
getConfiguration() |
UserRegistrationConfiguration |
getConfiguration(DocumentModel requestDoc) |
UserRegistrationConfiguration |
getConfiguration(String name)
Return specific configuration for the specified name
|
Set<String> |
getConfigurationsName()
List all registered onfiguration name
|
String |
getNameEventRegistrationAccepted() |
String |
getNameEventRegistrationRejected() |
String |
getNameEventRegistrationSubmitted() |
String |
getNameEventRegistrationValidated() |
DocumentModel |
getOrCreateRootDocument(CoreSession session,
String configurationName) |
RegistrationRules |
getRegistrationRules(String configurationName)
Get registration rules adapter
|
DocumentModel |
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 username
|
String |
getTestedRendering() |
DocumentModel |
getUserRegistrationModel(String configurationName)
Create a document model for the UserRegistration doctype.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
rejectRegistrationRequest(String requestId,
Map<String,Serializable> additionnalInfo)
reject the registration request
|
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.
|
String |
submitRegistrationRequest(DocumentModel userRegistrationModel,
Map<String,Serializable> additionnalInfo,
UserInvitationService.ValidationMethod validationMethod,
boolean autoAccept)
Stores a registration request and return a unique ID for it
|
String |
submitRegistrationRequest(String configurationName,
DocumentModel userRegistrationModel,
Map<String,Serializable> additionnalInfo,
UserInvitationService.ValidationMethod validationMethod,
boolean autoAccept)
Stores a resgitration request like submitRegistrationRequest with Document information
|
Map<String,Serializable> |
validateRegistration(String requestId,
Map<String,Serializable> additionnalInfo)
Validate a registration request and generate the target User
|
Map<String,Serializable> |
validateRegistrationAndSendEmail(String requestId,
Map<String,Serializable> additionnalInfo)
Validate a registration request and generate the target User
|
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterContribution, unregisterExtension
public static final String NUXEO_URL_KEY
public String getTestedRendering()
public DocumentModel getUserRegistrationModel(String configurationName) throws ClientException
UserInvitationService
getUserRegistrationModel
in interface UserInvitationService
configurationName
- The name of the configuration.ClientException
public DocumentModel getRegistrationRulesDocument(CoreSession session, String configurationName) throws ClientException
UserInvitationService
getRegistrationRulesDocument
in interface UserInvitationService
ClientException
public DocumentModel getOrCreateRootDocument(CoreSession session, String configurationName) throws ClientException
ClientException
public String submitRegistrationRequest(DocumentModel userRegistrationModel, Map<String,Serializable> additionnalInfo, UserInvitationService.ValidationMethod validationMethod, boolean autoAccept) throws ClientException
UserInvitationService
submitRegistrationRequest
in interface UserInvitationService
ClientException
public DocumentModelList getRegistrationsForUser(String docId, String username, String configurationName) throws ClientException
UserInvitationService
getRegistrationsForUser
in interface UserInvitationService
ClientException
public String submitRegistrationRequest(String configurationName, DocumentModel userRegistrationModel, Map<String,Serializable> additionnalInfo, UserInvitationService.ValidationMethod validationMethod, boolean autoAccept) throws ClientException
UserInvitationService
submitRegistrationRequest
in interface UserInvitationService
ClientException
public void acceptRegistrationRequest(String requestId, Map<String,Serializable> additionnalInfo) throws ClientException, UserRegistrationException
UserInvitationService
acceptRegistrationRequest
in interface UserInvitationService
ClientException
UserRegistrationException
public void rejectRegistrationRequest(String requestId, Map<String,Serializable> additionnalInfo) throws ClientException, UserRegistrationException
UserInvitationService
rejectRegistrationRequest
in interface UserInvitationService
ClientException
UserRegistrationException
public Map<String,Serializable> validateRegistration(String requestId, Map<String,Serializable> additionnalInfo) throws ClientException, UserRegistrationException
UserInvitationService
validateRegistration
in interface UserInvitationService
ClientException
UserRegistrationException
public Map<String,Serializable> validateRegistrationAndSendEmail(String requestId, Map<String,Serializable> additionnalInfo) throws ClientException, UserRegistrationException
UserInvitationService
validateRegistrationAndSendEmail
in interface UserInvitationService
ClientException
UserRegistrationException
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public NuxeoPrincipal createUser(CoreSession session, DocumentModel registrationDoc) throws ClientException, UserRegistrationException
createUser
in interface UserInvitationService
ClientException
UserRegistrationException
public UserRegistrationConfiguration getConfiguration()
getConfiguration
in interface UserInvitationService
public UserRegistrationConfiguration getConfiguration(DocumentModel requestDoc)
getConfiguration
in interface UserInvitationService
public UserRegistrationConfiguration getConfiguration(String name)
UserInvitationService
getConfiguration
in interface UserInvitationService
name
- configuration namepublic RegistrationRules getRegistrationRules(String configurationName) throws ClientException
UserInvitationService
getRegistrationRules
in interface UserInvitationService
ClientException
public void reviveRegistrationRequests(CoreSession session, List<DocumentModel> registrationDocs) throws ClientException
UserInvitationService
reviveRegistrationRequests
in interface UserInvitationService
ClientException
public void deleteRegistrationRequests(CoreSession session, List<DocumentModel> registrationDocs) throws ClientException
UserInvitationService
deleteRegistrationRequests
in interface UserInvitationService
ClientException
public Set<String> getConfigurationsName()
UserInvitationService
getConfigurationsName
in interface UserInvitationService
public void checkRequestId(String requestId) throws ClientException, UserRegistrationException
UserInvitationService
checkRequestId
in interface UserInvitationService
requestId
- The value of the request id.ClientException
UserRegistrationException
public String getNameEventRegistrationSubmitted()
getNameEventRegistrationSubmitted
in interface UserInvitationService
public String getNameEventRegistrationAccepted()
getNameEventRegistrationAccepted
in interface UserInvitationService
public String getNameEventRegistrationRejected()
getNameEventRegistrationRejected
in interface UserInvitationService
public String getNameEventRegistrationValidated()
getNameEventRegistrationValidated
in interface UserInvitationService
Copyright © 2015 Nuxeo SA. All rights reserved.