captoken.setActor(results.getString(ALLOWED_ACTOR));
captoken.setResourceID(results.getString(RESOURCE_ID));
captoken.setActorType(results.getBoolean(IS_USER));
String capActionStr = results.getString(ACTION_TYPE);
Action capAction = Action.All;
if(capActionStr != null){
capAction = Action.valueOf(capActionStr);
}
//If use has give a search action, skip everything does not match
if(searchAction != null){
if(!capAction.equals(Action.All) && !capAction.equals(searchAction)){
break;
}
}
captoken.setAction(capAction.toString());
String assertion = results.getString(ASSERTION);
if(assertion != null){
captoken.setAssertions(assertion);
}