From 38ffb7945d2e0a65618fdc0e3573b018fab21044 Mon Sep 17 00:00:00 2001 From: Jan Vonka Date: Mon, 17 Sep 2007 16:41:43 +0000 Subject: [PATCH] Minor MT fix git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6803 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/dictionary/DictionaryDAOImpl.java | 6 +-- .../repo/dictionary/DiffModelTest.java | 38 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/source/java/org/alfresco/repo/dictionary/DictionaryDAOImpl.java b/source/java/org/alfresco/repo/dictionary/DictionaryDAOImpl.java index ea436b5e59..def12b2859 100644 --- a/source/java/org/alfresco/repo/dictionary/DictionaryDAOImpl.java +++ b/source/java/org/alfresco/repo/dictionary/DictionaryDAOImpl.java @@ -397,7 +397,7 @@ public class DictionaryDAOImpl implements DictionaryDAO * @param modelName the model name * @return the compiled model of the given name */ - private CompiledModel getCompiledModel(QName modelName) + /* package */ CompiledModel getCompiledModel(QName modelName) { String tenantDomain = tenantService.getCurrentUserDomain(); if (tenantDomain != "") @@ -773,7 +773,7 @@ public class DictionaryDAOImpl implements DictionaryDAO * * @param tenantDomain */ - /* package */ Map getCompiledModels(String tenantDomain) + private Map getCompiledModels(String tenantDomain) { Map compiledModels = null; try @@ -948,7 +948,7 @@ public class DictionaryDAOImpl implements DictionaryDAO CompiledModel compiledModel = model.compile(this, namespaceDAO); QName modelName = compiledModel.getModelDefinition().getName(); - CompiledModel previousVersion = getCompiledModels(tenantService.getCurrentUserDomain()).get(modelName); + CompiledModel previousVersion = getCompiledModel(modelName); if (previousVersion == null) { return new ArrayList(0); diff --git a/source/java/org/alfresco/repo/dictionary/DiffModelTest.java b/source/java/org/alfresco/repo/dictionary/DiffModelTest.java index d6270171e9..7babcdf93c 100755 --- a/source/java/org/alfresco/repo/dictionary/DiffModelTest.java +++ b/source/java/org/alfresco/repo/dictionary/DiffModelTest.java @@ -806,7 +806,7 @@ public class DiffModelTest extends TestCase M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel previousVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel previousVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(previousVersion, null); @@ -839,7 +839,7 @@ public class DiffModelTest extends TestCase M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel compiledModel = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel compiledModel = dictionaryDAO.getCompiledModel(modelName); try { @@ -859,7 +859,7 @@ public class DiffModelTest extends TestCase M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel newVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel newVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(null, newVersion); @@ -879,12 +879,12 @@ public class DiffModelTest extends TestCase ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(MODEL1_XML.getBytes()); M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel previousVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel previousVersion = dictionaryDAO.getCompiledModel(modelName); byteArrayInputStream = new ByteArrayInputStream(MODEL1_UPDATE1_XML.getBytes()); model = M2Model.createModel(byteArrayInputStream); modelName = dictionaryDAO.putModel(model); - CompiledModel newVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel newVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(previousVersion, newVersion); @@ -911,12 +911,12 @@ public class DiffModelTest extends TestCase ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(MODEL2_XML.getBytes()); M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel previousVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel previousVersion = dictionaryDAO.getCompiledModel(modelName); byteArrayInputStream = new ByteArrayInputStream(MODEL2_EXTRA_PROPERTIES_XML.getBytes()); model = M2Model.createModel(byteArrayInputStream); modelName = dictionaryDAO.putModel(model); - CompiledModel newVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel newVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(previousVersion, newVersion); @@ -936,12 +936,12 @@ public class DiffModelTest extends TestCase ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(MODEL3_XML.getBytes()); M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel previousVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel previousVersion = dictionaryDAO.getCompiledModel(modelName); byteArrayInputStream = new ByteArrayInputStream(MODEL3_EXTRA_TYPES_AND_ASPECTS_XML.getBytes()); model = M2Model.createModel(byteArrayInputStream); modelName = dictionaryDAO.putModel(model); - CompiledModel newVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel newVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(previousVersion, newVersion); @@ -964,12 +964,12 @@ public class DiffModelTest extends TestCase ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(MODEL5_XML.getBytes()); M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel previousVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel previousVersion = dictionaryDAO.getCompiledModel(modelName); byteArrayInputStream = new ByteArrayInputStream(MODEL5_EXTRA_ASSOCIATIONS_XML.getBytes()); model = M2Model.createModel(byteArrayInputStream); modelName = dictionaryDAO.putModel(model); - CompiledModel newVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel newVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(previousVersion, newVersion); @@ -993,12 +993,12 @@ public class DiffModelTest extends TestCase ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(MODEL2_EXTRA_PROPERTIES_XML.getBytes()); M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel previousVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel previousVersion = dictionaryDAO.getCompiledModel(modelName); byteArrayInputStream = new ByteArrayInputStream(MODEL2_XML.getBytes()); model = M2Model.createModel(byteArrayInputStream); modelName = dictionaryDAO.putModel(model); - CompiledModel newVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel newVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(previousVersion, newVersion); @@ -1018,12 +1018,12 @@ public class DiffModelTest extends TestCase ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(MODEL3_EXTRA_TYPES_AND_ASPECTS_XML.getBytes()); M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel previousVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel previousVersion = dictionaryDAO.getCompiledModel(modelName); byteArrayInputStream = new ByteArrayInputStream(MODEL3_XML.getBytes()); model = M2Model.createModel(byteArrayInputStream); modelName = dictionaryDAO.putModel(model); - CompiledModel newVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel newVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(previousVersion, newVersion); @@ -1046,12 +1046,12 @@ public class DiffModelTest extends TestCase ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(MODEL4_XML.getBytes()); M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel previousVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel previousVersion = dictionaryDAO.getCompiledModel(modelName); byteArrayInputStream = new ByteArrayInputStream(MODEL4_EXTRA_DEFAULT_ASPECT_XML.getBytes()); model = M2Model.createModel(byteArrayInputStream); modelName = dictionaryDAO.putModel(model); - CompiledModel newVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel newVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(previousVersion, newVersion); @@ -1071,12 +1071,12 @@ public class DiffModelTest extends TestCase ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(MODEL5_EXTRA_ASSOCIATIONS_XML.getBytes()); M2Model model = M2Model.createModel(byteArrayInputStream); QName modelName = dictionaryDAO.putModel(model); - CompiledModel previousVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel previousVersion = dictionaryDAO.getCompiledModel(modelName); byteArrayInputStream = new ByteArrayInputStream(MODEL5_XML.getBytes()); model = M2Model.createModel(byteArrayInputStream); modelName = dictionaryDAO.putModel(model); - CompiledModel newVersion = dictionaryDAO.getCompiledModels("").get(modelName); + CompiledModel newVersion = dictionaryDAO.getCompiledModel(modelName); List modelDiffs = dictionaryDAO.diffModel(previousVersion, newVersion);