Exemplo n.º 1
0
 public static String getFullMachineID(AtomicMonitor atomicmonitor, String s) {
   String s1 = atomicmonitor.getFullID();
   SiteViewObject siteviewobject = Portal.getSiteViewForID(s1);
   if (siteviewobject instanceof PortalSiteView) {
     s = s + "@" + Portal.getServerID(s1) + ":";
   }
   return s;
 }
Exemplo n.º 2
0
 /** @return */
 public Array getServers() {
   Array array = new Array();
   Enumeration enumeration = Portal.getPortal().getElements();
   while (enumeration.hasMoreElements()) {
     PortalSiteView portalsiteview = (PortalSiteView) enumeration.nextElement();
     if (itemFilter.itemAllowed(portalsiteview.getFullID())) {
       array.add(portalsiteview);
     }
   }
   return array;
 }
Exemplo n.º 3
0
 public static Portal getPortal() {
   if (portal == null) {
     portal = new Portal();
     portal.checkConfiguration = new DetectPortalChange();
     SiteViewGroup siteviewgroup = SiteViewGroup.currentSiteView();
     portal.checkConfiguration.execute();
     int i = siteviewgroup.getSettingAsLong("_fileCheckFrequency", 120) * 1000;
     if (siteviewgroup.maintenanceScheduler != null) {
       siteviewgroup.maintenanceScheduler.scheduleRepeatedPeriodicAction(
           portal.checkConfiguration, i);
     }
   }
   return portal;
 }
Exemplo n.º 4
0
 public String verify(
     StringProperty stringproperty, String s, HTTPRequest httprequest, HashMap hashmap) {
   String s1 = super.verify(stringproperty, s, httprequest, hashmap);
   if (stringproperty == pMachineName) {
     String s2 = getFullID();
     SiteViewObject siteviewobject = Portal.getSiteViewForID(s2);
     if (siteviewobject instanceof PortalSiteView) {
       PortalSiteView portalsiteview = (PortalSiteView) siteviewobject;
       HashMap hashmap1 = portalsiteview.getMasterConfig();
       if (!s.equals(TextUtils.getValue(hashmap1, "_defaultMachine"))) {
         hashmap1.put("_defaultMachine", s);
         portalsiteview.saveMasterConfig();
       }
     } else if (siteviewobject instanceof SiteViewGroup) {
       SiteViewGroup siteviewgroup = SiteViewGroup.currentSiteView();
       if (!s.equals(siteviewgroup.getProperty("_defaultMachine"))) {
         siteviewgroup.setProperty("_defaultMachine", s);
         siteviewgroup.saveSettings();
       }
     }
   }
   return s1;
 }