org.alfresco.repo.invitation.site
Class InviteHelper

java.lang.Object
  extended by org.alfresco.repo.invitation.site.InviteHelper

public class InviteHelper
extends java.lang.Object

Helper class to house utility methods common to more than one Invite Service Web Script


Constructor Summary
InviteHelper()
           
 
Method Summary
static void cleanUpStaleInviteeResources(java.lang.String inviteeUserName, MutableAuthenticationDao authenticationDao, PersonService personService, WorkflowService workflowService)
          Clean up invitee user account and person node when no longer in use.
static void completeInviteTask(java.lang.String inviteId, QName fullTaskName, java.lang.String transitionId, WorkflowService workflowService)
          Complete the specified Invite Workflow Task for the invite workflow instance associated with the given invite ID, and follow the given transition upon completing the task
static java.util.List findInvitePendingTasks(java.lang.String inviteeUserName, WorkflowService workflowService)
          Find invitePending tasks (in-progress) by the given invitee user name
static WorkflowTask findInviteStartTask(java.lang.String inviteId, WorkflowService workflowService)
          Find an invite start task by the given task id.
static InviteInfo getPendingInviteInfo(WorkflowTask startInviteTask, ServiceRegistry serviceRegistry, SiteService siteService)
          Returns an InviteInfo instance for the given startInvite task (used for rendering the response).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InviteHelper

public InviteHelper()
Method Detail

findInviteStartTask

public static WorkflowTask findInviteStartTask(java.lang.String inviteId,
                                               WorkflowService workflowService)
Find an invite start task by the given task id.

Returns:
a WorkflowTask or null if not found.

findInvitePendingTasks

public static java.util.List findInvitePendingTasks(java.lang.String inviteeUserName,
                                                    WorkflowService workflowService)
Find invitePending tasks (in-progress) by the given invitee user name

Returns:
a list of workflow tasks

getPendingInviteInfo

public static InviteInfo getPendingInviteInfo(WorkflowTask startInviteTask,
                                              ServiceRegistry serviceRegistry,
                                              SiteService siteService)
Returns an InviteInfo instance for the given startInvite task (used for rendering the response).

Parameters:
startInviteTask - startInvite task to get invite info properties from
serviceRegistry - service registry instance
siteService - site service instance
Returns:
InviteInfo instance containing invite information

cleanUpStaleInviteeResources

public static void cleanUpStaleInviteeResources(java.lang.String inviteeUserName,
                                                MutableAuthenticationDao authenticationDao,
                                                PersonService personService,
                                                WorkflowService workflowService)
Clean up invitee user account and person node when no longer in use. They are deemed to no longer be in use when the invitee user account is still disabled and there are no outstanding pending invites for that invitee.

Parameters:
inviteeUserName -
authenticationDao -
personService -
workflowService -

completeInviteTask

public static void completeInviteTask(java.lang.String inviteId,
                                      QName fullTaskName,
                                      java.lang.String transitionId,
                                      WorkflowService workflowService)
Complete the specified Invite Workflow Task for the invite workflow instance associated with the given invite ID, and follow the given transition upon completing the task

Parameters:
inviteId - the invite ID of the invite workflow instance for which we want to complete the given task
fullTaskName - qualified name of invite workflow task to complete
transitionId - the task transition to take on completion of the task (or null, for the default transition)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.