private Set<IEmbeddableCartridge> getDependants(EmbeddableCartridgeRelations relation) {
   Set<IEmbeddableCartridge> dependants = dependantsByCartridge.get(relation.getRequired());
   if (dependants == null) {
     dependantsByCartridge.put(
         relation.getRequired(), dependants = new HashSet<IEmbeddableCartridge>());
   }
   return dependants;
 }
 protected void createDependants(
     Collection<IEmbeddableCartridge> allEmbeddableCartridges,
     EmbeddableCartridgeRelations dependency) {
   Set<IEmbeddableCartridge> dependants =
       dependantsByCartridge.get(dependency.getRequired(allEmbeddableCartridges));
   if (dependants == null) {
     IEmbeddableCartridge dependantCartridge = dependency.getRequired(allEmbeddableCartridges);
     if (dependantCartridge != null) {
       dependantsByCartridge.put(
           dependantCartridge, dependants = new HashSet<IEmbeddableCartridge>());
     }
   }
   if (dependants != null) {
     dependants.add(dependency.getSubject(allEmbeddableCartridges));
   }
 }
 private void add(
     IEmbeddableCartridge cartridge,
     Set<IEmbeddableCartridge> currentCartridges,
     EmbeddableCartridgeDiff diff)
     throws OpenShiftException {
   EmbeddableCartridgeRelations relation = dependenciesByCartridge.get(cartridge);
   if (relation == null) {
     return;
   }
   removeConflicting(currentCartridges, diff, relation);
   addRequired(currentCartridges, diff, relation.getRequired());
   addRequiredApplication(diff, relation);
 }
 private void add(
     IEmbeddableCartridge cartridge,
     Set<IEmbeddableCartridge> currentCartridges,
     EmbeddableCartridgeDiff diff,
     Collection<IEmbeddableCartridge> allEmbeddableCartridges,
     Collection<IStandaloneCartridge> allStandaloneCartridges,
     Collection<IApplication> allApplications)
     throws OpenShiftException {
   EmbeddableCartridgeRelations relation = dependenciesByCartridge.get(cartridge);
   if (relation == null) {
     return;
   }
   removeConflicting(currentCartridges, diff, relation, allEmbeddableCartridges);
   addRequired(
       currentCartridges,
       diff,
       relation.getRequired(allEmbeddableCartridges),
       allEmbeddableCartridges);
   addRequiredApplication(diff, relation, allStandaloneCartridges, allApplications);
 }