public void addNetwork(String networkUUID, OpenDoveNetwork network) {
   networkMap.putIfAbsent(networkUUID, network);
   IfOpenDoveDomainCRUD sbInterface = OpenDoveCRUDInterfaces.getIfDoveDomainCRU(this);
   if (sbInterface != null) {
     sbInterface.addNetworkToDomain(network.getDomain_uuid(), network);
   }
 }
 public List<OpenDoveDomain> getDomains() {
   List<OpenDoveDomain> answer = new ArrayList<OpenDoveDomain>();
   Iterator<OpenDoveObject> i = domainMap.values().iterator();
   while (i.hasNext()) {
     answer.add((OpenDoveDomain) i.next());
   }
   return answer;
 }
 public List<OpenDoveSwitch> getSwitches() {
   List<OpenDoveSwitch> answer = new ArrayList<OpenDoveSwitch>();
   Iterator<OpenDoveObject> i = switchMap.values().iterator();
   while (i.hasNext()) {
     answer.add((OpenDoveSwitch) i.next());
   }
   return answer;
 }
 public List<OpenDoveVGWVNIDMapping> getVgwVNIDMappings() {
   List<OpenDoveVGWVNIDMapping> answer = new ArrayList<OpenDoveVGWVNIDMapping>();
   Iterator<OpenDoveObject> i = vgwVNIDMap.values().iterator();
   while (i.hasNext()) {
     answer.add((OpenDoveVGWVNIDMapping) i.next());
   }
   return answer;
 }
 public List<OpenDoveNetwork> getNetworks() {
   List<OpenDoveNetwork> answer = new ArrayList<OpenDoveNetwork>();
   Iterator<OpenDoveObject> i = networkMap.values().iterator();
   while (i.hasNext()) {
     answer.add((OpenDoveNetwork) i.next());
   }
   return answer;
 }
 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 void deleteServiceAppliance(String saUUID) {
   if (doveServiceApplianceDB.containsKey(saUUID)) {
     OpenDoveServiceAppliance target = doveServiceApplianceDB.remove(saUUID);
     for (OpenDoveObject o : networkMap.values()) {
       OpenDoveNetwork network = (OpenDoveNetwork) o;
       network.removeEGW(target);
     }
   }
 }
 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 OpenDoveNetwork getNetworkByName(String name) {
   Iterator<OpenDoveObject> i = networkMap.values().iterator();
   while (i.hasNext()) {
     OpenDoveNetwork n = (OpenDoveNetwork) i.next();
     if (n.getName().equals(name)) {
       return n;
     }
   }
   return null;
 }
 public OpenDoveNetwork getNetworkByVnid(int vnid) {
   Iterator<OpenDoveObject> i = networkMap.values().iterator();
   while (i.hasNext()) {
     OpenDoveNetwork n = (OpenDoveNetwork) i.next();
     if (n.getVnid() == vnid) {
       return n;
     }
   }
   return null;
 }
 public boolean networkExistsByVnid(int vnid) {
   Iterator<OpenDoveObject> i = networkMap.values().iterator();
   while (i.hasNext()) {
     OpenDoveNetwork n = (OpenDoveNetwork) i.next();
     if (n.getVnid() == vnid) {
       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 void removeSwitch(String switchUUID) {
   switchMap.remove(switchUUID);
 }
 public void addNetworkToDomain(String domainUUID, OpenDoveNetwork network) {
   if (domainExists(domainUUID)) {
     OpenDoveDomain domain = (OpenDoveDomain) domainMap.get(domainUUID);
     domain.addNetwork(network);
   }
 }
 public void updateSwitch(String switchUUID, OpenDoveSwitch delta) {
   OpenDoveSwitch target = (OpenDoveSwitch) switchMap.get(switchUUID);
   if (target.overwrite(delta)) {
     switchMap.update(switchUUID, target);
   }
 }
 public void addSwitch(String switchUUID, OpenDoveSwitch oSwitch) {
   switchMap.putIfAbsent(switchUUID, oSwitch);
 }
 public boolean networkExists(String networkUUID) {
   return (networkMap.containsKey(networkUUID));
 }
 public void removeVgwVNIDMapping(String mappingUUID) {
   vgwVNIDMap.remove(mappingUUID);
 }
 public void addVgwVNIDMapping(String mappingUUID, OpenDoveVGWVNIDMapping mapping) {
   vgwVNIDMap.putIfAbsent(mappingUUID, mapping);
 }
 public void removeNetwork(String networkUUID) {
   networkMap.remove(networkUUID);
 }
 public void removeDomain(String domainUUID) {
   domainMap.remove(domainUUID);
 }
 public OpenDoveNetwork getNetwork(String networkUUID) {
   return (OpenDoveNetwork) (networkMap.get(networkUUID));
 }
 public boolean vgwVNIDMappingExists(String mappingUUID) {
   return (vgwVNIDMap.containsKey(mappingUUID));
 }
 public OpenDoveVGWVNIDMapping getVgwVNIDMapping(String mappingUUID) {
   return (OpenDoveVGWVNIDMapping) (vgwVNIDMap.get(mappingUUID));
 }
 public void updateNetwork(String networkUUID) {
   networkMap.update(networkUUID, networkMap.get(networkUUID));
 }
 public boolean switchExists(String switchUUID) {
   return (switchMap.containsKey(switchUUID));
 }
 public OpenDoveSwitch getSwitch(String switchUUID) {
   return (OpenDoveSwitch) (switchMap.get(switchUUID));
 }
 public void updateRule(String mappingUUID, OpenDoveVGWVNIDMapping delta) {
   OpenDoveVGWVNIDMapping target = (OpenDoveVGWVNIDMapping) vgwVNIDMap.get(mappingUUID);
   if (target.overwrite(delta)) {
     vgwVNIDMap.update(mappingUUID, target);
   }
 }
 public void updateDomain(String domainUUID, OpenDoveDomain domain) {
   domainMap.update(domainUUID, domain);
 }