Beispiel #1
0
 /**
  * Returns all {@link de.xirp.profile.Sensorgroup sensor groups} for the given plugin main class.
  *
  * @param pluginMainClass The main class of the plugin.
  * @return An unmodifiable list with the sensor groups
  * @see de.xirp.profile.Sensorgroup
  */
 public List<Sensorgroup> getSensorgroups(String pluginMainClass) {
   List<Plugin> lst = getPlugins(pluginMainClass);
   List<Sensorgroup> displays = new ArrayList<Sensorgroup>();
   for (Plugin plugin : lst) {
     List<String> sensornames = plugin.getSensornames();
     for (Sensorgroup sensor : getSensorgroups()) {
       if (sensornames.contains(sensor.getLongName())) {
         displays.add(sensor);
       }
     }
   }
   return Collections.unmodifiableList(displays);
 }
Beispiel #2
0
 /**
  * Returns all {@link de.xirp.profile.Sensorgroup sensor groups} for the given plugin main class
  * and identifier.
  *
  * @param pluginMainClass The main class of the plugin.
  * @param identifier The identifier of the plugin.
  * @return A unmodifiable list with the sensor groups.
  * @see de.xirp.profile.Sensorgroup
  */
 public List<Sensorgroup> getSensorgroups(String pluginMainClass, String identifier) {
   List<Plugin> lst = getPlugins(pluginMainClass);
   List<Sensorgroup> displays = new ArrayList<Sensorgroup>();
   for (Plugin plugin : lst) {
     String id = plugin.getUniqueIdentifier();
     if (id == identifier || (id != null && id.equals(identifier))) {
       List<String> sensornames = plugin.getSensornames();
       for (Sensorgroup sensor : getSensorgroups()) {
         if (sensornames.contains(sensor.getLongName())) {
           displays.add(sensor);
         }
       }
     }
   }
   return Collections.unmodifiableList(displays);
 }