MDR-1 - Current dependencies analysis

Issue: QCADOOMES-827

Analysis

 

grep -R genealogies $(find ./ -iname "*.java" )
 
... 

./mes-plugins/mes-plugins-orders/src/main/java/com/qcadoo/mes/orders/OrderService.java: if (order.getHasManyField("genealogies").size() == 0) {
./mes-plugins/mes-plugins-orders/src/main/java/com/qcadoo/mes/orders/OrderService.java: for (Entity genealogy : order.getHasManyField("genealogies")) {
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(0);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(0);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(0);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(0);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(0);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(1);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").iterator()).willReturn(iterator);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(1);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").iterator()).willReturn(iterator);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(1);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").iterator()).willReturn(iterator);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(1);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").iterator()).willReturn(iterator);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(1);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").iterator()).willReturn(iterator);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(1);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").iterator()).willReturn(iterator);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(1);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").iterator()).willReturn(iterator);
./mes-plugins/mes-plugins-orders/src/test/java/com/qcadoo/mes/products/OrderServiceTest.java: given(order.getHasManyField("genealogies").size()).willReturn(1);

...  

Why does the orders plugin use genealogies in their code ?

They have no dependency and should NOT have.

 

grep -R genealogies $(find ./ -iname "*.xml" )
 
... 

./mes-plugins/mes-plugins-quality-controls/src/main/resources/qcadoo-plugin.xml: <model:model-hook plugin="genealogies" model="genealogy">
./mes-plugins/mes-plugins-quality-controls/target/classes/qcadoo-plugin.xml: <model:model-hook plugin="genealogies" model="genealogy">



...  

Why does the quality-controls plugin use genealogies in their code ?

They have no dependency and should NOT have. quality-controls-for-batch is the place for this

 

grep -R productionScheduling $(find ./ -iname "*.java" )
 
... 

./mes-plugins/mes-plugins-gantt-for-operation/src/main/java/com/qcadoo/mes/ganttForOperations/GanttOperationService.java: DataDefinition dataDefinition = dataDefinitionService.get("productionScheduling", "orderOperationComponent");
./mes-plugins/mes-plugins-gantt-for-operation/src/main/java/com/qcadoo/mes/ganttForOperations/OperationsGanttChartItemResolverImpl.java: private static final String PRODUCTION_SCHEDULING_MODEL = "productionScheduling";

...   

gantt-for-operation has no dependacy do production scheduling.