|
From: <de...@us...> - 2012-07-12 09:14:19
|
Revision: 7481
http://fudaa.svn.sourceforge.net/fudaa/?rev=7481&view=rev
Author: deniger
Date: 2012-07-12 09:14:09 +0000 (Thu, 12 Jul 2012)
Log Message:
-----------
Modified Paths:
--------------
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/dao/CrueXmlReaderWriterImpl.java
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/neuf/DCFileReader.java
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/validation/ValidatorNomCasierContent.java
trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationEtu30.java
trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationEtu70.java
trunk/soft/fudaa-crue/crue-server/src/test/resources/integration/v1_1_1/Etu3-0.zip
trunk/soft/fudaa-crue/crue-server/src/test/resources/integration/v1_1_1/Etu7-0.zip
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/edition/ListCasierModificationProcess.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/edition/ListModificationProcess.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/EMHModificationProcessor.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHBrancheTopComponent.java
trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHCasierTopComponent.java
Added Paths:
-----------
trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionChangeActivity.java
Added: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionChangeActivity.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionChangeActivity.java (rev 0)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/edition/EditionChangeActivity.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -0,0 +1,33 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.fudaa.dodico.crue.edition;
+
+import java.util.Collection;
+import org.fudaa.ctulu.CtuluLog;
+import org.fudaa.dodico.crue.config.CrueConfigMetier;
+import org.fudaa.dodico.crue.metier.emh.EMH;
+import org.fudaa.dodico.crue.metier.emh.EMHModeleBase;
+
+/**
+ *
+ * @author Frédéric Deniger
+ */
+public class EditionChangeActivity {
+
+ public CtuluLog propagateActivityChanged(EMHModeleBase modele, EMH emh, CrueConfigMetier ccm) {
+ EditionOPTIChanged changeCini = new EditionOPTIChanged();
+ CtuluLog res = changeCini.propagateChange(modele, ccm);
+
+ return res;
+
+ }
+ public CtuluLog propagateActivityChanged(EMHModeleBase modele, Collection<? extends EMH> emh, CrueConfigMetier ccm) {
+ EditionOPTIChanged changeCini = new EditionOPTIChanged();
+ CtuluLog res = changeCini.propagateChange(modele, ccm);
+
+ return res;
+
+ }
+}
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/dao/CrueXmlReaderWriterImpl.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/dao/CrueXmlReaderWriterImpl.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/dao/CrueXmlReaderWriterImpl.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -306,11 +306,11 @@
} catch (ConversionException conversionException) {
LOGGER.log(Level.FINE, "io.unknown.bsalise", conversionException);
analyser.addSevereError("io.unknown.bsalise",
- StringUtils.substringBeforeLast(conversionException.getShortMessage(), "."));
+ StringUtils.substringAfterLast(conversionException.getShortMessage(), "."));
} catch (CannotResolveClassException cannotResolveException) {
LOGGER.log(Level.FINE, "io.unknown.bsalise", cannotResolveException);
- analyser.addSevereError("io.unknown.bsalise", cannotResolveException.getMessage());
+ analyser.addSevereError("io.unknown.bsalise", StringUtils.substringAfterLast(cannotResolveException.getMessage(), "."));
} catch (final Exception e) {
LOGGER.log(Level.SEVERE, "io.xml.error", e);
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/neuf/DCFileReader.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/neuf/DCFileReader.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/io/neuf/DCFileReader.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -1372,13 +1372,17 @@
CatEMHNoeud noeudRef = metier.findNoeudByReference(idNoeud);
if (noeudRef == null) {
- noeudRef = metier.createNode(idNoeud);// new EMHNoeudNiveauContinu(idNoeud);
+ noeudRef = metier.createNode(idNoeud);
if (noeudRef == null) {
analyze_.addSevereError("crue.noeud.notExist.forCasier", idNoeud, newCasier.getNom());
}
metier.add(noeudRef);
} else {
newCasier.setNoeud(noeudRef);
+ //pour s'assurer que les nom sont bien égaux en prenant en compte la casse
+ if(!noeudRef.getNom().equals(idNoeud)){
+ noeudRef.setNom(idNoeud);
+ }
}
// on ajoute la valeur par défaut pour dpti:
Modified: trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/validation/ValidatorNomCasierContent.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/validation/ValidatorNomCasierContent.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/crue-server/src/main/java/org/fudaa/dodico/crue/validation/ValidatorNomCasierContent.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -3,23 +3,15 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
-import org.apache.commons.lang.StringUtils;
import org.fudaa.ctulu.CtuluLog;
import org.fudaa.dodico.crue.common.BusinessMessages;
-import org.fudaa.dodico.crue.metier.emh.CatEMHBranche;
import org.fudaa.dodico.crue.metier.emh.CatEMHCasier;
import org.fudaa.dodico.crue.metier.emh.CatEMHNoeud;
-import org.fudaa.dodico.crue.metier.emh.CatEMHSection;
import org.fudaa.dodico.crue.metier.emh.EMH;
import org.fudaa.dodico.crue.metier.emh.EMHModeleBase;
import org.fudaa.dodico.crue.metier.emh.EMHScenario;
-import org.fudaa.dodico.crue.metier.emh.EMHSectionIdem;
import org.fudaa.dodico.crue.metier.emh.EMHSousModele;
-import org.fudaa.dodico.crue.metier.emh.EnumTypeLoi;
-import org.fudaa.dodico.crue.metier.emh.RelationEMHSectionDansBranche;
import org.fudaa.dodico.crue.metier.factory.CruePrefix;
-import org.fudaa.dodico.crue.metier.helper.EMHHelper;
-import org.fudaa.dodico.crue.metier.transformer.TransformerHelper;
/**
*
Modified: trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationEtu30.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationEtu30.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationEtu30.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -256,7 +256,7 @@
@Test
public void testSc_M30_v7c10() {
// IntegrationHelper.testScenario(projet, "Sc_M3-0_v7c10", new ErrorBilanTester(0, 0, 4, 0));
- IntegrationHelper.testScenario(projet, "Sc_M3-0_v7c10", new ErrorBilanTester(0, 0, 8, 0));
+ IntegrationHelper.testScenario(projet, "Sc_M3-0_v7c10", new ErrorBilanTester(0, 0, 7, 0));
}
@Test
@@ -350,8 +350,8 @@
@Test
public void testSc_M30_e9c10() {
-// IntegrationHelper.testScenario(projet, "Sc_M3-0_e9c10", new ErrorBilanTester(12, 0, 2, 0));
- IntegrationHelper.testScenario(projet, "Sc_M3-0_e9c10", new ErrorBilanTester(12, 0, 4, 0));
+// IntegrationHelper.testScenario(projet, "Sc_M3-0_e9c10", new ErrorBilanTester(14, 0, 2, 0));
+ IntegrationHelper.testScenario(projet, "Sc_M3-0_e9c10", new ErrorBilanTester(14, 0, 4, 0));
}
private File getEtuFile() {
Modified: trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationEtu70.java
===================================================================
--- trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationEtu70.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/crue-server/src/test/java/org/fudaa/dodico/crue/integration/TestIntegrationEtu70.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -46,17 +46,17 @@
@Test
public void testSc_M70_c9c9() {
- IntegrationHelper.exportToCrue9(getEtuFile().getParentFile(), projet, "Sc_M7-0_c9", "Sc_M7-0_c9c9", "M7-0_c9c9",
- Arrays.asList("DPTG01.1"));
+ IntegrationHelper.exportToCrue9(getEtuFile().getParentFile(), projet, "Sc_M7-0_c9", "Sc_M7-0_c9c9", "M7-0_c9c9",true,
+ 0);
IntegrationHelper.testScenario(projet, "Sc_M7-0_c9c9", new ErrorBilanTester(0, 0, 273, 0));
}
@Test
- public void testSc_M70_c1Oc9() {
+ public void testSc_M70_c10c9() {
// IntegrationHelper.exportToCrue9(getEtuFile().getParentFile(), projet, "Sc_M7-0_c10", "Sc_M7-0_c10c9", "M7-0_c10c9",
// Arrays.asList("COM5", "DPTG01.1","COM1", "COM3","OPTR1"));
IntegrationHelper.exportToCrue9(getEtuFile().getParentFile(), projet, "Sc_M7-0_c10", "Sc_M7-0_c10c9", "M7-0_c10c9",
- Arrays.asList("COM5", "DPTG01.1", "DPTG04","COM1", "COM3","OPTR1"));
+ Arrays.asList("COM5", "DPTG04","COM1", "COM3","OPTR1"));
IntegrationHelper.testScenario(projet, "Sc_M7-0_c10c9", new ErrorBilanTester(0, 0, 273, 0));
}
Modified: trunk/soft/fudaa-crue/crue-server/src/test/resources/integration/v1_1_1/Etu3-0.zip
===================================================================
(Binary files differ)
Modified: trunk/soft/fudaa-crue/crue-server/src/test/resources/integration/v1_1_1/Etu7-0.zip
===================================================================
(Binary files differ)
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/edition/ListCasierModificationProcess.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/edition/ListCasierModificationProcess.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/edition/ListCasierModificationProcess.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -8,8 +8,8 @@
import org.fudaa.ctulu.CtuluLog;
import org.fudaa.dodico.crue.common.Pair;
import org.fudaa.dodico.crue.config.CrueConfigMetier;
+import org.fudaa.dodico.crue.edition.EditionChangeActivity;
import org.fudaa.dodico.crue.edition.EditionChangeUtils;
-import org.fudaa.dodico.crue.edition.EditionOPTIChanged;
import org.fudaa.dodico.crue.edition.ReorderEMHProcess;
import org.fudaa.dodico.crue.metier.emh.CatEMHCasier;
import org.fudaa.dodico.crue.metier.emh.CatEMHNoeud;
@@ -133,7 +133,8 @@
}
}
if (activeModified) {
- CtuluLog propagateChange = new EditionOPTIChanged().propagateChange(emhSousModele.getParent(), ccm);
+ EditionChangeActivity change = new EditionChangeActivity();
+ CtuluLog propagateChange = change.propagateActivityChanged(emhSousModele.getParent(), casiers, ccm);
res.first.addAllLogRecord(propagateChange);
}
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/edition/ListModificationProcess.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/edition/ListModificationProcess.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/edition/ListModificationProcess.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -5,6 +5,7 @@
import java.util.List;
import org.fudaa.ctulu.CtuluLog;
import org.fudaa.dodico.crue.config.CrueConfigMetier;
+import org.fudaa.dodico.crue.edition.EditionChangeActivity;
import org.fudaa.dodico.crue.edition.EditionOPTIChanged;
import org.fudaa.dodico.crue.edition.ReorderEMHProcess;
import org.fudaa.dodico.crue.metier.emh.CatEMHBranche;
@@ -75,8 +76,8 @@
}
}
if (activeModified) {
- EditionOPTIChanged changeCini = new EditionOPTIChanged();
- res=changeCini.propagateChange(sousModele.getParent(), ccm);
+ EditionChangeActivity change=new EditionChangeActivity();
+ res=change.propagateActivityChanged(sousModele.getParent(),emhs, ccm);
}
List<EnumModification> modifications = new ArrayList<EnumModification>();
if (reorderDone) {
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/EMHModificationProcessor.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/EMHModificationProcessor.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/EMHModificationProcessor.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -4,8 +4,13 @@
*/
package org.fudaa.fudaa.crue.modelling.emh;
+import org.fudaa.ctulu.CtuluLog;
+import org.fudaa.dodico.crue.config.CrueConfigMetier;
+import org.fudaa.dodico.crue.edition.EditionChangeActivity;
import org.fudaa.dodico.crue.edition.EditionRename;
+import org.fudaa.dodico.crue.metier.emh.CatEMHActivable;
import org.fudaa.dodico.crue.metier.emh.EMH;
+import org.fudaa.dodico.crue.metier.emh.EMHModeleBase;
/**
*
@@ -17,6 +22,14 @@
return new EditionRename().rename(emh, newName);
}
+ public CtuluLog changeActivity(CatEMHActivable emh, EMHModeleBase modele, CrueConfigMetier ccm, boolean newValue) {
+ if (emh.getUserActive() == newValue) {
+ return null;
+ }
+ EditionChangeActivity change = new EditionChangeActivity();
+ return change.propagateActivityChanged(modele, emh, ccm);
+ }
+
/**
*
* @param emh
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHBrancheTopComponent.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHBrancheTopComponent.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHBrancheTopComponent.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -11,6 +11,7 @@
import javax.swing.JCheckBox;
import javax.swing.JPanel;
import org.fudaa.dodico.crue.metier.emh.CatEMHActivable;
+import org.fudaa.dodico.crue.metier.emh.CatEMHBranche;
import org.fudaa.dodico.crue.metier.emh.EMH;
import org.fudaa.fudaa.crue.common.helper.DialogHelper;
import org.fudaa.fudaa.crue.modelling.services.EnumModification;
@@ -59,13 +60,13 @@
public void valideModification() {
EMHModificationProcessor processor = new EMHModificationProcessor();
final String newName = jEMHName.getText();
- final EMH emh = getEMH();
+ final CatEMHBranche emh = getEMH();
String error = processor.isNameValid(emh, newName);
if (error != null) {
DialogHelper.showError(error);
} else {
processor.changeName(emh, newName);
- ((CatEMHActivable) emh).setUserActive(cbActive.isSelected());
+ processor.changeActivity(emh, emh.getParent().getParent(), getCcm(), cbActive.isSelected());
modellingScenarioModificationService.setScenarioModified(new ScenarioModificationEvent(EnumModification.EMH_NAME));
setModified(false);
}
Modified: trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHCasierTopComponent.java
===================================================================
--- trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHCasierTopComponent.java 2012-07-11 20:44:34 UTC (rev 7480)
+++ trunk/soft/fudaa-crue/ui-modelling/src/main/java/org/fudaa/fudaa/crue/modelling/emh/ModellingEMHCasierTopComponent.java 2012-07-12 09:14:09 UTC (rev 7481)
@@ -11,6 +11,7 @@
import javax.swing.JCheckBox;
import javax.swing.JPanel;
import org.fudaa.dodico.crue.metier.emh.CatEMHActivable;
+import org.fudaa.dodico.crue.metier.emh.CatEMHCasier;
import org.fudaa.dodico.crue.metier.emh.EMH;
import org.fudaa.fudaa.crue.common.helper.DialogHelper;
import org.fudaa.fudaa.crue.modelling.services.EnumModification;
@@ -60,13 +61,13 @@
public void valideModification() {
EMHModificationProcessor processor = new EMHModificationProcessor();
final String newName = jEMHName.getText();
- final EMH emh = getEMH();
+ final CatEMHCasier emh = getEMH();
String error = processor.isNameValid(emh, newName);
if (error != null) {
DialogHelper.showError(error);
} else {
processor.changeName(emh, newName);
- ((CatEMHActivable) emh).setUserActive(cbActive.isSelected());
+ processor.changeActivity(emh, emh.getParent().getParent(), getCcm(), cbActive.isSelected());
modellingScenarioModificationService.setScenarioModified(new ScenarioModificationEvent(EnumModification.EMH_NAME));
setModified(false);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|