Пример #1
0
 /**
  * This method verifies whether the InstantiatorResource can support any declared service
  * colocation requirements
  *
  * @param sElem The ServiceElement
  * @param ir The InstantiatorResource
  * @return Return true if the provided InstantiatorResource meets service colocation requirements
  */
 static boolean meetsColocationRequirements(ServiceElement sElem, InstantiatorResource ir) {
   boolean provisionable = true;
   AssociationDescriptor[] aDescs = sElem.getAssociationDescriptors();
   for (AssociationDescriptor aDesc : aDescs) {
     boolean ok = false;
     if (aDesc.getAssociationType() == AssociationType.COLOCATED) {
       if (matches(aDesc, ir.getServiceElements())) {
         break;
       }
     } else {
       ok = true;
     }
     if (!ok) {
       provisionable = false;
       break;
     }
   }
   return (provisionable);
 }