Package com.ibm.sbt.util

Examples of com.ibm.sbt.util.SBTException


 
  @Override
  public void checkValid() throws SBTException {
    super.checkValid();
    if (StringUtil.isEmpty(oAuthHandler.getConsumerKey())) {
      throw new SBTException(null, "The Endpoint consumer key is empty for {0}", getClass());
    }
    if (StringUtil.isEmpty(oAuthHandler.getConsumerSecret())) {
      throw new SBTException(null, "The Endpoint consumer secret is empty for {0}", getClass());
    }
    if (StringUtil.isEmpty(oAuthHandler.getAuthorizationURL())) {
      throw new SBTException(null, "The Endpoint authorization URL is empty for {0}", getClass());
    }
    if (StringUtil.isEmpty(oAuthHandler.getRequestTokenURL())) {
      throw new SBTException(null, "The Endpoint request token URL is empty for {0}", getClass());
    }
    if (StringUtil.isEmpty(oAuthHandler.getAccessTokenURL())) {
      throw new SBTException(null, "The Endpoint access token URL is empty for {0}", getClass());
    }
  }
View Full Code Here


    }
   
    @Override
  public void checkValid() throws SBTException {
      if(StringUtil.isEmpty(getUrl())) {
        throw new SBTException(null,"The Endpoint url is empty for {0}",getClass());
      }
    }
View Full Code Here

  @Override
  public void checkValid() throws SBTException {
    super.checkValid();
    // Looks OK with C4?
    if (StringUtil.isEmpty(oAuthHandler.getConsumerKey())) {
      throw new SBTException(null, "The Endpoint consumer key is empty for {0}", getClass());
    }
    if (StringUtil.isEmpty(oAuthHandler.getConsumerSecret())) {
      throw new SBTException(null, "The Endpoint consumer secret is empty for {0}", getClass());
    }
    if (StringUtil.isEmpty(oAuthHandler.getAccessTokenURL())) {
      throw new SBTException(null, "The Endpoint access token URL is empty for {0}", getClass());
    }
    if (StringUtil.isEmpty(oAuthHandler.getAuthorizationURL())) {
      throw new SBTException(null, "The Endpoint authorization URL is empty for {0}", getClass());
    }
  }
View Full Code Here

        Endpoint e = getEndpointUnchecked(name,defaultName);
        if(e==null) {
            if(StringUtil.isEmpty(name)) {
                name = defaultName;
            }
            throw new SBTException(null,"Cannot find Endpoint {0}",name);
        }
        return e;
    }
View Full Code Here

        if(StringUtil.isEmpty(name)) {
            name = defaultName;
        }
        // Look for a global property setting the default server, if the parameter is empty
        if(StringUtil.isEmpty(name)) {
            throw new SBTException(null,"The name of the endpoint is empty");
        }
       
        // Look for a property defining the bean associated to this server
        Context context = Context.get();
        String beanName = context.getProperty(SERVERPROP_PREFIX+name, null);
        if(StringUtil.isEmpty(beanName)) {
            beanName = SERVERBEAN_PREFIX+name;
        }
           
        // Look for a bean and/or class
        Object o = context.getBean(beanName);
        if(o!=null) {
            if(!(o instanceof Endpoint)) {
                throw new SBTException(null,"Invalid ServerBean implementation for bean {0} is instance of {1}",beanName,o.getClass());
            }
            else{
              ((AbstractEndpoint)o).setName(beanName);
            }
            return (Endpoint)o;
View Full Code Here

TOP

Related Classes of com.ibm.sbt.util.SBTException

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.