You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2019/06/13 23:04:17 UTC
[sling-org-apache-sling-app-cms] 02/02: Initial crack at a better
structure for the /conf content and fixing the breadcrumbs
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch dklco/conf-cleanup
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
commit c253ab1cec4efb3bcb40128b0159025d8fa56a69
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Jun 13 18:03:47 2019 -0500
Initial crack at a better structure for the /conf content and fixing the breadcrumbs
---
.../sling/cms/core/insights/impl/FakeResponse.java | 4 +-
.../cms/core/insights/impl/InsightFactoryImpl.java | 4 +-
.../core/internal/ResourceEditorAssociation.java | 80 +++++++++++++
.../internal/ResourceEditorAssociationConfig.java | 37 ++++++
.../ResourceEditorAssociationProvider.java | 38 +++++++
.../sling/cms/core/models/ContentBreadcrumb.java | 126 +++++++++++++++++++++
.../apache/sling/cms/core/models/package-info.java | 2 +-
.../main/resources/OSGI-INF/l10n/bundle.properties | 26 ++++-
.../internal/ResourceEditorAssociationTest.java | 94 +++++++++++++++
ui/src/main/resources/jcr_root/conf/global.json | 30 +++--
.../caconfig/fileeditor/config/edit.json | 42 +++----
.../sling-cms/components/caconfig/readability.json | 6 +-
.../sling-cms/components/caconfig/rewriter.json | 6 +-
.../components/caconfig/rewriter/config.json | 4 +
.../rewriter/{rewriter.jsp => config/config.jsp} | 24 ++--
.../components/caconfig/rewriter/config/edit.json | 25 ++++
.../components/caconfig/rewriter/edit.json | 25 ----
.../rewriter/{rewriter.jsp => include.jsp} | 16 +--
.../components/caconfig/sitesettings.json | 6 +-
.../components/caconfig/sitesettings/config.json | 4 +
.../{sitesettings.jsp => config/config.jsp} | 0
.../caconfig/sitesettings/{ => config}/edit.json | 0
.../sitesettings/{sitesettings.jsp => include.jsp} | 8 +-
.../sling-cms/components/caconfig/templates.json | 5 +
.../{site/site.jsp => templates/templates.jsp} | 13 +--
.../cms/contentbreadcrumb/contentbreadcrumb.jsp | 31 ++---
.../content/config/{list.json => bucket.json} | 63 +----------
.../{taxonomy/list.json => config/buckets.json} | 32 +++---
.../{taxonomy/list.json => config/configs.json} | 32 +++---
.../libs/sling-cms/content/config/create.json | 8 +-
.../libs/sling-cms/content/config/edit.json | 6 -
.../libs/sling-cms/content/site/content.json | 5 +-
.../libs/sling-cms/content/site/sites.json | 5 +-
.../libs/sling-cms/content/siteconfig/editor.json | 15 +--
.../jcr_root/libs/sling-cms/content/start.json | 4 +-
.../libs/sling-cms/content/static/content.json | 5 +-
.../libs/sling-cms/content/taxonomy/list.json | 3 +-
.../sling-cms/content/usergenerated/content.json | 3 +-
...nal.ResourceEditorAssociation-confbucket.config | 20 ++++
...al.ResourceEditorAssociation-confbuckets.config | 20 ++++
...ernal.ResourceEditorAssociation-confroot.config | 20 ++++
....internal.ResourceEditorAssociation-site.config | 21 ++++
...al.ResourceEditorAssociation-sitecontent.config | 21 ++++
...internal.ResourceEditorAssociation-sites.config | 22 ++++
...nternal.ResourceEditorAssociation-static.config | 20 ++++
...ernal.ResourceEditorAssociation-taxonomy.config | 20 ++++
...e.internal.ResourceEditorAssociation-ugc.config | 20 ++++
47 files changed, 752 insertions(+), 269 deletions(-)
diff --git a/core/src/main/java/org/apache/sling/cms/core/insights/impl/FakeResponse.java b/core/src/main/java/org/apache/sling/cms/core/insights/impl/FakeResponse.java
index 2827c11..bbe8933 100644
--- a/core/src/main/java/org/apache/sling/cms/core/insights/impl/FakeResponse.java
+++ b/core/src/main/java/org/apache/sling/cms/core/insights/impl/FakeResponse.java
@@ -166,7 +166,7 @@ public class FakeResponse implements HttpServletResponse {
@Override
public void reset() {
- throw new UnsupportedOperationException();
+ // do nothing
}
@Override
@@ -226,7 +226,7 @@ public class FakeResponse implements HttpServletResponse {
@Override
public void setLocale(Locale locale) {
- throw new UnsupportedOperationException();
+ // do nothing
}
@Override
diff --git a/core/src/main/java/org/apache/sling/cms/core/insights/impl/InsightFactoryImpl.java b/core/src/main/java/org/apache/sling/cms/core/insights/impl/InsightFactoryImpl.java
index 37986d0..9932b48 100644
--- a/core/src/main/java/org/apache/sling/cms/core/insights/impl/InsightFactoryImpl.java
+++ b/core/src/main/java/org/apache/sling/cms/core/insights/impl/InsightFactoryImpl.java
@@ -31,7 +31,7 @@ import org.apache.sling.cms.insights.InsightRequest;
import org.apache.sling.engine.SlingRequestProcessor;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
-import org.osgi.service.component.annotations.ReferenceCardinality;
+import org.osgi.service.component.annotations.ReferencePolicyOption;
/**
* Implementation of the InsightFactory service interface
@@ -39,7 +39,7 @@ import org.osgi.service.component.annotations.ReferenceCardinality;
@Component(immediate = true, service = { InsightFactory.class })
public class InsightFactoryImpl implements InsightFactory {
- @Reference(cardinality = ReferenceCardinality.MULTIPLE)
+ @Reference(policyOption = ReferencePolicyOption.GREEDY)
private List<InsightProvider> providers;
@Reference
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/ResourceEditorAssociation.java b/core/src/main/java/org/apache/sling/cms/core/internal/ResourceEditorAssociation.java
new file mode 100644
index 0000000..c431830
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/ResourceEditorAssociation.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.internal;
+
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.sling.api.resource.Resource;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
+import org.osgi.service.metatype.annotations.Designate;
+
+/**
+ * OSGi Component for setting the editor based on a path pattern. Used for
+ * constructing breadcrumbs.
+ */
+@Component(service = ResourceEditorAssociation.class, configurationPolicy = ConfigurationPolicy.REQUIRE, immediate = true)
+@Designate(ocd = ResourceEditorAssociationConfig.class, factory = true)
+public class ResourceEditorAssociation {
+
+ private Pattern pathPattern;
+ private String editor;
+ private String resourceType;
+ private String parentType;
+
+ @Activate
+ public void activate(ResourceEditorAssociationConfig config) {
+ this.pathPattern = Pattern.compile(config.pathPattern());
+ this.editor = config.editor();
+ this.resourceType = config.resourceType();
+ this.parentType = config.parentType();
+ }
+
+ public boolean matches(Resource resource) {
+ if (StringUtils.isNotBlank(parentType) && !hasParentType(resource)) {
+ return false;
+ }
+ if (StringUtils.isNotBlank(resourceType) && !resourceType.equals(resource.getResourceType())) {
+ return false;
+ }
+ return pathPattern.matcher(resource.getPath()).matches();
+ }
+
+ private boolean hasParentType(Resource resource) {
+ Resource parent = resource.getParent();
+ if (parent != null && !parent.getResourceType().equals(parentType)) {
+ return hasParentType(parent);
+ }
+ return parent != null && parent.getResourceType().equals(parentType);
+ }
+
+ public String getEditor() {
+ return editor;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return "ResourceEditorAssociation [pathPattern=" + pathPattern + ", editor=" + editor + ", resourceType="
+ + resourceType + ", parentType=" + parentType + "]";
+ }
+
+}
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/ResourceEditorAssociationConfig.java b/core/src/main/java/org/apache/sling/cms/core/internal/ResourceEditorAssociationConfig.java
new file mode 100644
index 0000000..644d36c
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/ResourceEditorAssociationConfig.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.internal;
+
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
+
+@ObjectClassDefinition(name = "%cms.resource.editor.assn.name", description = "%cms.resource.editor.assn.name", localization = "OSGI-INF/l10n/bundle")
+public @interface ResourceEditorAssociationConfig {
+
+ @AttributeDefinition(name = "%editor.name", description = "%editor.description")
+ String editor();
+
+ @AttributeDefinition(name = "%parentType.name", description = "%parentType.description")
+ String parentType();
+
+ @AttributeDefinition(name = "%path.pattern.name", description = "%path.pattern.description")
+ String pathPattern();
+
+ @AttributeDefinition(name = "%resourceType.name", description = "%resourceType.description")
+ String resourceType();
+
+}
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/ResourceEditorAssociationProvider.java b/core/src/main/java/org/apache/sling/cms/core/internal/ResourceEditorAssociationProvider.java
new file mode 100644
index 0000000..f1d09b7
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/ResourceEditorAssociationProvider.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.internal;
+
+import java.util.List;
+
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.annotations.ReferencePolicyOption;
+
+/**
+ * Service for retrieving the ResourceEditorAssociation configurations.
+ */
+@Component(service = ResourceEditorAssociationProvider.class)
+public class ResourceEditorAssociationProvider {
+
+ @Reference(policyOption = ReferencePolicyOption.GREEDY)
+ private List<ResourceEditorAssociation> associations;
+
+ public List<ResourceEditorAssociation> getAssociations() {
+ return associations;
+ }
+
+}
diff --git a/core/src/main/java/org/apache/sling/cms/core/models/ContentBreadcrumb.java b/core/src/main/java/org/apache/sling/cms/core/models/ContentBreadcrumb.java
new file mode 100644
index 0000000..7205807
--- /dev/null
+++ b/core/src/main/java/org/apache/sling/cms/core/models/ContentBreadcrumb.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.models;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.annotation.PostConstruct;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+import org.apache.jackrabbit.JcrConstants;
+import org.apache.sling.api.SlingHttpServletRequest;
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.cms.CMSConstants;
+import org.apache.sling.cms.core.internal.ResourceEditorAssociation;
+import org.apache.sling.cms.core.internal.ResourceEditorAssociationProvider;
+import org.apache.sling.models.annotations.Model;
+import org.apache.sling.models.annotations.injectorspecific.OSGiService;
+import org.osgi.annotation.versioning.ProviderType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Model for constructing the content breadcrumb.
+ */
+@ProviderType
+@Model(adaptables = SlingHttpServletRequest.class)
+public class ContentBreadcrumb {
+
+ private static final Logger log = LoggerFactory.getLogger(ContentBreadcrumb.class);
+
+ private long depth;
+
+ private List<Pair<String, String>> parents;
+
+ @OSGiService
+ private ResourceEditorAssociationProvider provider;
+
+ private Resource resource;
+
+ private String rootTitle;
+
+ public ContentBreadcrumb(SlingHttpServletRequest request) {
+ this.resource = request.getRequestPathInfo().getSuffixResource();
+
+ log.debug("Loading configuration from {}", request.getResource().getValueMap());
+ depth = request.getResource().getValueMap().get("depth", 0L);
+ rootTitle = request.getResource().getValueMap().get("rootTitle", String.class);
+
+ }
+
+ public String getCurrentItem() {
+ if ((parents == null || parents.isEmpty()) && StringUtils.isNotBlank(rootTitle)) {
+ return rootTitle;
+ }
+ return getTitle(resource);
+ }
+
+ private String getLink(Resource resource) {
+ log.debug("Getting link for {} from {}", resource, provider.getAssociations());
+ return provider.getAssociations().stream().filter(a -> a.matches(resource)).findFirst()
+ .map(ResourceEditorAssociation::getEditor).orElse("/bin/browser.html") + resource.getPath();
+ }
+
+ public List<Pair<String, String>> getParents() {
+ return parents;
+ }
+
+ private String getTitle(Resource resource) {
+ String title = resource.getValueMap().get(CMSConstants.PN_TITLE, String.class);
+ if (StringUtils.isNotBlank(title)) {
+ return title;
+ }
+ title = resource.getValueMap().get(JcrConstants.JCR_CONTENT + "/" + CMSConstants.PN_TITLE, String.class);
+ if (StringUtils.isNotBlank(title)) {
+ return title;
+ }
+ return resource.getName();
+ }
+
+ @PostConstruct
+ public void init() {
+ List<Resource> ps = new ArrayList<>();
+
+ Resource current = resource;
+ while (true) {
+ Resource parent = current.getParent();
+ if (parent != null) {
+ ps.add(parent);
+ current = parent;
+ } else {
+ break;
+ }
+ }
+ Collections.reverse(ps);
+
+ if (depth <= ps.size()) {
+ ps = ps.subList((int) depth, ps.size());
+ } else {
+ ps.clear();
+ }
+
+ parents = ps.stream().map(p -> new ImmutablePair<>(getLink(p), getTitle(p))).collect(Collectors.toList());
+ if (!parents.isEmpty() && StringUtils.isNotBlank(rootTitle)) {
+ parents.set(0, new ImmutablePair<>(parents.get(0).getLeft(), rootTitle));
+ }
+ }
+}
diff --git a/core/src/main/java/org/apache/sling/cms/core/models/package-info.java b/core/src/main/java/org/apache/sling/cms/core/models/package-info.java
index 783e35b..7e393d6 100644
--- a/core/src/main/java/org/apache/sling/cms/core/models/package-info.java
+++ b/core/src/main/java/org/apache/sling/cms/core/models/package-info.java
@@ -20,7 +20,7 @@
/**
* Package with all of the core models used to support the Sling reference CMS
*/
-@Version("2.1.0")
+@Version("2.2.0")
package org.apache.sling.cms.core.models;
import org.osgi.annotation.versioning.Version;
diff --git a/core/src/main/resources/OSGI-INF/l10n/bundle.properties b/core/src/main/resources/OSGI-INF/l10n/bundle.properties
index b1c254b..1b9cefc 100644
--- a/core/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ b/core/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -50,7 +50,7 @@ attributes using Sling Mappings
enabledPaths.name=Enabled Paths
enabledPaths.description=Paths under which this transformer will be enabled
-# Name Generator Entries
+## Name Generator Entries
cms.name.generator.name=Apache Sling CMS Property Hint Name Generator
cms.name.generator.description=Node Name generator for the Sling Post servlet \
which uses the value of a named node for generating the name of a newly created \
@@ -64,7 +64,7 @@ replacement.char.name=Replacement Character
replacement.char.description=A character with which to replace any non-allowed \
characters in the name
-# User Generated Content
+## User Generated Content
ugc.name=Apache Sling CMS User Generated Content
ugc.description=Service for creating buckets of User Generated Content
@@ -78,7 +78,7 @@ under the bucket. This will be sliced off the UUID, so if you had a UUID of 123
a bucket of bob and a path depth of 1, this would yield a path like: bob/1/123. \
This can be overridden by the path depth in the UGCBucketConfig.
-#Versioning Listener
+## Versioning Listener
cms.autoversioning.name=Apache Sling CMS Auto-Versioning
cms.autoversioning.description=A Resource Change listener to automatically version pages \
which are published, unpublished or updated having not been versioned in a defined time \
@@ -93,7 +93,7 @@ cms.autoversioning.cutoff.description=The cutoff for determine if the page shoul
auto-versioned. If the page has was last versioned before the cutoff, the page will be \
versioned.
-# Path Suggestion Servlet
+## Path Suggestion Servlet
pathsuggestionservlet.name=Apache Sling CMS Path Suggestion Servlet
pathsuggestionservlet.description=A servlet for providing suggested paths based \
on a stemmed path
@@ -133,4 +133,20 @@ pagespeed.param.enabled.name=Enabled
pagespeed.param.enabled.description=Whether or not the Page Speed Insight service is enabled
pagespeed.param.apikey.name=API Key
-pagespeed.param.apikey.description=The API key Google Cloud, see: https://developers.google.com/speed/docs/insights/
\ No newline at end of file
+pagespeed.param.apikey.description=The API key Google Cloud, see: https://developers.google.com/speed/docs/insights/
+
+## Resource Editor Association
+cms.resource.editor.assn.name=Apache Sling CMS - Resource Editor Association
+cms.resource.editor.assn.description=OSGi configuration for associating types and path patterns to an editor in Sling CMS
+
+path.pattern.name=Path Pattern
+path.pattern.description=A regular expression for determining if the resource matches the editor association
+
+editor.name=Editor Prefix
+editor.description=A URL prefix for the editor for this association
+
+resourceType.name=Resource Type
+resourceType.description=The resource type to determine if the resource matches the editor association, if not specified all resource types are supported
+
+parentType.name=Parent Resource Type
+parentType.description=To be considered matching, the resource must have a parent of the specified type, it not specified will not be evaluated
\ No newline at end of file
diff --git a/core/src/test/java/org/apache/sling/cms/core/internal/ResourceEditorAssociationTest.java b/core/src/test/java/org/apache/sling/cms/core/internal/ResourceEditorAssociationTest.java
new file mode 100644
index 0000000..2410942
--- /dev/null
+++ b/core/src/test/java/org/apache/sling/cms/core/internal/ResourceEditorAssociationTest.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.cms.core.internal;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.lang.annotation.Annotation;
+
+import org.apache.sling.api.resource.Resource;
+import org.apache.sling.cms.CMSConstants;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+
+public class ResourceEditorAssociationTest {
+
+ private ResourceEditorAssociation rea;
+
+ @Before
+ public void init() {
+ rea = new ResourceEditorAssociation(new ResourceEditorAssociationConfig() {
+
+ @Override
+ public Class<? extends Annotation> annotationType() {
+ return null;
+ }
+
+ @Override
+ public String pathPattern() {
+ return "/content.*";
+ }
+
+ @Override
+ public String editor() {
+ return "/cms/site/sites.html";
+ }
+
+ @Override
+ public String resourceType() {
+ return CMSConstants.NT_SITE;
+ }
+
+ @Override
+ public String parentType() {
+ return null;
+ }
+ });
+ }
+
+ @Test
+ public void testMatching() {
+ Resource matching = Mockito.mock(Resource.class);
+ Mockito.when(matching.getPath()).thenReturn("/content/sling-adobe-org");
+ Mockito.when(matching.getResourceType()).thenReturn(CMSConstants.NT_SITE);
+
+ assertTrue(rea.matches(matching));
+
+ assertEquals("/cms/site/sites.html", rea.getEditor());
+ }
+
+ @Test
+ public void testNonMatchingType() {
+ Resource matching = Mockito.mock(Resource.class);
+ Mockito.when(matching.getPath()).thenReturn("/content/sling-adobe-org");
+ Mockito.when(matching.getResourceType()).thenReturn(CMSConstants.NT_PAGE);
+
+ assertFalse(rea.matches(matching));
+ }
+
+ @Test
+ public void testNonMatchingPath() {
+ Resource matching = Mockito.mock(Resource.class);
+ Mockito.when(matching.getPath()).thenReturn("/conf/sling");
+ Mockito.when(matching.getResourceType()).thenReturn(CMSConstants.NT_SITE);
+
+ assertFalse(rea.matches(matching));
+ }
+}
diff --git a/ui/src/main/resources/jcr_root/conf/global.json b/ui/src/main/resources/jcr_root/conf/global.json
index 28bec56..11c4fd0 100644
--- a/ui/src/main/resources/jcr_root/conf/global.json
+++ b/ui/src/main/resources/jcr_root/conf/global.json
@@ -11,15 +11,12 @@
"jcr:title": "File Configurations"
},
"editors": {
- "jcr:primaryType": "sling:OrderedFolder",
- "jcr:content": {
- "jcr:primaryType": "nt:unstructured",
- "jcr:title": "File Editor"
- },
+ "jcr:primaryType": "sling:Config",
+ "sling:resourceType": "sling-cms/components/caconfig/fileeditor",
"default": {
- "jcr:primaryType": "sling:Config",
+ "jcr:primaryType": "nt:unstructured",
"jcr:title": "Default File Editor",
- "sling:resourceType": "sling-cms/components/caconfig/fileeditor",
+ "sling:resourceType": "sling-cms/components/caconfig/fileeditor/config",
"fields": {
"jcr:primaryType": "nt:unstructured",
"title": {
@@ -82,11 +79,15 @@
}
},
"site": {
- "jcr:primaryType": "sling:Config",
- "sling:resourceType": "sling-cms/components/caconfig/site",
- "jcr:title": "Default Site Configuration",
- "rewrite": {
+ "jcr:primaryType": "sling:OrderedFolder",
+ "jcr:content": {
"jcr:primaryType": "nt:unstructured",
+ "jcr:title": "Default Site Configuration"
+ },
+ "rewrite": {
+ "jcr:primaryType": "sling:Config",
+ "jcr:title": "Rewriter",
+ "sling:resourceType": "sling-cms/components/caconfig/rewriter",
"doctype": "<!DOCTYPE html>",
"attributes": [
"action",
@@ -95,10 +96,15 @@
]
},
"settings": {
+ "jcr:primaryType": "sling:Config",
+ "jcr:title": "Site Settings",
+ "sling:resourceType": "sling-cms/components/caconfig/sitesettings",
"taxonomyroot": "/etc/taxonomy"
},
"templates": {
- "jcr:primaryType": "nt:unstructured",
+ "jcr:primaryType": "sling:Config",
+ "jcr:title": "Templates",
+ "sling:resourceType": "sling-cms/components/caconfig/templates",
"base-page": {
"jcr:primaryType": "nt:unstructured",
"jcr:title": "Base Page",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/fileeditor/config/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/fileeditor/config/edit.json
index a47279b..92c9135 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/fileeditor/config/edit.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/fileeditor/config/edit.json
@@ -1,23 +1,23 @@
{
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/slingform",
- "button": "Save File Editor",
- "fields": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/container",
- "mimetypes": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/repeating",
- "type": "text",
- "label": "MIME Types",
- "name": "jcr:content/mimetypes",
- "required": true
- },
- "mimetypesTypeHint": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/hidden",
- "name": "jcr:content/mimetypes@TypeHint",
- "value":"String[]"
- }
- }
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/slingform",
+ "button": "Save File Editor",
+ "fields": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/general/container",
+ "mimetypes": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/repeating",
+ "type": "text",
+ "label": "MIME Types",
+ "name": "jcr:content/mimetypes",
+ "required": true
+ },
+ "mimetypesTypeHint": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/hidden",
+ "name": "jcr:content/mimetypes@TypeHint",
+ "value": "String[]"
+ }
+ }
}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/readability.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/readability.json
index e0f61ba..b5774b8 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/readability.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/readability.json
@@ -1,6 +1,6 @@
{
- "jcr:primaryType": "sling:Component",
- "jcr:title": "Sling CMS - Readability Configuration",
- "sling:resourceSuperType": "sling-cms/components/caconfig/base",
+ "jcr:primaryType": "sling:Component",
+ "jcr:title": "Sling CMS - Readability Configuration",
+ "sling:resourceSuperType": "sling-cms/components/caconfig/base",
"componentType": "SlingCMS-Config"
}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter.json
index b632efb..7815e85 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter.json
@@ -1,4 +1,6 @@
{
- "jcr:primaryType": "sling:Component",
- "jcr:title" : "Sling CMS - Rewriter Configuration"
+ "jcr:primaryType": "sling:Component",
+ "jcr:title": "Sling CMS - Rewriter Configuration",
+ "sling:resourceSuperType": "sling-cms/components/caconfig/base",
+ "componentType": "SlingCMS-Config"
}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/config.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/config.json
new file mode 100644
index 0000000..66b591f
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/config.json
@@ -0,0 +1,4 @@
+{
+ "jcr:primaryType": "sling:Component",
+ "jcr:title": "Sling CMS - Rewriter"
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/rewriter.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/config/config.jsp
similarity index 70%
copy from ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/rewriter.jsp
copy to ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/config/config.jsp
index 0e5a4c4..bcde6bc 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/rewriter.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/config/config.jsp
@@ -19,16 +19,16 @@
<%@include file="/libs/sling-cms/global.jsp"%>
<h3>Rewrite Configuration</h3>
<dl>
- <dt>Doctype</dt>
- <dd>
- <sling:encode value="${resource.valueMap.doctype}" mode="HTML" />
- </dd>
- <dt>Rewritten Attributes</dt>
- <dd>
- <ul>
- <c:forEach var="attribute" items="${resource.valueMap.attributes}">
- <sling:encode value="${attribute}" mode="HTML" />
- </c:forEach>
- </ul>
- </dd>
+ <dt>Doctype</dt>
+ <dd>
+ <sling:encode value="${resource.valueMap.doctype}" mode="HTML" />
+ </dd>
+ <dt>Rewritten Attributes</dt>
+ <dd>
+ <ul>
+ <c:forEach var="attribute" items="${resource.valueMap.attributes}">
+ <sling:encode value="${attribute}" mode="HTML" />
+ </c:forEach>
+ </ul>
+ </dd>
</dl>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/config/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/config/edit.json
new file mode 100644
index 0000000..ab1814a
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/config/edit.json
@@ -0,0 +1,25 @@
+ {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/slingform",
+ "button": "Save Rewrite Config",
+ "fields": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/general/container",
+ "doctype": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/text",
+ "label": "Doctype",
+ "name": "doctype",
+ "type": "nt:unstructured",
+ "required": true
+ },
+ "attributes": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/repeating",
+ "label": "Rewritten Attributes",
+ "name": "attributes",
+ "type": "text",
+ "required": true
+ }
+ }
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/edit.json
deleted file mode 100644
index 9f296f1..0000000
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/edit.json
+++ /dev/null
@@ -1,25 +0,0 @@
- {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/slingform",
- "button": "Save Rewrite Config",
- "fields": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/container",
- "doctype": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/text",
- "label": "Doctype",
- "name": "doctype",
- "type": "nt:unstructured",
- "required": true
- },
- "attributes": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/repeating",
- "label": "Rewritten Attributes",
- "name": "attributes",
- "type": "text",
- "required": true
- }
- }
-}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/rewriter.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/include.jsp
similarity index 71%
rename from ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/rewriter.jsp
rename to ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/include.jsp
index 0e5a4c4..93ab64b 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/rewriter.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/rewriter/include.jsp
@@ -17,18 +17,4 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<h3>Rewrite Configuration</h3>
-<dl>
- <dt>Doctype</dt>
- <dd>
- <sling:encode value="${resource.valueMap.doctype}" mode="HTML" />
- </dd>
- <dt>Rewritten Attributes</dt>
- <dd>
- <ul>
- <c:forEach var="attribute" items="${resource.valueMap.attributes}">
- <sling:encode value="${attribute}" mode="HTML" />
- </c:forEach>
- </ul>
- </dd>
-</dl>
\ No newline at end of file
+<sling:include path="${slingRequest.requestPathInfo.suffix}" resourceType="sling-cms/components/caconfig/rewriter/config" />
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings.json
index 82a1f0f..0596b11 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings.json
@@ -1,4 +1,6 @@
{
- "jcr:primaryType": "sling:Component",
- "jcr:title" : "Sling CMS - Site Settings"
+ "jcr:primaryType": "sling:Component",
+ "jcr:title": "Sling CMS - Site Settings",
+ "sling:resourceSuperType": "sling-cms/components/caconfig/base",
+ "componentType": "SlingCMS-Config"
}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/config.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/config.json
new file mode 100644
index 0000000..dbd0eb5
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/config.json
@@ -0,0 +1,4 @@
+{
+ "jcr:primaryType": "sling:Component",
+ "jcr:title": "Sling CMS - Site Settings"
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/sitesettings.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/config/config.jsp
similarity index 100%
copy from ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/sitesettings.jsp
copy to ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/config/config.jsp
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/config/edit.json
similarity index 100%
rename from ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/edit.json
rename to ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/config/edit.json
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/sitesettings.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/include.jsp
similarity index 87%
rename from ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/sitesettings.jsp
rename to ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/include.jsp
index 3fe200d..8f4d927 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/sitesettings.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/sitesettings/include.jsp
@@ -17,10 +17,4 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<h3>Site Settings</h3>
-<dl>
- <dt>Taxonomy Root</dt>
- <dd>
- ${properties.taxonomyroot}
- </dd>
-</dl>
\ No newline at end of file
+<sling:include path="${slingRequest.requestPathInfo.suffix}" resourceType="sling-cms/components/caconfig/sitesettings/config" />
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/templates.json b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/templates.json
new file mode 100644
index 0000000..af82927
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/templates.json
@@ -0,0 +1,5 @@
+{
+ "jcr:primaryType": "sling:Component",
+ "jcr:title": "Sling CMS - Templates Configuration",
+ "componentType": "SlingCMS-Config"
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/site/site.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/templates/templates.jsp
similarity index 62%
rename from ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/site/site.jsp
rename to ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/templates/templates.jsp
index fb309a3..9f45399 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/site/site.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/caconfig/templates/templates.jsp
@@ -17,15 +17,4 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-
- <c:set var="cmsEditEnabled" value="true" scope="request" />
-<sling:call script="/libs/sling-cms/components/editor/scripts/init.jsp" />
-
-<sling:include path="${slingRequest.requestPathInfo.suffix}/settings" resourceType="sling-cms/components/caconfig/sitesettings" />
-
-<sling:include path="${slingRequest.requestPathInfo.suffix}/rewrite" resourceType="sling-cms/components/caconfig/rewriter" />
-
-<sling:call script="/libs/sling-cms/components/editor/scripts/finalize.jsp" />
-<c:set var="cmsEditEnabled" value="false" scope="request" />
-
-<sling:include path="/mnt/overlay/sling-cms/content/siteconfig/editor" resourceType="sling-cms/components/general/container" replaceSuffix="${slingRequest.requestPathInfo.suffix}" />
\ No newline at end of file
+<sling:include path="/mnt/overlay/sling-cms/content/siteconfig/editor" resourceType="sling-cms/components/general/container" replaceSuffix="${slingRequest.requestPathInfo.suffixResource.parent.path}" />
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
index 18212b7..694fd5e 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentbreadcrumb/contentbreadcrumb.jsp
@@ -17,29 +17,20 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<sling:getParent resource="${slingRequest.requestPathInfo.suffixResource}" var="root" level="${resource.valueMap.depth}" />
+<sling:adaptTo var="breadcrumb" adaptable="${slingRequest}" adaptTo="org.apache.sling.cms.core.models.ContentBreadcrumb" />
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
- <li>
- <a href="${resource.valueMap.prefix}${root.path}">
- <sling:encode value="${root.valueMap['jcr:title'] != null ? root.valueMap['jcr:title'] : root.valueMap['jcr:content/jcr:title']}" default="${root.name}" mode="HTML" />
- </a>
- </li>
- <c:if test="${site.path != slingRequest.requestPathInfo.suffix && site.path != slingRequest.requestPathInfo.suffixResource.parent.path}">
- <c:forEach var="parent" items="${sling:getParents(slingRequest.requestPathInfo.suffixResource,(resource.valueMap.depth + 1))}">
- <li>
- <a href="${resource.valueMap.prefix}${parent.path}">
- <sling:encode value="${parent.valueMap['jcr:title'] != null ? parent.valueMap['jcr:title'] : parent.valueMap['jcr:content/jcr:title']}" default="${parent.name}" mode="HTML" />
- </a>
- </li>
- </c:forEach>
- </c:if>
- <c:if test="${root.path != slingRequest.requestPathInfo.suffix}">
- <li class="is-active">
- <a href="#">
- <sling:encode value="${slingRequest.requestPathInfo.suffixResource.valueMap['jcr:title'] != null ? slingRequest.requestPathInfo.suffixResource.valueMap['jcr:title'] : slingRequest.requestPathInfo.suffixResource.valueMap['jcr:content/jcr:title']}" default="${slingRequest.requestPathInfo.suffixResource.name}" mode="HTML" />
+ <c:forEach var="parent" items="${breadcrumb.parents}">
+ <li>
+ <a href="${parent.left}">
+ <sling:encode value="${parent.right}" mode="HTML" />
</a>
</li>
- </c:if>
+ </c:forEach>
+ <li class="is-active">
+ <a href="#">
+ <sling:encode value="${breadcrumb.currentItem}" mode="HTML" />
+ </a>
+ </li>
</ul>
</nav>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/list.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/bucket.json
similarity index 60%
rename from ui/src/main/resources/jcr_root/libs/sling-cms/content/config/list.json
rename to ui/src/main/resources/jcr_root/libs/sling-cms/content/config/bucket.json
index 2604694..28ef374 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/list.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/bucket.json
@@ -11,11 +11,6 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentactions",
"actions": {
- "folder": {
- "jcr:primaryType": "nt:unstructured",
- "label": "Folder",
- "prefix": "/cms/folder/create.html"
- },
"config": {
"jcr:primaryType": "nt:unstructured",
"label": "Config",
@@ -26,8 +21,8 @@
"contentbreadcrumb": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
- "depth": 2,
- "prefix": "/cms/config/list.html"
+ "depth": 1,
+ "rootTitle": "Configuration"
},
"contenttable": {
"jcr:primaryType": "nt:unstructured",
@@ -106,60 +101,6 @@
}
}
}
- },
- "sling:OrderedFolder": {
- "jcr:primaryType": "nt:unstructured",
- "columns": {
- "jcr:primaryType": "nt:unstructured",
- "name": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/columns/name",
- "link": true,
- "prefix": "/cms/config/list.html"
- },
- "title": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/columns/text",
- "property": "jcr:content/jcr:title"
- },
- "lastModified": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
- "subPath": "jcr:content"
- },
- "actions": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/columns/actions",
- "edit": {
- "jcr:primaryType": "nt:unstructured",
- "modal": true,
- "title": "Edit Folder Properties",
- "icon": "cog",
- "prefix": "/cms/folder/edit.html"
- },
- "references": {
- "jcr:primaryType": "nt:unstructured",
- "modal": true,
- "title": "References",
- "icon": "directions",
- "prefix": "/cms/shared/references.html"
- },
- "movecopy": {
- "jcr:primaryType": "nt:unstructured",
- "modal": true,
- "title": "Move / Copy Folder",
- "icon": "move-alt",
- "prefix": "/cms/shared/movecopy.html"
- },
- "delete": {
- "jcr:primaryType": "nt:unstructured",
- "modal": true,
- "title": "Delete Folder",
- "icon": "trash",
- "prefix": "/cms/shared/delete.html"
- }
- }
- }
}
}
}
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/buckets.json
similarity index 84%
copy from ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
copy to ui/src/main/resources/jcr_root/libs/sling-cms/content/config/buckets.json
index fcc0aee..308ebde 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/buckets.json
@@ -2,7 +2,7 @@
"jcr:primaryType": "sling:Page",
"jcr:content": {
"sling:resourceType": "sling-cms/components/pages/base",
- "jcr:title": "Taxonomy",
+ "jcr:title": "Configurations",
"jcr:primaryType": "nt:unstructured",
"container": {
"jcr:primaryType": "nt:unstructured",
@@ -11,18 +11,18 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentactions",
"actions": {
- "taxonomy": {
+ "folder": {
"jcr:primaryType": "nt:unstructured",
- "label": "Taxonomy Item",
- "prefix": "/cms/taxonomy/create.html"
+ "label": "Bucket",
+ "prefix": "/cms/folder/create.html"
}
}
},
"contentbreadcrumb": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
- "depth": 2,
- "prefix": "/cms/taxonomy/list.html"
+ "depth": 1,
+ "rootTitle": "Configuration"
},
"contenttable": {
"jcr:primaryType": "nt:unstructured",
@@ -48,7 +48,7 @@
},
"types": {
"jcr:primaryType": "nt:unstructured",
- "sling:Taxonomy": {
+ "sling:OrderedFolder": {
"jcr:primaryType": "nt:unstructured",
"columns": {
"jcr:primaryType": "nt:unstructured",
@@ -56,17 +56,17 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/columns/name",
"link": true,
- "prefix": "/cms/taxonomy/list.html"
+ "prefix": "/cms/config/bucket.html"
},
"title": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/columns/text",
- "property": "jcr:title"
+ "property": "jcr:content/jcr:title"
},
"lastModified": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
- "subPath": ""
+ "subPath": "jcr:content"
},
"actions": {
"jcr:primaryType": "nt:unstructured",
@@ -74,9 +74,9 @@
"edit": {
"jcr:primaryType": "nt:unstructured",
"modal": true,
- "title": "Edit Taxonomy Item",
- "icon": "pencil-f",
- "prefix": "/cms/taxonomy/edit.html"
+ "title": "Edit Folder Properties",
+ "icon": "cog",
+ "prefix": "/cms/folder/edit.html"
},
"references": {
"jcr:primaryType": "nt:unstructured",
@@ -88,14 +88,14 @@
"movecopy": {
"jcr:primaryType": "nt:unstructured",
"modal": true,
- "title": "Move / Copy Taxonomy Item",
+ "title": "Move / Copy Folder",
"icon": "move-alt",
"prefix": "/cms/shared/movecopy.html"
},
"delete": {
"jcr:primaryType": "nt:unstructured",
"modal": true,
- "title": "Delete Taxonomy Item",
+ "title": "Delete Folder",
"icon": "trash",
"prefix": "/cms/shared/delete.html"
}
@@ -106,4 +106,4 @@
}
}
}
-}
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/configs.json
similarity index 84%
copy from ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
copy to ui/src/main/resources/jcr_root/libs/sling-cms/content/config/configs.json
index fcc0aee..fd81c6a 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/configs.json
@@ -2,7 +2,7 @@
"jcr:primaryType": "sling:Page",
"jcr:content": {
"sling:resourceType": "sling-cms/components/pages/base",
- "jcr:title": "Taxonomy",
+ "jcr:title": "Configurations",
"jcr:primaryType": "nt:unstructured",
"container": {
"jcr:primaryType": "nt:unstructured",
@@ -11,18 +11,18 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentactions",
"actions": {
- "taxonomy": {
+ "folder": {
"jcr:primaryType": "nt:unstructured",
- "label": "Taxonomy Item",
- "prefix": "/cms/taxonomy/create.html"
+ "label": "Config Context",
+ "prefix": "/cms/folder/create.html"
}
}
},
"contentbreadcrumb": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
- "depth": 2,
- "prefix": "/cms/taxonomy/list.html"
+ "depth": 1,
+ "rootTitle": "Configuration"
},
"contenttable": {
"jcr:primaryType": "nt:unstructured",
@@ -48,7 +48,7 @@
},
"types": {
"jcr:primaryType": "nt:unstructured",
- "sling:Taxonomy": {
+ "sling:OrderedFolder": {
"jcr:primaryType": "nt:unstructured",
"columns": {
"jcr:primaryType": "nt:unstructured",
@@ -56,17 +56,17 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/columns/name",
"link": true,
- "prefix": "/cms/taxonomy/list.html"
+ "prefix": "/cms/config/buckets.html"
},
"title": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/columns/text",
- "property": "jcr:title"
+ "property": "jcr:content/jcr:title"
},
"lastModified": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/columns/lastmodified",
- "subPath": ""
+ "subPath": "jcr:content"
},
"actions": {
"jcr:primaryType": "nt:unstructured",
@@ -74,9 +74,9 @@
"edit": {
"jcr:primaryType": "nt:unstructured",
"modal": true,
- "title": "Edit Taxonomy Item",
- "icon": "pencil-f",
- "prefix": "/cms/taxonomy/edit.html"
+ "title": "Edit Folder Properties",
+ "icon": "cog",
+ "prefix": "/cms/folder/edit.html"
},
"references": {
"jcr:primaryType": "nt:unstructured",
@@ -88,14 +88,14 @@
"movecopy": {
"jcr:primaryType": "nt:unstructured",
"modal": true,
- "title": "Move / Copy Taxonomy Item",
+ "title": "Move / Copy Folder",
"icon": "move-alt",
"prefix": "/cms/shared/movecopy.html"
},
"delete": {
"jcr:primaryType": "nt:unstructured",
"modal": true,
- "title": "Delete Taxonomy Item",
+ "title": "Delete Folder",
"icon": "trash",
"prefix": "/cms/shared/delete.html"
}
@@ -106,4 +106,4 @@
}
}
}
-}
+}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/create.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/create.json
index 3d91f00..297b526 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/create.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/create.json
@@ -11,7 +11,7 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/slingform",
"actionSuffix": "/*",
- "button": "Create Site Config",
+ "button": "Create Config",
"successPrepend": "/libs/sling-cms/content/site/content.html",
"fields": {
"jcr:primaryType": "nt:unstructured",
@@ -42,12 +42,6 @@
"name": "jcr:primaryType",
"value": "sling:Config"
},
- "pageTemplatesPrimaryType": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/hidden",
- "name": "pageTemplates/jcr:primaryType",
- "value": "nt:unstructured"
- },
"type": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/editor/fields/select",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/edit.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/edit.json
index 7c21313..59be611 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/edit.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/config/edit.json
@@ -12,12 +12,6 @@
"sling:resourceType": "sling-cms/components/general/richtext",
"text": "<h2>Edit Configuration</h2>"
},
- "contentbreadcrumb": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
- "depth": 2,
- "prefix": "/cms/config/list.html"
- },
"editconfig": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/caconfig/edit"
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json
index 9ed8e82..1241863 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/content.json
@@ -31,9 +31,8 @@
"contentbreadcrumb": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
- "depth": 2,
- "prefix": "/cms/site/content.html",
- "titleProp": "jcr:content/jcr:title"
+ "depth": 1,
+ "rootTitle": "Sites"
},
"contenttable": {
"jcr:primaryType": "nt:unstructured",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
index 4abc99a..56e6176 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/site/sites.json
@@ -28,9 +28,8 @@
"contentbreadcrumb": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
- "depth": 2,
- "prefix": "/cms/site/sites.html",
- "titleProp": "jcr:content/jcr:title"
+ "depth": 1,
+ "rootTitle": "Sites"
},
"contenttable": {
"jcr:primaryType": "nt:unstructured",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/siteconfig/editor.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/siteconfig/editor.json
index e879931..8df1da5 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/siteconfig/editor.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/siteconfig/editor.json
@@ -1,3 +1,4 @@
+
{
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/general/container",
@@ -72,13 +73,13 @@
"icon": "pencil-f",
"prefix": "/cms/template/edit.html"
},
- "references": {
- "jcr:primaryType": "nt:unstructured",
- "modal": true,
- "title": "References",
- "icon": "directions",
- "prefix": "/cms/shared/references.html"
- },
+ "references": {
+ "jcr:primaryType": "nt:unstructured",
+ "modal": true,
+ "title": "References",
+ "icon": "directions",
+ "prefix": "/cms/shared/references.html"
+ },
"movecopy": {
"jcr:primaryType": "nt:unstructured",
"modal": true,
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json
index 4645ffa..a6fa87b 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/start.json
@@ -52,9 +52,9 @@
"jcr:primaryType": "nt:unstructured",
"alternatives": [
"/cms/template/edit.html",
- "/cms/config/edit.html"
+ "/cms/config"
],
- "link": "/cms/config/list.html/conf",
+ "link": "/cms/config/configs.html/conf",
"text": "Configuration"
},
"usergenerated": {
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json
index 3f2a07b..77a36e4 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/static/content.json
@@ -26,9 +26,8 @@
"contentbreadcrumb": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
- "depth": 2,
- "prefix": "/cms/static/content.html",
- "titleProp": "jcr:content/jcr:title"
+ "depth": 1,
+ "rootTitle": "Static Content"
},
"contenttable": {
"jcr:primaryType": "nt:unstructured",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
index fcc0aee..7c7604e 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/taxonomy/list.json
@@ -21,8 +21,7 @@
"contentbreadcrumb": {
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
- "depth": 2,
- "prefix": "/cms/taxonomy/list.html"
+ "depth": 2
},
"contenttable": {
"jcr:primaryType": "nt:unstructured",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json
index e5223f0..e91504e 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/content/usergenerated/content.json
@@ -22,8 +22,7 @@
"jcr:primaryType": "nt:unstructured",
"sling:resourceType": "sling-cms/components/cms/contentbreadcrumb",
"depth": 2,
- "prefix": "/cms/usergenerated/content.html",
- "titleProp": "jcr:content/jcr:title"
+ "rootTitle": "User Generated Content"
},
"contenttable": {
"jcr:primaryType": "nt:unstructured",
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-confbucket.config b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-confbucket.config
new file mode 100644
index 0000000..23fa083
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-confbucket.config
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pathPattern="\\/conf\\/[\\w\\d\\-_]+\\/[\\w\\d\\-_]+"
+editor="/cms/config/bucket.html"
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-confbuckets.config b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-confbuckets.config
new file mode 100644
index 0000000..28705e4
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-confbuckets.config
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pathPattern="\\/conf\\/[\\w\\d\-_]+"
+editor="/cms/config/buckets.html"
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-confroot.config b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-confroot.config
new file mode 100644
index 0000000..5216e0e
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-confroot.config
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pathPattern="\\/conf"
+editor="/cms/config/configs.html"
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-site.config b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-site.config
new file mode 100644
index 0000000..a9e5152
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-site.config
@@ -0,0 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pathPattern="\\/content.*"
+editor="/cms/site/content.html"
+resourceType="sling:Site"
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-sitecontent.config b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-sitecontent.config
new file mode 100644
index 0000000..ecb6ab0
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-sitecontent.config
@@ -0,0 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pathPattern="\\/content.*"
+editor="/cms/site/content.html"
+parentType="sling:Site"
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-sites.config b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-sites.config
new file mode 100644
index 0000000..3e594bc
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-sites.config
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pathPattern="\\/content.*"
+editor="/cms/site/sites.html"
+resourceType="sling:OrderedFolder"
+service.ranking=I"-1"
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-static.config b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-static.config
new file mode 100644
index 0000000..6fd4be4
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-static.config
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pathPattern="\\/static.*"
+editor="/cms/static/content.html"
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-taxonomy.config b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-taxonomy.config
new file mode 100644
index 0000000..bdd5a99
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-taxonomy.config
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pathPattern="\\/etc\\/taxonomy.*"
+editor="/cms/taxonomy/list.html"
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-ugc.config b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-ugc.config
new file mode 100644
index 0000000..1b7d94a
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/install/org.apache.sling.cms.core.internal.ResourceEditorAssociation-ugc.config
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+pathPattern="\\/etc\\/usergenerated.*"
+editor="/cms/usergenerated/content.html"
\ No newline at end of file