I metodi in _taskContextInformation e _eventContextInformation vengono forniti rispettivamente tramite gli oggetti di Identity Manager ExposedTaskContextInformation e ExposedEventContextInformation.
Questi oggetti ereditano metodi nell'API di Identity Manager di base. Di conseguenza, i metodi ereditati sono disponibili anche per _taskContextInformation e _eventContextInformation.
I metodi seguenti ereditati dall'oggetto TaskInfo sono particolarmente utili per un modello di messaggio di posta elettronica:
Questi oggetti recuperati consentono di inserire informazioni specifiche di amministratore e specifiche di attività in un messaggio di posta elettronica. Ad esempio:
<!-- Define the E-mail Properties --->
<%
_cc = "" ;
_bcc = "" ;
_subject = _eventContextInformation.getEventName() +
" richiesta di approvazione";
%>
<!--- Start of Body --->
<html>
<body text="Navy">
The following item has been added to your work list for approval:<br>
<br>
User <b><%= _eventContextInformation.getAdministrator().
getAttribute(Packages.com.netegrity.llsdk6.imsapi.
managedobject.User.PROPERTY_FRIENDLY_NAME)%> </b>
from department <b><%= _eventContextInformation.
getAdministrator().getOrg(null).getFriendlyName()
%></b> initiated task <b><%= _eventContextInformation.
getAdminTask().getFriendlyName() %></b>at <b><%= _eventContextInformation.getSessionCreateTime() %></b>
<br><br>
<font color="green">Details: </font><b><%=_eventContextInformation.
getEventName()%></b><br>
<font color="green"><%=_eventContextInformation.
getPrimaryObjectTypeName()%>:</font>
<b><%=_eventContextInformation.getPrimaryObjectName()%></b>>
was modified
<br>
<font color="green">Updated Attributes:</font>
<table border="1">
<tr>
<td><b>Name</b></td>
<td><b>Value</b></td>
</tr>
<%
var event = _eventContextInformation.getEvent();
if(event instanceof Packages.com.netegrity.imapi.UserEvent) {
var user = event.getUser();
var attributes = user.getAttributes().keys();
while(attributes.hasMoreElements()) {
var attr = attributes.nextElement();
var value = user.getAttribute(attr);
if(user.hasAttributeChanged(attr)) {
template.add("<tr><td>" + attr +"</td>");
template.add("<td>" + value +"</td></tr>");
}
}
}
%>
</table>
<br>
</body>
</html>
Corpo del messaggio di posta elettronica possibile:

Per ulteriori informazioni sui metodi ereditati disponibili per l'API di modello di messaggio di posta elettronica, consultare gli oggetti ExposedTaskContextInformation e ExposedEventContextInformation nel Javadoc di Identity Manager.
|
Copyright © 2015 CA Technologies.
Tutti i diritti riservati.
|
|