Tobias Jeger pushed to branch master at cms-community / hippo-essentials

Commits:
3830497a by Tobias Jeger at 2017-08-09T09:58:25+02:00
ESSENTIALS-1093 Remove obsolete TaggingInstructionPackage

setting up /tags is now done from the CMS plugin, see HIPPLUG-1478.

- - - - -
a78efcbd by Tobias Jeger at 2017-08-09T15:56:59+02:00
ESSENTIALS-1093 Lower setup installation FSM flag

- - - - -
49858070 by Tobias Jeger at 2017-08-09T15:59:20+02:00
ESSENTIALS-1093 Reintegrate 'bugfix/ESSENTIALS-1093'

- - - - -


3 changed files:

- − 
plugins/tagging/src/main/java/org/onehippo/cms7/essentials/plugins/tagging/TaggingInstructionPackage.java
- 
plugins/tagging/src/main/java/org/onehippo/cms7/essentials/plugins/tagging/TaggingParameterService.java
- plugins/tagging/src/main/resources/plugin-descriptor.json


Changes:

=====================================
plugins/tagging/src/main/java/org/onehippo/cms7/essentials/plugins/tagging/TaggingInstructionPackage.java
 deleted
=====================================
--- 
a/plugins/tagging/src/main/java/org/onehippo/cms7/essentials/plugins/tagging/TaggingInstructionPackage.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2014 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.onehippo.cms7.essentials.plugins.tagging;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.onehippo.cms7.essentials.dashboard.ctx.PluginContext;
-import org.onehippo.cms7.essentials.dashboard.instructions.InstructionStatus;
-import 
org.onehippo.cms7.essentials.dashboard.packaging.DefaultInstructionPackage;
-import org.onehippo.cms7.essentials.dashboard.utils.GlobalUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Forget about instructions. All we need to do is create a facet navigation 
node.
- */
-public class TaggingInstructionPackage extends DefaultInstructionPackage {
-
-    private static Logger log = 
LoggerFactory.getLogger(TaggingInstructionPackage.class);
-
-    @Override
-    public InstructionStatus execute(final PluginContext context) {
-        InstructionStatus status = InstructionStatus.SUCCESS;
-        final Session session = context.createSession();
-        try {
-            if (!session.nodeExists("/tags")) {
-                final Node rootNode = session.getRootNode();
-                final Node tags = rootNode.addNode("tags", 
"hippofacnav:facetnavigation");
-                final String rootIdentifier = 
session.getNode("/content").getIdentifier();
-                tags.setProperty("hippo:docbase", rootIdentifier);
-                tags.setProperty("hippofacnav:facets", new 
String[]{"hippostd:tags"});
-                tags.setProperty("hippofacnav:limit", 100);
-                session.save();
-            } else {
-                log.debug("/tags node already exists");
-            }
-        } catch (RepositoryException e) {
-            status = InstructionStatus.FAILED;
-            log.error("Error setting up /tags facet node", e);
-        } finally {
-            GlobalUtils.cleanupSession(session);
-        }
-
-        return status;
-    }
-}
\ No newline at end of file


=====================================
plugins/tagging/src/main/java/org/onehippo/cms7/essentials/plugins/tagging/TaggingParameterService.java
=====================================
--- 
a/plugins/tagging/src/main/java/org/onehippo/cms7/essentials/plugins/tagging/TaggingParameterService.java
+++ 
b/plugins/tagging/src/main/java/org/onehippo/cms7/essentials/plugins/tagging/TaggingParameterService.java
@@ -21,7 +21,7 @@ import 
org.onehippo.cms7.essentials.dashboard.config.PluginParameterService;
 public class TaggingParameterService implements PluginParameterService {
     @Override
     public boolean hasSetup() {
-        return true;
+        return false;
     }
 
     @Override


=====================================
plugins/tagging/src/main/resources/plugin-descriptor.json
=====================================
--- a/plugins/tagging/src/main/resources/plugin-descriptor.json
+++ b/plugins/tagging/src/main/resources/plugin-descriptor.json
@@ -11,7 +11,6 @@
   ],
   "documentationLink": 
"http://www.onehippo.org/library/concepts/plugins/tagging/about.html";,
   "parameterServiceClass": 
"org.onehippo.cms7.essentials.plugins.tagging.TaggingParameterService",
-  "packageClass": 
"org.onehippo.cms7.essentials.plugins.tagging.TaggingInstructionPackage",
   "restClasses": [
     "org.onehippo.cms7.essentials.plugins.tagging.TaggingResource"
   ],



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-essentials/compare/0ef543b3954cce2b6b49e4228ee178b9cd9a6728...49858070147887c584aa2b94a96edf83e6ecc9aa

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-essentials/compare/0ef543b3954cce2b6b49e4228ee178b9cd9a6728...49858070147887c584aa2b94a96edf83e6ecc9aa
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

Reply via email to