[HippoCMS-scm] [Git][cms-community/hippo-testsuite][feature/spaplus] HSTTWO-4268: Adding menu model contribution example

2018-03-14 Thread Woonsan Ko
Woonsan Ko pushed to branch feature/spaplus at cms-community / hippo-testsuite


Commits:
0fd05a6d by Woonsan Ko at 2018-03-14T15:41:57-04:00
HSTTWO-4268: Adding menu model contribution example

- - - - -


1 changed file:

- components/src/main/java/org/hippoecm/hst/demo/components/LeftMenu.java


Changes:

=
components/src/main/java/org/hippoecm/hst/demo/components/LeftMenu.java
=
--- a/components/src/main/java/org/hippoecm/hst/demo/components/LeftMenu.java
+++ b/components/src/main/java/org/hippoecm/hst/demo/components/LeftMenu.java
@@ -50,7 +50,7 @@ public class LeftMenu extends BaseHstComponent {
 }
 }
 }
-request.setAttribute("menu", editable);
+request.setModel("menu", editable);
 }
 
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-testsuite/commit/0fd05a6d7badc5bc337f1e57d367b7af38cff218

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-testsuite/commit/0fd05a6d7badc5bc337f1e57d367b7af38cff218
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


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][feature/spaplus] HSTTWO-4268: Adding mixins for Common|EditableMenu(Item).

2018-03-14 Thread Woonsan Ko
Woonsan Ko pushed to branch feature/spaplus at cms-community / 
hippo-site-toolkit


Commits:
2996d4b0 by Woonsan Ko at 2018-03-14T15:41:20-04:00
HSTTWO-4268: Adding mixins for Common|EditableMenu(Item).

- - - - -


3 changed files:

- 
components/core/src/main/java/org/hippoecm/hst/core/pagemodel/container/HstBeansObjectMapperDecorator.java
- + 
content-beans/src/main/java/org/hippoecm/hst/content/beans/support/jackson/EditableMenuItemMixin.java
- + 
content-beans/src/main/java/org/hippoecm/hst/content/beans/support/jackson/EditableMenuMixin.java


Changes:

=
components/core/src/main/java/org/hippoecm/hst/core/pagemodel/container/HstBeansObjectMapperDecorator.java
=
--- 
a/components/core/src/main/java/org/hippoecm/hst/core/pagemodel/container/HstBeansObjectMapperDecorator.java
+++ 
b/components/core/src/main/java/org/hippoecm/hst/core/pagemodel/container/HstBeansObjectMapperDecorator.java
@@ -30,7 +30,11 @@ import 
org.hippoecm.hst.content.beans.standard.HippoGalleryImageSetBean;
 import org.hippoecm.hst.content.beans.standard.HippoHtmlBean;
 import org.hippoecm.hst.content.beans.standard.HippoMirrorBean;
 import org.hippoecm.hst.content.beans.standard.HippoRequestBean;
+import org.hippoecm.hst.content.beans.support.jackson.CommonMenuItemMixin;
+import org.hippoecm.hst.content.beans.support.jackson.CommonMenuMixin;
 import 
org.hippoecm.hst.content.beans.support.jackson.DefaultJsonIgnoreTypeMixin;
+import org.hippoecm.hst.content.beans.support.jackson.EditableMenuItemMixin;
+import org.hippoecm.hst.content.beans.support.jackson.EditableMenuMixin;
 import org.hippoecm.hst.content.beans.support.jackson.HippoBeanMixin;
 import org.hippoecm.hst.content.beans.support.jackson.HippoDocumentBeanMixin;
 import org.hippoecm.hst.content.beans.support.jackson.HippoFolderBeanMixin;
@@ -45,6 +49,10 @@ import 
org.hippoecm.hst.content.beans.support.jackson.HstSiteMenuMixin;
 import org.hippoecm.hst.content.beans.support.jackson.HstURLMixin;
 import org.hippoecm.hst.core.component.HstURL;
 import org.hippoecm.hst.core.linking.HstLink;
+import org.hippoecm.hst.core.sitemenu.CommonMenu;
+import org.hippoecm.hst.core.sitemenu.CommonMenuItem;
+import org.hippoecm.hst.core.sitemenu.EditableMenu;
+import org.hippoecm.hst.core.sitemenu.EditableMenuItem;
 import org.hippoecm.hst.core.sitemenu.HstSiteMenu;
 import org.hippoecm.hst.core.sitemenu.HstSiteMenuItem;
 import org.hippoecm.hst.provider.ValueProvider;
@@ -81,6 +89,10 @@ public class HstBeansObjectMapperDecorator {
 defaultMixins.put(HstLink.class, HstLinkMixin.class);
 defaultMixins.put(HstSiteMenuItem.class, HstSiteMenuItemMixin.class);
 defaultMixins.put(HstSiteMenu.class, HstSiteMenuMixin.class);
+defaultMixins.put(EditableMenuItem.class, EditableMenuItemMixin.class);
+defaultMixins.put(EditableMenu.class, EditableMenuMixin.class);
+defaultMixins.put(CommonMenuItem.class, CommonMenuItemMixin.class);
+defaultMixins.put(CommonMenu.class, CommonMenuMixin.class);
 }
 
 public Map getDefaultMixins() {


=
content-beans/src/main/java/org/hippoecm/hst/content/beans/support/jackson/EditableMenuItemMixin.java
=
--- /dev/null
+++ 
b/content-beans/src/main/java/org/hippoecm/hst/content/beans/support/jackson/EditableMenuItemMixin.java
@@ -0,0 +1,33 @@
+/*
+ *  Copyright 2018 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.content.beans.support.jackson;
+
+import org.hippoecm.hst.core.sitemenu.EditableMenu;
+import org.hippoecm.hst.core.sitemenu.EditableMenuItem;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public interface EditableMenuItemMixin extends EditableMenuItem, 
CommonMenuItemMixin {
+
+@Override
+@JsonIgnore
+EditableMenu getEditableMenu();
+
+@Override
+@JsonIgnore
+EditableMenuItem getParentItem();
+
+}


=
content-beans/src/main/java/org/hippoecm/hst/content/beans/support/jackson/EditableMenuMixin.java
=
--- /dev/null
+++ 
b/content-beans/src/main/java/org/hippoecm/hst/content/beans/support/jackson/EditableMenuMixin.java
@@ -0,0 +1,38 @@
+/*
+ *  Copyright 2018 Hippo B.V. (http://www.onehippo.com)
+ * 
+ *  Licensed under the Apache License, 

[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][feature/spaplus] HSTTWO-4268: Adding label in component window model

2018-03-14 Thread Woonsan Ko
Woonsan Ko pushed to branch feature/spaplus at cms-community / 
hippo-site-toolkit


Commits:
f20141d4 by Woonsan Ko at 2018-03-14T15:03:34-04:00
HSTTWO-4268: Adding label in component window model

- - - - -


1 changed file:

- 
components/core/src/main/java/org/hippoecm/hst/core/pagemodel/model/ComponentWindowModel.java


Changes:

=
components/core/src/main/java/org/hippoecm/hst/core/pagemodel/model/ComponentWindowModel.java
=
--- 
a/components/core/src/main/java/org/hippoecm/hst/core/pagemodel/model/ComponentWindowModel.java
+++ 
b/components/core/src/main/java/org/hippoecm/hst/core/pagemodel/model/ComponentWindowModel.java
@@ -35,7 +35,7 @@ public class ComponentWindowModel extends 
IdentifiableLinkableMetadataBaseModel 
 private final String name;
 private final String componentClass;
 private final String type;
-private String label;
+private final String label;
 private Map models;
 private Set components;
 
@@ -44,6 +44,7 @@ public class ComponentWindowModel extends 
IdentifiableLinkableMetadataBaseModel 
 name = window.getName();
 componentClass = window.getComponentName();
 type = window.getComponentInfo().getComponentType().toString();
+label = window.getComponentInfo().getLabel();
 
 final Map childComponentWindows = 
window.getChildWindowMap();
 
@@ -81,14 +82,11 @@ public class ComponentWindowModel extends 
IdentifiableLinkableMetadataBaseModel 
  * Return component's label. i.e. hst:label property value of an 
hst:containeritemcomponent.
  * @return
  */
+@JsonInclude(Include.NON_NULL)
 public String getLabel() {
 return label;
 }
 
-public void setLabel(String label) {
-this.label = label;
-}
-
 /**
  * Return the contributed model map by HstRequest{@link 
HstRequest#setModel(String,Object)} calls.
  * @return



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/f20141d461c0bd8cad91c01e702a74fabc244059

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/f20141d461c0bd8cad91c01e702a74fabc244059
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


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][feature/spaplus] HSTTWO-4268: Adding definitionId metadata back

2018-03-14 Thread Woonsan Ko
Woonsan Ko pushed to branch feature/spaplus at cms-community / 
hippo-site-toolkit


Commits:
5493c190 by Woonsan Ko at 2018-03-14T14:43:40-04:00
HSTTWO-4268: Adding definitionId metadata back

- - - - -


1 changed file:

- 
components/core/src/main/java/org/hippoecm/hst/core/pagemodel/container/PageModelAggregationValve.java


Changes:

=
components/core/src/main/java/org/hippoecm/hst/core/pagemodel/container/PageModelAggregationValve.java
=
--- 
a/components/core/src/main/java/org/hippoecm/hst/core/pagemodel/container/PageModelAggregationValve.java
+++ 
b/components/core/src/main/java/org/hippoecm/hst/core/pagemodel/container/PageModelAggregationValve.java
@@ -90,6 +90,11 @@ public class PageModelAggregationValve extends 
AggregationValve {
 private static final String PAGE_TITLE_METADATA = "pageTitle";
 
 /**
+ * Page definition ID (from the configuration) metadata name.
+ */
+private static final String PAGE_DEFINITION_ID_METADATA = "definitionId";
+
+/**
  * Jackson ObjectMapper instance for JSON (de)serialization.
  */
 private ObjectMapper objectMapper;
@@ -201,10 +206,17 @@ public class PageModelAggregationValve extends 
AggregationValve {
 
 final AggregatedPageModel pageModel = new AggregatedPageModel(id);
 final ComponentWindowModel pageWindowModel = new 
ComponentWindowModel(rootWindow);
+
+final String definitionId = rootWindow.getComponentInfo().getId();
+if (StringUtils.isNotEmpty(definitionId)) {
+pageWindowModel.putMetadata(PAGE_DEFINITION_ID_METADATA, 
definitionId);
+}
+
 final String pageTitle = 
requestContext.getResolvedSiteMapItem().getPageTitle();
 if (StringUtils.isNotEmpty(pageTitle)) {
 pageWindowModel.putMetadata(PAGE_TITLE_METADATA, pageTitle);
 }
+
 pageModel.setPage(pageWindowModel);
 addLinksToPageModel(pageModel);
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/5493c19050180fac3f9768d366c5447c9f55fdea

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/5493c19050180fac3f9768d366c5447c9f55fdea
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


[HippoCMS-scm] [Git][cms-community/hippo-testsuite][feature/spaplus] HSTTWO-4271: Adding prototypes in demosite

2018-03-14 Thread Woonsan Ko
Woonsan Ko pushed to branch feature/spaplus at cms-community / hippo-testsuite


Commits:
5e660dc5 by Woonsan Ko at 2018-03-14T14:25:36-04:00
HSTTWO-4271: Adding prototypes in demosite

- - - - -


1 changed file:

- + 
content/src/main/resources/hcm-config/hstconfiguration/demosite/prototypepages.yaml


Changes:

=
content/src/main/resources/hcm-config/hstconfiguration/demosite/prototypepages.yaml
=
--- /dev/null
+++ 
b/content/src/main/resources/hcm-config/hstconfiguration/demosite/prototypepages.yaml
@@ -0,0 +1,16 @@
+definitions:
+  config:
+/hst:hst/hst:configurations/demosite/hst:prototypepages:
+  jcr:primaryType: hst:pages
+  /homepage-like:
+jcr:primaryType: hst:component
+jcr:mixinTypes: ['hst:prototypemeta']
+hst:displayname: Homepage Like
+hst:referencecomponent: hst:pages/home
+/body:
+  jcr:primaryType: hst:component
+  /content:
+jcr:primaryType: hst:component
+/banners-div:
+  jcr:primaryType: hst:containercomponent
+  hst:xtype: HST.vBox



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-testsuite/commit/5e660dc5d7f882721708b30ed992c732e70ed133

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-testsuite/commit/5e660dc5d7f882721708b30ed992c732e70ed133
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


[HippoCMS-scm] [Git][cms-community/hippo-essentials] Deleted branch bugfix/ESSENTIALS-1086

2018-03-14 Thread Jeroen Hoffman
Jeroen Hoffman deleted branch bugfix/ESSENTIALS-1086 at cms-community / 
hippo-essentials

---

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


[HippoCMS-scm] [Git][cms-community/hippo-configuration-management][feature/msdts] HCM-255 Add module extension information to HCM API

2018-03-14 Thread Sergey Shepelevich
Sergey Shepelevich pushed to branch feature/msdts at cms-community / 
hippo-configuration-management


Commits:
fc0afd33 by Sergey Shepelevich at 2018-03-14T16:28:35+01:00
HCM-255 Add module extension information to HCM API

- - - - -


2 changed files:

- api/src/main/java/org/onehippo/cm/model/Module.java
- model/src/main/java/org/onehippo/cm/model/impl/ModuleImpl.java


Changes:

=
api/src/main/java/org/onehippo/cm/model/Module.java
=
--- a/api/src/main/java/org/onehippo/cm/model/Module.java
+++ b/api/src/main/java/org/onehippo/cm/model/Module.java
@@ -53,6 +53,11 @@ public interface Module extends OrderableByName {
 Project getProject();
 
 /**
+ * @return Extension name of the Module or null if it is a core Module
+ */
+String getExtension();
+
+/**
  * @return The immutable set of all {@link Source}s of this module, in 
undefined order.
  */
 Set getSources();


=
model/src/main/java/org/onehippo/cm/model/impl/ModuleImpl.java
=
--- a/model/src/main/java/org/onehippo/cm/model/impl/ModuleImpl.java
+++ b/model/src/main/java/org/onehippo/cm/model/impl/ModuleImpl.java
@@ -47,7 +47,6 @@ import 
org.onehippo.cm.model.impl.definition.ContentDefinitionImpl;
 import org.onehippo.cm.model.impl.definition.NamespaceDefinitionImpl;
 import org.onehippo.cm.model.impl.definition.TreeDefinitionImpl;
 import org.onehippo.cm.model.impl.definition.WebFileBundleDefinitionImpl;
-import org.onehippo.cm.model.path.JcrPath;
 import org.onehippo.cm.model.impl.source.ConfigSourceImpl;
 import org.onehippo.cm.model.impl.source.ContentSourceImpl;
 import org.onehippo.cm.model.impl.source.FileResourceInputProvider;
@@ -58,6 +57,7 @@ import org.onehippo.cm.model.parser.ConfigSourceParser;
 import org.onehippo.cm.model.parser.ContentSourceHeadParser;
 import org.onehippo.cm.model.parser.ParserException;
 import org.onehippo.cm.model.parser.SourceParser;
+import org.onehippo.cm.model.path.JcrPath;
 import org.onehippo.cm.model.serializer.ModuleDescriptorSerializer;
 import org.onehippo.cm.model.source.ResourceInputProvider;
 import org.onehippo.cm.model.source.SourceType;
@@ -240,6 +240,7 @@ public class ModuleImpl implements Module, 
Comparable, Cloneable {
 lastExecutedAction = value;
 }
 
+@Override
 public String getExtension() {
 return extension;
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-configuration-management/commit/fc0afd3367f00b79b439a09c9bef5da819e7135c

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-configuration-management/commit/fc0afd3367f00b79b439a09c9bef5da819e7135c
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


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][master] HSTTWO-4272 change the default sort on property for preview

2018-03-14 Thread Ard Schrijvers
Ard Schrijvers pushed to branch master at cms-community / hippo-site-toolkit


Commits:
c9452323 by Ard Schrijvers at 2018-03-14T16:03:04+01:00
HSTTWO-4272 change the default sort on property for preview

Since preview variants do not have a publication date, we should not sort
on that field. Sorting on the modification date for preview makes much
more sense

- - - - -


1 changed file:

- 
components/restapi/src/main/java/org/hippoecm/hst/restapi/content/DocumentsResource.java


Changes:

=
components/restapi/src/main/java/org/hippoecm/hst/restapi/content/DocumentsResource.java
=
--- 
a/components/restapi/src/main/java/org/hippoecm/hst/restapi/content/DocumentsResource.java
+++ 
b/components/restapi/src/main/java/org/hippoecm/hst/restapi/content/DocumentsResource.java
@@ -49,13 +49,14 @@ import org.onehippo.cms7.services.contenttype.ContentType;
 import org.onehippo.cms7.services.search.query.AndClause;
 import org.onehippo.cms7.services.search.query.Query;
 import org.onehippo.cms7.services.search.query.QueryUtils;
-import org.onehippo.cms7.services.search.query.constraint.ExistsConstraint;
 import org.onehippo.cms7.services.search.result.QueryResult;
 import org.onehippo.cms7.services.search.service.SearchService;
 import org.onehippo.cms7.services.search.service.SearchServiceException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static 
org.hippoecm.hst.restapi.content.DocumentsResource.SortOrder.DESCENDING;
+import static 
org.hippoecm.repository.HippoStdPubWfNodeType.HIPPOSTDPUBWF_LAST_MODIFIED_DATE;
 import static 
org.hippoecm.repository.HippoStdPubWfNodeType.HIPPOSTDPUBWF_PUBLICATION_DATE;
 import static org.hippoecm.repository.api.HippoNodeType.HIPPO_AVAILABILITY;
 import static org.hippoecm.repository.api.HippoNodeType.NT_DOCUMENT;
@@ -150,10 +151,29 @@ public class DocumentsResource extends AbstractResource {
 return Arrays.asList(attributeString.split(","));
 }
 
+
+private List getOrderBy(final String orderBy, final boolean 
preview) {
+if (StringUtils.isNotBlank(orderBy)) {
+return parseOrderBy(orderBy);
+}
+if (preview) {
+return Collections.singletonList(HIPPOSTDPUBWF_LAST_MODIFIED_DATE);
+}
+return  Collections.singletonList(HIPPOSTDPUBWF_PUBLICATION_DATE);
+}
+
+
 private List parseOrderBy(final String orderBy) {
 return Arrays.asList(StringUtils.split(orderBy, ','));
 }
 
+private List getSortOrder(final String sortOrder) {
+if (StringUtils.isNotBlank(sortOrder)) {
+return parseSortOrder(sortOrder);
+}
+return Collections.singletonList(DESCENDING);
+}
+
 private List parseSortOrder(final String sortOrder) {
 final List sortOrders = new LinkedList<>();
 try {
@@ -179,22 +199,25 @@ public class DocumentsResource extends AbstractResource {
  @QueryParam("_max") final String maxString,
  @QueryParam("_query") final String 
queryString,
  @QueryParam("_nodetype") final String 
nodeTypeString,
- @QueryParam("_orderBy") 
@DefaultValue(HIPPOSTDPUBWF_PUBLICATION_DATE) final String orderBy,
- @QueryParam("_sortOrder") 
@DefaultValue("descending") final String sortOrder,
+ @QueryParam("_orderBy") final String orderBy,
+ @QueryParam("_sortOrder") final String 
sortOrder,
  @QueryParam("_attributes") final String 
attributeString) {
 try {
+
+final boolean preview = RequestContextProvider.get().isPreview();
+
 final List includedAttributes = 
parseAttributes(attributeString);
 final ResourceContext context = 
getResourceContextFactory().createResourceContext(includedAttributes);
 final int offset = parseOffset(offsetString);
 final int max = parseMax(maxString);
 final String parsedQuery = parseQuery(queryString);
 final String parsedNodeType = parseNodeType(context, 
nodeTypeString);
-final List parsedOrderBys = parseOrderBy(orderBy);
-final List parsedSortOrders = parseSortOrder(sortOrder);
+final List parsedOrderBys = getOrderBy(orderBy, preview);
+final List parsedSortOrders = getSortOrder(sortOrder);
 checkOrderParameters(parsedOrderBys, parsedSortOrders);
 
 final String availability;
-if (RequestContextProvider.get().isPreview() ) {
+if (preview) {
 availability = "preview";
 } else {
 availability = "live";



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/c94523232fbfd5490c2562a9a99bf0c38aee5d35

---
View it on 

[HippoCMS-scm] [Git][cms-community/hippo-essentials] Pushed new branch feature/msdts

2018-03-14 Thread Sergey Shepelevich
Sergey Shepelevich pushed new branch feature/msdts at cms-community / 
hippo-essentials

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-essentials/tree/feature/msdts
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


[HippoCMS-scm] [Git][cms-community/hippo-essentials][master] ESSENTIALS-604 Remove dead code

2018-03-14 Thread Sergey Shepelevich
Sergey Shepelevich pushed to branch master at cms-community / hippo-essentials


Commits:
35da7614 by Sergey Shepelevich at 2018-03-14T15:27:56+01:00
ESSENTIALS-604 Remove dead code

- - - - -


2 changed files:

- 
plugin-sdk/implementation/src/main/java/org/onehippo/cms7/essentials/plugin/sdk/utils/HstUtils.java
- − 
plugin-sdk/implementation/src/test/java/org/onehippo/cms7/essentials/plugin/sdk/utils/HstUtilsTest.java


Changes:

=
plugin-sdk/implementation/src/main/java/org/onehippo/cms7/essentials/plugin/sdk/utils/HstUtils.java
=
--- 
a/plugin-sdk/implementation/src/main/java/org/onehippo/cms7/essentials/plugin/sdk/utils/HstUtils.java
+++ 
b/plugin-sdk/implementation/src/main/java/org/onehippo/cms7/essentials/plugin/sdk/utils/HstUtils.java
@@ -42,33 +42,6 @@ public final class HstUtils {
 
 private static final Logger log = LoggerFactory.getLogger(HstUtils.class);
 
-public static Set getHstMounts(final JcrService jcrService) {
-final Session session = jcrService.createSession();
-
-try {
-final Workspace workspace = session.getWorkspace();
-final QueryManager queryManager = workspace.getQueryManager();
-final Query query = 
queryManager.createQuery("//hst:hst/hst:hosts//element(*, hst:mount)", "xpath");
-final QueryResult queryResult = query.execute();
-final NodeIterator nodes = queryResult.getNodes();
-final Set retVal = new HashSet<>();
-while (nodes.hasNext()) {
-final Node node = nodes.nextNode();
-retVal.add(node);
-}
-return retVal;
-} catch (InvalidQueryException e) {
-log.error("Error creating query", e);
-} catch (RepositoryException e) {
-log.error("Error fetching hst:host nodes", e);
-} finally {
-jcrService.destroySession(session);
-}
-return Collections.emptySet();
-
-}
-
-
 private HstUtils() {
 // utility
 }


=
plugin-sdk/implementation/src/test/java/org/onehippo/cms7/essentials/plugin/sdk/utils/HstUtilsTest.java
 deleted
=
--- 
a/plugin-sdk/implementation/src/test/java/org/onehippo/cms7/essentials/plugin/sdk/utils/HstUtilsTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2014-2018 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.plugin.sdk.utils;
-
-import java.util.Set;
-
-import javax.jcr.Node;
-import javax.jcr.Session;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.onehippo.cms7.essentials.BaseRepositoryTest;
-
-import static org.junit.Assert.assertEquals;
-
-public class HstUtilsTest extends BaseRepositoryTest{
-
-@Test
-public void testGetHstMounts() throws Exception {
-final Set hstMounts = HstUtils.getHstMounts(jcrService);
-assertEquals("expected 3 mounts, hst:root and 2 added by us", 3, 
hstMounts.size());
-}
-
-@Override
-@Before
-public void setUp() throws Exception {
-super.setUp();
-final Session session = jcrService.createSession();
-final Node root = session.getNode("/hst:hst")
-.addNode("hst:hosts", "hst:virtualhosts")
-.addNode("localhost-group", "hst:virtualhostgroup")
-.addNode("localhost", "hst:virtualhost")
-.addNode("hst:root", "hst:mount");
-root.addNode("restone", "hst:mount");
-root.addNode("resttwo", "hst:mount");
-session.save();
-jcrService.destroySession(session);
-}
-}
\ No newline at end of file



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-essentials/commit/35da761463727b84edb0728317bc8ec5ba64614c

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-essentials/commit/35da761463727b84edb0728317bc8ec5ba64614c
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


[HippoCMS-scm] [Git][cms-community/hippo-site-toolkit][master] HSTTWO-4270 Do not require sort order properties to be present

2018-03-14 Thread Ard Schrijvers
Ard Schrijvers pushed to branch master at cms-community / hippo-site-toolkit


Commits:
7a93d214 by Ard Schrijvers at 2018-03-14T14:53:44+01:00
HSTTWO-4270 Do not require sort order properties to be present

Sort order properties are something else than where clause constraints
so should not be mixed

- - - - -


2 changed files:

- 
components/restapi/src/main/java/org/hippoecm/hst/restapi/content/DocumentsResource.java
- 
components/restapi/src/test/java/org/hippoecm/hst/restapi/content/requests/DocumentsResourceIT.java


Changes:

=
components/restapi/src/main/java/org/hippoecm/hst/restapi/content/DocumentsResource.java
=
--- 
a/components/restapi/src/main/java/org/hippoecm/hst/restapi/content/DocumentsResource.java
+++ 
b/components/restapi/src/main/java/org/hippoecm/hst/restapi/content/DocumentsResource.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015-2017 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2015-2018 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.
@@ -209,10 +209,6 @@ public class DocumentsResource extends AbstractResource {
 .where(QueryUtils.text().contains(parsedQuery == null ? "" 
: parsedQuery))
 
.and(QueryUtils.text(HIPPO_AVAILABILITY).isEqualTo(availability));
 
-for (String ob : parsedOrderBys) {
-andClause = andClause.and(new ExistsConstraint(ob));
-}
-
 final Query query = addOrdering(andClause, parsedOrderBys, 
parsedSortOrders).offsetBy(offset)
 .limitTo(max);
 


=
components/restapi/src/test/java/org/hippoecm/hst/restapi/content/requests/DocumentsResourceIT.java
=
--- 
a/components/restapi/src/test/java/org/hippoecm/hst/restapi/content/requests/DocumentsResourceIT.java
+++ 
b/components/restapi/src/test/java/org/hippoecm/hst/restapi/content/requests/DocumentsResourceIT.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016-2017 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2016-2018 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.
@@ -206,7 +206,7 @@ public class DocumentsResourceIT extends AbstractRestApiIT {
 for (Map item : itemsList) {
 final Node handleNode = liveUser.getNodeByIdentifier((String) 
item.get("id"));
 final Node node = handleNode.getNode(handleNode.getName());
-if (!node.hasProperty(PROPERTY_TITLE) && 
!node.hasProperty(PROPERTY_DATE)) {
+if (!node.hasProperty(PROPERTY_TITLE) || 
!node.hasProperty(PROPERTY_DATE)) {
 continue;
 }
 String current = node.getProperty(PROPERTY_TITLE).getString();
@@ -322,7 +322,7 @@ public class DocumentsResourceIT extends AbstractRestApiIT {
 for (Map item : itemsList) {
 final Node handleNode = liveUser.getNodeByIdentifier((String) 
item.get("id"));
 final Node node = handleNode.getNode(handleNode.getName());
-if (!node.hasProperty(PROPERTY_TITLE) && 
!node.hasProperty(PROPERTY_DATE)) {
+if (!node.hasProperty(PROPERTY_TITLE) || 
!node.hasProperty(PROPERTY_DATE)) {
 continue;
 }
 final String currentTitle = 
node.getProperty(PROPERTY_TITLE).getString();



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/7a93d21478097d1cc0794e2955aa8e55e225a6d8

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/7a93d21478097d1cc0794e2955aa8e55e225a6d8
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


[HippoCMS-scm] [Git][cms-community/hippo-cms][feature/CMS-10840] 12 commits: CMS-11089 Renamed npm-shrinkwrap.json to package-lock.json

2018-03-14 Thread Jeroen Hoffman
Jeroen Hoffman pushed to branch feature/CMS-10840 at cms-community / hippo-cms


Commits:
558f46eb by Arthur Bogaart at 2018-02-22T16:49:53+01:00
CMS-11089 Renamed npm-shrinkwrap.json to package-lock.json

- - - - -
f7b206f6 by Arthur Bogaart at 2018-02-22T16:56:30+01:00
CMS-11089 Bump grunt-sass to prevent compilation of node-sass

- - - - -
5b05405c by Arthur Bogaart at 2018-02-23T09:31:51+01:00
CMS-11089 Rename npm-shrinkwrap and restrict build to node8  npm5

- - - - -
1e3dd7cf by Mathijs den Burger at 2018-02-23T09:57:11+01:00
CMS-11089 Reintegrate feature/CMS-11089

- - - - -
7c30d52c by Peter Centgraf at 2018-02-23T22:08:27+01:00
CMS-11000 Bump versions to prepare 12.3 development iteration

- - - - -
393adc01 by Ate Douma at 2018-02-26T01:20:40+01:00
CMS-11086 Upgrade to jackrabbit-2.16.1-h1 and Tika 1.17 (see: REPO-1950)

- - - - -
2e56861c by Mathijs den Burger at 2018-02-27T16:52:29+01:00
CMS-11098 Use Hippo CKEditor 4.7.1-h12.3.0-SNAPSHOT

- - - - -
411d2bf1 by Ate Douma at 2018-03-09T16:29:27+01:00
CMS-11122 Update to hippo htmldiff library 1.02.00 which no longer uses 
nekohtml but htmlcleaner

Dropping nekohtml also required replacing its direct usage in HtmlValidator and 
HtmlDiffModelTest with htmlcleaner.
Also replaced deprecated (Xerces provided) SAXSerializer usage for Console XML 
Content Export with standard JAXP XMLTransformer.

- - - - -
8e0a8789 by Arent-Jan Banck at 2018-03-09T16:33:17+01:00
CMS-11084 Update drewnoakes-extractor from 2.6.2 to 2.11.0. The library is used 
to verify an jpg is using YCCK. Note that ImageMetaData has been deprecated 
some versions ago so should be scheduled for removal.

(cherry picked from commit 8553b57af8bccbc857b9f0ee6a0f61f0bd7e7e67)

- - - - -
99826d09 by Ate Douma at 2018-03-12T00:31:56+01:00
CMS-11122 - htmldiff switched to semantic version 2.0.0

- - - - -
4c0a038f by Jeroen Hoffman at 2018-03-13T21:29:45+01:00
CMS-10840 Merge branch master into feature/CMS-10840

- - - - -
751da0bb by Jeroen Hoffman at 2018-03-14T11:31:21+01:00
CMS-10840 add unit tests for FieldPluginHelper.getCaptionModel

- - - - -


30 changed files:

- api/npm-shrinkwrap.json → api/package-lock.json
- api/package.json
- api/pom.xml
- api/src/main/java/org/hippoecm/frontend/editor/plugins/resource/PdfParser.java
- 
api/src/main/java/org/hippoecm/frontend/plugins/gallery/imageutil/ImageBinary.java
- 
api/src/main/java/org/hippoecm/frontend/plugins/gallery/imageutil/ImageMetaData.java
- 
api/src/main/java/org/hippoecm/frontend/plugins/yui/upload/MagicMimeTypeFileItem.java
- automatic-export/frontend/pom.xml
- automatic-export/pom.xml
- automatic-export/repository/pom.xml
- brokenlinks/common/pom.xml
- brokenlinks/frontend/pom.xml
- brokenlinks/pom.xml
- brokenlinks/repository/pom.xml
- brokenlinks/test/pom.xml
- builtin/pom.xml
- config/pom.xml
- console/frontend/npm-shrinkwrap.json → console/frontend/package-lock.json
- console/frontend/package.json
- console/frontend/pom.xml
- 
console/frontend/src/main/java/org/hippoecm/frontend/plugins/console/menu/content/ContentExportDialog.java
- console/pom.xml
- console/repository/pom.xml
- dependencies/pom.xml
- editor/common/pom.xml
- editor/frontend/pom.xml
- 
editor/frontend/src/main/java/org/hippoecm/frontend/editor/plugins/field/FieldPluginHelper.java
- 
editor/frontend/src/main/java/org/hippoecm/frontend/editor/validator/HtmlValidator.java
- + 
editor/frontend/src/test/java/org/hippoecm/frontend/editor/plugins/field/FieldPluginHelperTest.java
- editor/pom.xml


The diff was not included because it is too large.


View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/compare/6edd883fce6eb6d5777851f9eafc902bea3cfcdc...751da0bbda245e9c11cd4aba77ef69c39f3d6693

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/compare/6edd883fce6eb6d5777851f9eafc902bea3cfcdc...751da0bbda245e9c11cd4aba77ef69c39f3d6693
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


[HippoCMS-scm] [Git][cms-community/hippo-cms][release/3.2] CMS-11118 Manage beanutils version and use beanutils 1.9.3. In addition use json-lib 2.4

2018-03-14 Thread Arent-Jan Banck
Arent-Jan Banck pushed to branch release/3.2 at cms-community / hippo-cms


Commits:
df00582c by Arent-Jan Banck at 2018-03-14T11:29:36+01:00
CMS-8 Manage beanutils version and use beanutils 1.9.3. In addition use 
json-lib 2.4

- - - - -


5 changed files:

- api/pom.xml
- api/src/main/java/org/hippoecm/frontend/util/PluginConfigMapper.java
- engine/pom.xml
- pom.xml
- 
test/src/test/java/org/hippoecm/frontend/plugins/yui/javascript/TestSettings.java


Changes:

=
api/pom.xml
=
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -104,6 +104,10 @@
   provided
 
 
+  commons-beanutils
+  commons-beanutils
+
+
   org.imgscalr
   imgscalr-lib
   ${imgscalr-lib.version}


=
api/src/main/java/org/hippoecm/frontend/util/PluginConfigMapper.java
=
--- a/api/src/main/java/org/hippoecm/frontend/util/PluginConfigMapper.java
+++ b/api/src/main/java/org/hippoecm/frontend/util/PluginConfigMapper.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2010-2013 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2010-2018 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.
@@ -33,9 +33,9 @@ public class PluginConfigMapper implements Serializable {
 
 public static void populate(Object bean, IValueMap config) throws 
MappingException {
 try {
-Map entries = BeanUtils.describe(bean);
+Map entries = BeanUtils.describe(bean);
 BeanUtilsBean bub = BeanUtilsBean.getInstance();
-for (Map.Entry entry : entries.entrySet()) {
+for (Map.Entry entry : entries.entrySet()) {
 if ("class".equals(entry.getKey())) {
 continue;
 }


=
engine/pom.xml
=
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -1,6 +1,6 @@
 
 
 1.4
 3.2.2
-1.7.0
+1.9.3
 2.6
 1.4
 1.0
@@ -119,7 +119,7 @@
 4.2.2
 
 2.0
-2.2.2
+2.4
 
 2.6.2
 0.97-incubator
@@ -351,6 +351,11 @@
 ${commons-lang.version}
   
   
+commons-beanutils
+commons-beanutils
+${commons-beanutils.version}
+  
+  
 org.mockito
 mockito-all
 ${mockito.version}


=
test/src/test/java/org/hippoecm/frontend/plugins/yui/javascript/TestSettings.java
=
--- 
a/test/src/test/java/org/hippoecm/frontend/plugins/yui/javascript/TestSettings.java
+++ 
b/test/src/test/java/org/hippoecm/frontend/plugins/yui/javascript/TestSettings.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2009-2013 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2009-2018 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.
@@ -41,6 +41,7 @@ import org.junit.Test;
 
 import junit.framework.TestCase;
 import net.sf.json.JSONArray;
+import net.sf.json.JSONNull;
 import net.sf.json.JSONObject;
 import net.sf.json.JsonConfig;
 
@@ -138,7 +139,7 @@ public class TestSettings extends TestCase {
 JsonConfig jsonConfig = new JsonConfig();
 jsonConfig.registerJsonValueProcessor(YuiId.class, new 
YuiIdProcessor());
 JSONObject wfObject = JSONObject.fromObject(wfSettings, jsonConfig);
-assertTrue(((JSONObject) wfObject.get("rootId")).isNullObject());
+assertEquals(JSONNull.getInstance(), wfObject.get("rootId"));
 
 JSONArray units = wfObject.getJSONArray("units");
 Map unitMap = new TreeMap();
@@ -171,7 +172,7 @@ public class TestSettings extends TestCase {
 JsonConfig jsonConfig = new JsonConfig();
 jsonConfig.registerJsonValueProcessor(YuiId.class, new 
YuiIdProcessor());
 JSONObject wfObject = JSONObject.fromObject(wfSettings, jsonConfig);
-assertTrue(((JSONObject) wfObject.get("rootId")).isNullObject());
+assertEquals(JSONNull.getInstance(), wfObject.get("rootId"));
 
 JSONArray units = wfObject.getJSONArray("units");
 JSONObject centerObject = null;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/df00582c9a3e55950c79646765ea3d09a503f518

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/df00582c9a3e55950c79646765ea3d09a503f518
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


[HippoCMS-scm] [Git][cms-community/hippo-testsuite][release/3.2] HSTTWO-1003 Bump json-lib version to 2.4

2018-03-14 Thread Arent-Jan Banck
Arent-Jan Banck pushed to branch release/3.2 at cms-community / hippo-testsuite


Commits:
a68cb854 by Arent-Jan Banck at 2018-03-14T11:02:31+01:00
HSTTWO-1003 Bump json-lib version to 2.4

- - - - -


1 changed file:

- pom.xml


Changes:

=
pom.xml
=
--- a/pom.xml
+++ b/pom.xml
@@ -58,7 +58,7 @@
 
 4.9.0
 
-2.2.2
+2.4
 
 nl,de,fr,es,zh
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-testsuite/commit/a68cb8549956385ca7ac4453a0061548695584d1

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-testsuite/commit/a68cb8549956385ca7ac4453a0061548695584d1
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