コード例 #1
0
 /* (non-Javadoc)
  * @see eu.planets.test.backend.api.model.mockup.TestbedService#getServiceOperation(java.lang.String)
  */
 public ServiceOperation getServiceOperation(String sName) {
   if (sName != null) {
     if (this.getAllServiceOperationNames().contains(sName)) {
       Iterator<ServiceOperation> it = this.getAllServiceOperations().iterator();
       while (it.hasNext()) {
         ServiceOperation op = it.next();
         if (op.getName().equals(sName)) {
           return op;
         }
       }
     }
   }
   // else
   return null;
 }
コード例 #2
0
 /* (non-Javadoc)
  * @see eu.planets.test.backend.api.model.mockup.TestbedService#removeServiceOperation(java.lang.String)
  */
 public void removeServiceOperation(String sOperationName) {
   if (sOperationName != null) {
     if (this.getAllServiceOperationNames().contains(sOperationName)) {
       Iterator<ServiceOperation> it = this.getAllServiceOperations().iterator();
       boolean bFound = false;
       ServiceOperation opRet = null;
       while (it.hasNext()) {
         ServiceOperation op = it.next();
         if (op.getName().equals(sOperationName)) {
           opRet = op;
           bFound = true;
         }
       }
       if (bFound) {
         this.lAllRegisteredServiceOperations.remove(opRet);
       }
     }
   }
 }