public long getCustomer(String msn) { try { MethodReturnTypeObj returnObj = orBinding.getCustomer(msn, -1, null); if (returnObj != null && returnObj.getReturnCode() == 0) { return returnObj.getClientID(); } else { return -1; } } catch (RemoteException e) { logging.Utils.writeLog(logging.Utils.logLevel.FATAL, e.getMessage(), e); } return -1; }
public Boolean createAlias(String msn, int custId, String alias) { try { MethodReturnTypeObj returnObj = orBinding.createAlias(msn, custId, alias, "*", null, null, null); if (returnObj.getReturnCode() == 0) { return true; } else { return true; } } catch (RemoteException e) { logging.Utils.writeLog(logging.Utils.logLevel.FATAL, e.getMessage(), e); } return false; }
public Boolean createProduct(int custId, String productId, String alias) { try { MethodReturnTypeObj returnObj = orBinding.createProduct(null, custId, productId, alias, "TEL", "", "", ""); if (returnObj.getReturnCode() == 0) { return true; } else { return false; } } catch (RemoteException e) { logging.Utils.writeLog(logging.Utils.logLevel.FATAL, e.getMessage(), e); } return false; }
public long createCustomer(String msn) { try { long custId = getCustomer(msn); MethodReturnTypeObj returnObj = orBinding.createCustomer(msn, null, null, null); if (returnObj.getReturnCode() == 0) { custId = returnObj.getClientID(); } else { throw new Exception(returnObj.getMessage()); } return custId; } catch (RemoteException e) { logging.Utils.writeLog(logging.Utils.logLevel.FATAL, e.getMessage(), e); } catch (Exception e) { logging.Utils.writeLog(logging.Utils.logLevel.FATAL, e.getMessage(), e); } return -1; }