import java.util.Date;
import org.apache.commons.logging.Log;
import sailpoint.api.SailPointContext;
import sailpoint.object.AuditEvent;
import sailpoint.object.Certification;
import sailpoint.tools.GeneralException;
public class ActivePeriodRule1 {
static Log logger = null;
static SailPointContext context = null;
static Certification certification = null;
private static void callActivePeriodRule1() {
String auditTarget = null;
String auditAction = "UserENTCertEvent";
auditTarget = certification.getEntities().get(0).getIdentity();
AuditEvent auditEvent = new AuditEvent();
auditEvent.setSource("User Entitlement Certification Event Trigger");
auditEvent.setAction(auditAction);
auditEvent.setTarget(auditTarget);
auditEvent.setAttributeValue("CN=SailPoint IdentityIQ,OU=Groups,OU=mighty,OU=com");
auditEvent.setCreated(new Date());
try {
context.saveObject(auditEvent);
context.commitTransaction();
context.decache(auditEvent);
} catch (GeneralException e) {
logger.error("GeneralException in ActivePerioRule1 : " + e.getMessage());
}
}
public static void main(String[] args) {
callActivePeriodRule1();
}
}
No comments:
Post a Comment