Package org.apache.airavata.registry.api

Examples of org.apache.airavata.registry.api.Gateway


    @Path(ResourcePathConstants.BasicRegistryConstants.GET_GATEWAY)
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response getGateway() {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            Gateway gateway = airavataRegistry.getGateway();
            if (gateway != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(gateway);
                return builder.build();
            } else {
View Full Code Here


                                  @FormParam("submittedDate") String submittedDate) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            AiravataExperiment experiment = new AiravataExperiment();
            experiment.setExperimentId(experimentID);
            Gateway gateway = airavataRegistry.getGateway();
            AiravataUser airavataUser = airavataRegistry.getAiravataUser();
            experiment.setGateway(gateway);
            experiment.setUser(airavataUser);
            DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            Date formattedDate = dateFormat.parse(submittedDate);
View Full Code Here

  }

  public static AiravataRegistry2 getRegistry(URI registryURI,
      String gateway, String username, PasswordCallback callback)
      throws RegistryException, AiravataConfigurationException {
    return AiravataRegistryFactory.getRegistry(registryURI, new Gateway(
        gateway), new AiravataUser(username), callback);
  }
View Full Code Here

    public static AiravataRegistry2 acquireRegistry(ServletContext context) {
        AiravataRegistry2 airavataRegistry=null;
        String user =  WorkflowContext.getRequestUser();
        String gatewayId = WorkflowContext.getGatewayId();
        Gateway gateway = new Gateway(gatewayId);
        AiravataUser airavataUser = new AiravataUser(user);
        /*RegistryInstancesPool registryInstancesPool =
                (RegistryInstancesPool) context.getAttribute(RestServicesConstants.AIRAVATA_REGISTRY_POOL);
        Map<RegIdentifier,AiravataRegistry2> registryMap = registryInstancesPool.getRegistryInstancesList();
        boolean foundReg=false;*/
 
View Full Code Here

        try {
          AiravataUtils.setExecutionAsServer();
            ServletContext servletContext = servletContextEvent.getServletContext();
            String gatewayID = ServerSettings.getDefaultGatewayId();
            String user = ServerSettings.getSystemUser();
            Gateway gateway =  new Gateway(gatewayID);

            servletContext.setAttribute(RestServicesConstants.GATEWAY, gateway);
            servletContext.setAttribute(RestServicesConstants.AIRAVATA_USER, user);
            servletContext.setAttribute(
                    RestServicesConstants.AIRAVATA_REGISTRY_POOL,new RegistryInstancesPool(100));
View Full Code Here

//        } catch (IOException e) {
//            e.printStackTrace();
//        }
        try {
          username=ServerSettings.getSystemUser();
            registry = AiravataRegistryFactory.getRegistry(new Gateway(ServerSettings.getDefaultGatewayId()),
                    new AiravataUser(username));
        } catch (AiravataConfigurationException e) {
            log.error("Error initializing AiravataRegistry2");
        } catch (RegistryAccessorNotFoundException e) {
            log.error("Error initializing AiravataRegistry2");
View Full Code Here

  }

  public static AiravataRegistry2 getRegistry(URI registryURI,
      String gateway, String username, PasswordCallback callback)
      throws RegistryException, AiravataConfigurationException {
    return AiravataRegistryFactory.getRegistry(registryURI, new Gateway(
        gateway), new AiravataUser(username), callback);
  }
View Full Code Here

  }

  public static AiravataRegistry2 getRegistry(URI registryURI,
      String gateway, String username, PasswordCallback callback)
      throws RegistryException, AiravataConfigurationException {
    return AiravataRegistryFactory.getRegistry(registryURI, new Gateway(
        gateway), new AiravataUser(username), callback);
  }
View Full Code Here

           * Create database
           */
        Map<String,String> config = new HashMap<String,String>();
            config.put("org.apache.jackrabbit.repository.home","target");

        jcrRegistry = AiravataRegistryFactory.getRegistry(new Gateway("default"), new AiravataUser("admin"));

   
        /*
           * Host
           */
 
View Full Code Here

            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        try {
            registry = AiravataRegistryFactory.getRegistry(new Gateway((String) properties.get(GATEWAY_ID)),
                    new AiravataUser(username));
        } catch (AiravataConfigurationException e) {
            log.error("Error initializing AiravataRegistry2");
        } catch (RegistryAccessorNotFoundException e) {
            log.error("Error initializing AiravataRegistry2");
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.Gateway

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.