Commit c51896ae authored by Unico Hommes's avatar Unico Hommes

REPO-1075 remove obsolete updater modules and hippo:version property

parent 239da581
......@@ -203,7 +203,6 @@ frontend/src/main/java/org/hippoecm/hst/plugins/frontend/util/IOUtil.java svneol
frontend/src/main/java/org/hippoecm/hst/plugins/frontend/util/JcrUtilities.java svneol=native#text/plain
/pom.xml svneol=native#text/plain
repository/pom.xml svneol=native#text/plain
repository/src/main/java/org/hippoecm/hst/plugins/upgrade/HstConfigEditorUpgrader18a.java svneol=native#text/plain
repository/src/main/resources/hide-hst-namespace.xml -text
repository/src/main/resources/hippoecm-extension.xml svneol=native#text/plain
repository/src/main/resources/hst-editor-auth.xml -text svneol=unset#text/plain
......
/*
* Copyright 2010-2013 Hippo B.V. (http://www.onehippo.com)
*
* Licensed 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.hippoecm.hst.plugins.upgrade;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
import org.hippoecm.repository.ext.UpdaterContext;
import org.hippoecm.repository.ext.UpdaterItemVisitor;
import org.hippoecm.repository.ext.UpdaterModule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HstConfigEditorUpgrader12a implements UpdaterModule {
static final Logger log = LoggerFactory.getLogger(HstConfigEditorUpgrader12a.class);
public void register(final UpdaterContext context) {
context.registerName("hst-config-editor-upgrade-v12a");
context.registerStartTag("v12a");
context.registerEndTag("v12a-hst-config-editor");
// re-read parts of the configuration
context.registerVisitor(new UpdaterItemVisitor.PathVisitor("/hippo:configuration/hippo:initialize") {
@Override
protected void leaving(Node node, int level) throws RepositoryException {
if (node.hasNode("hst-editor-namespace")) {
node.getNode("hst-editor-loader").remove();
node.getNode("hst-editor").remove();
node.getNode("hst-editor-namespace").remove();
node.getNode("hst-editor-views").remove();
node.getNode("hst-editor-pickers").remove();
node.getNode("hst-editor-tree-views").remove();
node.getNode("hst-editor-navigator").remove();
node.getNode("hst-folder-views").remove();
if (node.hasNode("hst-editor-auth")) {
node.getNode("hst-editor-auth").remove();
}
}
}
});
context.registerVisitor(new UpdaterItemVisitor.PathVisitor("/hippo:namespaces") {
@Override
protected void leaving(Node node, int level) throws RepositoryException {
if (node.hasNode("hst")) {
node.getNode("hst").remove();
}
}
});
context.registerVisitor(new UpdaterItemVisitor.PathVisitor("/hippo:configuration/hippo:frontend/cms") {
@Override
protected void leaving(Node node, int level) throws RepositoryException {
Node cmsStatic = node.getNode("cms-static");
if (cmsStatic.hasNode("hst-editor-loader")) {
cmsStatic.getNode("hst-editor-loader").remove();
node.getNode("hst-editor").remove();
node.getNode("hst-editor-views").remove();
node.getNode("hst-editor-pickers").remove();
node.getNode("hst-editor-tree-views").remove();
node.getNode("hst-editor-navigator").remove();
node.getNode("hst-folder-views").remove();
}
}
});
context.registerVisitor(new UpdaterItemVisitor.PathVisitor("/hippo:configuration/hippo:domains/frontendconfig/frontent-plugins") {
@Override
protected void leaving(Node node, int level) throws RepositoryException {
if (node.hasNode("exclude-hst")) {
node.getNode("exclude-hst").remove();
}
}
});
}
}
/*
* Copyright 2010-2013 Hippo B.V. (http://www.onehippo.com)
*
* Licensed 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.hippoecm.hst.plugins.upgrade;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
import org.hippoecm.repository.ext.UpdaterContext;
import org.hippoecm.repository.ext.UpdaterItemVisitor;
import org.hippoecm.repository.ext.UpdaterModule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HstConfigEditorUpgrader18a implements UpdaterModule {
static final Logger log = LoggerFactory.getLogger(HstConfigEditorUpgrader18a.class);
public void register(final UpdaterContext context) {
context.registerName("hst-config-editor-upgrade-v18a");
context.registerStartTag("v12a-hst-config-editor");
context.registerEndTag("v18a-hst-config-editor");
// re-read parts of the configuration
context.registerVisitor(new UpdaterItemVisitor.PathVisitor("/hippo:configuration/hippo:initialize") {
@Override
protected void leaving(Node node, int level) throws RepositoryException {
if (node.hasNode("hst-editor-namespace")) {
node.getNode("hst-editor-loader").remove();
node.getNode("hst-editor").remove();
node.getNode("hst-editor-namespace").remove();
node.getNode("hst-editor-views").remove();
node.getNode("hst-editor-pickers").remove();
node.getNode("hst-editor-tree-views").remove();
node.getNode("hst-editor-navigator").remove();
node.getNode("hst-folder-views").remove();
if (node.hasNode("hst-editor-auth")) {
node.getNode("hst-editor-auth").remove();
}
}
}
});
context.registerVisitor(new UpdaterItemVisitor.PathVisitor("/hippo:namespaces") {
@Override
protected void leaving(Node node, int level) throws RepositoryException {
if (node.hasNode("hst")) {
node.getNode("hst").remove();
}
}
});
context.registerVisitor(new UpdaterItemVisitor.PathVisitor("/hippo:configuration/hippo:frontend/cms") {
@Override
protected void leaving(Node node, int level) throws RepositoryException {
Node cmsStatic = node.getNode("cms-static");
if (cmsStatic.hasNode("hst-editor-loader")) {
cmsStatic.getNode("hst-editor-loader").remove();
node.getNode("hst-editor").remove();
node.getNode("hst-editor-views").remove();
node.getNode("hst-editor-pickers").remove();
node.getNode("hst-editor-tree-views").remove();
node.getNode("hst-editor-navigator").remove();
node.getNode("hst-folder-views").remove();
}
}
});
context.registerVisitor(new UpdaterItemVisitor.PathVisitor("/hippo:configuration/hippo:domains/frontendconfig/frontent-plugins") {
@Override
protected void leaving(Node node, int level) throws RepositoryException {
if (node.hasNode("exclude-hst")) {
node.getNode("exclude-hst").remove();
}
}
});
}
}
......@@ -21,11 +21,7 @@
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:initializefolder</sv:value>
</sv:property>
<sv:property sv:name="hippo:version" sv:type="String">
<sv:value>v18a-hst-config-editor</sv:value>
</sv:property>
<sv:node sv:name="hstconfigedit">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:initializeitem</sv:value>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment