Examples of delivery()


Examples of org.qi4j.sample.dcicargo.sample_a.communication.query.dto.CargoDTO.delivery()

                // Status ----------------------------------------------------------------------
                ValueMap map = new ValueMap();
                map.put( "status", cargo.delivery().get().transportStatus().get().name() );
                map.put( "trackingId", trackingId );
                HandlingEvent lastEvent = cargo.delivery().get().lastHandlingEvent().get();
                if( lastEvent != null )
                {
                    String voyageString = lastEvent.voyage().get() != null ?
                                          lastEvent.voyage()
                                              .get()
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.communication.query.dto.CargoDTO.delivery()

    {
        super( new PageParameters().set( 0, trackingId ) );

        IModel<CargoDTO> cargoModel = new CommonQueries().cargo( trackingId );
        CargoDTO cargo = cargoModel.getObject();
        Delivery delivery = cargo.delivery().get();
        RouteSpecification routeSpecification = cargo.routeSpecification().get();
        final RoutingStatus routingStatus = delivery.routingStatus().get();
        Boolean isMisrouted = routingStatus == RoutingStatus.MISROUTED;

        add( new PrevNext( "prevNext", CargoDetailsPage.class, trackingId ) );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.communication.query.dto.CargoDTO.delivery()

                add( new Label( "transportStatus", new StringResourceModel(
                    "transportStatus.${status}", this, new Model<ValueMap>( map ) ) ) );

                // ETA ----------------------------------------------------------------------
                String destination = cargo.routeSpecification().get().destination().get().getString();
                Date eta = cargo.delivery().get().eta().get();
                String etaString = eta == null ? "?" : new SimpleDateFormat( "yyyy-MM-dd" ).format( eta );
                add( new Label( "eta", new StringResourceModel(
                    "eta", this, null, Model.of( destination ), Model.of( etaString ) ) ) );

                // Warning/Notifier ----------------------------------------------------------------------
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.communication.query.dto.CargoDTO.delivery()

                String etaString = eta == null ? "?" : new SimpleDateFormat( "yyyy-MM-dd" ).format( eta );
                add( new Label( "eta", new StringResourceModel(
                    "eta", this, null, Model.of( destination ), Model.of( etaString ) ) ) );

                // Warning/Notifier ----------------------------------------------------------------------
                add( new WebMarkupContainer( "isMisdirected" ).setVisible( cargo.delivery()
                                                                               .get()
                                                                               .isMisdirected()
                                                                               .get() ) );
                add( new WebMarkupContainer( "isClaimed" ).setVisible(
                    !cargo.delivery().get().isMisdirected().get()
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.communication.query.dto.CargoDTO.delivery()

                add( new WebMarkupContainer( "isMisdirected" ).setVisible( cargo.delivery()
                                                                               .get()
                                                                               .isMisdirected()
                                                                               .get() ) );
                add( new WebMarkupContainer( "isClaimed" ).setVisible(
                    !cargo.delivery().get().isMisdirected().get()
                    && cargo.delivery().get().isUnloadedAtDestination().get()
                    && lastEvent != null
                    && lastEvent.handlingEventType().get() == HandlingEventType.CLAIM
                ) );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.communication.query.dto.CargoDTO.delivery()

                                                                               .get()
                                                                               .isMisdirected()
                                                                               .get() ) );
                add( new WebMarkupContainer( "isClaimed" ).setVisible(
                    !cargo.delivery().get().isMisdirected().get()
                    && cargo.delivery().get().isUnloadedAtDestination().get()
                    && lastEvent != null
                    && lastEvent.handlingEventType().get() == HandlingEventType.CLAIM
                ) );

                // Handling history ----------------------------------------------------------------------
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.communication.query.dto.CargoDTO.delivery()

                    && lastEvent != null
                    && lastEvent.handlingEventType().get() == HandlingEventType.CLAIM
                ) );

                // Handling history ----------------------------------------------------------------------
                if( cargo.delivery().get().lastHandlingEvent().get() == null )
                {
                    add( new Label( "handlingHistoryPanel" ) );
                }
                else
                {
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.cargo.Cargo.delivery()

        assertThat( cargo.routeSpecification().get().arrivalDeadline().get(),  equalTo( day( 17 )  ));

        // (Itinerary is not assigned yet)

        // Test derived delivery snapshot
        Delivery delivery = cargo.delivery().get();
        assertThat( delivery.timestamp().get().after( TODAY ), is( equalTo( true ) ) ); // TODAY is set first
        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.NOT_ROUTED ) ) );
        assertThat( delivery.transportStatus().get(), is( equalTo( TransportStatus.NOT_RECEIVED ) ) );
        assertThat( delivery.nextExpectedHandlingEvent().get().handlingEventType().get(), is( equalTo( HandlingEventType.RECEIVE ) ) );
        assertThat( delivery.nextExpectedHandlingEvent().get().location().get(), is( equalTo( HONGKONG ) ) );
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_a.data.shipping.cargo.Cargo.delivery()

        assertThat( "Itinerary has been assigned to cargo.", itinerary, is( equalTo( cargo.itinerary().get() ) ) );

        // BuildDeliverySnapshot will check if itinerary is valid. No need to check it here.

        // Check values set in new delivery snapshot
        Delivery delivery = cargo.delivery().get();
        assertThat( delivery.routingStatus().get(), is( equalTo( RoutingStatus.ROUTED ) ) );

        // ETA (= Unload time of last Leg) is before Deadline (set in previous test)
        assertTrue( delivery.eta().get().before( deadline ) );
    }
View Full Code Here

Examples of org.qi4j.sample.dcicargo.sample_b.communication.query.dto.CargoDTO.delivery()

                RouteSpecification routeSpec = cargo.routeSpecification().get();
                String destination = routeSpec.destination().get().getCode();
                Date deadline = routeSpec.arrivalDeadline().get();

                // Routing status
                Delivery delivery = cargo.delivery().get();
                RoutingStatus routingStatus = cargo.delivery().get().routingStatus().get();
                boolean isMisrouted = routingStatus == RoutingStatus.MISROUTED;

                // Transport status
                TransportStatus transportStatus = delivery.transportStatus().get();
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.