Package org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.exception

Examples of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.exception.ChangeDestinationException


        throws Exception
    {
        // Pre-conditions
        if( transportStatus.equals( CLAIMED ) )
        {
            throw new ChangeDestinationException( "Can't change destination of claimed cargo." );
        }

        cargoInspector.registerNewDestination( destinationUnLocodeString );
    }
View Full Code Here


                {
                    newDestination = uowf.currentUnitOfWork().get( Location.class, newDestinationString );
                }
                catch( NoSuchEntityException e )
                {
                    throw new ChangeDestinationException( "Didn't recognize location '" + newDestinationString + "'" );
                }
                if( newDestination.equals( cargo.routeSpecification().get().destination().get() ) )
                {
                    throw new ChangeDestinationException( "New destination is same as old destination." );
                }

                // Step 2 - Derive new route specification

                newRouteSpec = new DeriveUpdatedRouteSpecification( cargo, newDestination ).getRouteSpec();
View Full Code Here

TOP

Related Classes of org.qi4j.sample.dcicargo.sample_b.context.interaction.booking.exception.ChangeDestinationException

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.