import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import sailpoint.object.Certifiable;
import sailpoint.object.EntitlementGroup;
public class CertExclusionRule2 {
static List items = null;
static List itemsToExclude = null;
private static String excludeEntitlement() {
String explanation = "";
// String appName = null;
String entName = null;
String entValue = null;
Iterator iterator = null;
List certObjList = new ArrayList();
EntitlementGroup entitlementGroup = null;
iterator = items.iterator();
while (iterator.hasNext()) {
// entitlementGroup = (EntitlementGroup) iterator.next();
Certifiable certifiable = (Certifiable) iterator.next();
if (certifiable instanceof EntitlementGroup && entitlementGroup.getApplicationName() != null
&& entitlementGroup.getAttributeNames().get(0) != null
&& entitlementGroup.getAttributes().get(entName).toString() != null) {
entitlementGroup = (EntitlementGroup) certifiable;
// appName = entitlementGroup.getApplicationName();
entName = entitlementGroup.getAttributeNames().get(0);
entValue = entitlementGroup.getAttributes().get(entName).toString();
if (entValue.contains("SailPoint IdentityIQ")) {
certObjList.add(entValue);
} else {
itemsToExclude.add(certifiable);
iterator.remove();
explanation = "Groups match the exclusion criteria";
}
}
}
return explanation;
}
public static void main(String[] args) {
String message = excludeEntitlement();
}
}
No comments:
Post a Comment