Package edu.indiana.extreme.gfac.utils

Examples of edu.indiana.extreme.gfac.utils.GfacException


  public void removeObject(RegistryService regService, String applicationName) throws GfacException {
    String [] splitNames = applicationName.split("#");
    if(splitNames != null && splitNames.length == 2){
      regService.removeAppDesc(splitNames[0], splitNames[1]);
      }else{
      throw new GfacException("Input is wrong. Send Application Name and Host Name concat by #",FaultCode.InvaliedLocalArgumnet);
    }
 
  }
View Full Code Here


    }
    try {
      SchemaValidator validator = new SchemaValidator(appType);
      validator.validate();
    } catch (GFacSchemaException e) {
       throw new GfacException(e,FaultCode.SchemaValidationError);
    }
    return appDescDoc.xmlText();
  }
View Full Code Here

    }
    try {
      SchemaValidator validator = new SchemaValidator(appType);
      validator.validate();
    } catch (GFacSchemaException e) {
       throw new GfacException(e,FaultCode.SchemaValidationError);
    }
    return appDescDoc;
  }
View Full Code Here

  }
  public void load() throws GfacException{
    try {
      createRegistryService(registryUrl, gssCredential);
    } catch (Exception e) {
      throw new GfacException("Error creating registry connection", FaultCode.InitalizationError);
    }
 
   
  }
View Full Code Here

      XregistryServiceWrapper xregistryServiceWrapper = (XregistryServiceWrapper) super
          .getContext().getRegService();
      return xregistryServiceWrapper.getCapability(resourceID, null,
          false, null);
    } else {
      throw new GfacException(
          "Capabilities are only avalible with xregistry",
          FaultCode.InvaliedLocalArgumnet);
    }
  }
View Full Code Here

   System.out.println("actorsToAddStr ="+actorsToAddStr);
   System.out.println("actorsToRemoveStr ="+actorsToRemoveStr);
             
   if(actorsToAddStr != null){
   if(resourceID == null){
   throw new
   GfacException("When capability update info is provided, resourceID must not be null",FaultCode.InvaliedLocalArgumnet);
   }
                 
   List<Capability> actorsToAdd = new ArrayList<Capability>();
                 
   String[] actorsToAddRaw = actorsToAddStr.split(ACTOR_SEPERATOR);
   for(String raw:actorsToAddRaw){
   if(raw != null && raw.trim().length() > 0){
   String[] data = raw.split(ACTOR_FILED_SEPERATOR);
   actorsToAdd.add(new Capability(data[0], data[1]));
   }
   }
 
   if(actorsToRemoveStr != null){
   String[] actorsToRemoveRaw = actorsToRemoveStr.split(ACTOR_SEPERATOR);
   for(String actor:actorsToRemoveRaw){
   if(actor != null && actor.trim().length() > 0){
   if(!hasCapabilityWithName(actorsToAdd,actor)){
   xregistryServiceWrapper.removeCapability(resourceID, actor);
   }else{
   removeCapabilitybyName(actorsToAdd, actor);
   }
   }
   }
   }
                 
   for(Capability capability:actorsToAdd){
   xregistryServiceWrapper.addCapability(resourceID, capability.actor,
   capability.isUser, capability.action);
   }
   return "Capability updated for resource "+resourceID;
   }else{
   return null;
   }
   } else {
   throw new
   GfacException("Capabilities are only avalible with xregistry",FaultCode.InvaliedLocalArgumnet);
   }
   }
View Full Code Here

            case AppDesc:
              String [] splitNames = objectName.split("#");
            if(splitNames != null && splitNames.length == 2){
              resultsAsStr.append(context.getRegService().getAppDesc(splitNames[0], splitNames[1]));
            }else{
              throw new GfacException("Input is wrong. Send Application Name and Host Name concat by #",FaultCode.InvaliedLocalArgumnet);
            }
                break;
            case ServiceDesc:
              resultsAsStr.append(context.getRegService().getServiceMap(objectName));
                break;
View Full Code Here

      String hostDescStr) throws GfacException {
    try {
      regService.registerHostDesc(hostDescStr);
    } catch (Exception e) {
      String errormessage = new GfacGUIException(e).getMessage();
      throw new GfacException(errormessage, FaultCode.LocalError);
    }
  }
View Full Code Here

    if (hostDescStr != null) {
      HostDescriptionType hostDescriptionType = GfacUtils
          .parseHostDescirption(hostDescStr);
      return new HostBean(hostDescriptionType);
    } else {
      throw new GfacException("Host of name " + hostName
          + " does not exist", FaultCode.InvaliedLocalArgumnet);
    }
  }
View Full Code Here

  }
  public MethodBean(String methodName, String methodDescription,
      boolean stageOutputDataFiles, boolean forceFileStagingToWorkDir,
      boolean useLEADNameListFile, boolean useLEADNameListPropertiesFile) throws GfacException {
    if (methodName == null || methodName.trim().length() == 0) {
      throw new GfacException("Method Name can't be Null",
          FaultCode.InvaliedLocalArgumnet);
    }

    this.methodName = methodName;
    this.methodDescription = methodDescription;
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.gfac.utils.GfacException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.