public class InvitationServiceImpl extends Object implements InvitationService, NodeServicePolicies.BeforeDeleteNodePolicy
Invitation
Policy.Arg
Modifier and Type | Field and Description |
---|---|
static int |
MAX_NUM_INVITEE_USER_NAME_GEN_TRIES |
QNAME
Constructor and Description |
---|
InvitationServiceImpl() |
Modifier and Type | Method and Description |
---|---|
Invitation |
accept(String invitationId,
String ticket)
Invitee accepts this invitation Nominated Invitaton process only
|
void |
acceptNominatedInvitation(String siteName,
String invitee,
String role,
String inviter)
Moderator approves this invitation
|
void |
addSiteMembership(String invitee,
String siteName,
String role,
String runAsUser,
boolean overrideExisting)
Add Invitee to Site with the site role that the inviter "started" the invite process with
|
Invitation |
approve(String invitationId,
String reason)
Moderator approves this invitation
|
void |
approveModeratedInvitation(String siteName,
String invitee,
String role,
String reviewer)
Moderator approves this invitation
|
void |
beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
NodeServicePolicies.BeforeDeleteNodePolicy Called immediatly prior to
deletion of a web site.
|
Invitation |
cancel(String invitationId)
cancel this request
|
void |
cancelInvitation(String siteName,
String invitee,
String inviteId,
String currentInviteId)
Inviter cancels this invitation
|
void |
deleteAuthenticationIfUnused(String invitee,
String currentInviteId)
Clean up invitee user account and person node when no longer in use.
|
protected String |
generateWorkflowDescription(SiteInfo siteInfo,
String messageId)
Generates a description for the workflow
|
MutableAuthenticationService |
getAuthenticationService() |
Invitation |
getInvitation(String invitationId)
Get an invitation from its invitation id
Invitations are returned which may be in progress or completed. |
List<String> |
getInvitationServiceWorkflowNames()
Get the names of the workflows which are managed by the invitation
service
|
org.alfresco.service.namespace.NamespaceService |
getNamespaceService() |
org.alfresco.service.cmr.repository.NodeService |
getNodeService() |
PasswordGenerator |
getPasswordGenerator() |
org.alfresco.service.cmr.security.PermissionService |
getPermissionService() |
PersonService |
getPersonService() |
SiteService |
getSiteService() |
UserNameGenerator |
getUserNameGenerator() |
WorkflowService |
getWorkflowService() |
void |
init()
Checks that all necessary properties and services have been provided.
|
ModeratedInvitation |
inviteModerated(String inviteeComments,
String inviteeUserName,
Invitation.ResourceType resourceType,
String resourceName,
String inviteeRole)
Start the invitation process for a ModeratedInvitation
|
NominatedInvitation |
inviteNominated(String inviteeUserName,
Invitation.ResourceType resourceType,
String resourceName,
String inviteeRole,
String acceptUrl,
String rejectUrl)
Start the invitation process for a NominatedInvitation
|
NominatedInvitation |
inviteNominated(String inviteeUserName,
Invitation.ResourceType resourceType,
String resourceName,
String inviteeRole,
String serverPath,
String acceptUrl,
String rejectUrl)
Start the invitation process for a NominatedInvitation
|
NominatedInvitation |
inviteNominated(String inviteeFirstName,
String inviteeLastName,
String inviteeEmail,
Invitation.ResourceType resourceType,
String resourceName,
String inviteeRole,
String acceptUrl,
String rejectUrl)
Start the invitation process for a NominatedInvitation
|
NominatedInvitation |
inviteNominated(String inviteeFirstName,
String inviteeLastName,
String inviteeEmail,
Invitation.ResourceType resourceType,
String resourceName,
String inviteeRole,
String serverPath,
String acceptUrl,
String rejectUrl)
Start the invitation process for a NominatedInvitation
|
boolean |
isSendEmails() |
List<Invitation> |
listPendingInvitationsForInvitee(String invitee)
list Invitations for a specific person/invitee
|
List<Invitation> |
listPendingInvitationsForInvitee(String invitee,
Invitation.ResourceType resourceType) |
List<Invitation> |
listPendingInvitationsForResource(Invitation.ResourceType resourceType,
String resourceName)
list Invitations for a specific resource
|
Invitation |
reject(String invitationId,
String reason)
User or moderator rejects this request
|
void |
rejectModeratedInvitation(String siteName,
String invitee,
String role,
String reviewer,
String resourceType,
String reviewComments)
Moderator rejects this invitation
|
List<Invitation> |
searchInvitation(InvitationSearchCriteria criteria)
Deprecated.
|
List<Invitation> |
searchInvitation(InvitationSearchCriteria criteria,
int limit)
This is the general search invitation method returning
Invitation
This is the recommended method to use for searching invitations; Consider
that the performance of the method will be greatly influenced by the
limit specified |
void |
sendModeratedInvitation(String inviteId,
String emailTemplateXpath,
String emailSubjectKey,
Map<String,Object> executionVariables)
Sends the site join request notification email using the given template, subject localization key, and variables.
|
void |
sendNominatedInvitation(String inviteId,
Map<String,Object> executionVariables)
Implemented for backwards compatibility
|
void |
sendNominatedInvitation(String inviteId,
String emailTemplateXpath,
String emailSubjectKey,
Map<String,Object> executionVariables)
Sends the invite email using the given template, subject localization key, and variables.
|
void |
setActionService(ActionService actionService) |
void |
setAuthenticationService(MutableAuthenticationService authenticationService) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setMessageService(MessageService messageService) |
void |
setModeratedInvitationWorkflowId(String moderatedInvitationWorkflowId)
Sets the moderated invite activiti workflow definition
|
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setNominatedInvitationExternalWorkflowId(String nominatedInvitationExternalWorkflowId)
Sets the nominated invite activiti workflow definition for external users
|
void |
setNominatedInvitationWorkflowId(String nominatedInvitationWorkflowId)
Sets the nominated invite activiti workflow definition for internal users
|
void |
setPasswordGenerator(PasswordGenerator passwordGenerator) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setPersonService(PersonService personService) |
void |
setPolicyComponent(PolicyComponent policyComponent)
Set the policy component
|
void |
setRepositoryHelper(Repository repositoryHelper) |
void |
setSendEmails(boolean sendEmails) |
void |
setServiceRegistry(ServiceRegistry serviceRegistry) |
void |
setSiteService(SiteService siteService) |
void |
setSysAdminParams(SysAdminParams sysAdminParams) |
void |
setTemplateService(TemplateService templateService) |
void |
setUserNameGenerator(UserNameGenerator usernameGenerator) |
void |
setWorkflowAdminService(WorkflowAdminService workflowAdminService) |
void |
setWorkflowService(WorkflowService workflowService)
Set the workflow service
|
ModeratedInvitation |
updateModeratedInvitation(String inviteeId,
String siteShortName,
String inviteeComments)
Update the invitee comments for an existing moderated invitation
|
public static final int MAX_NUM_INVITEE_USER_NAME_GEN_TRIES
public void setPolicyComponent(PolicyComponent policyComponent)
policyComponent
- policy componentpublic void setNominatedInvitationWorkflowId(String nominatedInvitationWorkflowId)
nominatedInvitationWorkflowId
- public void setNominatedInvitationExternalWorkflowId(String nominatedInvitationExternalWorkflowId)
nominatedInvitationExternalWorkflowId
- public void setModeratedInvitationWorkflowId(String moderatedInvitationWorkflowId)
moderatedInvitationWorkflowId
- public void init()
public List<String> getInvitationServiceWorkflowNames()
getInvitationServiceWorkflowNames
in interface InvitationService
public NominatedInvitation inviteNominated(String inviteeUserName, Invitation.ResourceType resourceType, String resourceName, String inviteeRole, String serverPath, String acceptUrl, String rejectUrl)
inviteNominated
in interface InvitationService
inviteeUserName
- Alfresco user name of the inviteeresourceType
- resourceTyperesourceName
- StringinviteeRole
- StringserverPath
- StringacceptUrl
- StringrejectUrl
- StringInvitationException
InvitationExceptionUserError
InvitationExceptionForbidden
public NominatedInvitation inviteNominated(String inviteeUserName, Invitation.ResourceType resourceType, String resourceName, String inviteeRole, String acceptUrl, String rejectUrl)
inviteNominated
in interface InvitationService
inviteeUserName
- Alfresco user name of the inviteeresourceType
- resourceTyperesourceName
- StringinviteeRole
- StringacceptUrl
- StringrejectUrl
- StringInvitationException
InvitationExceptionUserError
InvitationExceptionForbidden
public NominatedInvitation inviteNominated(String inviteeFirstName, String inviteeLastName, String inviteeEmail, Invitation.ResourceType resourceType, String resourceName, String inviteeRole, String acceptUrl, String rejectUrl)
inviteNominated
in interface InvitationService
inviteeFirstName
- StringinviteeLastName
- StringinviteeEmail
- StringresourceType
- Invitation.ResourceTyperesourceName
- StringinviteeRole
- StringacceptUrl
- StringrejectUrl
- StringInvitationException
InvitationExceptionUserError
InvitationExceptionForbidden
public NominatedInvitation inviteNominated(String inviteeFirstName, String inviteeLastName, String inviteeEmail, Invitation.ResourceType resourceType, String resourceName, String inviteeRole, String serverPath, String acceptUrl, String rejectUrl)
inviteNominated
in interface InvitationService
inviteeFirstName
- StringinviteeLastName
- StringinviteeEmail
- StringresourceType
- Invitation.ResourceTypresourceName
- StringinviteeRole
- StringserverPath
- StringacceptUrl
- StringrejectUrl
- StringInvitationException
InvitationExceptionUserError
InvitationExceptionForbidden
public ModeratedInvitation inviteModerated(String inviteeComments, String inviteeUserName, Invitation.ResourceType resourceType, String resourceName, String inviteeRole)
inviteModerated
in interface InvitationService
inviteeComments
- why does the invitee want access to the resource ?inviteeUserName
- who is to be invitedresourceType
- Invitation .ResourceType what resource type ?resourceName
- which resourceinviteeRole
- which role ?public Invitation accept(String invitationId, String ticket)
accept
in interface InvitationService
invitationId
- the invitation idticket
- the ticket produced when creating the invitation.public Invitation approve(String invitationId, String reason)
approve
in interface InvitationService
invitationId
- the request idreason
- comments about the acceptancepublic Invitation reject(String invitationId, String reason)
reject
in interface InvitationService
invitationId
- Stringreason
- , optional reason for rejectionpublic Invitation cancel(String invitationId)
cancel
in interface InvitationService
public Invitation getInvitation(String invitationId)
getInvitation
in interface InvitationService
InvitationExceptionNotFound
- the invitation does not exist.InvitationExceptionUserError
public List<Invitation> listPendingInvitationsForInvitee(String invitee)
listPendingInvitationsForInvitee
in interface InvitationService
invitee
- alfresco user id of person being invitedpublic List<Invitation> listPendingInvitationsForInvitee(String invitee, Invitation.ResourceType resourceType)
listPendingInvitationsForInvitee
in interface InvitationService
public List<Invitation> listPendingInvitationsForResource(Invitation.ResourceType resourceType, String resourceName)
listPendingInvitationsForResource
in interface InvitationService
resourceType
- Invitation.ResourceTyperesourceName
- Stringpublic List<Invitation> searchInvitation(InvitationSearchCriteria criteria)
Invitation
This method has a hardcoded limit of 200 invitations to return. It has
been deprecated and it is recommended to use the overloaded version for
which you can specify an appropriate limit depending on the needssearchInvitation
in interface InvitationService
criteria
- InvitationSearchCriteria
search criteriapublic List<Invitation> searchInvitation(InvitationSearchCriteria criteria, int limit)
Invitation
This is the recommended method to use for searching invitations; Consider
that the performance of the method will be greatly influenced by the
limit specifiedsearchInvitation
in interface InvitationService
criteria
- search criterialimit
- maximum number of IDs to return. If less than 1, there is no
limit.public void setWorkflowService(WorkflowService workflowService)
workflowService
- WorkflowServicepublic void setWorkflowAdminService(WorkflowAdminService workflowAdminService)
workflowAdminService
- the workflowAdminService to setpublic WorkflowService getWorkflowService()
public void setActionService(ActionService actionService)
actionService
- the actionService to setpublic void setPersonService(PersonService personService)
public PersonService getPersonService()
public void setSiteService(SiteService siteService)
public SiteService getSiteService()
public void setAuthenticationService(MutableAuthenticationService authenticationService)
public MutableAuthenticationService getAuthenticationService()
public void setUserNameGenerator(UserNameGenerator usernameGenerator)
public UserNameGenerator getUserNameGenerator()
public void setPasswordGenerator(PasswordGenerator passwordGenerator)
public PasswordGenerator getPasswordGenerator()
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public org.alfresco.service.namespace.NamespaceService getNamespaceService()
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
public org.alfresco.service.cmr.security.PermissionService getPermissionService()
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public org.alfresco.service.cmr.repository.NodeService getNodeService()
public ModeratedInvitation updateModeratedInvitation(String inviteeId, String siteShortName, String inviteeComments)
InvitationService
updateModeratedInvitation
in interface InvitationService
public void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
beforeDeleteNode
in interface NodeServicePolicies.BeforeDeleteNodePolicy
nodeRef
- the node referenceprotected String generateWorkflowDescription(SiteInfo siteInfo, String messageId)
siteInfo
- The site to generate a description formessageId
- The resource bundle key to use for the descriptionpublic void setSendEmails(boolean sendEmails)
sendEmails
- the sendEmails to setpublic boolean isSendEmails()
isSendEmails
in interface InvitationService
public void setSysAdminParams(SysAdminParams sysAdminParams)
public void setTemplateService(TemplateService templateService)
public void setMessageService(MessageService messageService)
messageService
- the messageService to setpublic void setRepositoryHelper(Repository repositoryHelper)
repositoryHelper
- the repositoryHelper to setpublic void setServiceRegistry(ServiceRegistry serviceRegistry)
serviceRegistry
- the serviceRegistry to setpublic void acceptNominatedInvitation(String siteName, String invitee, String role, String inviter)
InvitationService
acceptNominatedInvitation
in interface InvitationService
public void approveModeratedInvitation(String siteName, String invitee, String role, String reviewer)
InvitationService
approveModeratedInvitation
in interface InvitationService
public void addSiteMembership(String invitee, String siteName, String role, String runAsUser, boolean overrideExisting)
invitee
- siteName
- role
- runAsUser
- siteService
- overrideExisting
- public void rejectModeratedInvitation(String siteName, String invitee, String role, String reviewer, String resourceType, String reviewComments)
InvitationService
rejectModeratedInvitation
in interface InvitationService
public void deleteAuthenticationIfUnused(String invitee, String currentInviteId)
InvitationService
deleteAuthenticationIfUnused
in interface InvitationService
public void sendNominatedInvitation(String inviteId, Map<String,Object> executionVariables)
InvitationService
sendNominatedInvitation
in interface InvitationService
#sendNominatedInvitation(String, String, String, Map)}
public void sendNominatedInvitation(String inviteId, String emailTemplateXpath, String emailSubjectKey, Map<String,Object> executionVariables)
InvitationService
sendNominatedInvitation
in interface InvitationService
emailTemplateXpath
- the XPath to the email template in the repositoryemailSubjectKey
- the subject of the emailexecutionVariables
- the variables used to populate the emailpublic void sendModeratedInvitation(String inviteId, String emailTemplateXpath, String emailSubjectKey, Map<String,Object> executionVariables)
InvitationService
sendModeratedInvitation
in interface InvitationService
public void cancelInvitation(String siteName, String invitee, String inviteId, String currentInviteId)
InvitationService
cancelInvitation
in interface InvitationService
Copyright © 2005–2017 Alfresco Software. All rights reserved.