import sailpoint.api.identityService;
import sailpoint.object.*;
String explanation = "AD account disabled";
if(entity instanceof Identity) {
Identity identity = (Identity)entity;
if(null != identity) {
Application application = context.getObjectByName(Application.class,"AD");
IdentityService is = new IdentityService(context);
List LinksList = is.getLinks(identity,application);
if(null != linksList && linksList.size() > 0) {
for(Link link : linksList) {
if(link.isDisabled()) {
for(Iterator it = items.iterator(); it.hasNext();) {
Certifiable certifiable = it.next();
it.remove();
itemsToExclude.add(certifiable);
}
}
}
}
}
}