private void checkCircularDependency(ModelDefinition model, M2Model existingModel, String parentPrefixedName) throws AlfrescoRuntimeException { for (NamespaceDefinition importedNamespace : model.getImportedNamespaces()) { ModelDefinition md = null; if ((md = dictionaryService.getModelByNamespaceUri(importedNamespace.getUri())) != null) { if (existingModel.getNamespace(importedNamespace.getUri()) != null) { throw new AlfrescoRuntimeException("Failed to validate model update - found circular dependency. You can't set parent " + parentPrefixedName + " as it's model already depends on " + existingModel.getName()); } checkCircularDependency(md, existingModel, parentPrefixedName); } } }
private void checkCircularDependency(ModelDefinition model, M2Model existingModel, String parentPrefixedName) throws AlfrescoRuntimeException { for (NamespaceDefinition importedNamespace : model.getImportedNamespaces()) { ModelDefinition md = null; if ((md = dictionaryService.getModelByNamespaceUri(importedNamespace.getUri())) != null) { if (existingModel.getNamespace(importedNamespace.getUri()) != null) { throw new AlfrescoRuntimeException("Failed to validate model update - found circular dependency. You can't set parent " + parentPrefixedName + " as it's model already depends on " + existingModel.getName()); } checkCircularDependency(md, existingModel, parentPrefixedName); } } }
ModelDefinition importedModel = dictionaryService.getModelByNamespaceUri(modelDiff.getNamespaceDefinition().getUri()); if(importedModel != null && !model.getNamespaces().isEmpty())
ModelDefinition importedModel = dictionaryService.getModelByNamespaceUri(modelDiff.getNamespaceDefinition().getUri()); if(importedModel != null && !model.getNamespaces().isEmpty())