Package org.libreplan.business.scenarios.entities

Examples of org.libreplan.business.scenarios.entities.Scenario


    }

    private Order reload(Order order) {
        ensureOrderVersionsAreNotProxies();
        Order result = orderDAO.findExistingEntity(order.getId());
        Scenario current = scenarioManager.getCurrent();
        result.useSchedulingDataFor(current);
        return result;
    }
View Full Code Here


                .runOnAnotherReadOnlyTransaction(new IOnTransaction<List<Long>>() {

                    @Override
                    public List<Long> execute() {
                        List<Long> result = new ArrayList<Long>();
                        Scenario scenario = scenarioManager.getCurrent();
                        for (OrderVersion each : scenario.getOrders().values()) {
                            result.add(each.getId());
                        }
                        return result;
                    }
                });
View Full Code Here

            orderVersionDAO.findExistingEntity(each);
        }
    }

    private PlanningState createPlanning(Order orderReloaded) {
        Scenario currentScenario = scenarioManager.getCurrent();
        final List<Resource> allResources = resourceDAO.list(Resource.class);
        criterionDAO.list(Criterion.class);

        forceLoadOfOrderAssociatedData(orderReloaded);
        TaskGroup rootTask = orderReloaded.getAssociatedTaskElement();
View Full Code Here

            eachTask.getParent().getName();
        }
    }

    private IScenarioInfo buildScenarioInfo(Order orderReloaded) {
        Scenario currentScenario = scenarioManager.getCurrent();
        if (orderReloaded.isUsingTheOwnerScenario()) {
            switchAllocationsToScenario(currentScenario,
                    orderReloaded.getAssociatedTaskElement());
            return new UsingOwnerScenario(currentScenario, orderReloaded);
        }
View Full Code Here

        }
    }

    @Override
    public boolean entryMatchesText(Object obj, String text) {
        final Scenario scenario = (Scenario) obj;
        text = text.trim().toLowerCase();
        return scenario.getName().toLowerCase().contains(text);
    }
View Full Code Here

            }
        }

        private void associateWithScenario(
                Collection<? extends Resource> resources) {
            Scenario currentScenario = getCurrentScenario();
            for (Resource each : resources) {
                each.useScenario(currentScenario);
            }
        }
View Full Code Here

TOP

Related Classes of org.libreplan.business.scenarios.entities.Scenario

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.