Package com.ibm.sbt.services.endpoints

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


      pushProperty(context,env,"sbt.endpoint.twitter");
      pushProperty(context,env,"sbt.endpoint.dropbox");
     
    // Override the beans with the environment definition
    {
      ConnectionsBasicEndpoint ep = (ConnectionsBasicEndpoint)ManagedBeanUtil.getBean(context, "connectionsBasic");
      if(ep!=null) {
        if(env.hasRuntime("connections")) {
          ep.setUrl(env.getField("Con_URL"));
        } else {
          ep.setUrl(null);
        }
      }
    }
    {
      ConnectionsOAuth2Endpoint ep = (ConnectionsOAuth2Endpoint)ManagedBeanUtil.getBean(context, "connectionsOA2");
      if(ep!=null) {
        if(env.hasRuntime("connections")) {
          ep.setUrl(env.getField("Con_URL"));
          ep.setConsumerKey(env.getField("Con_OA2_ConsumerKey"));
          ep.setConsumerSecret(env.getField("Con_OA2_ConsumerSecret"));
          ep.setAuthorizationURL(env.getField("Con_OA2_AuthorizationURL"));
          ep.setAccessTokenURL(env.getField("Con_OA2_AccessTokenURL"));
        } else {
          ep.setUrl(null);
        }
      }
    }
    {
      SmartCloudBasicEndpoint ep = (SmartCloudBasicEndpoint)ManagedBeanUtil.getBean(context, "smartcloudBasic");
      if(ep!=null) {
        if(env.hasRuntime("smartcloud")) {
          ep.setUrl(env.getField("Sma_URL"));
        } else {
          ep.setUrl(null);
        }
      }
    }
    {
      SmartCloudFormEndpoint ep = (SmartCloudFormEndpoint)ManagedBeanUtil.getBean(context, "smartcloudForm");
      if(ep!=null) {
        if(env.hasRuntime("smartcloud")) {
          ep.setUrl(env.getField("Sma_URL"));
        } else {
          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


  public void createFileService() {
    String url = System.getProperty("url");
    String user = System.getProperty("user");
    String password = System.getProperty("password");
    if (StringUtil.isNotEmpty(url) && StringUtil.isNotEmpty(user) && StringUtil.isNotEmpty(password)) {
      BasicEndpoint endpoint = new ConnectionsBasicEndpoint();
      endpoint.setUrl(url);
      endpoint.setUser(user);
      endpoint.setPassword(password);
      endpoint.setForceTrustSSLCertificate(true);
     
      fileService = new FileService(endpoint);
      communityService = new CommunityService(endpoint);
    } else {
      fileService = new FileService();
View Full Code Here

        this.communityService = new CommunityService();
        this.communityService.setEndpoint(createEndpoint(url, user, password));
    }
   
    private BasicEndpoint createEndpoint(String url, String user, String password) {
      BasicEndpoint endpoint = new ConnectionsBasicEndpoint();
      endpoint.setUrl(url);
      endpoint.setUser(user);
      endpoint.setPassword(password);
      endpoint.setForceTrustSSLCertificate(true);
      return endpoint;
    }
View Full Code Here

 
  /*
   *
   */
  private BasicEndpoint createBasicEndpoint(String url, String user, String password) {
    ConnectionsBasicEndpoint basicEndpoint = new ConnectionsBasicEndpoint();
    basicEndpoint.setUrl(url);
    basicEndpoint.setUser(user);
    basicEndpoint.setPassword(password);
    basicEndpoint.setForceTrustSSLCertificate(true);
    return basicEndpoint;
  }
View Full Code Here

    public void setHomepageHandle(String blogHandle){
      this.blogService.setHomepageHandle(blogHandle);
    }
   
    private BasicEndpoint createEndpoint(String url, String user, String password) {
      BasicEndpoint endpoint = new ConnectionsBasicEndpoint();
      endpoint.setUrl(url);
      endpoint.setUser(user);
      endpoint.setPassword(password);
      endpoint.setForceTrustSSLCertificate(true);
      return endpoint;
    }
View Full Code Here

TOP

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

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.