import sailpoint.object. Certifiable;
import sailpoint.object.EntitlementGroup ;
import java.util.List;
import java.util.ArrayList;
String description = "";
List certificationObjectList = new ArrayList();
Iterator itr = items.iterator();
while(itr.hasNext()){
Certifiable certificationObject = itr.next();
if(certificationObject instanceOf EntitlementGroup){
EntitlementGroup entitlementGroup = (EntitlementGroup) certificationObject ;
String applicationName = entitlementGroup .getApplicationName();
String entitlementName = entitlementGroup.getAttributeName().get(0);
String entitlementValue = entitlementGroup.getAttributes().get(entitlementName );
if(entitlementValue.contains("SailPoint") || entitlementValue.contains("OIM") || entitlementValue.contains("Java")){
certificationObjectList.add(certificationObject );
} else{
itemsToExclude.add(certificationObject);
itr.remove();
description = "Entitlements matches the exclusion criteria";
}
}
}
return description ;