public class AgentTools extends GenericService
| Modifier and Type | Field and Description | 
|---|---|
| protected static java.lang.String | AGENTRESOURCES | 
| static java.lang.String | CLASS_VERSIONClass version string | 
| static java.lang.String | COMMENT_AGENT_PROPERTY_NAMEThe name for the agent property on a comment item | 
| static java.lang.String | COMMENT_COMMENT_PROPERTY_NAMEThe name for the comment property on a comment item | 
| static java.lang.String | COMMENT_CREATIONDATE_PROPERTY_NAMEThe name for the creationDate property on a comment item | 
| static java.lang.String | COMMENT_OWNER_PROPERTY_NAMEThe name for the owner property on a comment item | 
| static java.lang.String | NEW_PASSWORD_PARAM_NAMEThe name of the new passord parameter that is used to attach the new password to the notification email. | 
| protected java.util.ResourceBundle | sBundle | 
SERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description | 
|---|
| AgentTools() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | assignUserToCurrentOrganization(RepositoryItem pProfile)Assigns an external profile to the organization that is currently set in the parent organization property. | 
| void | assignUserToOrganization(RepositoryItem pProfile,
                        java.lang.String pOrganizationId)Adds an external user to an organization | 
| MutableRepositoryItem | createNewAgentProfileCommentItem()Creates a new transient comment item in the profile repository | 
| RepositoryItem | createProfileComment(java.lang.String pProfileId,
                    RepositoryItem pAgentProfile,
                    java.lang.String pComment)Creates a new comment item for the given profile. | 
| java.lang.String | generateNewAccountPasswordAndNotification(MutableRepositoryItem pNewProfile,
                                         boolean pSendEmail,
                                         TemplateEmailSender pTemplateEmailSender,
                                         TemplateEmailInfo pTemplateEmailInfo,
                                         java.util.Map pTemplateEmailParams,
                                         boolean pSendEmailInDifferentThread,
                                         boolean pPersistEmail)Generates a password for a new external account and sends a notification email to the user. | 
| java.util.Map | generateNewAccountTemplateDefaultParams(RepositoryItem pProfile,
                                       java.lang.String pPassword)Generates a parameters map that are made available to all new account email tempaltes. | 
| AgentMessagingTools | getAgentMessagingTools()Returns component for sending agent messages | 
| RepositoryItem | getAgentProfile(java.lang.String pProfileId) | 
| RepositoryItem | getCustomerProfile(java.lang.String pProfileId) | 
| ProfileTools | getInternalProfileTools()Returns the internalProfileTools. | 
| java.lang.String | getProfileCommentItemDescriptorName() | 
| ProfileTools | getProfileTools()The ProfileTools component | 
| UserDirectoryTools | getUserDirectoryTools() | 
| java.lang.String | getUserViewName()Returns the userViewName. | 
| void | initializeRegistrationDate(MutableRepositoryItem pProfile)Initializes the registration date to the current time. | 
| void | setAgentMessagingTools(AgentMessagingTools pAgentMessagingTools)Sets the component for sending agent messages | 
| void | setInternalProfileTools(ProfileTools pInternalProfileTools)Sets the internalProfileTools. | 
| void | setProfileCommentItemDescriptorName(java.lang.String pProfileCommentItemDescriptorName)Sets the name of the "comment" item descriptor in the external profile repository | 
| void | setProfileTools(ProfileTools pProfileTools)Sets the ProfileTools component | 
| protected void | setPropertiesOfComment(MutableRepositoryItem pComment,
                      java.lang.String pCommentData,
                      java.util.Date pCreationDate,
                      java.lang.String pOwnerId,
                      RepositoryItem pAgent)Sets the properties of a comment item | 
| void | setUserDirectoryTools(UserDirectoryTools pUserDirectoryTools)Sets tools component used to add an external user to an organization | 
| void | setUserViewName(java.lang.String pUserViewName)Sets the userViewName. | 
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningprotected static final java.lang.String AGENTRESOURCES
protected final java.util.ResourceBundle sBundle
public static final java.lang.String NEW_PASSWORD_PARAM_NAME
public static final java.lang.String COMMENT_COMMENT_PROPERTY_NAME
public static final java.lang.String COMMENT_CREATIONDATE_PROPERTY_NAME
public static final java.lang.String COMMENT_OWNER_PROPERTY_NAME
public static final java.lang.String COMMENT_AGENT_PROPERTY_NAME
public static final java.lang.String CLASS_VERSION
public void setAgentMessagingTools(AgentMessagingTools pAgentMessagingTools)
pAgentMessagingTools - public AgentMessagingTools getAgentMessagingTools()
public void setUserDirectoryTools(UserDirectoryTools pUserDirectoryTools)
pUserDirectoryTools - tools component used to add an external user to an organizationpublic UserDirectoryTools getUserDirectoryTools()
public void setProfileTools(ProfileTools pProfileTools)
pProfileTools - the ProfileTools componentpublic ProfileTools getProfileTools()
public void setProfileCommentItemDescriptorName(java.lang.String pProfileCommentItemDescriptorName)
pProfileCommentItemDescriptorName - the name of the "comment" item descriptor in the profile repositorypublic java.lang.String getProfileCommentItemDescriptorName()
public RepositoryItem createProfileComment(java.lang.String pProfileId, RepositoryItem pAgentProfile, java.lang.String pComment) throws RepositoryException
pProfile - the profile that will own the commentpAgentProfile - the agent profile that made the commentpComment - the comment dataRepositoryExceptionsetPropertiesOfComment(MutableRepositoryItem, String, java.util.Date, String, RepositoryItem)protected void setPropertiesOfComment(MutableRepositoryItem pComment, java.lang.String pCommentData, java.util.Date pCreationDate, java.lang.String pOwnerId, RepositoryItem pAgent)
pComment - the mutable comment itempCommentData - the comment datapCreationDate - the creation datepOwnerId - the owner of the comment itempAgent - the agent that created the commentpublic MutableRepositoryItem createNewAgentProfileCommentItem() throws RepositoryException
RepositoryExceptionpublic java.lang.String generateNewAccountPasswordAndNotification(MutableRepositoryItem pNewProfile, boolean pSendEmail, TemplateEmailSender pTemplateEmailSender, TemplateEmailInfo pTemplateEmailInfo, java.util.Map pTemplateEmailParams, boolean pSendEmailInDifferentThread, boolean pPersistEmail) throws TemplateEmailException, RepositoryException
pNewProfile - the affected profilepSendEmail - determines if the notification email is sentpTemplateEmailSender - The sender used to send the templated email.pTemplateEmailInfo - The email template.pTemplateEmailParams - the template parameters. This method also adds the new password as a parameterpSendEmailInDifferentThread - determines if the email is sent in a new threadpPersistEmail - determines if email is persisted before it is sent.TemplateEmailExceptionRepositoryExceptionProfileTools.generateNewPasswordForProfile(RepositoryItem), 
ProfileTools#sendEmailToUser(MutableRepositoryItem, boolean, boolean, TemplateEmailInfo, Map), 
#generateNewAccountTemplateParams(RepositoryItem, String)public java.util.Map generateNewAccountTemplateDefaultParams(RepositoryItem pProfile, java.lang.String pPassword)
 By default, this method adds the parameter for the new password using the
 name defined by the NEW_PASSWORD_PARAM_NAME constant.  
 
Extend this method to add additional parameters to the email template.
pProfile - the profile that had the new password generated.pPassword - the new account password in clear textNEW_PASSWORD_PARAM_NAMEpublic void initializeRegistrationDate(MutableRepositoryItem pProfile)
pProfile - public void assignUserToCurrentOrganization(RepositoryItem pProfile)
pProfile - public void assignUserToOrganization(RepositoryItem pProfile, java.lang.String pOrganizationId)
pProfile - pOrganizationId - public RepositoryItem getCustomerProfile(java.lang.String pProfileId)
public RepositoryItem getAgentProfile(java.lang.String pProfileId)
public java.lang.String getUserViewName()
public void setUserViewName(java.lang.String pUserViewName)
pUserViewName - public ProfileTools getInternalProfileTools()
public void setInternalProfileTools(ProfileTools pInternalProfileTools)
pInternalProfileTools -