Package org.wso2.carbon.billing.core

Examples of org.wso2.carbon.billing.core.BillingException


        try {
            return Class.forName(className).newInstance();
        } catch (ClassNotFoundException e) {
            String msg = "The class: " + className + " is not in the classpath.";
            log.error(msg, e);
            throw new BillingException(msg, e);
        } catch (Exception e) {
            String msg = "Error in initializing the object for " + className + ".";
            log.error(msg);
            throw new BillingException(msg, e);
        }
    }
View Full Code Here


            OMElement billingConfig = buildOMElement(new FileInputStream(billingConfigFile));
            deserialize(billingConfig);
        } catch (FileNotFoundException e) {
            String msg = "Unable to find the file: " + billingConfigFile;
            log.error(msg, e);
            throw new BillingException(msg, e);
        }
    }
View Full Code Here

        try {
            parser = XMLInputFactory.newInstance().createXMLStreamReader(inputStream);
        } catch (XMLStreamException e) {
            String msg = "Error in initializing the parser to build the OMElement.";
            log.error(msg, e);
            throw new BillingException(msg, e);
        }

        StAXOMBuilder builder = new StAXOMBuilder(parser);
        return builder.getDocumentElement();
    }
View Full Code Here

                    billingTaskConfigs.put(id, taskConfig);
                }
            } else {
                String msg = "Unknown element in Billing Configuration";
                log.error(msg);
                throw new BillingException(msg);
            }
        }
    }
View Full Code Here

                    .equals(dbConfigChildEle.getQName())) {
                dataSource.setValidationQuery(dbConfigChildEle.getText());
            } else {
                String msg = "Unknown element in DBConfig of Billing Configuration";
                log.error(msg);
                throw new BillingException(msg);
            }
        }
    }
View Full Code Here

            //customer.setAddress(); //we dont have the address
        }catch (Exception e){
            String msg = "Failed to fill the data for customer: " +
                    customer.getId() + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);
        }
    }
View Full Code Here

                //customer.setAddress();
            }
        } catch (Exception e){
            String msg = "Failed to get customer for customer id: " + customerId + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);
        }

        return customer;
    }
View Full Code Here

        try{
            tenantId = tenantManager.getTenantId(customerName);
        }catch (Exception e){
            String msg = "Failed to get tenant for domain: " + customerName + ".";
            log.error(msg, e);
            throw new BillingException(msg, e);
        }

        return tenantId;
    }
View Full Code Here

                }
            }
        } catch (Exception e){
            String msg = "Failed to get all the customers.";
            log.error(msg, e);
            throw new BillingException(msg, e);
        }

        return customers;
    }
View Full Code Here

     * @return The end line number, or -1 if could not be determined
     */
    public int getEndLineNumber() {
      int ret=-1;
     
      ActivityInterface parent=getParent();
     
      if (parent != null) {
        int index=parent.getSubActivities().indexOf(this);
       
        if (index != -1) {
          if (index < (parent.getSubActivities().size()-1)) {
            ActivityInterface other=parent.getSubActivities().get(index+1);
           
            ret = other.getStartLineNumber()-1;
          } else {
            ret = parent.getEndLineNumber();
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.billing.core.BillingException

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.