예제 #1
0
 Set<Dependency> getDependenciesBetweenProjects() {
   Set<Dependency> result = Sets.newLinkedHashSet();
   for (Dependency dependency : dependencies) {
     if (ResourceUtils.isSet(dependency.getFrom()) || ResourceUtils.isSet(dependency.getTo())) {
       result.add(dependency);
     }
   }
   return result;
 }
예제 #2
0
  boolean registerDependency(Dependency dependency) {
    Bucket fromBucket = doIndex(dependency.getFrom());
    Bucket toBucket = doIndex(dependency.getTo());

    if (fromBucket != null && toBucket != null) {
      dependencies.add(dependency);
      registerOutgoingDependency(dependency);
      registerIncomingDependency(dependency);
      return true;
    }
    return false;
  }