Package org.multibit.mbm.client.domain.model.model

Examples of org.multibit.mbm.client.domain.model.model.Delivery


  @Override
  public Optional<Delivery> getInitialisedDeliveryBySupplier(Supplier supplier) {
    Preconditions.checkNotNull(supplier, "supplier cannot be null");

    Delivery delivery;
    if (supplier.getDeliveries().isEmpty()) {
      // Create a suitable delivery
      delivery = DeliveryBuilder
        .newInstance()
        .withSupplier(supplier)
View Full Code Here


    Preconditions.checkNotNull(supplierUser.getSupplier(), "supplier");

    if (supplierUser.getSupplier().getDeliveries().isEmpty()) {
      // TODO Fill in the location of a Delivery by a Supplier
    }
    Delivery delivery = supplierUser.getSupplier().getDeliveries().iterator().next();

    // Provide a representation to the client
    Representation representation = new SupplierDeliveryRepresentation().get(delivery);

    return ok(representation);
View Full Code Here

    @RestrictedTo({Authority.ROLE_SUPPLIER})
    User supplierUser,
    SupplierUpdateDeliveryDto updateDeliveryRequest) {

    // Retrieve the delivery
    Delivery delivery = supplierUser.getSupplier().getDeliveries().iterator().next();

    // Verify and apply any changes to the Delivery
    apply(updateDeliveryRequest, delivery);

    // Persist the updated delivery
View Full Code Here

    // Retrieve the delivery
    Optional<Delivery> delivery = deliveryReadService.getById(deliveryId);
    ResourceAsserts.assertPresent(delivery,"delivery");

    // Verify and apply any changes to the Delivery
    Delivery persistentDelivery = delivery.get();
    apply(updateDeliveryRequest,persistentDelivery);

    // Persist the updated delivery
    persistentDelivery = deliveryReadService.saveOrUpdate(persistentDelivery);
View Full Code Here

    Preconditions.checkNotNull(supplierUser.getSupplier(), "supplier");

    if (supplierUser.getSupplier().getDeliveries().isEmpty()) {
      // TODO Fill in the location of a Delivery by a Supplier
    }
    Delivery delivery = supplierUser.getSupplier().getDeliveries().iterator().next();

    // Provide a representation to the client
    Representation representation = new SupplierDeliveryRepresentation().get(delivery);

    return ok(representation);
View Full Code Here

    @RestrictedTo({Authority.ROLE_SUPPLIER})
    User supplierUser,
    SupplierUpdateDeliveryDto updateDeliveryRequest) {

    // Retrieve the delivery
    Delivery delivery = supplierUser.getSupplier().getDeliveries().iterator().next();

    // Verify and apply any changes to the Delivery
    apply(updateDeliveryRequest, delivery);

    // Persist the updated delivery
View Full Code Here

TOP

Related Classes of org.multibit.mbm.client.domain.model.model.Delivery

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.