Package com.wordpress.salaboy.model

Examples of com.wordpress.salaboy.model.Procedure


        emergency = persistenceService.loadEmergency(emergency.getId());
        assertNotNull(emergency);
       
        trackingService.attachEmergency(call.getId(), emergency.getId());

        Procedure procedure = new Procedure("MyProcedure");
        persistenceService.storeProcedure(procedure);
        assertNotSame("", procedure.getId());

        procedure = persistenceService.loadProcedure(procedure.getId());
        assertNotNull(procedure);

        trackingService.attachProcedure(emergency.getId(), procedure.getId());


        Vehicle vehicle = new Ambulance();

        persistenceService.storeVehicle(vehicle);
        assertNotSame("", vehicle.getId());

        vehicle = persistenceService.loadVehicle(vehicle.getId());
        assertNotNull(vehicle);


        trackingService.attachVehicle(procedure.getId(), vehicle.getId());

        Vehicle vehicle2 = new FireTruck();
        persistenceService.storeVehicle(vehicle2);
        assertNotSame("", vehicle2.getId());

        vehicle2 = persistenceService.loadVehicle(vehicle2.getId());
        assertNotNull(vehicle2);

        trackingService.attachVehicle(procedure.getId(), vehicle2.getId());

        ServiceChannel channel = new ServiceChannel("MyChannel");
        persistenceService.storeServiceChannel(channel);
        assertNotSame("", channel.getId());
       
View Full Code Here


        emergency = persistenceService.loadEmergency(emergency.getId());
        assertNotNull(emergency);
       
        trackingService.attachEmergency(call.getId(), emergency.getId());

        Procedure procedure = new Procedure("MyProcedure");
        persistenceService.storeProcedure(procedure);
        assertNotSame("", procedure.getId());

        procedure = persistenceService.loadProcedure(procedure.getId());
        assertNotNull(procedure);

        trackingService.attachProcedure(emergency.getId(), procedure.getId());


        Vehicle vehicle = new Ambulance();

        persistenceService.storeVehicle(vehicle);
        assertNotSame("", vehicle.getId());

        vehicle = persistenceService.loadVehicle(vehicle.getId());
        assertNotNull(vehicle);


        trackingService.attachVehicle(procedure.getId(), vehicle.getId());

        Vehicle vehicle2 = new FireTruck();
        persistenceService.storeVehicle(vehicle2);
        assertNotSame("", vehicle2.getId());

        vehicle2 = persistenceService.loadVehicle(vehicle2.getId());
        assertNotNull(vehicle2);

        trackingService.attachVehicle(procedure.getId(), vehicle2.getId());

        ServiceChannel channel = new ServiceChannel("MyChannel");
        persistenceService.storeServiceChannel(channel);
        assertNotSame("", channel.getId());
       
View Full Code Here

 
        PersistenceService persistenceService = PersistenceServiceProvider.getPersistenceService();
        ContextTrackingService trackingService = ContextTrackingProvider.getTrackingService();

        //create a new Procedure: this is the representation of the Procedure Service
        Procedure newProcedure = new Procedure(procedureName);

        //Get the requested ProcedureService from Spring
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("procedures-beans.xml");
        ProcedureService procedureService = (ProcedureService) context.getBean(procedureName);

        //Store the procedure so it has a valid id
        persistenceService.storeProcedure(newProcedure);

        //Configure the ProcedureService
        procedureService.configure(emergencyId, newProcedure, parameters);

        //Update the procedure.
        persistenceService.storeProcedure(newProcedure);

        //the process is attached to the emergency
        trackingService.attachProcedure(emergencyId, newProcedure.getId());

        return procedureService;
    }
View Full Code Here

TOP

Related Classes of com.wordpress.salaboy.model.Procedure

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.