Пример #1
0
 public boolean hasSoftwareUnit(String softwareUnitName) {
   boolean hasSoftwareUnit = false;
   for (SoftwareUnitDefinition unit : mappedSUunits) {
     if (unit.getName().equals(softwareUnitName)) {
       hasSoftwareUnit = true;
     }
   }
   for (Module mod : subModules) {
     if (mod.hasSoftwareUnit(softwareUnitName)) {
       hasSoftwareUnit = true;
     }
   }
   return hasSoftwareUnit;
 }
Пример #2
0
 public SoftwareUnitDefinition getSoftwareUnitByName(String softwareUnitName) {
   SoftwareUnitDefinition softwareUnit = null;
   for (SoftwareUnitDefinition unit : mappedSUunits) {
     if (unit.getName().equals(softwareUnitName)) {
       softwareUnit = unit;
     }
   }
   for (Module mod : subModules) {
     if (mod.hasSoftwareUnit(softwareUnitName)) {
       softwareUnit = getSoftwareUnitByName(softwareUnitName);
     }
   }
   if (softwareUnit == null) {
     throw new RuntimeException("This Software Unit does not exist!");
   }
   return softwareUnit;
 }