Example #1
0
 private void detectMode(String service, String attribute) {
   try {
     ServiceSchema schema = schemaManager.getGlobalSchema();
     Map defaults = schema.getAttributeDefaults();
     enabled = Boolean.parseBoolean(CollectionHelper.getMapAttr(defaults, attribute, ""));
     if (listenerId == null) {
       listenerId = schemaManager.addListener(this);
     }
   } catch (SMSException e) {
     DEBUG.error("Could not get " + service, e);
     throw new IllegalStateException("Could not get " + service, e);
   }
 }