public OpenDoveDomain getDomainByNumber(String domainID) { for (OpenDoveObject o : domainMap.values()) { OpenDoveDomain domain = (OpenDoveDomain) o; if (domainID.equalsIgnoreCase(domain.getCreateVersion().toString())) { return domain; } } return null; }
public boolean domainExistsByNumber(String domainID) { for (OpenDoveObject o : domainMap.values()) { OpenDoveDomain domain = (OpenDoveDomain) o; if (domainID.equalsIgnoreCase(domain.getCreateVersion().toString())) { return true; } } return false; }
public OpenDoveDomain getDomainByName(String name) { Iterator<OpenDoveObject> i = domainMap.values().iterator(); while (i.hasNext()) { OpenDoveDomain d = (OpenDoveDomain) i.next(); if (d.getName().compareTo(name) == 0) { return d; } } return null; }
public boolean domainExistsByName(String name) { Iterator<OpenDoveObject> i = domainMap.values().iterator(); while (i.hasNext()) { OpenDoveDomain d = (OpenDoveDomain) i.next(); if (d.getName().compareTo(name) == 0) { return true; } } return false; }
public void addNetworkToDomain(String domainUUID, OpenDoveNetwork network) { if (domainExists(domainUUID)) { OpenDoveDomain domain = (OpenDoveDomain) domainMap.get(domainUUID); domain.addNetwork(network); } }