コード例 #1
0
  public void deleteRemoteNexusInstance(String alias) throws IOException {
    List<CRemoteNexusInstance> knownInstances = getConfigurationModel().getRemoteNexusInstances();

    for (Iterator<CRemoteNexusInstance> i = knownInstances.iterator(); i.hasNext(); ) {
      CRemoteNexusInstance nexusInstance = i.next();

      if (nexusInstance.getAlias().equals(alias)) {
        i.remove();
      }
    }

    applyAndSaveConfiguration();
  }
コード例 #2
0
  public CRemoteNexusInstance readRemoteNexusInstance(String alias) throws IOException {
    List<CRemoteNexusInstance> knownInstances = getConfigurationModel().getRemoteNexusInstances();

    for (Iterator<CRemoteNexusInstance> i = knownInstances.iterator(); i.hasNext(); ) {
      CRemoteNexusInstance nexusInstance = i.next();

      if (nexusInstance.getAlias().equals(alias)) {
        return nexusInstance;
      }
    }

    return null;
  }