* <p> This handler filters out AdminObjects from a list-jms-resources, only return Connection Factories.
*/
@Handler( id="filterAdminObjects")
public static List filterAdminObjects(HandlerContext context) {
List result = new ArrayList();
FilterTreeEvent event = null;
try{
if (context.getEventObject() instanceof FilterTreeEvent){
event = FilterTreeEvent.class.cast(context.getEventObject());
}else{
return result;
}
List<String> jmsResources = event.getChildObjects();
if (jmsResources == null || jmsResources.size() <=0){
return result;
}
List adminObjs = new ArrayList();
Map responseMap = RestUtil.restRequest(GuiUtil.getSessionValue("REST_URL") +"/resources/admin-object-resource" , null, "GET", null, false);