Package com.ibm.sbt.services.endpoints

Examples of com.ibm.sbt.services.endpoints.SmartCloudOAuthEndpoint


  }
 
  static private Endpoint createEndpoint(String user) throws ClientServicesException {
    Endpoint endpoint = getEndpoint("connections");
    if (endpoint instanceof SmartCloudOAuthEndpoint) {
      SmartCloudOAuthEndpoint smartcloud = (SmartCloudOAuthEndpoint)endpoint;
      SmartCloudOAuthEndpoint cloned = new SmartCloudOAuthEndpoint();
      cloned.setApiVersion(smartcloud.getApiVersion());
      cloned.setUrl(smartcloud.getUrl());
      cloned.setForceTrustSSLCertificate(smartcloud.isForceTrustSSLCertificate());
      cloned.setConsumerKey(smartcloud.getConsumerKey());
      cloned.setConsumerSecret(smartcloud.getConsumerSecret());
      cloned.setRequestTokenURL(smartcloud.getRequestTokenURL());
      cloned.setAuthorizationURL(smartcloud.getAuthorizationURL());
      cloned.setAccessTokenURL(smartcloud.getAccessTokenURL());
      cloned.setSignatureMethod(smartcloud.getSignatureMethod());
      cloned.setCredentialStore(smartcloud.getCredentialStore());
      cloned.setServiceName(smartcloud.getServiceName());
      cloned.setAppId(smartcloud.getAppId());
      cloned.setAuthenticationService(smartcloud.getAuthenticationService());
      if (cloned.login(user)) {
        return cloned;
      }
    }
    if (endpoint instanceof ConnectionsOAuth2Endpoint) {
      ConnectionsOAuth2Endpoint connections = (ConnectionsOAuth2Endpoint)endpoint;
      ConnectionsOAuth2Endpoint cloned = new ConnectionsOAuth2Endpoint();
      cloned.setApiVersion(connections.getApiVersion());
      cloned.setUrl(connections.getUrl());
      cloned.setForceTrustSSLCertificate(connections.isForceTrustSSLCertificate());
      cloned.setConsumerKey(connections.getConsumerKey());
      cloned.setConsumerSecret(connections.getConsumerSecret());
      cloned.setAuthorizationURL(connections.getAuthorizationURL());
      cloned.setAccessTokenURL(connections.getAccessTokenURL());
      cloned.setCredentialStore(connections.getCredentialStore());
      cloned.setServiceName(connections.getServiceName());
      cloned.setAppId(connections.getAppId());
      cloned.setAuthenticationService(connections.getAuthenticationService());
      if (cloned.login(user)) {
        return cloned;
      }
    }
   
    return null;
View Full Code Here


          ep.setUrl(null);
        }
      }
    }
    {
      SmartCloudOAuthEndpoint ep = (SmartCloudOAuthEndpoint)ManagedBeanUtil.getBean(context, "smartcloudOA");
      if(ep!=null) {
        if(env.hasRuntime("smartcloud")) {
          ep.setUrl(env.getField("Sma_URL"));
          ep.setConsumerKey(env.getField("Sma_OA_ConsumerKey"));
          ep.setConsumerSecret(env.getField("Sma_OA_ConsumerSecret"));
          ep.setRequestTokenURL(env.getField("Sma_OA_RequestTokenURL"));
          ep.setAuthorizationURL(env.getField("Sma_OA_AuthorizationURL"));
          ep.setAccessTokenURL(env.getField("Sma_OA_AccessTokenURL"));
        } else {
          ep.setUrl(null);
        }
      }
    }
    {
      SmartCloudOAuth2Endpoint ep = (SmartCloudOAuth2Endpoint)ManagedBeanUtil.getBean(context, "smartcloudOA2");
      if(ep!=null) {
        if(env.hasRuntime("smartcloud")) {
          ep.setUrl(env.getField("Sma_URL"));
          ep.setConsumerKey(env.getField("Sma_OA2_ConsumerKey"));
          ep.setConsumerSecret(env.getField("Sma_OA2_ConsumerSecret"));
          ep.setAuthorizationURL(env.getField("Sma_OA2_AuthorizationURL"));
          ep.setAccessTokenURL(env.getField("Sma_OA2_AccessTokenURL"));
        } else {
          ep.setUrl(null);
        }
      }
    }
    {
      DominoBasicEndpoint ep = (DominoBasicEndpoint)ManagedBeanUtil.getBean(context, "dominoBasic");
      if(ep!=null) {
        if(env.hasRuntime("domino")) {
          ep.setUrl(env.getField("Dom_URL"));
        } else {
          ep.setUrl(null);
        }
      }
    }
    {
      SametimeBasicEndpoint ep = (SametimeBasicEndpoint)ManagedBeanUtil.getBean(context, "sametime");
      if(ep!=null) {
        if(env.hasRuntime("sametime")) {
          ep.setUrl(env.getField("St_URL"));
        } else {
          ep.setUrl(null);
        }
      }
    }
    {
      TwitterOAuthEndpoint epd = (TwitterOAuthEndpoint)ManagedBeanUtil.getBean(context, "twitter");
View Full Code Here

TOP

Related Classes of com.ibm.sbt.services.endpoints.SmartCloudOAuthEndpoint

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.