Peter Centgraf pushed to branch feature/REPO-1914 at cms-community / hippo-repository
Commits: e3fec71d by Peter Centgraf at 2018-02-08T11:54:22+01:00 REPO-1914 Update copyright year - - - - - 3 changed files: - engine/src/main/java/org/onehippo/cm/engine/ConfigurationContentService.java - engine/src/main/java/org/onehippo/cm/engine/autoexport/AutoExportConfigExporter.java - engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java Changes: ===================================== engine/src/main/java/org/onehippo/cm/engine/ConfigurationContentService.java ===================================== --- a/engine/src/main/java/org/onehippo/cm/engine/ConfigurationContentService.java +++ b/engine/src/main/java/org/onehippo/cm/engine/ConfigurationContentService.java @@ -253,7 +253,7 @@ public class ConfigurationContentService { for (final ActionItem item : items) { if (item.getType() == ActionType.DELETE) { final JcrPath baseNodePath = item.getPath(); - if (ConfigurationModelUtils.getCategoryForNode(baseNodePath.toMinimallyIndexedPath().toString(), model) == ConfigurationItemCategory.CONTENT) { + if (ConfigurationModelUtils.getCategoryForNode(baseNodePath.suppressIndices().toString(), model) == ConfigurationItemCategory.CONTENT) { log.debug("Processing delete action for node: {}", baseNodePath); final DefinitionNode deleteNode = new DefinitionNodeImpl(baseNodePath, ===================================== engine/src/main/java/org/onehippo/cm/engine/autoexport/AutoExportConfigExporter.java ===================================== --- a/engine/src/main/java/org/onehippo/cm/engine/autoexport/AutoExportConfigExporter.java +++ b/engine/src/main/java/org/onehippo/cm/engine/autoexport/AutoExportConfigExporter.java @@ -17,8 +17,6 @@ package org.onehippo.cm.engine.autoexport; import java.io.IOException; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -485,7 +483,7 @@ public class AutoExportConfigExporter extends JcrContentExporter { protected void checkDeletedContentChildren(final JcrPath deletedConfig) throws RepositoryException { for (final ContentDefinitionImpl contentDefinition : configurationModel.getContentDefinitions()) { final JcrPath contentRootPath = contentDefinition.getNode().getJcrPath(); - final String contentRoot = contentRootPath.toMinimallyIndexedPath().toString(); + final String contentRoot = contentRootPath.suppressIndices().toString(); if (contentRootPath.startsWith(deletedConfig) && !deletedContent.matches(contentRoot)) { // content root found as child of a deleted config path, which itself, or a parent path, hasn't been recorded as deleted yet deletedContent.removeChildren(contentRoot); ===================================== engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java ===================================== --- a/engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java +++ b/engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java @@ -1095,7 +1095,7 @@ public class DefinitionMergeService { protected static boolean shouldPathCreateNewSource(final JcrPath incomingPath) { // for the sake of creating new source files, we always want to use the minimally-indexed path // to avoid annoying and unnecessary "[1]" tags on filenames - final String minimallyIndexedPath = incomingPath.toMinimallyIndexedPath().toString(); + final String minimallyIndexedPath = incomingPath.suppressIndices().toString(); return JcrPaths.getPath(LocationMapper.contextNodeForPath(minimallyIndexedPath, true)) .equals(incomingPath); } @@ -1107,7 +1107,7 @@ public class DefinitionMergeService { * @return a module-base-relative path with no leading slash for a potentially new yaml source file */ protected String getFilePathByLocationMapper(JcrPath path) { - String xmlFile = LocationMapper.fileForPath(path.toMinimallyIndexedPath().toString(), true); + String xmlFile = LocationMapper.fileForPath(path.suppressIndices().toString(), true); if (xmlFile == null) { return "main.yaml"; } @@ -1961,7 +1961,7 @@ public class DefinitionMergeService { } // if a delete path is -below- one of the sources that remains, treat it as a change for (final JcrPath sourceNodePath : Sets.difference(existingSourcesByNodePath.keySet(), toRemoveByNodePath)) { - if (deletePath.startsWith(sourceNodePath.toMinimallyIndexedPath().toString())) { + if (deletePath.startsWith(sourceNodePath.suppressIndices().toString())) { contentChangesByPath.add(deletePath); } } View it on GitLab: https://code.onehippo.org/cms-community/hippo-repository/commit/e3fec71d7b8236d8dfe8d1e5a18eec1643893820 --- View it on GitLab: https://code.onehippo.org/cms-community/hippo-repository/commit/e3fec71d7b8236d8dfe8d1e5a18eec1643893820 You're receiving this email because of your account on code.onehippo.org.
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn