CA Identity Manager
Java SDK r12.5 SP 8

 

com.netegrity.imapi
Interface EventContext

All Superinterfaces:
IMContext, IMPersistentContext, Logger, ProviderAccessor, java.io.Serializable, ServiceProvider, TaskInfo
All Known Subinterfaces:
WorkflowContext

public interface EventContext
extends IMPersistentContext

Provides access to the current Identity Manager event, including the managed object(s) in the event.

EventContext allows read and write access to the managed objects in Identity Manager events. If managed object information for an event is modified, Identity Manager commits the changes to the directory after any workflow approvals required for the execution of the event have been provided and the execution of the event is complete.

EventContext also allows you to generate a secondary event for the current task. For example, if an event listener adds a user to a group during a Create User task, Identity Manager does not generate the secondary event AddToGroupEvent. However, the event listener can generate the secondary event by calling generateEvent().

In addition to accessing the managed objects in the current event, EventContext gives you direct access to the managed objects in the data store through the ProviderAccessor object.

WorkflowContext in the Workflow API extends EventContext. Also, EventContext serves as the ...Context object for the Event Listener API. These APIs inherit all the context methods in the core Identity Manager API through EventContext.

For information about retrieving an event object and accessing managed object information in the event, see the section Accessing Objects in an Event in the Programming Guide.

Since:
IdentityMinder 5.6

Method Summary
 void generateEvent(java.lang.String className, java.lang.Object primary, java.lang.Object secondary, java.lang.String workflowID)
          Creates an instance of the specified secondary event.
 IMEvent getEvent()
          Retrieves a read/write version of an event object for the current event.
 java.lang.String getEventDescription()
          Retrieves the description of the current event.
 java.lang.String getEventName()
          Retrieves the name of the current event.
 
Methods inherited from interface com.netegrity.imapi.IMPersistentContext
getPersistentData, setPersistentData
 
Methods inherited from interface com.netegrity.imapi.IMContext
getAuxDataRoot, getLocalizer, getLocalizer, getSessionAttribute, removeSessionAttribute, setSessionAttribute
 
Methods inherited from interface com.netegrity.imapi.Logger
logDebugMessage, logErrorMessage, logInfoMessage, logWarningMessage
 
Methods inherited from interface com.netegrity.imapi.TaskInfo
addErrorObject, addMessageObject, addMessageObject, addStatusDetail, createRuntimeStatusDetail, getActionType, getAdminFriendlyName, getAdministrator, getAdminTask, getAdminUniqueName, getAuthDirFriendlyName, getAuthDirUniqueName, getEnvironmentFriendlyName, getEnvironmentUniqueName, getObjectOrganization, getObjectOrganizationFriendlyName, getSessionCreateTime, getSessionId, getSiteMinderSessionId, getSiteMinderSessionSpec, getSiteMinderTransactionId, getSMHeader, getSubject, getSubjects, getTaskApplication, getTaskCategory, getTaskFriendlyName, getTaskUniqueName, getTSContext, getUserLocale, isAuditableTask, isTaskReadOnly, isWorkflowTask, sendAuditEvent
 
Methods inherited from interface com.netegrity.imapi.ServiceProvider
canUserAdministerGroup, convertLogicalToPhysical, convertPhysicalToLogical, decryptString, decryptString, doesSupportGroup, doesSupportOrganization, encryptString, encryptString, findAdminTask, getAllUsersAccessRoles, getGroupAdmins, getGroupMembers, getGroups, getGroupsAdminCanAdminister, getManagedObject, getManagedObjects, getManagedObjects, getOrg, getOrgMembers, getRootOrg, getSubOrgs, getTemporaryPassword, getTempPassword, isPasswordValid, isPasswordValid, isTopMostOrgWhichTaskIsBoundTo, validatePassword, validatePassword
 
Methods inherited from interface com.netegrity.imapi.ProviderAccessor
getAccessControlProvider, getAccessRoleProvider, getAccessTaskProvider, getAdminRoleProvider, getAdminTaskProvider, getAnalyticsEngineProvider, getEnvironmentSettingsProvider, getGroupProvider, getManagedObjectProvider, getOrganizationProvider, getProvisioningPolicyProvider, getProvisioningRoleProvider, getRelationshipProvider, getSecurityProvider, getSynchronizationProvider, getTabDefinitionProvider, getUserProvider
 

Method Detail

getEvent

IMEvent getEvent()
Retrieves a read/write version of an event object for the current event.

Returns:
An event object for the current event.

getEventName

java.lang.String getEventName()
Retrieves the name of the current event.

Returns:
The name of the event.

getEventDescription

java.lang.String getEventDescription()
Retrieves the description of the current event.

Returns:
The description of the event.

generateEvent

void generateEvent(java.lang.String className,
                   java.lang.Object primary,
                   java.lang.Object secondary,
                   java.lang.String workflowID)
                   throws java.lang.Exception
Creates an instance of the specified secondary event. The event is queued with any other secondary events associated with the current task.

No Identity Manager security checks are performed on an event generated by this method.

Primary and Secondary Objects

When you generate an event with this method, you specify one of the event names shown below. You also specify the primary object affected by the event and any secondary object affected by the event. For example, with CreateUserEvent, the primary object affected by the event is the new User object, and the secondary object affected by the event is the organization where the user is being created.

The table below shows the primary object and the secondary object (if any) associated with each Identity Manager event you can generate:

Event Name Primary Object Secondary Object
AddGrantorOnAccessRoleEvent User AccessRole
AddGrantorOnAdminRoleEvent User AdminRole
AddGrantorOnProvisioningRoleEvent User ProvisioningRole
AddGroupAdminEvent User Group
AddGroupAdminGroupEvent Group Group
AddGroupToGroupEvent Group Group
AddToGroupEvent User Group
AssignAccessRoleEvent User AccessRole
AssignAdminRoleEvent User AdminRole
AssignProvisioningRoleEvent User ProvisioningRole
CertificationNonCertifiedActionCompletedNotificationEvent User CertificationActionType
CertificationNonCertifiedActionPendingNotificationEvent User CertificationActionType
CertificationRequiredFinalReminderNotificationEvent User null
CertificationRequiredNotificationEvent User null
CertificationRequiredReminderNotificationEvent User null
CertificationStatusCertifiedEvent User null
CertificationStatusInCertificationEvent User null
CertificationStatusNotCertifiedEvent User null
CertificationStatusRequiredCertificationEvent User null
CertifyRoleEvent User Role (Access, Admin, or Provisioning)
CreateAccessRoleEvent AccessRole null
CreateAccessTaskEvent AccessTask null
CreateAdminRoleEvent AdminRole null
CreateAdminTaskEvent AdminTask null
CreateGroupEvent Group Organization
CreateIdentityPolicySetEvent BusinessPolicySet null
CreateLAHDefinitionEvent LogicalAttributeHandlerDefinition null
CreateOrganizationEvent Organization Organization
CreatePasswordPolicyEvent PasswordPolicy null
CreateProvisioningRoleEvent ProvisioningRole null
CreateUserEvent User Organization
DeleteAccessRoleEvent AccessRole null
DeleteAccessTaskEvent AccessTask null
DeleteAdminRoleEvent AdminRole null
DeleteAdminTaskEvent AdminTask null
DeleteGroupEvent Group Organization
DeleteIdentityPolicySetEvent BusinessPolicySet null
DeleteLAHDefinitionEvent LogicalAttributeHandlerDefinition null
DeleteOrganizationEvent Organization Organization
DeletePasswordPolicyEvent PasswordPolicy null
DeleteProvisioningRoleEvent ProvisioningRole null
DeleteUserEvent User Organization
DisableUserEvent User Organization
EnableUserEvent User Organization
ExternalTaskGroupEvent Group null
ExternalTaskOrgEvent Org null
ExternalTaskUserEvent User null
ForgottenPasswordEvent User Organization
ForgottenPasswordAuditEvent User status
ModifyAccessRoleEvent AccessRole null
ModifyAccessTaskEvent AccessTask null
ModifyAdminRoleEvent AdminRole null
ModifyAdminTaskEvent AdminTask null
ModifyGroupEvent Group Organization
ModifyIdentityPolicySetEvent BusinessPolicySet null
ModifyLAHDefinitionEvent oldClassName LogicalAttributeHandlerDefinition
ModifyOrganizationEvent Organization Organization
ModifyPasswordPolicyEvent PasswordPolicy null
ModifyProvisioningRoleEvent ProvisioningRole resetOwnersOnly as Boolean object
ModifyUserEvent User Organization
RemoveFromGroupEvent User Group
RemoveGrantorOnAccessRoleEvent User AccessRole
RemoveGrantorOnAdminRoleEvent User AdminRole
RemoveGrantorOnProvisioningRoleEvent User ProvisioningRole
RemoveGroupAdminEvent User Group
RemoveGroupAdminGroupEvent Group Group
RemoveGroupFromGroupEvent Group Group
ResetPasswordEvent User Organization
RevokeAccessRoleEvent User AccessRole
RevokeAdminRoleEvent User AdminRole
RevokeProvisioningRoleEvent User ProvisioningRole
SelfRegisterUserEvent User Organization
SetPrimaryObjectAuditEvent Any managed object null
SynchronizeUserAccountEvent User Organization
SynchronizeUserEvent User Organization
SynchronizeUserProvisioningRoleAddAccountsEvent User null
SynchronizeUserProvisioningRoleDeleteAccountsEvent User null
UserAttributeAddValueEvent User Values in Hashtable
UserAttributeRemoveValueEvent User Values in Hashtable
ViewAccessRoleEvent AccessRole null
ViewAccessTaskEvent AccessTask null
ViewAdminRoleEvent AdminRole null
ViewAdminTaskEvent AdminTask null
ViewGroupEvent Group Organization
ViewLAHDefinitionEvent LogicalAttributeHandlerDefinition null
ViewOrganizationEvent Organization Organization
ViewPasswordPolicyEvent PasswordPolicy null
ViewProvisioningRoleEvent ProvisioningRole null
ViewUserEvent User Organization

Parameters:
className - The fully qualified name of the class to be instantiated for the event being generated. Event classes are in the package com.netegrity.ims.events. For example, to generate an AddToGroupEvent event, specify com.netegrity.ims.events.AddToGroupEvent in the className parameter. The names of all the events you can generate are listed in the section Primary and Secondary Objects.

primary - The primary object affected by the event being generated -- for example, a User object with a CreateUserEvent. See the table in the section Primary and Secondary Objects for the primary object associated with each event.

secondary - The secondary object, if any, affected by the event being generated -- for example, a Group object with an AddToGroupEvent. Pass null in this parameter if there is no secondary object -- for example, DeleteAccessRoleEvent has a primary object (the access role being deleted), but no secondary object. See the table in the section Primary and Secondary Objects for the secondary object associated with each event.

workflowID - The name of the workflow process (such as CreateUserApproveProcess) to map to the event being generated. To use the default mapping, pass null in this parameter.
Default event/workflow process mappings are defined in the following locations:
  • The Event Mappings dialog of the Identity Manager Management Console.
  • The Event tab of a task screen for a particular Create... admin task or Modify... admin task.
If null is passed and the event is not mapped to a workflow process in the above locations, the generated event will not be workflow controlled.
For information about mapping events with workflow processes, see the CA Identity Manager Operations Guide.

Example

The following example generates the event AssignAccessRoleEvent for a user who is being assigned to an access role. The event will be subject to workflow control by the workflow process ModifyAccessRoleMembershipApproveProcess:
      evtCtx.generateEvent("com.netegrity.ims.events.AssignAccessRoleEvent", user, accessRole,"ModifyAccessRoleMembershipApproveProcess");
 
Throws:
java.lang.Exception
Since:
IdentityMinder 6.0

CA Identity Manager
Java SDK r12.5 SP 8

06/13/2011

© 2011 CA Technologies, Inc. All rights reserved.