Fix to DictionaryRepositoryBootstrap - ignore working copy of Dictionary Model

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6777 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-09-13 15:59:51 +00:00
parent f161572b1e
commit 75213e84ee

View File

@@ -262,8 +262,12 @@ public class DictionaryRepositoryBootstrap extends AbstractLifecycleBean impleme
for (NodeRef dictionaryModel : nodeRefs)
{
boolean isActive = ((Boolean)nodeService.getProperty(dictionaryModel, ContentModel.PROP_MODEL_ACTIVE)).booleanValue();
if (isActive)
// Ignore if the node is a working copy or if its inactive
if (nodeService.hasAspect(dictionaryModel, ContentModel.ASPECT_WORKING_COPY) == false)
{
Boolean isActive = (Boolean)nodeService.getProperty(dictionaryModel, ContentModel.PROP_MODEL_ACTIVE);
if ((isActive != null) && (isActive.booleanValue() == true))
{
M2Model model = createM2Model(dictionaryModel);
if (model != null)
@@ -277,6 +281,7 @@ public class DictionaryRepositoryBootstrap extends AbstractLifecycleBean impleme
}
}
}
}
// Load the models ensuring that they are loaded in the correct order
List<String> loadedModels = new ArrayList<String>();