code: public Plugin[] getPlugins(Boolean onlyValid) {
          Configuration[] configurations = ConfigurationService.getInstance().getConfigurations(Constants.DB_TABLE_CONFIGURATION_PLUGIN_PATH);
  
          ArrayList<Plugin> plugins = new ArrayList<Plugin>();
  
          if (configurations == null) {
              return new Plugin[0];
          }
  
          for (Configuration config : configurations) {
              Plugin plugin = new Plugin();
              plugin.setId(config.getId());
              plugin.setPath(config.getValue());
  
              File path = new File(plugin.getPath());
              if (path.isDirectory()) {
                  plugin.setStatus(Constants.PLUGIN_STATUS_VALID);
                  plugin.setStatusMessage("Valid");
              } else {
                  plugin.setStatus(Constants.PLUGIN_STATUS_NOT_DIRECTORY);
                  plugin.setStatusMessage("Path is not a directory");
              }
  
              if (!onlyValid || plugin.getStatus() == Constants.PLUGIN_STATUS_VALID) {
                  plugins.add(plugin);
              }
          }
  
          return plugins.toArray(new Plugin[0]);
      }
docs: Returns the data about all of the plugins that are set
  
  @param onlyValid True to get only valid plugins, False for all
  @return array of Plugins set