Examples of Customer


Examples of org.wso2.carbon.account.mgt.stub.services.beans.xsd.Customer

        }
    }


    public boolean updateUsagePlan(String tenantDomainName,String usagePlanName) {
        Customer customer;
        try {
            customer = stub.getCustomerWithName(tenantDomainName);
            stub.changeSubscription(customer.getId(), usagePlanName);
        } catch (Exception e) {
            return false;
        }
        return true;
    }
View Full Code Here

Examples of org.wso2.carbon.billing.core.dataobjects.Customer

   
    public void invoke(ThrottlingDataContext dataContext) throws ThrottlingException {
        int tenantId = dataContext.getTenantId();
        try {
            Customer customer = Util.getCurrentBillingCustomer(tenantId);
            dataContext.addDataObject(ThrottlingDataEntryConstants.CUSTOMER, customer);
        } catch (RegistryException e) {
            String msg = "Error in getting the current customer. tenant id: " + tenantId + ".";
            log.error(msg, e);
            throw new ThrottlingException(msg, e);
View Full Code Here

Examples of quickdb.complexDataStructure.model.Customer

        buys.add(buy2);
        buys.add(buy3);

        AddressComplex address = new AddressComplex("unnamed street", 123);

        Customer customer = new Customer("Diego", "Sarmentero",
                "diego.sarmentero@gmail.com", address, buys);

        System.out.println(admin.save(customer));

        Customer customer2 = new Customer();
        admin.obtain(customer2).If("name").equal("Diego").find();

        System.out.println(customer2.getEmail().equals("diego.sarmentero@gmail.com"));
        System.out.println(customer2.getBuy().size() > 2);
        System.out.println(((Buy)customer2.getBuy().get(0)).getCodes().size() > 1);
    }
View Full Code Here

Examples of scatours.customer.Customer

    @Property
    protected float transactionFeeRate = 0.01f;

    public String makePaymentMember(String customerId, float amount) {
        Customer customer = null;

        try {
            customer = customerRegistry.getCustomer(customerId);
        } catch (CustomerNotFoundException ex) {
            return "Payment failed due to " + ex.getMessage();
        } catch (Throwable t) {
            return "Payment failed due to system error " + t.getMessage();
        }

        CreditCardDetailsType ccDetails = customer.getCreditCard();

        String status;
        try {
            status = creditCardPayment.authorize(ccDetails, amount);
        } catch (AuthorizeFault_Exception e) {
            status = e.getFaultInfo().getErrorCode();
        }

        StringBuffer body = new StringBuffer();
        body.append(customer);
        body.append("\n").append("Status: ").append(status).append("\n");
        emailGateway.sendEmail("order@tuscanyscatours.com", customer.getEmail(), "Status for your payment", body
            .toString());

        return status;
    }
View Full Code Here

Examples of steveonjava.server.Customer

        restTemplate.delete("http://localhost:8080/crm/customer/" + customer.getId());
        customers.remove(customer);
    }

    public void addCustomer(String firstName, String lastName) {
        Customer customer = new Customer();
        customer.setFirstName(firstName);
        customer.setLastName(lastName);
        customer.setSignupDate(new Date());
        Integer id = restTemplate.postForObject("http://localhost:8080/crm/customers", customer, Integer.class);
        customer.setId(id);
        customers.add(customer);
    }
View Full Code Here

Examples of supplychain.Customer

        // Obtain SCA module context.
        ModuleContext moduleContext = CurrentModuleContext.getContext();

        // Locate the HelloWorld service component and invoke it
        // Locate the CustomerComponent service component and invoke it
        Customer customer = (Customer) moduleContext.locateService("CustomerComponent");
        System.out.println("Main thread " + Thread.currentThread());
        customer.purchaseGoods();

    }
View Full Code Here

Examples of supplychain.customer.Customer

*/
public class SupplyChainClient {

    public static final void main(String[] args) throws Exception {
        SCADomain scaDomain = SCADomain.newInstance("supplychain.composite");
        Customer customer = scaDomain.getService(Customer.class, "CustomerComponent");

        System.out.println("Main thread " + Thread.currentThread());
        customer.purchaseGoods();
        System.out.println("Main thread sleeping ...");
        Thread.sleep(1000);

        scaDomain.close();
    }
View Full Code Here

Examples of test.interfaces.Customer

        try {
            CustomerHome home = (CustomerHome) new InitialContext().lookup("java:comp/env/ejb/bank/Customer");
            Collection customers = home.findAll();
            for (Iterator customersInBank = customers.iterator(); customersInBank.hasNext();) {
                Customer customer = (Customer) customersInBank.next();
                customer.talkTo();
            }
        }
        catch (NamingException e) {
            throw new EJBException("Unable to find any customers: " + e.getMessage());
        }
View Full Code Here

Examples of testsuite.clusterj.model.Customer

        addTearDownClasses(OrderLine.class);
    }

    private void createCustomerInstances(int numberToCreate) {
        for (int i = 0; i < numberToCreate; ++i) {
            Customer customer = session.newInstance(Customer.class);
            customer.setId(i);
            customer.setName("Customer number " + i);
            customer.setMagic(i * 100);
            customers.add(customer);
        }
    }
View Full Code Here

Examples of ua.com.jpy.entity.customer.Customer

  private ICustomerService customerService;

  @SuppressWarnings("deprecation")
  @RequestMapping(value = {"*", ""}, method = RequestMethod.GET)
  public String homeController(ModelMap modelMap) {
    Customer customer = null;
    if(modelMap.containsKey("customer") && modelMap.get("customer") instanceof Customer) {
      customer = (Customer) modelMap.get("customer");
    } else {
      customer = customerService.getCurrentCustomer();
    }
    if(customer != null) {
      log.info("Customer found, login: " + customer.getLogin());
      modelMap.addAttribute(customer);
      modelMap.addObject(customer);
    } else {
      log.info("Customer was not found, add new instance customer to the session");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.