예제 #1
0
  void processSiteView(PortalSiteView portalsiteview) {
    boolean flag = visitor.siteviewPre(portalsiteview);
    if (flag) {
      if (debug) {
        PortalSiteView _tmp = portalsiteview;
        TextUtils.debugPrint("search groups: " + portalsiteview.getProperty(PortalSiteView.pTitle));
      }
      Array array = getSortedGroupIDs(portalsiteview);
      for (int i = 0; i < array.size(); i++) {
        String s = (String) array.at(i);
        MonitorGroup monitorgroup = (MonitorGroup) portalsiteview.getElement(s);
        if (monitorgroup == null || !itemFilter.itemAllowed(monitorgroup.getFullID())) {
          continue;
        }
        if (debug) {
          MonitorGroup _tmp1 = monitorgroup;
          TextUtils.debugPrint("process group: " + monitorgroup.getProperty(MonitorGroup.pName));
        }
        processGroup(monitorgroup, portalsiteview);
      }

      if (addAlerts) {
        Array array1 =
            portalsiteview.getElementsOfClass("COM.dragonflow.SiteView.Rule", false, false);
        Rule rule;
        for (Enumeration enumeration = array1.elements();
            enumeration.hasMoreElements();
            processAlert(rule, null, null, portalsiteview)) {
          rule = (Rule) enumeration.nextElement();
        }
      }
    }
    visitor.siteviewPost(portalsiteview);
  }
예제 #2
0
 /**
  * @param monitorgroup
  * @param portalsiteview
  */
 void processGroup(MonitorGroup monitorgroup, PortalSiteView portalsiteview) {
   boolean flag = visitor.groupPre(monitorgroup, portalsiteview);
   if (flag) {
     if (addAlerts) {
       Array array = monitorgroup.getElementsOfClass("COM.dragonflow.SiteView.Rule", false, false);
       Rule rule;
       for (Enumeration enumeration1 = array.elements();
           enumeration1.hasMoreElements();
           processAlert(rule, null, monitorgroup, portalsiteview)) {
         rule = (Rule) enumeration1.nextElement();
       }
     }
     Enumeration enumeration = monitorgroup.getMonitors();
     while (enumeration.hasMoreElements()) {
       Monitor monitor = (Monitor) enumeration.nextElement();
       if (itemFilter.itemAllowed(monitor.getFullID()) && itemFilter.monitorAllowed(monitor)) {
         if (debug) {
           Monitor _tmp = monitor;
           TextUtils.debugPrint("process monitor: " + monitor.getProperty(Monitor.pName));
         }
         processMonitor(monitor, monitorgroup, portalsiteview);
       }
     }
   }
   visitor.groupPost(monitorgroup, portalsiteview);
 }
예제 #3
0
 public void runQuery() {
   boolean flag = visitor.enterprisePre();
   if (flag) {
     Array array = getServers();
     PortalSiteView portalsiteview;
     for (Enumeration enumeration = array.elements();
         enumeration.hasMoreElements();
         processSiteView(portalsiteview)) {
       portalsiteview = (PortalSiteView) enumeration.nextElement();
       if (debug) {
         PortalSiteView _tmp = portalsiteview;
         TextUtils.debugPrint(
             "process siteview: " + portalsiteview.getProperty(PortalSiteView.pTitle));
       }
     }
   }
   visitor.enterprisePost();
 }