Package org.apache.airavata.registry.api

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


    private AiravataRegistry2 registry;

    public JCRComponentRegistry(String username, String password) throws RegistryException {
        String gatewayName=null;
        AiravataRegistryConnectionDataProvider provider = AiravataRegistryFactory.getRegistryConnectionDataProvider();
    if (provider==null){
          URL configURL = this.getClass().getClassLoader().getResource(REPOSITORY_PROPERTIES);
          if(configURL != null){
            try {
              Properties properties = new Properties();
                properties.load(configURL.openStream());
                if (username==null){
                  if(properties.get(RegistryConstants.KEY_DEFAULT_REGISTRY_USER) != null){
                      username = (String)properties.get(RegistryConstants.KEY_DEFAULT_REGISTRY_USER);
                  }
                }
                gatewayName = (String)properties.get(RegistryConstants.KEY_DEFAULT_GATEWAY_ID);
            } catch (MalformedURLException e) {
                e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
            } catch (IOException e) {
                e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
            }
          }
        }else{
          try {
        if (username==null){
          username=provider.getValue(RegistryConstants.KEY_DEFAULT_REGISTRY_USER).toString();
        }
        gatewayName = provider.getValue(RegistryConstants.KEY_DEFAULT_GATEWAY_ID).toString();
      } catch (Exception e) {
        log.warn(e.getMessage());
      }
        }
        if (username==null){
View Full Code Here

TOP

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

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.