[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][release/5.2] 2 commits: CHANNELMGR-1731 Only show overlay if project in "Unapproved"

2018-02-27 Thread Michiel Rop
Michiel Rop pushed to branch release/5.2 at cms-community / 
hippo-addon-channel-manager


Commits:
16264f82 by Michiel Rop at 2018-02-27T15:39:17+01:00
CHANNELMGR-1731 Only show overlay if project in Unapproved

Only show the overlay if there is a selectedProject that has the
state Unapproved.

A listener implementation is impossible, because the project service
gets loaded after the overlay service. So register to a a listener
in the project service is not going to work.

Alternatively calling the overlay service from the project service
creates a circular dependency.

Calling the setter is needed because the overlays have to be in sync
with the toggles.

- - - - -
70171824 by Joeri de Gooijer at 2018-02-27T15:39:17+01:00
CHANNELMGR-1731 Remove unneeded check

- - - - -


2 changed files:

- frontend-ng/src/app/channel/channel.controller.js
- frontend-ng/src/app/services/project.service.js


Changes:

=
frontend-ng/src/app/channel/channel.controller.js
=
--- a/frontend-ng/src/app/channel/channel.controller.js
+++ b/frontend-ng/src/app/channel/channel.controller.js
@@ -29,6 +29,7 @@ class ChannelCtrl {
 ConfigService,
 FeedbackService,
 HippoIframeService,
+ProjectService,
 PageActionsService,
 PageMetaDataService,
 SidePanelService,
@@ -47,6 +48,7 @@ class ChannelCtrl {
 this.HippoIframeService = HippoIframeService;
 this.PageActionsService = PageActionsService;
 this.PageMetaDataService = PageMetaDataService;
+this.ProjectService = ProjectService;
 this.SidePanelService = SidePanelService;
 
 this.projectsEnabled = ConfigService.projectsEnabled;
@@ -60,6 +62,7 @@ class ChannelCtrl {
   }
 
   get isContentOverlayDisplayed() {
+
this.OverlayService.showContentOverlay(this.OverlayService.isContentOverlayDisplayed
 && this.ProjectService.actionFlags.contentOverlay.allowed);
 return this.OverlayService.isContentOverlayDisplayed;
   }
 
@@ -68,6 +71,7 @@ class ChannelCtrl {
   }
 
   get isComponentsOverlayDisplayed() {
+
this.OverlayService.showComponentsOverlay(this.OverlayService.isComponentsOverlayDisplayed
 && this.ProjectService.actionFlags.componentsOverlay.allowed);
 return this.OverlayService.isComponentsOverlayDisplayed;
   }
 


=
frontend-ng/src/app/services/project.service.js
=
--- a/frontend-ng/src/app/services/project.service.js
+++ b/frontend-ng/src/app/services/project.service.js
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2017-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.
@@ -31,6 +31,11 @@ class ProjectService {
 this.ConfigService = ConfigService;
 this.FeedbackService = FeedbackService;
 this.HippoGlobal = HippoGlobal;
+this.initialActionFlags = {
+  contentOverlay: { allowed: true, enabled: true },
+  componentsOverlay: { allowed: true, enabled: true },
+};
+this.actionFlags = Object.assign({}, this.initialActionFlags);
   }
 
   load(mountId, projectId) {
@@ -111,10 +116,21 @@ class ProjectService {
   .then(() => {
 const selectedProject = this.projects.find(project => project.id === 
this.projectId);
 this.selectedProject = selectedProject;
+this.updateActionFlags(selectedProject);
 return this.selectedProject ? 
this._selectProject(this.selectedProject.id) : this._selectCore();
   });
   }
 
+  updateActionFlags(project) {
+const allowed = this.isCore(project) || (project.state === 'UNAPPROVED');
+this.actionFlags.contentOverlay.allowed = allowed;
+this.actionFlags.componentsOverlay.allowed = allowed;
+  }
+
+  isCore(project) {
+return !project;
+  }
+
   _getProjects() {
 const url = 
`${this.ConfigService.getCmsContextPath()}ws/projects/${this.mountId}/associated-with-channel`;
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/5958826c278523780f29f03c2c625e9fcd41fbe6...701718242008275ae7b64947abb0928cbc4d2992

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/5958826c278523780f29f03c2c625e9fcd41fbe6...701718242008275ae7b64947abb0928cbc4d2992
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-addon-channel-manager] Pushed new branch CHANNELMGR-1731

2018-02-26 Thread Michiel Rop
Michiel Rop pushed new branch CHANNELMGR-1731 at cms-community / 
hippo-addon-channel-manager

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/tree/CHANNELMGR-1731
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-repository][feature/projectdocs] REPO-1929 Optimized imports

2018-01-23 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-repository


Commits:
0e90cd49 by Michiel Rop at 2018-01-23T16:07:37+01:00
REPO-1929 Optimized imports

- - - - -


1 changed file:

- utilities/src/main/java/org/hippoecm/repository/util/UserUtils.java


Changes:

=
utilities/src/main/java/org/hippoecm/repository/util/UserUtils.java
=
--- a/utilities/src/main/java/org/hippoecm/repository/util/UserUtils.java
+++ b/utilities/src/main/java/org/hippoecm/repository/util/UserUtils.java
@@ -10,7 +10,6 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
 import org.hippoecm.repository.api.HippoWorkspace;
-import org.onehippo.cms7.services.HippoServiceRegistry;
 import org.onehippo.repository.security.User;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/0e90cd497b8c493aa69479c120a0320d057b7b34
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-addon-channel-manager][feature/projectdocs] CHANNELMGR-1689 Remove UserUtils

2018-01-23 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-addon-channel-manager


Commits:
18262e0d by Michiel Rop at 2018-01-23T12:09:11+01:00
CHANNELMGR-1689 Remove UserUtils

Move UserUtils to repository, because the functionality is needed in
other module as well. See REPO-1929.

- - - - -


2 changed files:

- − 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/util/UserUtils.java
- − 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/document/util/UserUtilsTest.java


Changes:

=
content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/util/UserUtils.java
 deleted
=
--- 
a/content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/util/UserUtils.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2017 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.cms.channelmanager.content.document.util;
-
-import java.util.Optional;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-
-import org.hippoecm.repository.api.HippoWorkspace;
-import org.onehippo.repository.security.User;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-class UserUtils {
-
-private static final Logger log = LoggerFactory.getLogger(UserUtils.class);
-
-/**
- * Look up the real user name pertaining to a user ID
- *
- * @param userId  ID of some user
- * @param session current user's JCR session
- * @return name of the user or nothing, wrapped in an Optional
- */
-public static Optional getUserName(final String userId, final 
Session session) {
-try {
-final HippoWorkspace workspace = (HippoWorkspace) 
session.getWorkspace();
-final User user = workspace.getSecurityService().getUser(userId);
-final String firstName = user.getFirstName();
-final String lastName = user.getLastName();
-
-StringBuilder sb = new StringBuilder();
-if (firstName != null) {
-sb.append(firstName.trim());
-sb.append(" ");
-}
-if (lastName != null) {
-sb.append(lastName.trim());
-}
-return Optional.of(sb.toString().trim());
-} catch (RepositoryException e) {
-log.debug("Unable to determine displayName of user '{}'.", userId, 
e);
-}
-return Optional.empty();
-}
-}


=
content-service/src/test/java/org/onehippo/cms/channelmanager/content/document/util/UserUtilsTest.java
 deleted
=
--- 
a/content-service/src/test/java/org/onehippo/cms/channelmanager/content/document/util/UserUtilsTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2017 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.cms.channelmanager.content.document.util;
-
-import javax.jcr.Session;
-
-import org.hippoecm.repository.api.HippoWorkspace;
-import org.junit.Test;
-import org.onehippo.repository.security.SecurityService;
-import org.onehippo.repository.security.User;
-
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.equalTo;
-
-public class UserUtilsTest {
-
-@Test
-public void getUserNameNoFirstName() throws Exception {
-final Session session = createMock(Session.class);
-final HippoWorkspace workspace = createMock(HippoWorkspace.class);
-final SecurityService securityService = 
createMock(SecurityServ

[HippoCMS-scm] [Git][cms-community/hippo-cms-utilities][master] 2 commits: CMS-11022 Fix errors

2017-12-14 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-cms-utilities


Commits:
0a545c10 by Michiel Rop at 2017-12-14T21:33:32+01:00
CMS-11022 Fix errors

- - - - -
0b6dc29c by Michiel Rop at 2017-12-14T21:36:25+01:00
CMS-11022 Fix layout javadoc

- - - - -


1 changed file:

- src/main/java/org/onehippo/cms7/utilities/servlet/ResourceServlet.java


Changes:

=
src/main/java/org/onehippo/cms7/utilities/servlet/ResourceServlet.java
=
--- a/src/main/java/org/onehippo/cms7/utilities/servlet/ResourceServlet.java
+++ b/src/main/java/org/onehippo/cms7/utilities/servlet/ResourceServlet.java
@@ -40,28 +40,72 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Serves resources from either web application or classpath.   A 
typical configuration is to set classpath
- * resource path and map a servlet path to this servlet.
ExampleResourceServlet
- * org.hippoecm.hst.servlet.ResourceServlet 

- * jarPathPrefix 
/META-INF/example/myapp/skin 
- *   
ExampleResourceServlet
- * /myapp/skin/* 
With the configuration above, requests by
- * paths, "/myapp/skin/*", will be served by 
ExampleResourceServlet, which reads the target resource from
- * the configured classpath resource path, "/META-INF/example/myapp/skin". For 
example, if the request path info is
- * "/myapp/skin/example.png", then the servlet will find the corresponding 
classpath resource,
- * "classpath:META-INF/example/myapp/skin/example.png", to serve the request. 
 The following init parameters are
- * available:   Init parameter name 
Description Example value
- * Default value   jarPathPrefix Classpath 
resource path prefix
- * META-INF/example/myapp/skin META-INF   
gzipEnabled Flag to enable/disable
- * gzip encoded response for specified mimeTypes, which can be configured by 
'compressedMimeTypes' init parameter.
- * false true   webResourceEnabled 
Flag to enable/disable to read resources from
- * the servlet context on web application resources. If this is enabled, then 
the servlet will try to read a resource
- * from the web application first by the request path info.  
false true  
- * jarResourceEnabled  Flag to enable/disable to read resources 
from the classpath resources. If this is
- * enabled, then the servlet will try to read a resource from the 
classpath. false true 
- *  allowedResourcePaths Sets resource path regex patterns 
which are allowed to serve by this
- * servlet. 
- * 
+ * Serves resources from either web application or classpath.
+ * 
+ * 
+ * A typical configuration is to set classpath resource path and map a servlet 
path to this servlet.
+ * 
+ * 
+ * 
+ * ExampleResourceServlet
+ * 
org.hippoecm.hst.servlet.ResourceServlet
+ * 
+ * jarPathPrefix
+ * /META-INF/example/myapp/skin
+ * 
+ * 
+ * 
+ * ExampleResourceServlet
+ * /myapp/skin/*
+ * 
+ * 
+ * 
+ * 
+ * With the configuration above, requests by paths, "/myapp/skin/*", will be 
served by
+ * ExampleResourceServlet, which reads the target resource from 
the configured classpath resource path,
+ * "/META-INF/example/myapp/skin". For example, if the request path info is 
"/myapp/skin/example.png", then the servlet
+ * will find the corresponding classpath resource, 
"classpath:META-INF/example/myapp/skin/example.png", to serve the
+ * request.
+ * 
+ * The following init parameters are available:
+ * 
+ * 
+ * Init parameter name
+ * Description
+ * Example value
+ * Default value
+ * 
+ * 
+ * jarPathPrefix
+ * Classpath resource path prefix
+ * META-INF/example/myapp/skin
+ * META-INF
+ * 
+ * 
+ * gzipEnabled
+ * Flag to enable/disable gzip encoded response for specified 
mimeTypes, which can be configured by
+ *  'compressedMimeTypes' init parameter.
+ * false
+ * true
+ * 
+ * 
+ * webResourceEnabled
+ * Flag to enable/disable to read resources from the servlet 
context on web application resources. If this is enabled,
+ * then the servlet will try to read a resource from the web application first 
by the request path info. 
+ * false
+ * true
+ * 
+ * 
+ * jarResourceEnabled
+ *  Flag to enable/disable to read resources from the classpath 
resources. If this is enabled, then the servlet will try to read a resource 
from the classpath.
+ * false
+ * true
+ * 
+ * 
+ * allowedResourcePaths
+ * Sets resource path regex patterns which are allowed to serve by 
this servlet.
+ * 
+ * 
  * ^/.*\\.js,
  * ^/.*\\.css,
  * ^/.*\\.png,
@@ -72,8 +116,9 @@ import org.slf

[HippoCMS-scm] [Git][cms-community/hippo-cms-utilities][master] CMS-11014 Revert

2017-12-12 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-cms-utilities


Commits:
87eaac78 by Michiel Rop at 2017-12-12T13:57:22+01:00
CMS-11014 Revert

Change introduces a vulnerability.

- - - - -


1 changed file:

- src/main/java/org/onehippo/cms7/utilities/servlet/ResourceServlet.java


Changes:

=
src/main/java/org/onehippo/cms7/utilities/servlet/ResourceServlet.java
=
--- a/src/main/java/org/onehippo/cms7/utilities/servlet/ResourceServlet.java
+++ b/src/main/java/org/onehippo/cms7/utilities/servlet/ResourceServlet.java
@@ -504,7 +504,7 @@ public class ResourceServlet extends HttpServlet {
  * @return resource path, appended with index.html if needed.
  */
 private static String addIndexHtmlIfNeeded(String resourcePath) {
-if (StringUtils.substringAfterLast(resourcePath, ".").isEmpty()) {
+if (!resourcePath.endsWith(".") && 
StringUtils.substringAfterLast(resourcePath, ".").isEmpty()) {
 // The welcome-file-list is configurable, but we assume that 
index.html is always present.
 return StringUtils.substringBeforeLast(resourcePath, "/") + 
"/index.html";
 }



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms-utilities/commit/87eaac7889e374cebecb5cfe463af7806bc31429
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][master] 2 commits: CMS-10981 delegate the #hints to the WorkflowDescriptorModel and cache the result

2017-11-10 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-cms


Commits:
85e3becd by Ard Schrijvers at 2017-11-10T11:39:26+01:00
CMS-10981 delegate the #hints to the WorkflowDescriptorModel and cache the 
result

- - - - -
8d0c7d2d by Michiel Rop at 2017-11-10T17:04:46+01:00
CMS-10981 Merge branch bugfix/CMS-10981

- - - - -


3 changed files:

- api/src/main/java/org/hippoecm/addon/workflow/WorkflowDescriptorModel.java
- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractDocumentWorkflowPlugin.java
- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/EditingWorkflowPlugin.java


Changes:

=
api/src/main/java/org/hippoecm/addon/workflow/WorkflowDescriptorModel.java
=
--- a/api/src/main/java/org/hippoecm/addon/workflow/WorkflowDescriptorModel.java
+++ b/api/src/main/java/org/hippoecm/addon/workflow/WorkflowDescriptorModel.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2009-2013 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2009-2017 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.
@@ -15,6 +15,11 @@
  */
 package org.hippoecm.addon.workflow;
 
+import java.io.Serializable;
+import java.rmi.RemoteException;
+import java.util.Collections;
+import java.util.Map;
+
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
@@ -26,14 +31,21 @@ import org.hippoecm.repository.api.HippoNodeType;
 import org.hippoecm.repository.api.HippoWorkspace;
 import org.hippoecm.repository.api.Workflow;
 import org.hippoecm.repository.api.WorkflowDescriptor;
+import org.hippoecm.repository.api.WorkflowException;
 import org.hippoecm.repository.api.WorkflowManager;
+import org.onehippo.repository.documentworkflow.DocumentWorkflow;
 import org.onehippo.repository.util.JcrConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class WorkflowDescriptorModel extends 
LoadableDetachableModel {
 
+private static final Logger log = 
LoggerFactory.getLogger(WorkflowDescriptorModel.class);
+
 private String id;
 private String category;
 private transient Workflow workflow;
+private transient Map<String, Serializable> hints;
 
 /**
  * deprecated: use the alternative constructor instead
@@ -105,9 +117,29 @@ public class WorkflowDescriptorModel extends 
LoadableDetachableModel getHints() {
+if (hints != null) {
+return hints;
+}
+DocumentWorkflow workflow = getWorkflow();
+if (workflow != null) {
+try {
+hints = workflow.hints();
+return hints;
+} catch (WorkflowException | RemoteException | RepositoryException 
e) {
+log.error("Unable to retrieve workflow hints", e);
+}
+}
+hints = Collections.emptyMap();
+return hints;
 }
 }


=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractDocumentWorkflowPlugin.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractDocumentWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractDocumentWorkflowPlugin.java
@@ -165,14 +165,6 @@ public abstract class AbstractDocumentWorkflowPlugin 
extends RenderPlugin {
 }
 
 protected Map<String, Serializable> getHints() {
-DocumentWorkflow workflow = getWorkflow();
-if (workflow != null) {
-try {
-return workflow.hints();
-} catch (WorkflowException | RemoteException | RepositoryException 
e) {
-log.error("Unable to retrieve workflow hints", e);
-}
-}
-return Collections.emptyMap();
+return getModel().getHints();
 }
 }


=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/EditingWorkflowPlugin.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/EditingWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/EditingWorkflowPlugin.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2008-2015 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2008-2017 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.
@@ -15,13 +15,9 @@
  */
 package org.hippoecm.frontend.plugins.reviewedactions;
 
-import java.text.DateFormat;
-import java.util.Date;
-
 import javax.jcr.Node;
 
 import org.apache.wick

[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/projectdocs] CHANNELMGR-1572 Fix unit test

2017-11-09 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-addon-channel-manager


Commits:
237acc8d by Michiel Rop at 2017-11-09T16:41:32+01:00
CHANNELMGR-1572 Fix unit test

- - - - -


1 changed file:

- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/DocumentsServiceImpl.java


Changes:

=
content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/DocumentsServiceImpl.java
=
--- 
a/content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/DocumentsServiceImpl.java
+++ 
b/content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/DocumentsServiceImpl.java
@@ -130,7 +130,8 @@ public class DocumentsServiceImpl implements 
DocumentsService {
 throw new BadRequestException(document);
 }
 
-editingUtils.copyToPreviewAndKeepEditing(workflow, session);
+editingUtils.copyToPreviewAndKeepEditing(workflow, session)
+.orElseThrow(() -> new 
InternalServerErrorException(errorInfoFromHintsOrNoHolder(workflow, session)));
 
 FieldTypeUtils.readFieldValues(draft, docType.getFields(), 
document.getFields());
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/237acc8dd7471e6da5132031396d164328a5da3b

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/237acc8dd7471e6da5132031396d164328a5da3b
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-addon-channel-manager][feature/projectdocs] CHANNELMGR-1559 Account for the 'drop' of contextPayload and 'active project' logic

2017-11-06 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-addon-channel-manager


Commits:
06452ec0 by Michiel Rop at 2017-11-06T21:08:45+01:00
CHANNELMGR-1559 Account for the drop of contextPayload and 
active project logic

- copyToPreviewAndKeepEditing does not throw exception (anymore)
- check if Object wrapped by optional is present
- fix imports

- - - - -


3 changed files:

- 
content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/DocumentsServiceImpl.java
- 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/ContentResourceTest.java
- 
content-service/src/test/java/org/onehippo/cms/channelmanager/content/document/util/EditingUtilsTest.java


Changes:

=
content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/DocumentsServiceImpl.java
=
--- 
a/content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/DocumentsServiceImpl.java
+++ 
b/content-service/src/main/java/org/onehippo/cms/channelmanager/content/document/DocumentsServiceImpl.java
@@ -130,8 +130,7 @@ public class DocumentsServiceImpl implements 
DocumentsService {
 throw new BadRequestException(document);
 }
 
-editingUtils.copyToPreviewAndKeepEditing(workflow, session)
-.orElseThrow(() -> new 
InternalServerErrorException(errorInfoFromHintsOrNoHolder(workflow, session)));
+editingUtils.copyToPreviewAndKeepEditing(workflow, session);
 
 FieldTypeUtils.readFieldValues(draft, docType.getFields(), 
document.getFields());
 


=
content-service/src/test/java/org/onehippo/cms/channelmanager/content/ContentResourceTest.java
=
--- 
a/content-service/src/test/java/org/onehippo/cms/channelmanager/content/ContentResourceTest.java
+++ 
b/content-service/src/test/java/org/onehippo/cms/channelmanager/content/ContentResourceTest.java
@@ -29,7 +29,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.onehippo.cms.channelmanager.content.document.DocumentsService;
-import org.onehippo.cms.channelmanager.content.document.DocumentsServiceImpl;
 import org.onehippo.cms.channelmanager.content.document.model.Document;
 import 
org.onehippo.cms.channelmanager.content.documenttype.DocumentTypesService;
 import org.onehippo.cms.channelmanager.content.documenttype.model.DocumentType;


=
content-service/src/test/java/org/onehippo/cms/channelmanager/content/document/util/EditingUtilsTest.java
=
--- 
a/content-service/src/test/java/org/onehippo/cms/channelmanager/content/document/util/EditingUtilsTest.java
+++ 
b/content-service/src/test/java/org/onehippo/cms/channelmanager/content/document/util/EditingUtilsTest.java
@@ -19,6 +19,7 @@ package org.onehippo.cms.channelmanager.content.document.util;
 import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Optional;
 
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
@@ -145,9 +146,15 @@ public class EditingUtilsTest {
 expect(workflow.hints()).andReturn(hints);
 replay(workflow);
 
-final ErrorInfo errorInfo = 
editingUtils.determineEditingFailure(workflow, session).get();
-assertThat(errorInfo.getReason(), 
equalTo(ErrorInfo.Reason.REQUEST_PENDING));
-assertNull(errorInfo.getParams());
+final Optional errorInfoOptional = 
editingUtils.determineEditingFailure(workflow, session);
+assertThat("Errorinfo should be 
present",errorInfoOptional.isPresent());
+if (errorInfoOptional.isPresent()){
+final ErrorInfo errorInfo = errorInfoOptional.get();
+assertThat(errorInfo.getReason(), 
equalTo(ErrorInfo.Reason.REQUEST_PENDING));
+assertNull(errorInfo.getParams());
+}
+
+
 
 verify(workflow);
 }
@@ -170,10 +177,15 @@ public class EditingUtilsTest {
 expect(user.getLastName()).andReturn(" Doe ");
 replay(workflow, session, workspace, securityService, user);
 
-final ErrorInfo errorInfo = 
editingUtils.determineEditingFailure(workflow, session).get();
-assertThat(errorInfo.getReason(), 
equalTo(ErrorInfo.Reason.OTHER_HOLDER));
-assertThat(errorInfo.getParams().get("userId"), equalTo("admin"));
-assertThat(errorInfo.getParams().get("userName"), equalTo("John Doe"));
+final Optional errorInfoOptional = 
editingUtils.determineEditingFailure(workflow, session);
+assertThat("Errorinfo should be 
present",errorInfoOptional.isPresent());
+if (errorInfoOptional.isPresent()){
+final ErrorInfo errorInfo = errorInfoOptional.get();
+assertThat(errorInfo.getReason(), 
equalTo(ErrorInfo.Reason.

[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/projectdocs] CHANNELMGR-1534 Make workflow call user context aware

2017-10-23 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-addon-channel-manager


Commits:
5bcdc92a by Michiel Rop at 2017-10-23T21:27:20+02:00
CHANNELMGR-1534 Make workflow call user context aware

- - - - -


1 changed file:

- 
frontend/src/main/java/org/onehippo/cms7/channelmanager/plugins/social/SocialSharingPlugin.java


Changes:

=
frontend/src/main/java/org/onehippo/cms7/channelmanager/plugins/social/SocialSharingPlugin.java
=
--- 
a/frontend/src/main/java/org/onehippo/cms7/channelmanager/plugins/social/SocialSharingPlugin.java
+++ 
b/frontend/src/main/java/org/onehippo/cms7/channelmanager/plugins/social/SocialSharingPlugin.java
@@ -29,6 +29,7 @@ import org.hippoecm.addon.workflow.StdWorkflow;
 import org.hippoecm.addon.workflow.WorkflowDescriptorModel;
 import org.hippoecm.frontend.plugin.IPluginContext;
 import org.hippoecm.frontend.plugin.config.IPluginConfig;
+import org.hippoecm.frontend.plugins.standardworkflow.ContextPayloadProvider;
 import org.hippoecm.frontend.session.UserSession;
 import org.hippoecm.repository.api.HippoNodeType;
 import org.hippoecm.repository.api.Workflow;
@@ -88,7 +89,7 @@ public class SocialSharingPlugin extends 
CompatibilityWorkflowPlugin {
 if (node.isNodeType(HippoNodeType.NT_HANDLE)) {
 WorkflowManager workflowManager = 
UserSession.get().getWorkflowManager();
 DocumentWorkflow workflow = (DocumentWorkflow) 
workflowManager.getWorkflow(model.getObject());
-Serializable isLive = workflow.hints().get("isLive");
+Serializable isLive = 
workflow.hints(ContextPayloadProvider.get()).get("isLive");
 isPublished = (isLive instanceof Boolean) && ((Boolean) 
isLive);
 }
 } catch (RepositoryException | RemoteException | WorkflowException 
e) {



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/5bcdc92a6156f3d59a0e3f923ef55c37e09c8417

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/5bcdc92a6156f3d59a0e3f923ef55c37e09c8417
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/projectdocs] CMS-10959 Let infoEditAction determine its own visibility

2017-10-23 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / hippo-cms


Commits:
e1ed2f53 by Michiel Rop at 2017-10-23T10:25:37+02:00
CMS-10959 Let infoEditAction determine its own visibility

- - - - -


2 changed files:

- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractPreviewWorkflowPlugin.java
- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PreviewWorkflowPlugin.java


Changes:

=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractPreviewWorkflowPlugin.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractPreviewWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractPreviewWorkflowPlugin.java
@@ -46,15 +46,11 @@ import org.hippoecm.repository.api.DocumentWorkflowAction;
 import org.hippoecm.repository.api.Workflow;
 import org.hippoecm.repository.api.WorkflowTransition;
 import org.hippoecm.repository.util.NodeIterable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public abstract class AbstractPreviewWorkflowPlugin extends 
AbstractDocumentWorkflowPlugin {
 
 private static final long serialVersionUID = 1L;
 
-private static final Logger log = 
LoggerFactory.getLogger(AbstractPreviewWorkflowPlugin.class);
-
 private final StdWorkflow infoAction;
 private final StdWorkflow infoEditAction;
 private final StdWorkflow editAction;
@@ -158,7 +154,6 @@ public abstract class AbstractPreviewWorkflowPlugin extends 
AbstractDocumentWork
 private void hideInvalidActions() {
 hideIfNotAllowed(info, "obtainEditableInstance", editAction);
 hideOrDisable(info, "status", infoAction);
-infoEditAction.setVisible(getInfoEditActionVisibility());
 }
 
 protected final String getHint(final String key){
@@ -169,9 +164,6 @@ public abstract class AbstractPreviewWorkflowPlugin extends 
AbstractDocumentWork
 return StringUtils.EMPTY;
 }
 
-
-protected abstract boolean getInfoEditActionVisibility();
-
 protected abstract StdWorkflow getInfoEditAction();
 
 }


=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PreviewWorkflowPlugin.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PreviewWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PreviewWorkflowPlugin.java
@@ -35,13 +35,23 @@ public class PreviewWorkflowPlugin extends 
AbstractPreviewWorkflowPlugin {
 inUseBy = getHint("inUseBy");
 }
 
-protected boolean getInfoEditActionVisibility() {
-return StringUtils.isNotEmpty(inUseBy);
-}
-
 protected StdWorkflow getInfoEditAction() {
 return new StdWorkflow("infoEdit", "infoEdit") {
 
+/**
+ * Gets whether this component and any children are visible.
+ * 
+ * WARNING: this method can be called multiple times during a 
request. If you override this method, it is a good
+ * idea to keep it cheap in terms of processing. Alternatively, 
you can call {@link #setVisible(boolean)}.
+ * 
+ *
+ * @return True if component and any children are visible
+ */
+@Override
+public boolean isVisible() {
+return StringUtils.isNotEmpty(inUseBy);
+}
+
 @Override
 public String getSubMenu() {
 return "info";



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/e1ed2f53381e2b21b29904e03e7311f1b85c68a2
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-addon-channel-manager][feature/projectdocs] CHANNELMGR-1534 Make workflow call user context aware

2017-10-23 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-addon-channel-manager


Commits:
fc2f9d89 by Michiel Rop at 2017-10-23T15:39:24+02:00
CHANNELMGR-1534 Make workflow call user context aware

- - - - -


1 changed file:

- 
frontend/src/main/java/org/onehippo/cms7/channelmanager/plugins/channelactions/ChannelActionsPlugin.java


Changes:

=
frontend/src/main/java/org/onehippo/cms7/channelmanager/plugins/channelactions/ChannelActionsPlugin.java
=
--- 
a/frontend/src/main/java/org/onehippo/cms7/channelmanager/plugins/channelactions/ChannelActionsPlugin.java
+++ 
b/frontend/src/main/java/org/onehippo/cms7/channelmanager/plugins/channelactions/ChannelActionsPlugin.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2011-2017 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.
@@ -49,6 +49,7 @@ import org.hippoecm.addon.workflow.WorkflowDescriptorModel;
 import org.hippoecm.frontend.plugin.IPluginContext;
 import org.hippoecm.frontend.plugin.config.IPluginConfig;
 import org.hippoecm.frontend.plugins.standards.icon.HippoIcon;
+import org.hippoecm.frontend.plugins.standardworkflow.ContextPayloadProvider;
 import org.hippoecm.frontend.service.IRestProxyService;
 import org.hippoecm.frontend.session.UserSession;
 import org.hippoecm.frontend.skin.Icon;
@@ -87,7 +88,7 @@ public class ChannelActionsPlugin extends 
CompatibilityWorkflowPlugin 
 if (node.isNodeType(HippoNodeType.NT_HANDLE)) {
 WorkflowManager workflowManager = 
UserSession.get().getWorkflowManager();
 DocumentWorkflow workflow = (DocumentWorkflow) 
workflowManager.getWorkflow(model.getObject());
-if 
(Boolean.TRUE.equals(workflow.hints().get("previewAvailable"))) {
+if 
(Boolean.TRUE.equals(workflow.hints(ContextPayloadProvider.get()).get("previewAvailable")))
 {
 addMenuDescription(model);
 }
 }
@@ -153,12 +154,7 @@ public class ChannelActionsPlugin extends 
CompatibilityWorkflowPlugin 
 
 for (final Map.Entry<String, IRestProxyService> entry : 
liveRestProxyServices.entrySet()) {
 final DocumentService documentService = 
entry.getValue().createSecureRestProxy(DocumentService.class);
-restProxyJobs.add(new Callable<List>() {
-@Override
-public List call() throws Exception {
-return 
documentService.getChannels(documentUuid).getChannelDocuments();
-}
-});
+restProxyJobs.add(() -> 
documentService.getChannels(documentUuid).getChannelDocuments());
 }
 
 final List combinedChannelDocuments = new 
ArrayList<>();
@@ -174,9 +170,9 @@ public class ChannelActionsPlugin extends 
CompatibilityWorkflowPlugin 
 }
 }
 }
-Collections.sort(combinedChannelDocuments, 
getChannelDocumentComparator());
+combinedChannelDocuments.sort(getChannelDocumentComparator());
 
-final Map<String, ChannelDocument> idToChannelMap = new 
LinkedHashMap<String, ChannelDocument>();
+final Map<String, ChannelDocument> idToChannelMap = new 
LinkedHashMap<>();
 for (final ChannelDocument channelDocument : combinedChannelDocuments) 
{
 idToChannelMap.put(channelDocument.getChannelId(), 
channelDocument);
 }
@@ -188,7 +184,7 @@ public class ChannelActionsPlugin extends 
CompatibilityWorkflowPlugin 
 if (!idToChannelMap.isEmpty()) {
 return new ArrayList<>(idToChannelMap.keySet());
 } else {
-return Arrays.asList("");
+return Collections.singletonList("");
 }
 }
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/fc2f9d89ce1285705d4664094180a045afddd3d7

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/fc2f9d89ce1285705d4664094180a045afddd3d7
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/projectdocs] CMS-10929 Add payload to rename and move api calls

2017-10-17 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / hippo-cms


Commits:
9496e899 by Michiel Rop at 2017-10-17T15:45:45+02:00
CMS-10929 Add payload to rename and move api calls

Split assignment and usage to improve readability.
( whereUsedAction showed up as non used during inspection )

- - - - -


1 changed file:

- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/DocumentWorkflowPlugin.java


Changes:

=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/DocumentWorkflowPlugin.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/DocumentWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/DocumentWorkflowPlugin.java
@@ -53,6 +53,7 @@ import org.hippoecm.frontend.skin.Icon;
 import org.hippoecm.frontend.util.CodecUtils;
 import org.hippoecm.repository.api.Document;
 import org.hippoecm.repository.api.DocumentWorkflowAction;
+import org.hippoecm.repository.api.DocumentWorkflowConstants;
 import org.hippoecm.repository.api.HippoNode;
 import org.hippoecm.repository.api.StringCodec;
 import org.hippoecm.repository.api.Workflow;
@@ -64,6 +65,8 @@ import 
org.hippoecm.repository.standardworkflow.FolderWorkflow;
 import org.onehippo.repository.documentworkflow.DocumentWorkflow;
 import org.onehippo.repository.util.JcrConstants;
 
+import static org.hippoecm.repository.api.DocumentWorkflowAction.MOVE;
+
 public class DocumentWorkflowPlugin extends AbstractDocumentWorkflowPlugin {
 
 private static final String DEFAULT_FOLDERWORKFLOW_CATEGORY = "embedded";
@@ -149,7 +152,10 @@ public class DocumentWorkflowPlugin extends 
AbstractDocumentWorkflowPlugin {
 WorkflowManager manager = 
UserSession.get().getWorkflowManager();
 DefaultWorkflow defaultWorkflow = (DefaultWorkflow) 
manager.getWorkflow("core", node);
 if (!((WorkflowDescriptorModel) 
getDefaultModel()).getNode().getName().equals(nodeName)) {
-((DocumentWorkflow) wf).rename(nodeName);
+wf.transition(new WorkflowTransition.Builder()
+.initializationPayload(InitializationPayload.get())
+.action(DocumentWorkflowAction.RENAME)
+.build());
 }
 if (!node.getDisplayName().equals(localName)) {
 defaultWorkflow.setDisplayName(localName);
@@ -298,8 +304,11 @@ public class DocumentWorkflowPlugin extends 
AbstractDocumentWorkflowPlugin {
 : new JcrNodeModel("/").getNode();
 
 String nodeName = document.getName();
-DocumentWorkflow workflow = (DocumentWorkflow) wf;
-workflow.move(new Document(folder), nodeName);
+wf.transition(new WorkflowTransition.Builder()
+.action(MOVE)
+.initializationPayload(InitializationPayload.get())
+
.eventPayload(DocumentWorkflowConstants.DESTINATION,new Document(folder), 
DocumentWorkflowConstants.NAME,nodeName)
+.build());
 browseTo(new JcrNodeModel(folder.getPath() + "/" + nodeName));
 return null;
 }
@@ -338,8 +347,10 @@ public class DocumentWorkflowPlugin extends 
AbstractDocumentWorkflowPlugin {
 
 @Override
 protected String execute(Workflow wf) throws Exception {
-DocumentWorkflow workflow = (DocumentWorkflow) wf;
-workflow.delete();
+wf.transition(new WorkflowTransition.Builder()
+.initializationPayload(InitializationPayload.get())
+.action(DocumentWorkflowAction.DELETE)
+.build());
 return null;
 }
 });
@@ -375,8 +386,7 @@ public class DocumentWorkflowPlugin extends 
AbstractDocumentWorkflowPlugin {
 return null;
 }
 });
-
-add(whereUsedAction = new StdWorkflow("where-used", new 
StringResourceModel("where-used-label", this, null), context, getModel()) {
+whereUsedAction = new StdWorkflow("where-used", new 
StringResourceModel("where-used-label", this, null), context, getModel()) {
 
 @Override
 public String getSubMenu() {
@@ -398,7 +408,8 @@ public class DocumentWorkflowPlugin extends 
AbstractDocumentWorkflowPlugin {
 protected String execute(Workflow wf) throws Exception {
 return null;
 }
-});
+};
+add(whereUsedAction);
 
 add(historyAction = new StdWorkflow("history", new 
StringResourceModel("history-label", this, null

[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/projectdocs] 55 commits: REPO-1811 Implement in-memory lock manager

2017-10-17 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-repository


Commits:
dfa6f279 by Ard Schrijvers at 2017-09-12T15:49:32+02:00
REPO-1811 Implement in-memory lock manager

- - - - -
4750450f by Ard Schrijvers at 2017-09-12T23:29:49+02:00
REPO-1811 To the RepositoryImpl add a Journal ConnectionHelper accessor

Via this Journal ConnectionHelper we can access the Journal DataSource
via the ConnectionHelperDataSourceAccessor.

Admittedly, a bit clumsy but we need access to the Journal DataSource
because we need to know whether we are dealing with a database *and*
whether we have a clustered setup : Only in that case, the lock mechanism
has to be upgraded from in memory locking to db base locking because
needs to be cluster wide

- - - - -
e0f19fab by Ard Schrijvers at 2017-09-12T23:33:43+02:00
REPO-1811 Support for a Database lock manager

The Database lock manager interaction is pretty much exactly the same
as the MemoryLockManager interaction. The biggest difference is that
the DbLockManager creates database based locks and the MemoryLockManager
creates MemoryLocks. Note that a DbLock is the same as the MemoryLock
but only contains a #destroy implementation that releases the database
lock.

The DbLockManager is still work in progress

- - - - -
1dba0d49 by Ard Schrijvers at 2017-09-13T14:44:56+02:00
REPO-1811 Fix the LockClusterTest setup

(still ignored but the setup failed since we do not allow SNS
below jcr:root any more)

- - - - -
92c914ef by Ard Schrijvers at 2017-09-14T14:29:52+02:00
REPO-1811 Support database locking

- - - - -
cbf14aed by Ard Schrijvers at 2017-09-19T15:16:45+02:00
REPO-1811 Support background jobs in the Memory or Db LockManager

- All the background jobs are run by a single thread
- By default they run every 5 seconds with an initial delay of 5 seconds
- Every background job is wrapped in a synchronized runnable the 
synchronized
  on the LockManager instance: The reason for this is that we do not want
  background jobs to write concurrently to possibly the same records as
  other (background) jobs
- We have the following background jobs:
  1) UnlockStoppedThreadJanitor : releases database locks for records
 that were held by a thread that is not alive any more
  2) DbResetExpiredLocksJanitor : Resets all database rows which have
 expired locks (rows with status RUNNING or ABORT and 
expirationTime
 has passed
  3) DbLockRefresher: Refreshes the expiresTime of a lock to currentTime + 
refreshRateSeconds
  4) LockThreadInterrupter : Interrupts the Thread that holds the lock that has 
been marked ABORT

- - - - -
441beff4 by Ard Schrijvers at 2017-09-19T16:54:14+02:00
REPO-1811 Make sure getLocks and isLocked works cluster wide in case of a 
database

- - - - -
d3d25849 by Ard Schrijvers at 2017-09-20T11:30:29+02:00
REPO-1811 Fix sql statement

- - - - -
5ab1e55f by Ard Schrijvers at 2017-09-20T11:33:54+02:00
REPO-1811 Extract abstract test and add an abort test

- - - - -
4a939b29 by Ard Schrijvers at 2017-09-20T11:37:27+02:00
REPO-1811 merge from master

- - - - -
7027fce3 by Ard Schrijvers at 2017-09-20T13:41:57+02:00
REPO-1811 use getHoldCount() instead of protected access

- - - - -
0bf87cb5 by Ard Schrijvers at 2017-09-20T13:42:28+02:00
REPO-1811 improve feedback

- - - - -
a268b5e6 by Ard Schrijvers at 2017-09-20T13:42:50+02:00
REPO-1811 use getHoldCount() instead of protected access

- - - - -
dac8d9cc by Ard Schrijvers at 2017-09-20T13:43:20+02:00
REPO-1811 Fix abort statement

- - - - -
cc3e10d9 by Ard Schrijvers at 2017-09-20T15:02:27+02:00
REPO-1811 Encapsulate the localLocks object

Since localLocks is a hashmap, all access to it should be synchronized.
This can be easier achieved by encapsulating it and whenever needed by
other classes, return a new object containing the same locks

- - - - -
43f17029 by Ard Schrijvers at 2017-09-20T15:25:56+02:00
REPO-1811 Enhance abort tests

- - - - -
05143edd by Ard Schrijvers at 2017-09-20T17:10:43+02:00
REPO-1811 use auto closable in integration tests

- - - - -
62bd68c2 by Ard Schrijvers at 2017-09-20T17:11:14+02:00
REPO-1811 Correct the expiresTime parameter

- - - - -
f038ec5b by Ard Schrijvers at 2017-09-20T17:13:20+02:00
REPO-1811 Locks in status ABORT should also be refreshed

Namely if a lock is in status ABORT and the lock is for the *CLUSTER NODE*
on which the DbLockRefresher runs, then it means that on this cluster
node the Thread that should be aborted did not yet abort (for example
still busy with its job). All we can do is wait until that job finishes

- - - - -
591ff099 by Ard Schrijvers at 2017-09-20T17:13:43+02:00
REPO-1811 remove unneeded auto commit

- - - - -
8a6b58b3 by Ard Schrijvers at 2017-09-20T17:14:10+02:00
REPO-1811 If a Thread is already interrupted, dont interrupt again

- - - - -
a3bc5d1f by Ard Schrijvers at 2017-09-20T17:14:41+02:00
REPO-1811 Integration tests that confirm the correct working of the 
DbLockRefresher

- - - - -
c2284223 by Ard Schrijvers at 2017

[HippoCMS-scm] [Git][cms-community/hippo-cms] Pushed new branch feature/CMS-10929

2017-10-16 Thread Michiel Rop
Michiel Rop pushed new branch feature/CMS-10929 at cms-community / hippo-cms

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/tree/feature/CMS-10929
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-repository][master] REPO-1830 Add unit test for scxml extension

2017-10-16 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-repository


Commits:
901a117b by Michiel Rop at 2017-10-16T10:45:16+02:00
REPO-1830 Add unit test for scxml extension

- - - - -


1 changed file:

- + 
workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java


Changes:

=
workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java
=
--- /dev/null
+++ 
b/workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2017 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.repository.documentworkflow;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+
+public class DocumentWorkflowImplTest {
+
+public static final String DOCUMENTWORKFLOW = "customworkflow";
+
+/**
+ * Test extension of  {@link DocumentWorkflowImpl#getScxmlId()}
+ * @throws Exception
+ */
+@Test
+public void getScxmlId() throws Exception {
+DocumentWorkflowImpl wf = new DocumentWorkflowImpl(){
+@Override
+protected String getScxmlId() {
+return DOCUMENTWORKFLOW;
+}
+};
+assertEquals(DOCUMENTWORKFLOW, wf.getScxmlId());
+}
+
+}
\ No newline at end of file



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/901a117b61bd773e52e99907b53130091b00061a
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-services-api][master] 2 commits: CMS-10929 Add payload to hints method where applicable.

2017-10-13 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-services-api


Commits:
b1f244ac by Michiel Rop at 2017-10-13T13:40:07+02:00
CMS-10929 Add payload to hints method where applicable.

- - - - -
85b25869 by Michiel Rop at 2017-10-13T14:06:32+02:00
CMS-10929 Make javadoc and value cmsSessionContextPayloadKey general

- - - - -


1 changed file:

- src/main/java/org/onehippo/cms7/services/cmscontext/CmsSessionContext.java


Changes:

=
src/main/java/org/onehippo/cms7/services/cmscontext/CmsSessionContext.java
=
--- a/src/main/java/org/onehippo/cms7/services/cmscontext/CmsSessionContext.java
+++ b/src/main/java/org/onehippo/cms7/services/cmscontext/CmsSessionContext.java
@@ -46,9 +46,9 @@ public interface CmsSessionContext {
 
 
 /**
- * Key to retrieve the initial payload for the documentworkflow.
+ * Key to retrieve the context payload
  */
-String CMS_SESSION_CONEXT_PAYLOAD_KEY = CmsSessionContext.class.getName() 
+ ".initialPayload";
+String CMS_SESSION_CONTEXT_PAYLOAD_KEY = CmsSessionContext.class.getName() 
+ ".contextPayload";
 
 /**
  * Static method to retrieve the CmsSessionContext from a HttpSession



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-services-api/compare/10058615e41b6a71459ca90a146a7bbdd184c8f0...85b2586988312a862ec74d1ec7c35ee0b1db7df9

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-services-api/compare/10058615e41b6a71459ca90a146a7bbdd184c8f0...85b2586988312a862ec74d1ec7c35ee0b1db7df9
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-repository][feature/projectdocs] REPO-1830 Add unit test for getScxmlId

2017-10-13 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-repository


Commits:
5d285a3d by Michiel Rop at 2017-10-13T09:13:07+02:00
REPO-1830 Add unit test for getScxmlId

- - - - -


1 changed file:

- 
workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java


Changes:

=
workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java
=
--- 
a/workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java
+++ 
b/workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java
@@ -22,7 +22,7 @@ import static org.junit.Assert.assertEquals;
 
 public class DocumentWorkflowImplTest {
 
-public static final String DOCUMENTWORKFLOW = "documentworkflow";
+public static final String DOCUMENTWORKFLOW = "customworkflow";
 
 /**
  * Test extension of  {@link DocumentWorkflowImpl#getScxmlId()}



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/5d285a3d0de11fbc63829fefa218ebb06085076d
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-repository][feature/projectdocs] REPO-1830 Add unit test for getScxmlId

2017-10-13 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-repository


Commits:
ad446ec2 by Michiel Rop at 2017-10-13T09:10:22+02:00
REPO-1830 Add unit test for getScxmlId

- - - - -


1 changed file:

- + 
workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java


Changes:

=
workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java
=
--- /dev/null
+++ 
b/workflow/src/test/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImplTest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2017 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.repository.documentworkflow;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+
+public class DocumentWorkflowImplTest {
+
+public static final String DOCUMENTWORKFLOW = "documentworkflow";
+
+/**
+ * Test extension of  {@link DocumentWorkflowImpl#getScxmlId()}
+ * @throws Exception
+ */
+@Test
+public void getScxmlId() throws Exception {
+DocumentWorkflowImpl wf = new DocumentWorkflowImpl(){
+@Override
+protected String getScxmlId() {
+return DOCUMENTWORKFLOW;
+}
+};
+assertEquals(DOCUMENTWORKFLOW, wf.getScxmlId());
+}
+
+}
\ No newline at end of file



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/ad446ec2a498d00320450b067bd0649f964ab3d5
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/projectdocs] CMS-10929 Add test-jar dependency

2017-10-13 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / hippo-cms


Commits:
e83efbae by Michiel Rop at 2017-10-13T08:54:19+02:00
CMS-10929 Add test-jar dependency

- - - - -


1 changed file:

- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractDocumentWorkflowPlugin.java


Changes:

=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractDocumentWorkflowPlugin.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractDocumentWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractDocumentWorkflowPlugin.java
@@ -181,9 +181,9 @@ public abstract class AbstractDocumentWorkflowPlugin 
extends RenderPlugin {
 
 
 
-protected Map<String, Object> getInitializationPayload() {
+protected Map<String, Serializable> getInitializationPayload() {
 HttpServletRequest request = ((HttpServletRequest) 
getRequest().getContainerRequest());
 final CmsSessionContext context = 
CmsSessionContext.getContext(request.getSession());
-return (Map<String, Object>) 
context.getAttribute(CmsSessionContext.CMS_SESSION_CONEXT_PAYLOAD_KEY);
+return (Map<String, Serializable>) 
context.getAttribute(CmsSessionContext.CMS_SESSION_CONEXT_PAYLOAD_KEY);
 }
 }



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/e83efbae262b8a9aa2e8609194a65f9079bbf259
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-services-api][master] 2 commits: CMS-10929 Add key for initial payload

2017-10-12 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-services-api


Commits:
a43401b6 by Michiel Rop at 2017-10-02T11:25:16+02:00
CMS-10929 Add key for initial payload

The key is used to retrieve a map with session context parameters.

use getAttribute or setAttribute to obtain the map.

- - - - -
10058615 by Michiel Rop at 2017-10-12T21:13:44+02:00
Merge branch feature/CMS-10929

- - - - -


1 changed file:

- src/main/java/org/onehippo/cms7/services/cmscontext/CmsSessionContext.java


Changes:

=
src/main/java/org/onehippo/cms7/services/cmscontext/CmsSessionContext.java
=
--- a/src/main/java/org/onehippo/cms7/services/cmscontext/CmsSessionContext.java
+++ b/src/main/java/org/onehippo/cms7/services/cmscontext/CmsSessionContext.java
@@ -44,6 +44,12 @@ public interface CmsSessionContext {
  */
 String LOCALE = "locale";
 
+
+/**
+ * Key to retrieve the initial payload for the documentworkflow.
+ */
+String CMS_SESSION_CONEXT_PAYLOAD_KEY = CmsSessionContext.class.getName() 
+ ".initialPayload";
+
 /**
  * Static method to retrieve the CmsSessionContext from a HttpSession
  *



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-services-api/compare/d45bf5e0cb4987ebc10091e7dd239bf7ff6e8112...10058615e41b6a71459ca90a146a7bbdd184c8f0

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-services-api/compare/d45bf5e0cb4987ebc10091e7dd239bf7ff6e8112...10058615e41b6a71459ca90a146a7bbdd184c8f0
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/projectdocs] CMS-10929 Change access modifier

2017-10-12 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / hippo-cms


Commits:
259534a4 by Michiel Rop at 2017-10-12T21:52:31+02:00
CMS-10929 Change access modifier

- - - - -


1 changed file:

- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PreviewWorkflowPlugin.java


Changes:

=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PreviewWorkflowPlugin.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PreviewWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PreviewWorkflowPlugin.java
@@ -35,11 +35,11 @@ public class PreviewWorkflowPlugin extends 
AbstractPreviewWorkflowPlugin {
 inUseBy = getHint("inUseBy");
 }
 
-boolean getInfoEditActionVisibility() {
+protected boolean getInfoEditActionVisibility() {
 return StringUtils.isNotEmpty(inUseBy);
 }
 
-StdWorkflow getInfoEditAction() {
+protected StdWorkflow getInfoEditAction() {
 return new StdWorkflow("infoEdit", "infoEdit") {
 
 @Override



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/259534a41fe001356065c69d9e4cf7d774c8ebad
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-repository][feature/projectdocs] REPO-1859 Add overloaded method of hints to supply payload

2017-10-12 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-repository


Commits:
61647c47 by Michiel Rop at 2017-10-12T21:20:52+02:00
REPO-1859 Add overloaded method of hints to supply payload

- - - - -


2 changed files:

- 
builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java


Changes:

=
builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
=
--- 
a/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
+++ 
b/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
@@ -83,6 +83,40 @@ public interface DocumentWorkflow extends Workflow, 
EditableWorkflow, CopyWorkfl
 @Override
 Map<String, Serializable> hints() throws WorkflowException, 
RemoteException, RepositoryException;
 
+
+/**
+ * 
+ * The DocumentWorkflow hints method provides all the operational hints 
corresponding with the DocumentWorkflow
+ * operational method names which are available to the current user to be 
invoked. However, only when the returned
+ * value is Boolean.TRUE are they allowed to be invoked. They 
might have a value of Boolean.FALSE though
+ * when the current document state does not allow executing the 
specific operation.
+ * 
+ * 
+ * The returned hints map may also provide additional information, like 
the current editable "status", if the
+ * document "isLive", or if currently there is a "previewAvailable".
+ * 
+ * 
+ * Separately, the hints map also returns status information about 
existing workflow or scheduled requests.
+ * This request status data is returned under key "requests" with as value 
a nested 'hints'
+ * MapString,MapString, Boolean per request node 
identifier,
+ * defining the allowable request operations ({@link 
#acceptRequest(String)}, {@link #cancelRequest(String)},
+ * {@link #rejectRequest(String, String)}) for each request node.
+ * 
+ *
+ * @param initialPayload supplies information that is not available on the 
document
+ *
+ * @return a map containing hints given by the workflow, the data in this 
map may be considered valid until the
+ * document itself changes
+ *
+ * @throws WorkflowException   indicates that the work-flow call failed 
due work-flow specific conditions
+ * @throws RepositoryException indicates that the work-flow call failed 
because of storage problems internal to the
+ * repository
+ * @throws RemoteException indicates that the work-flow call failed 
because of a connection problem with the
+ * repository
+ */
+@WorkflowAction(loggable = false, mutates = false)
+Map<String, Serializable> hints(Map<String, Serializable> initialPayload) 
throws WorkflowException, RemoteException, RepositoryException;
+
 // Operations previously provided through BasicReviewedActionsWorkflow, 
now provided on Document handle level
 
 /**


=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
@@ -193,6 +193,13 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 return Collections.unmodifiableMap(hints);
 }
 
+@Override
+public Map<String, Serializable> hints(final Map<String, Serializable> 
initializationPayload) throws WorkflowException {
+return hints();
+}
+
+
+
 // EditableWorkflow implementation
 
 @Override



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/61647c471ae85c47fc3d93a63723bdf09f6b7af1
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/projectdocs] CMS-10929 Change package name

2017-10-12 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / hippo-cms


Commits:
02d96d81 by Michiel Rop at 2017-10-12T16:58:07+02:00
CMS-10929 Change package name

Add title instead of id.

- - - - -


1 changed file:

- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractPreviewWorkflowPlugin.java


Changes:

=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractPreviewWorkflowPlugin.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractPreviewWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/AbstractPreviewWorkflowPlugin.java
@@ -58,7 +58,7 @@ public abstract class AbstractPreviewWorkflowPlugin extends 
AbstractDocumentWork
 private final StdWorkflow editAction;
 private final Map<String, Serializable> info;
 
-AbstractPreviewWorkflowPlugin(final IPluginContext context, IPluginConfig 
config) {
+protected AbstractPreviewWorkflowPlugin(final IPluginContext context, 
IPluginConfig config) {
 super(context, config);
 
 final TypeTranslator translator = new TypeTranslator(new 
JcrNodeTypeModel(HippoStdNodeType.NT_PUBLISHABLESUMMARY));
@@ -156,7 +156,7 @@ public abstract class AbstractPreviewWorkflowPlugin extends 
AbstractDocumentWork
 infoEditAction.setVisible(getInfoEditActionVisibility());
 }
 
-final String getHint(final String key){
+protected final String getHint(final String key){
 final Serializable serializable = info.get(key);
 if (serializable instanceof String) {
 return (String) serializable;
@@ -165,8 +165,8 @@ public abstract class AbstractPreviewWorkflowPlugin extends 
AbstractDocumentWork
 }
 
 
-abstract boolean getInfoEditActionVisibility();
+protected abstract boolean getInfoEditActionVisibility();
 
-abstract StdWorkflow getInfoEditAction();
+protected abstract StdWorkflow getInfoEditAction();
 
 }



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/02d96d814b129a49c1ae1e0dfd08ce994edf5e6b
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-repository] Pushed new branch feature/REPO-1859

2017-10-12 Thread Michiel Rop
Michiel Rop pushed new branch feature/REPO-1859 at cms-community / 
hippo-repository

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/tree/feature/REPO-1859
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-repository][feature/REPO-1835] REPO-1835 Remove default constructor

2017-10-12 Thread Michiel Rop
Michiel Rop pushed to branch feature/REPO-1835 at cms-community / 
hippo-repository


Commits:
3b5befab by Michiel Rop at 2017-10-12T09:27:09+02:00
REPO-1835 Remove default constructor

- Reordered access modifiers according the java specs
- Avoid creation of new Object in hints method

- - - - -


2 changed files:

- api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java


Changes:

=
api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
=
--- a/api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
+++ b/api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
@@ -16,9 +16,7 @@
 package org.hippoecm.repository.ext;
 
 import java.io.Serializable;
-import java.lang.reflect.Method;
 import java.rmi.Remote;
-import java.rmi.RemoteException;
 import java.util.Map;
 import java.util.TreeMap;
 
@@ -43,17 +41,10 @@ public abstract class WorkflowImpl implements Remote, 
Workflow
 protected WorkflowContext context;
 
 /**
- * All implementations of a work-flow must provide a single, no-argument 
constructor.
- * @throws RemoteException mandatory exception that must be thrown by all 
Remote objects
- */
-public WorkflowImpl() throws RemoteException {
-}
-
-/**
  * This call is not (yet) part of the API, but under evaluation.
  * @param context the new context that should be used
  */
-final public void setWorkflowContext(WorkflowContext context) {
+public final void setWorkflowContext(WorkflowContext context) {
 this.context = context;
 }
 
@@ -66,6 +57,15 @@ public abstract class WorkflowImpl implements Remote, 
Workflow
 }
 
 /**
+ * {@inheritDoc}
+ */
+public Map<String,Serializable> hints() throws WorkflowException {
+Map<String,Serializable> map = new TreeMap<>();
+map.put("hints", Boolean.valueOf(true));
+return map;
+}
+
+/**
  * @return the backing Node of this workflow
  */
 protected Node getNode() {
@@ -82,17 +82,10 @@ public abstract class WorkflowImpl implements Remote, 
Workflow
 return node;
 }
 
-final protected WorkflowContext getWorkflowContext() {
+protected final WorkflowContext getWorkflowContext() {
 return context;
 }
 
-/**
- * {@inheritDoc}
- */
-public Map<String,Serializable> hints() throws WorkflowException {
-Map<String,Serializable> map = new TreeMap<>();
-map.put("hints", new Boolean(true));
-return map;
-}
+
 
 }


=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
@@ -36,7 +36,28 @@ import org.hippoecm.repository.ext.WorkflowImpl;
 import org.onehippo.repository.scxml.SCXMLWorkflowContext;
 import org.onehippo.repository.scxml.SCXMLWorkflowExecutor;
 
-import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.*;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.ACCEPT_REQUEST;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.CANCEL_REQUEST;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.CHECK_MODIFIED;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.COMMIT_EDITABLE_INSTANCE;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.COPY;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.DELETE;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.DEPUBLISH;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.DISPOSE_EDITABLE_INSTANCE;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.LIST_VERSIONS;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.MOVE;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.OBTAIN_EDITABLE_INSTANCE;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.PUBLISH;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.REJECT_REQUEST;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.RENAME;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.REQUEST_DELETE;
+import static 
org.onehippo.repository.documentworkflow.DocumentWorkflowAction.REQUEST_DEPUBLICATION;
+import static 
org.onehippo.repository.documentworkflow.Do

[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/REPO-1835] REPO-1835 Renamed PayloadReceivable to PayloadAware

2017-10-10 Thread Michiel Rop
Michiel Rop pushed to branch feature/REPO-1835 at cms-community / 
hippo-repository


Commits:
af3f73a5 by Michiel Rop at 2017-10-10T22:36:53+02:00
REPO-1835 Renamed PayloadReceivable to PayloadAware

- - - - -


4 changed files:

- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
- workflow/src/main/java/org/onehippo/repository/scxml/PayloadReceivable.java → 
workflow/src/main/java/org/onehippo/repository/scxml/PayloadAware.java
- 
workflow/src/main/java/org/onehippo/repository/scxml/SCXMLWorkflowExecutor.java


Changes:

=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
@@ -16,7 +16,6 @@
 
 package org.onehippo.repository.documentworkflow;
 
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -27,7 +26,7 @@ import org.hippoecm.repository.HippoStdPubWfNodeType;
 import org.hippoecm.repository.api.WorkflowException;
 import org.hippoecm.repository.util.JcrUtils;
 import org.hippoecm.repository.util.NodeIterable;
-import org.onehippo.repository.scxml.PayloadReceivable;
+import org.onehippo.repository.scxml.PayloadAware;
 import org.onehippo.repository.scxml.SCXMLWorkflowData;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -37,7 +36,7 @@ import static 
org.hippoecm.repository.HippoStdNodeType.HIPPOSTD_STATE;
 /**
  * DocumentHandle provides the {@link SCXMLWorkflowData} backing model object 
for the DocumentWorkflow SCXML state machine.
  */
-public class DocumentHandle implements SCXMLWorkflowData, PayloadReceivable {
+public class DocumentHandle implements SCXMLWorkflowData, PayloadAware {
 
 private static final Logger log = 
LoggerFactory.getLogger(DocumentHandle.class);
 


=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
@@ -65,6 +65,7 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
  * @see #createDocumentHandle(javax.jcr.Node)
  */
 public static final String DOCUMENT_HANDLE_FACTORY_CLASS_KEY = 
"documentHandleFactoryClass";
+public static final String UNSUPPORTED = "unsupported";
 
 
 private SCXMLWorkflowExecutor<SCXMLWorkflowContext, DocumentHandle> 
workflowExecutor;
@@ -227,12 +228,12 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 
 @Override
 public void requestPublication(final Date publicationDate, final Date 
unpublicationDate) throws WorkflowException {
-throw new WorkflowException("unsupported");
+throw new WorkflowException(UNSUPPORTED);
 }
 
 @Override
 public void requestPublicationDepublication(final Date publicationDate, 
final Date unpublicationDate) throws WorkflowException, RepositoryException, 
RemoteException {
-throw new WorkflowException("unsupported");
+throw new WorkflowException(UNSUPPORTED);
 }
 
 // FullReviewedActionsWorkflow implementation
@@ -294,7 +295,7 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 
 @Override
 public void publish(final Date publicationDate, final Date 
unpublicationDate) throws WorkflowException {
-throw new WorkflowException("unsupported");
+throw new WorkflowException(UNSUPPORTED);
 }
 
 // Request Workflow on Document handle level


=
workflow/src/main/java/org/onehippo/repository/scxml/PayloadReceivable.java → 
workflow/src/main/java/org/onehippo/repository/scxml/PayloadAware.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/scxml/PayloadReceivable.java
+++ b/workflow/src/main/java/org/onehippo/repository/scxml/PayloadAware.java
@@ -23,7 +23,7 @@ import java.util.Map;
  * {@link SCXMLWorkflowExecutor#start(Map)} sets the initial payload
  * if the instance of {@link SCXMLWorkflowData} implements this interface.
  */
-public interface PayloadReceivable {
+public interface PayloadAware {
 
 Map<String,Object> getInitialPayload();
 


=
workflow/src/main/java/org/onehippo/repository/scxml/SCXMLWorkflowExecutor.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/scxml/SCXMLWorkflowExecutor.java
+++ 
b/workflow/src/main/java/org

[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/REPO-1835] REPO-1835 Remove Unnecessary import

2017-10-10 Thread Michiel Rop
Michiel Rop pushed to branch feature/REPO-1835 at cms-community / 
hippo-repository


Commits:
2fbd1b2c by Michiel Rop at 2017-10-10T22:04:39+02:00
REPO-1835 Remove Unnecessary import

- - - - -


1 changed file:

- 
builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowTransition.java


Changes:

=
builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowTransition.java
=
--- 
a/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowTransition.java
+++ 
b/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowTransition.java
@@ -17,7 +17,6 @@
 
 package org.onehippo.repository.documentworkflow;
 
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/2fbd1b2c83c9247cb9a66da9cc1974c0b48b30ae
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-repository] Pushed new branch feature/projectdocs

2017-10-10 Thread Michiel Rop
Michiel Rop pushed new branch feature/projectdocs at cms-community / 
hippo-repository

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/tree/feature/projectdocs
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/projectdocs] HSTTWO-4149 Update parent project to version 29.3-SNAPSHOT

2017-10-06 Thread Michiel Rop
Michiel Rop pushed to branch feature/projectdocs at cms-community / 
hippo-site-toolkit


Commits:
2e1761d7 by Arent-Jan Banck at 2017-10-06T15:41:07+02:00
HSTTWO-4149 Update parent project to version 29.3-SNAPSHOT

- - - - -


1 changed file:

- pom.xml


Changes:

=
pom.xml
=
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
   
 org.onehippo.cms7
 hippo-cms7-project
-29.2-SNAPSHOT
+29.3-SNAPSHOT
   
 
   Hippo Site Toolkit



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/2e1761d7382c6ccf37f756fba12a2cb8e7a7a31c
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-repository][feature/REPO-1835] 12 commits: REPO-1 Enable injecting QueryManager mock

2017-10-03 Thread Michiel Rop
Michiel Rop pushed to branch feature/REPO-1835 at cms-community / 
hippo-repository


Commits:
a353175a by Michiel Eggermont at 2017-07-31T16:09:14+02:00
REPO-1 Enable injecting QueryManager mock

- - - - -
0490f91b by Sergey Shepelevich at 2017-09-25T13:03:59+02:00
REPO-1820 Change logging level to debug for Events processed log 
message

(cherry picked from commit 206b5b4e831afd8d70028b1dca7b739b31c889a1)

- - - - -
d8f2345d by Peter Centgraf at 2017-09-25T16:41:46+02:00
REPO-1829 Apply initial values for system properties

(cherry picked from commit 98a8f2b96f387130d0dd5496addef5a8f0530beb)
(cherry picked from commit 62e737e27129d95b4deaf1a20b426eab6d0ec1c4)

- - - - -
d761a51a by Ate Douma at 2017-09-25T16:41:46+02:00
REPO-1829 minor cleanup and removing reinitialization of SYSTEM properties on 
forceApply==true when node already exists

Even in case of forceApply=true, SYSTEM properties should not get 
re-initialized (even if they no longer exist) iff the node already does

(cherry picked from commit 84de99c8b377c522e502497a9917103dfe893c4d)
(cherry picked from commit 02d14eb467accf44d222a88582404e90731039bf)

- - - - -
1d7cf1a7 by Peter Centgraf at 2017-09-25T16:52:50+02:00
REPO-1821 admin user password and admin group membership are now system 
properties with default values

(cherry picked from commit 3e12e086bb5ebbaaecfb02d621efc43e46652f40)
(cherry picked from commit ce726c83fa8edb03fc2bffc8dd6ede966dc4c5f9)

- - - - -
11e57a51 by Oscar Scholten at 2017-09-28T15:37:23+02:00
REPO-1797 Process upstream content definitions when re-sorting

- Added support for storing order before in the baseline for content.
- Added support for order-first () for content.
- When re-sorting a node, upstream content definitions are now processed too.
- After sorting, added a method that prints out warning for any inconsistencies.
- Improved AutoExportIntegrationTest to be able to perform multiple start/stop 
runs.
- Improved documentation.

(cherry picked from commit a9d1af4b0f49f089fedea45d860baf041dcd595f)

- - - - -
65af67d3 by Woonsan Ko at 2017-09-29T17:02:29+02:00
REPO-1810: fixing ResourceUtils usages to comply with cxf 3.1.12.

- - - - -
5b660141 by Ate Douma at 2017-10-02T00:46:32+02:00
REPO-1839 Fix exporting ValueType for jcr URI, NAME and PATH property types and 
property jcr:mixinTypes with ValueType.NAME instead of ValueType.STRING

(cherry picked from commit 1026762f15b7e8052c9e4dc6482aa155fba8b72e)

- - - - -
b668d247 by Michiel Rop at 2017-10-02T11:32:36+02:00
Merge branch feature/wpm-link-documents into feature/REPO-1835

- - - - -
16b39bd2 by Michiel Rop at 2017-10-02T11:44:08+02:00
REPO-1835 Merge branch master into feature/REPO-1835

- - - - -
63c0321a by Michiel Rop at 2017-10-02T12:59:36+02:00
REPO-1835 Make distinction between empty and null actionsMap

The scxmlExecutor behaves differently for a actionMap that is null
than for an empty one. In the latter case, there are no valid
transitions.

- - - - -
a6f3076e by Michiel Rop at 2017-10-02T15:57:57+02:00
REPO-1835 Add requestIdentifier to builder

Add requestIdentifier to builder in order to set the
event payload key, value pair on the eventpayload and the allowed
actions a started scxmlExecutor is necessary. If it has not been
started, the feedback containing the requests has not been initialized
yet.

An additional benefit of adding the requestIdentifier to the builder
is that callers of the api can also use workflowmethods that request
a requestModifier using the new transitionMethod in combination
with the DocumentWorkflowTransition.Builder.

This approach seems preferably over introducing Futures, since the
current cases of using a request Identifier all result in the same
modification of the actionsMap and the eventPayload. Using Futures
furthermore makes the api overly complex, without adding any new
functionality.

Its still possible to set the actionsMap as well. The available actions
derived from the requestIdentifier are added in that case.

- - - - -


30 changed files:

- 
builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowTransition.java
- config/src/main/resources/hcm-config/group-author.yaml
- config/src/main/resources/hcm-config/group-editor.yaml
- engine/src/main/java/org/onehippo/cm/engine/BaselineResourceInputProvider.java
- engine/src/main/java/org/onehippo/cm/engine/ConfigurationBaselineService.java
- engine/src/main/java/org/onehippo/cm/engine/ConfigurationConfigService.java
- engine/src/main/java/org/onehippo/cm/engine/ConfigurationContentService.java
- engine/src/main/java/org/onehippo/cm/engine/Constants.java
- engine/src/main/java/org/onehippo/cm/engine/JcrContentExporter.java
- engine/src/main/java/org/onehippo/cm/engine/JcrContentProcessor.java
- engine/src/main/java/org/onehippo/cm/engine/ValueProcessor.java
- 
engine/src/main/java/org/onehippo/cm/engine/autoexport/AutoExportConfigExporter.java
- 
engine/src/main/java/org/onehippo/cm/engine/autoexport/DefinitionMergeService.java

[HippoCMS-scm] [Git][cms-community/hippo-services-api] Pushed new branch feature/CMS-10929

2017-10-02 Thread Michiel Rop
Michiel Rop pushed new branch feature/CMS-10929 at cms-community / 
hippo-services-api

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-services-api/tree/feature/CMS-10929
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-repository][feature/REPO-1835] REPO-1835 Swap parameters for transition method

2017-09-28 Thread Michiel Rop
Michiel Rop pushed to branch feature/REPO-1835 at cms-community / 
hippo-repository


Commits:
eab949fd by Michiel Rop at 2017-09-28T11:49:33+02:00
REPO-1835 Swap parameters for transition method

The initialPayload has preference.

- - - - -


2 changed files:

- 
builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java


Changes:

=
builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
=
--- 
a/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
+++ 
b/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
@@ -537,12 +537,12 @@ public interface DocumentWorkflow extends Workflow, 
EditableWorkflow, CopyWorkfl
  * Triggers the action with supplied payload.
  *
  * @param action
- * @param transitionPayload
+ * @param initialPayload
  * @return
  * @throws WorkflowException
  * @throws RepositoryException
  */
-Object transition(String action, Map<String, Object> transitionPayload) 
throws WorkflowException;
+Object transition(String action, Map<String, Object> initialPayload) 
throws WorkflowException;
 
 /**
  * Triggers the action with supplied transaction payload and initial 
payload
@@ -552,7 +552,7 @@ public interface DocumentWorkflow extends Workflow, 
EditableWorkflow, CopyWorkfl
  * @return
  * @throws WorkflowException
  */
-Object transition(String action, Map<String, Object> transitionPayload, 
Map<String, Object> initialPayload) throws WorkflowException;
+Object transition(String action, Map<String, Object> initialPayload, 
Map<String, Object> transitionPayload) throws WorkflowException;
 
 /**
  * Triggers the action


=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
@@ -378,13 +378,13 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 
 
 @Override
-public Object transition(String action, Map<String, Object> 
transitionPayload) throws WorkflowException{
-return transition(action,transitionPayload,Collections.emptyMap());
+public Object transition(String action, Map<String, Object> 
initialPayload) throws WorkflowException{
+return transition(action,initialPayload,Collections.emptyMap());
 }
 
 
 @Override
-public Object transition(String action, Map<String, Object> 
transitionPayload, Map<String, Object> initialPayload) throws WorkflowException{
+public Object transition(String action, Map<String, Object> 
initialPayload, Map<String, Object> transitionPayload) throws WorkflowException{
 workflowExecutor.start(initialPayload);
 return workflowExecutor.triggerAction(action,transitionPayload);
 }



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

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/eab949fd647449f6586ef891155459c348feb5d4
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-repository] Pushed new branch feature/REPO-1835

2017-09-28 Thread Michiel Rop
Michiel Rop pushed new branch feature/REPO-1835 at cms-community / 
hippo-repository

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/tree/feature/REPO-1835
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-repository] Pushed new branch feature/REPO-1824

2017-09-19 Thread Michiel Rop
Michiel Rop pushed new branch feature/REPO-1824 at cms-community / 
hippo-repository

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/tree/feature/REPO-1824
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-jcrdiff] Deleted branch bugfix/CMS-10908

2017-09-18 Thread Michiel Rop
Michiel Rop deleted branch bugfix/CMS-10908 at cms-community / hippo-jcrdiff

---

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-jcrdiff][master] CMS-10908 Update project to work with Maven 3.3.9 Update parent pom to build with Java 8

2017-09-18 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-jcrdiff


Commits:
05acf51b by Arent-Jan Banck at 2017-09-15T16:50:21+02:00
CMS-10908 Update project to work with Maven 3.3.9 Update parent pom to build 
with Java 8

- - - - -


4 changed files:

- NOTICE
- client/pom.xml
- core/pom.xml
- pom.xml


Changes:

=
NOTICE
=
--- a/NOTICE
+++ b/NOTICE
@@ -1,5 +1,5 @@
 JCR Diff
-Copyright 2011-2015 Hippo B.V. (http://www.onehippo.com)
+Copyright 2011-2017 Hippo B.V. (http://www.onehippo.com)
 
 This product includes software developed by:
 Hippo B.V., Amsterdam, The Netherlands (http://www.onehippo.com/);


=
client/pom.xml
=
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -1,6 +1,6 @@
 
 

[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Deleted branch bugfix/CHANNELMGR-1462

2017-09-18 Thread Michiel Rop
Michiel Rop deleted branch bugfix/CHANNELMGR-1462 at cms-community / 
hippo-addon-channel-manager

---

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-addon-channel-manager] Deleted branch bugfix/CHANNELMGR-1461

2017-09-18 Thread Michiel Rop
Michiel Rop deleted branch bugfix/CHANNELMGR-1461 at cms-community / 
hippo-addon-channel-manager

---

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-addon-channel-manager][master] CHANNELMGR-1461 Select core/master when selecting channel from overview

2017-09-18 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
f703393a by Joeri de Gooijer at 2017-09-18T10:50:26+02:00
CHANNELMGR-1461 Select core/master when selecting channel from overview

- - - - -


1 changed file:

- frontend/src/main/resources/org/onehippo/cms7/channelmanager/RootPanel.js


Changes:

=
frontend/src/main/resources/org/onehippo/cms7/channelmanager/RootPanel.js
=
--- a/frontend/src/main/resources/org/onehippo/cms7/channelmanager/RootPanel.js
+++ b/frontend/src/main/resources/org/onehippo/cms7/channelmanager/RootPanel.js
@@ -118,7 +118,7 @@
 if (this.layout.activeItem === 
Hippo.ChannelManager.ChannelEditor.Instance) {
   return;
 }
-Hippo.ChannelManager.ChannelEditor.Instance.loadChannel(channelId);
+Hippo.ChannelManager.ChannelEditor.Instance.loadChannel(channelId, 
null, 'master');
 self._showChannelEditor();
   };
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/f703393aea6a212b0b837844f18ae9987f98dd2c

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/f703393aea6a212b0b837844f18ae9987f98dd2c
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-addon-channel-manager][master] 2 commits: CHANNELMGR-1462 Change 'Confirm' to 'Submit' as label for projects.

2017-09-18 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
8a312a7d by Joeri de Gooijer at 2017-09-14T15:42:16+02:00
CHANNELMGR-1462 Change Confirm to Submit as label for 
projects.

- - - - -
3445c2a8 by Michiel Rop at 2017-09-18T10:42:57+02:00
Merge branch bugfix/CHANNELMGR-1462

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/actions/channelActions.service.js
- frontend-ng/src/i18n/en.json


Changes:

=
frontend-ng/src/angularjs/channel/actions/channelActions.service.js
=
--- a/frontend-ng/src/angularjs/channel/actions/channelActions.service.js
+++ b/frontend-ng/src/angularjs/channel/actions/channelActions.service.js
@@ -69,7 +69,7 @@ class ChannelActionsService extends MenuService {
   onClick: () => this._publish(),
 })
  .addAction('confirm', {
-   translationKey: 'TOOLBAR_MENU_CHANNEL_CONFIRM',
+   translationKey: 'TOOLBAR_MENU_CHANNEL_SUBMIT',
iconName: 'publish',
isVisible: () => this._isBranch(),
isEnabled: () => this._hasOwnChanges(),


=
frontend-ng/src/i18n/en.json
=
--- a/frontend-ng/src/i18n/en.json
+++ b/frontend-ng/src/i18n/en.json
@@ -166,7 +166,7 @@
   "TOOLBAR_MENU_CHANNEL_DELETE": "Delete",
   "TOOLBAR_MENU_CHANNEL_DISCARD_CHANGES": "Discard changes",
   "TOOLBAR_MENU_CHANNEL_PUBLISH": "Publish",
-  "TOOLBAR_MENU_CHANNEL_CONFIRM": "Confirm",
+  "TOOLBAR_MENU_CHANNEL_SUBMIT": "Submit",
   "TOOLBAR_MENU_CHANNEL_MANAGE_CHANGES": "Manage changes",
   "TOOLBAR_MENU_CHANNEL_SETTINGS": "Settings",
   "TOOLBAR_MENU_PAGE_COPY": "Copy",



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/1f4e41871c1dbfbff4efd2c159dea0e9b4d34388...3445c2a8e2da06db6bccc8f41c9b1ff0c5801147

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/compare/1f4e41871c1dbfbff4efd2c159dea0e9b4d34388...3445c2a8e2da06db6bccc8f41c9b1ff0c5801147
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-addon-channel-manager] Deleted branch bugfix/CHANNELMGR-1384

2017-08-24 Thread Michiel Rop
Michiel Rop deleted branch bugfix/CHANNELMGR-1384 at cms-community / 
hippo-addon-channel-manager

---

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-addon-channel-manager][master] CHANNELMGR-1384 Pass current path info to load call as initialPath

2017-08-24 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
7442c834 by Joeri de Gooijer at 2017-08-24T11:01:23+02:00
CHANNELMGR-1384 Pass current path info to load call as initialPath

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.controller.js
- frontend-ng/src/angularjs/channel/page/pageMetaData.service.js


Changes:

=
frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.controller.js
=
--- a/frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.controller.js
+++ b/frontend-ng/src/angularjs/channel/hippoIframe/hippoIframe.controller.js
@@ -122,7 +122,8 @@ class HippoIframeCtrl {
   _updateChannelIfSwitched() {
 const channelToLoad = this._getChannelToLoad();
 if (channelToLoad !== null) {
-  this.CmsService.publish('load-channel', channelToLoad);
+  const path = this.PageMetaDataService.getPathInfo();
+  this.CmsService.publish('load-channel', channelToLoad, path);
 }
   }
 


=
frontend-ng/src/angularjs/channel/page/pageMetaData.service.js
=
--- a/frontend-ng/src/angularjs/channel/page/pageMetaData.service.js
+++ b/frontend-ng/src/angularjs/channel/page/pageMetaData.service.js
@@ -36,6 +36,10 @@ class PageMetaDataService {
 return this.data;
   }
 
+  getPathInfo() {
+return this.data[this.HST.PATH_INFO];
+  }
+
   getChannelId() {
 return this.data[this.HST.CHANNEL_ID];
   }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/7442c8344d4ef2810a55e76c2cb731f074f163d7

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/7442c8344d4ef2810a55e76c2cb731f074f163d7
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-addon-channel-manager][master] CHANNELMGR-1383 Replace call to non-existing function

2017-07-07 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
318942b0 by Michiel Rop at 2017-07-07T12:14:23+02:00
CHANNELMGR-1383 Replace call to non-existing function

- - - - -


1 changed file:

- frontend-ng/src/angularjs/channel/actions/channelActions.service.js


Changes:

=
frontend-ng/src/angularjs/channel/actions/channelActions.service.js
=
--- a/frontend-ng/src/angularjs/channel/actions/channelActions.service.js
+++ b/frontend-ng/src/angularjs/channel/actions/channelActions.service.js
@@ -73,7 +73,7 @@ class ChannelActionsService extends MenuService {
translationKey: 'TOOLBAR_MENU_CHANNEL_CONFIRM',
iconName: 'publish',
isVisible: () => this._hasOwnChanges() && this._isBranch(),
-   onClick: () => this._confirm(),
+   onClick: () => this._publish(),
  })
 .addAction('discard-changes', {
   translationKey: 'TOOLBAR_MENU_CHANNEL_DISCARD_CHANGES',



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/318942b020c233ccecfda528d90ffd236bf22954
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch bugfix/CHANNELMGR-1380-htmlselect

2017-07-06 Thread Michiel Rop
Michiel Rop pushed new branch bugfix/CHANNELMGR-1380-htmlselect at 
cms-community / hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][master] CHANNELMGR-1372 Fix unit test

2017-06-30 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
99714084 by Michiel Rop at 2017-06-30T15:14:39+02:00
CHANNELMGR-1372 Fix unit test

- - - - -


1 changed file:

- frontend-ng/src/angularjs/channel/menu/models/menu.model.js


Changes:

=
frontend-ng/src/angularjs/channel/menu/models/menu.model.js
=
--- a/frontend-ng/src/angularjs/channel/menu/models/menu.model.js
+++ b/frontend-ng/src/angularjs/channel/menu/models/menu.model.js
@@ -30,7 +30,7 @@ class Menu extends MenuItem {
   }
 
   getTranslationKey() {
-if (this.translationKey() === undefined) {
+if (this.translationKey === undefined) {
   return this.name;
 }
 return this.translationKey();



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/99714084d78d48d8407f925f72e59a4810857ac8
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][master] CHANNELMGR-1372 Fix unit test

2017-06-30 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
d6c8bbaa by Michiel Rop at 2017-06-30T14:57:59+02:00
CHANNELMGR-1372 Fix unit test

- - - - -


3 changed files:

- frontend-ng/src/angularjs/channel/menu/models/menu.model.js
- frontend-ng/src/angularjs/channel/menu/models/menuItem.model.js
- frontend-ng/src/angularjs/channel/menu/models/menuItem.model.spec.js


Changes:

=
frontend-ng/src/angularjs/channel/menu/models/menu.model.js
=
--- a/frontend-ng/src/angularjs/channel/menu/models/menu.model.js
+++ b/frontend-ng/src/angularjs/channel/menu/models/menu.model.js
@@ -30,7 +30,10 @@ class Menu extends MenuItem {
   }
 
   getTranslationKey() {
-return this.translationKey() || this.name;
+if (this.translationKey() === undefined) {
+  return this.name;
+}
+return this.translationKey();
   }
 
   hasIcons() {


=
frontend-ng/src/angularjs/channel/menu/models/menuItem.model.js
=
--- a/frontend-ng/src/angularjs/channel/menu/models/menuItem.model.js
+++ b/frontend-ng/src/angularjs/channel/menu/models/menuItem.model.js
@@ -34,7 +34,10 @@ class MenuItem {
   }
 
   getTranslationKey() {
-return this.translationKey() || this.name;
+if (this.translationKey() === undefined) {
+  return this.name;
+}
+return this.translationKey();
   }
 
   isEnabled() {


=
frontend-ng/src/angularjs/channel/menu/models/menuItem.model.spec.js
=
--- a/frontend-ng/src/angularjs/channel/menu/models/menuItem.model.spec.js
+++ b/frontend-ng/src/angularjs/channel/menu/models/menuItem.model.spec.js
@@ -24,12 +24,12 @@ describe('MenuItem model', () => {
 
   it('uses the name as the default translation key', () => {
 const item = new MenuItem('test-menu-item');
-expect(item.translationKey).toBe('test-menu-item');
+expect(item.getTranslationKey()).toBe('test-menu-item');
   });
 
   it('can have a custom translation key', () => {
-const item = new MenuItem('test-menu-item', { translationKey: 
'test-translation-key' });
-expect(item.translationKey).toBe('test-translation-key');
+const item = new MenuItem('test-menu-item', { translationKey: () => 
'test-translation-key' });
+expect(item.getTranslationKey()).toBe('test-translation-key');
   });
 
   it('is visible and enabled by default', () => {



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/d6c8bbaa4be508044773885cfbb76f440622e48e
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][master] CHANNELMGR-1372 Reload translationKey

2017-06-29 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
ca3488b3 by Michiel Rop at 2017-06-29T21:18:58+02:00
CHANNELMGR-1372 Reload translationKey

Reload translationKey when the project changes.

- - - - -


3 changed files:

- frontend-ng/src/angularjs/channel/actions/channelActions.service.js
- frontend-ng/src/angularjs/channel/menu/models/menu.model.js
- frontend-ng/src/angularjs/channel/menu/models/menuItem.model.js


Changes:

=
frontend-ng/src/angularjs/channel/actions/channelActions.service.js
=
--- a/frontend-ng/src/angularjs/channel/actions/channelActions.service.js
+++ b/frontend-ng/src/angularjs/channel/actions/channelActions.service.js
@@ -49,7 +49,7 @@ class ChannelActionsService extends MenuService {
 this.SiteMapService = SiteMapService;
 this.ProjectService = ProjectService;
 
-this.defineMenu('channel', {
+this.menuService = this.defineMenu('channel', {
   translationKey: 'TOOLBAR_BUTTON_CHANNEL',
   isIconVisible: () => this._hasAnyChanges(),
   iconSvg: 'attention',
@@ -93,6 +93,15 @@ class ChannelActionsService extends MenuService {
   translationKey: 'TOOLBAR_MENU_CHANNEL_CLOSE',
   onClick: () => this._closeChannel(),
 });
+
+this.ProjectService.registerChangeListener(() => 
this._setPublicationLabel());
+  }
+
+  _setPublicationLabel() {
+const findItemByName = this.menuService.menu.findItemByName('publish');
+if (findItemByName) {
+  findItemByName.setTranslationKey(this._getPublicationLabel());
+}
   }
 
   _getPublicationLabel() {


=
frontend-ng/src/angularjs/channel/menu/models/menu.model.js
=
--- a/frontend-ng/src/angularjs/channel/menu/models/menu.model.js
+++ b/frontend-ng/src/angularjs/channel/menu/models/menu.model.js
@@ -29,6 +29,10 @@ class Menu extends MenuItem {
 this.items.push(item);
   }
 
+  findItemByName(name) {
+return this.items.find(item => item.name === name);
+  }
+
   hasIcons() {
 return this.items
 .filter(item => item.type === 'action')


=
frontend-ng/src/angularjs/channel/menu/models/menuItem.model.js
=
--- a/frontend-ng/src/angularjs/channel/menu/models/menuItem.model.js
+++ b/frontend-ng/src/angularjs/channel/menu/models/menuItem.model.js
@@ -29,6 +29,10 @@ class MenuItem {
 this.isIconVisible = config.isIconVisible || this.isIconVisible;
   }
 
+  setTranslationKey(key) {
+this.translationKey = key;
+  }
+
   isVisible() {
 return true;
   }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/ca3488b3710bfcedf1d5226619c07adce0f87516
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][master] CHANNELMGR-1372 Contextualize "Publish" action

2017-06-27 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
04c76928 by Michiel Rop at 2017-06-27T15:17:41+02:00
CHANNELMGR-1372 Contextualize Publish action

If a project is selected, the label will change to Confirm instead
of Publish and vice versa in order to better communicate the intent.

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/actions/channelActions.service.js
- frontend-ng/src/i18n/en.json


Changes:

=
frontend-ng/src/angularjs/channel/actions/channelActions.service.js
=
--- a/frontend-ng/src/angularjs/channel/actions/channelActions.service.js
+++ b/frontend-ng/src/angularjs/channel/actions/channelActions.service.js
@@ -30,6 +30,7 @@ class ChannelActionsService extends MenuService {
 SessionService,
 SidePanelService,
 SiteMapService,
+ProjectService,
   ) {
 'ngInject';
 
@@ -46,6 +47,7 @@ class ChannelActionsService extends MenuService {
 this.SessionService = SessionService;
 this.SidePanelService = SidePanelService;
 this.SiteMapService = SiteMapService;
+this.ProjectService = ProjectService;
 
 this.defineMenu('channel', {
   translationKey: 'TOOLBAR_BUTTON_CHANNEL',
@@ -62,7 +64,7 @@ class ChannelActionsService extends MenuService {
   isVisible: () => this._isChannelSettingsAvailable() && 
this._hasAnyChanges(),
 })
 .addAction('publish', {
-  translationKey: 'TOOLBAR_MENU_CHANNEL_PUBLISH',
+  translationKey: this._getPublicationLabel(),
   iconName: 'publish',
   isVisible: () => this._hasOwnChanges(),
   onClick: () => this._publish(),
@@ -93,6 +95,11 @@ class ChannelActionsService extends MenuService {
 });
   }
 
+  _getPublicationLabel() {
+return this.ConfigService.projectsEnabled && 
this.ProjectService.selectedProject ?
+ 'TOOLBAR_MENU_CHANNEL_CONFIRM' : 'TOOLBAR_MENU_CHANNEL_PUBLISH';
+  }
+
   // Settings
   _showChannelSettings() {
 this.showSubPage('channel-settings');
@@ -242,6 +249,7 @@ class ChannelActionsService extends MenuService {
   _closeChannel() {
 this.CmsService.publish('close-channel');
   }
+
 }
 
 export default ChannelActionsService;


=
frontend-ng/src/i18n/en.json
=
--- a/frontend-ng/src/i18n/en.json
+++ b/frontend-ng/src/i18n/en.json
@@ -164,6 +164,7 @@
   "TOOLBAR_MENU_CHANNEL_DELETE": "Delete",
   "TOOLBAR_MENU_CHANNEL_DISCARD_CHANGES": "Discard changes",
   "TOOLBAR_MENU_CHANNEL_PUBLISH": "Publish",
+  "TOOLBAR_MENU_CHANNEL_CONFIRM": "Confirm",
   "TOOLBAR_MENU_CHANNEL_MANAGE_CHANGES": "Manage changes",
   "TOOLBAR_MENU_CHANNEL_SETTINGS": "Settings",
   "TOOLBAR_MENU_PAGE_COPY": "Copy",



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/04c7692850179b42cc63ccc6c304aa36593a8000
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][master] CHANNELMGR-1321 Hide overlay toggle if locked

2017-06-20 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
3f367dc1 by Michiel Rop at 2017-06-20T22:24:09+02:00
CHANNELMGR-1321 Hide overlay toggle if locked

- - - - -


3 changed files:

- frontend-ng/src/angularjs/channel/channel.controller.js
- frontend-ng/src/angularjs/channel/channel.html
- frontend-ng/src/angularjs/channel/channel.service.js


Changes:

=
frontend-ng/src/angularjs/channel/channel.controller.js
=
--- a/frontend-ng/src/angularjs/channel/channel.controller.js
+++ b/frontend-ng/src/angularjs/channel/channel.controller.js
@@ -65,6 +65,10 @@ class ChannelCtrl {
 return !this.isChannelLoaded() || !this.isPageLoaded();
   }
 
+  isConfigurationLocked() {
+return this.ChannelService.isConfigurationLocked();
+  }
+
   isChannelLoaded() {
 return this.ChannelService.hasChannel();
   }


=
frontend-ng/src/angularjs/channel/channel.html
=
--- a/frontend-ng/src/angularjs/channel/channel.html
+++ b/frontend-ng/src/angularjs/channel/channel.html
@@ -41,7 +41,7 @@
 icon-src="images/toggle_components_overlay.svg"
 tooltip="{{ channelCtrl.isComponentsOverlayDisplayed ? 
'HIDE_COMPONENTS' : 'SHOW_COMPONENTS' | translate }}"
 class="qa-toggle-components"
-ng-if="channelCtrl.isEditable() && 
channelCtrl.isPageLoaded()">
+ng-if="channelCtrl.isEditable() && 
channelCtrl.isPageLoaded() && !channelCtrl.isConfigurationLocked()">
 
 
 https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/3f367dc17ed3321acc051c9b888eccb9fbbd0cc1
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][master] CHANNELMGR-1356 Load Channel from Project Perspective

2017-06-19 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / 
hippo-addon-channel-manager


Commits:
64894a79 by Michiel Rop at 2017-06-19T15:03:31+02:00
CHANNELMGR-1356 Load Channel from Project Perspective

The Channel Store only holds preview channels.

- - - - -


1 changed file:

- 
frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ChannelEditor.js


Changes:

=
frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ChannelEditor.js
=
--- 
a/frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ChannelEditor.js
+++ 
b/frontend/src/main/resources/org/onehippo/cms7/channelmanager/channeleditor/ChannelEditor.js
@@ -166,9 +166,8 @@
 
 _getChannelRecord: function(channelStore, channelId) {
   var channelRecord = channelStore.getById(channelId);
-  if (!channelRecord && channelId.endsWith('-preview')) {
-// try to use the live channel instead.
-channelRecord = channelStore.getById(channelId.replace(/-preview$/, 
''));
+  if (!channelRecord && !channelId.endsWith('-preview')) {
+channelRecord = channelStore.getById(channelId+'-preview');
   }
   return channelRecord;
 },



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/64894a79f73ad3009e294ebcba86dc6fec440b75
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] 2 commits: CHANNELMGR-1267 Add unit test for select project

2017-05-16 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
cfb4a74c by Michiel Rop at 2017-05-16T15:51:00+02:00
CHANNELMGR-1267 Add unit test for select project

- - - - -
9aba4441 by Michiel Rop at 2017-05-16T15:51:03+02:00
CHANNELMGR-1267 Disable projects for non master

If the currently selected project is the master or core then associating
projects is allowed, otherwise not.

- - - - -


3 changed files:

- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
- frontend-ng/src/angularjs/services/project.service.js
- frontend-ng/src/angularjs/services/project.service.spec.js


Changes:

=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
=
--- a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
+++ b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
@@ -33,7 +33,7 @@
 
 
 
   {{ project.name }}
 


=
frontend-ng/src/angularjs/services/project.service.js
=
--- a/frontend-ng/src/angularjs/services/project.service.js
+++ b/frontend-ng/src/angularjs/services/project.service.js
@@ -42,6 +42,7 @@ class ProjectService {
   }
 
   projects() {
+console.log('projects');
 return this._getProjects(this._mountId)
   .then((result) => {
 this.currentBranch()
@@ -50,9 +51,12 @@ class ProjectService {
 this.withBranch = this.withBranch.concat(result.withBranch);
 this.withoutBranch = result.withoutBranch;
 this.selectedProject = this._master;
+let disabled = false;
 if (branchId) {
+  disabled = true;
   this.selectedProject = this.withBranch.find(project => 
this._compareIgnorePreview(project.id, branchId));
 }
+this.withoutBranch = this.withoutBranch.map(p => Object.create(p, 
{ disabled: { value: disabled } }));
   });
   });
   }
@@ -100,8 +104,9 @@ class ProjectService {
   }
 
   selectMaster() {
-this.HstService.doPut(null, this._mountId, 'selectmaster');
+return this.HstService.doPut(null, this._mountId, 'selectmaster');
   }
+
 }
 
 export default ProjectService;


=
frontend-ng/src/angularjs/services/project.service.spec.js
=
--- a/frontend-ng/src/angularjs/services/project.service.spec.js
+++ b/frontend-ng/src/angularjs/services/project.service.spec.js
@@ -20,6 +20,7 @@ import 'angular-mocks';
 describe('ProjectService', () => {
   let $httpBackend;
   let ProjectService;
+  let HstService;
 
   const mountId = '12';
 
@@ -40,10 +41,13 @@ describe('ProjectService', () => {
   $provide.value('ChannelService', channelServiceMock);
 });
 
-inject((_$httpBackend_, _ProjectService_) => {
+inject((_$httpBackend_, _ProjectService_, _HstService_) => {
   $httpBackend = _$httpBackend_;
   ProjectService = _ProjectService_;
+  HstService = _HstService_;
 });
+
+spyOn(HstService, 'doPut');
   });
 
   afterEach(() => {
@@ -79,4 +83,61 @@ describe('ProjectService', () => {
 
 expect(actual).toEqual(returnFromRest);
   });
+
+  it('selects master if the selectedProject changes to master', () => {
+const master = {
+  id: 'master',
+  name: 'master',
+};
+ProjectService._master = master;
+ProjectService._mountId = mountId;
+ProjectService.projectChanged(master);
+expect(HstService.doPut).toHaveBeenCalledWith(null, mountId, 
'selectmaster');
+  });
+
+  it('selects the branch associated with the selectedProject if the 
selectedProject has already been associated', () => {
+const master = {
+  id: 'master',
+  name: 'master',
+};
+const test1 = {
+  id: 'test1',
+  name: 'test1',
+};
+const withBranch = [
+  test1,
+  {
+id: 'test2',
+name: 'test2',
+  }];
+ProjectService.withBranch = withBranch;
+ProjectService.withoutBranch = [];
+ProjectService._master = master;
+ProjectService._mountId = mountId;
+ProjectService.projectChanged(test1);
+expect(HstService.doPut).toHaveBeenCalledWith(null, mountId, 
'selectbranch', test1.id);
+  });
+
+  it('creates a branch based on the selectedProject if the selectedProject has 
not been yet associated', () => {
+const master = {
+  id: 'master',
+  name: 'master',
+};
+const test1 = {
+  id: 'test1',
+  name: 'test1',
+};
+const withoutBranch = [
+  test1,
+  {
+id: 'test2',
+name: 'test2',
+  }];
+ProjectService.withBranch = [];
+ProjectService.withoutBranch = withoutBranch;
+ProjectService._master = master;
+ProjectService._mountId = mountId;
+ProjectService.projectChanged(test1);
+expect(HstService.doPut).toHaveBeenCall

[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] CHANNELMGR-1272 Fix alignment of text and dropdowns in toolbar

2017-05-15 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
8c264892 by Joeri de Gooijer at 2017-05-15T10:54:14+02:00
CHANNELMGR-1272 Fix alignment of text and dropdowns in toolbar

- - - - -


7 changed files:

- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
- frontend-ng/src/angularjs/channel/relevance/viewAs.html
- frontend-ng/src/angularjs/channel/viewportToggle/viewportToggle.component.js
- frontend-ng/src/angularjs/channel/viewportToggle/viewportToggle.html
- + frontend-ng/src/angularjs/channel/viewportToggle/viewportToggle.scss
- frontend-ng/src/styles/_channel.scss
- frontend-ng/src/styles/_toolbar.scss


Changes:

=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
=
--- a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
+++ b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
@@ -21,6 +21,7 @@
   
 
   
 
   {{ 'TOOLBAR_VIEW_AS_LABEL' | translate }}
-  
 
   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.
+
+.viewport-name {
+  margin-left: 8px;
+
+  // hide the name of the selected viewport
+  md-select-value & {
+display: none;
+  }
+}


=
frontend-ng/src/styles/_channel.scss
=
--- a/frontend-ng/src/styles/_channel.scss
+++ b/frontend-ng/src/styles/_channel.scss
@@ -14,10 +14,6 @@
 
 // let a linear progress indicator float 'above' the bottom of a toolbar
 // instead of taking up extra space below the toolbar
-md-toolbar > md-progress-linear {
-  bottom: 0;
-  position: absolute;
-}
 
 .input-container-picker {
   img {


=
frontend-ng/src/styles/_toolbar.scss
=
--- a/frontend-ng/src/styles/_toolbar.scss
+++ b/frontend-ng/src/styles/_toolbar.scss
@@ -71,7 +71,6 @@ md-toolbar.hippo-toolbar {
 
   md-select {
 margin: 0;
-padding-bottom: 6px;
 
 &[disabled] md-select-value md-icon {
   color: $grey-500;
@@ -80,21 +79,15 @@ md-toolbar.hippo-toolbar {
 
   md-select-value {
 background: none !important;
-border-bottom-width: 0 !important;
 font-weight: bold;
 margin-left: 4px;
 position: relative;
-top: 1px;
 
 md-icon {
   color: $text-dark;
 }
   }
 
-  md-switch {
-margin: 0;
-  }
-
   .changes-button {
 margin-left: 0;
 margin-right: 4px;
@@ -108,23 +101,13 @@ md-toolbar.hippo-toolbar {
   }
 }
 
-md-toolbar md-progress-linear {
+md-toolbar > md-progress-linear {
+  bottom: 0;
   height: 2px;
+  position: absolute;
 
   .md-container {
 height: 2px;
   }
 }
 
-.project-name{
-  margin-left: 8px;
-}
-
-.viewport-name {
-  margin-left: 8px;
-
-  // hide the name of the selected viewport
-  md-select-value & {
-display: none;
-  }
-}



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/8c264892f795897dbf90b57d9e100732e4e7f316
___
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/wpm] HSTTWO-3998 Fixed randomness

2017-05-09 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-site-toolkit


Commits:
0bcdcc2d by Michiel Rop at 2017-05-09T23:29:05+02:00
HSTTWO-3998 Fixed randomness

- - - - -


1 changed file:

- 
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java


Changes:

=
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
=
--- 
a/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
+++ 
b/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
@@ -107,7 +107,8 @@ public class MountResource extends AbstractConfigResource {
 private SiteMenuHelper siteMenuHelper;
 private PagesHelper pagesHelper;
 private LockHelper lockHelper = new LockHelper();
-private Supplier isError = () -> new 
Random(5l).nextBoolean()==Boolean.FALSE;
+private Random random = new Random(5);
+private Supplier isError = () -> 
random.nextBoolean()==Boolean.FALSE;
 
 public void isError(Supplier isError){
 this.isError = isError;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/0bcdcc2d305584fcde871a625d630f9651362194
___
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/wpm] HSTTWO-3998 Add mountpoint for dry-run and merge

2017-05-09 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-site-toolkit


Commits:
d2b9b69d by Michiel Rop at 2017-05-09T22:00:13+02:00
HSTTWO-3998 Add mountpoint for dry-run and merge

- Added random success / fail as stub
- Used isError Supplier to facilitate unit tests

- - - - -


1 changed file:

- 
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java


Changes:

=
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
=
--- 
a/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
+++ 
b/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
@@ -20,7 +20,9 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Random;
 import java.util.Set;
+import java.util.function.Supplier;
 
 import javax.annotation.security.RolesAllowed;
 import javax.jcr.LoginException;
@@ -105,6 +107,11 @@ public class MountResource extends AbstractConfigResource {
 private SiteMenuHelper siteMenuHelper;
 private PagesHelper pagesHelper;
 private LockHelper lockHelper = new LockHelper();
+private Supplier isError = () -> new 
Random(5l).nextBoolean()==Boolean.FALSE;
+
+public void isError(Supplier isError){
+this.isError = isError;
+}
 
 public void setSiteMapHelper(final SiteMapHelper siteMapHelper) {
 this.siteMapHelper = siteMapHelper;
@@ -249,6 +256,29 @@ public class MountResource extends AbstractConfigResource {
 }
 }
 
+@PUT
+@Path("/dryrunmerge/{branchId}")
+@Produces(MediaType.APPLICATION_JSON)
+public Response dryRunMerge(@Context HttpServletRequest servletRequest, 
@PathParam("branchId") final String branchId){
+final Mount editingMount = 
getPageComposerContextService().getEditingMount();
+log.debug("Dry-run merge requested for branch:{} for channel:{}", 
branchId, editingMount.getChannel());
+return getMergeResponse();
+}
+
+@PUT
+@Path("/merge/{branchId}")
+@Produces(MediaType.APPLICATION_JSON)
+public Response merge(@Context HttpServletRequest servletRequest, 
@PathParam("branchId") final String branchId){
+final Mount editingMount = 
getPageComposerContextService().getEditingMount();
+log.debug("Merge requested for branch:{} for channel:{}", branchId, 
editingMount.getChannel());
+return getMergeResponse();
+}
+
+Response getMergeResponse() {
+return isError.get()?error("Dry-run merge failed"):ok("dry-run merge 
successful");
+}
+
+
 private void setMountToPreviewBranchId(final HttpServletRequest 
servletRequest, String branchId, final Mount mount) {
 HttpSession session = servletRequest.getSession();
 Map<String,String> mountToBranchIdMap = 
(Map<String,String>)session.getAttribute(HST_SITE_PROVIDER_HTTP_SESSION_KEY);



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/d2b9b69de29f590a9b4eec0c439e3e6fd2e1bb29
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm-CHANNELMGR-1247] 2 commits: CHANNELMGR-1239 Fix karma test

2017-05-09 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm-CHANNELMGR-1247 at cms-community / 
hippo-addon-channel-manager


Commits:
3a481c0d by Michiel Eggermont at 2017-05-09T14:02:53+02:00
CHANNELMGR-1239 Fix karma test

- - - - -
216e7969 by Michiel Rop at 2017-05-09T14:03:59+02:00
CHANNELMGR-1247 Fix the getProjects unit test

- - - - -


5 changed files:

- 
frontend-ng/src/angularjs/channel/actions/settings/property/property.controller.js
- frontend-ng/src/angularjs/channel/actions/settings/property/property.spec.js
- frontend-ng/src/angularjs/channel/actions/settings/settings.spec.js
- frontend-ng/src/angularjs/services/project.service.js
- frontend-ng/src/angularjs/services/project.service.spec.js


Changes:

=
frontend-ng/src/angularjs/channel/actions/settings/property/property.controller.js
=
--- 
a/frontend-ng/src/angularjs/channel/actions/settings/property/property.controller.js
+++ 
b/frontend-ng/src/angularjs/channel/actions/settings/property/property.controller.js
@@ -47,9 +47,7 @@ class ChannelPropertyCtrl {
 this.annotation = this._getFirstFieldAnnotation();
 this.type = this._getType();
 this.qaClass = this._getQaClass();
-if (!this.data.editable || (this.data.lockedBy && this.data.lockedBy !== 
ConfigService.cmsUser)) {
-  this.readOnly = true;
-}
+this.readOnly = !this.data.editable || (this.data.lockedBy && 
this.data.lockedBy !== ConfigService.cmsUser);
 this.required = this.definition && this.definition.isRequired;
 
 if (this._isPickerField()) {


=
frontend-ng/src/angularjs/channel/actions/settings/property/property.spec.js
=
--- 
a/frontend-ng/src/angularjs/channel/actions/settings/property/property.spec.js
+++ 
b/frontend-ng/src/angularjs/channel/actions/settings/property/property.spec.js
@@ -193,7 +193,8 @@ describe('ChannelProperty', () => {
 expect(ChannelPropertyCtrl.getDropDownListValues()).toEqual([]);
   });
 
-  it('enters read-only mode if the channel is locked by someone else', () => {
+  it('enters read-only mode if the channel is locked by someone else even if 
the channel is editable', () => {
+channelInfoDescription.editable = true;
 ConfigService.cmsUser = 'admin';
 channelInfoDescription.lockedBy = 'tester';
 let ChannelPropertyCtrl = compileDirectiveAndGetController();


=
frontend-ng/src/angularjs/channel/actions/settings/settings.spec.js
=
--- a/frontend-ng/src/angularjs/channel/actions/settings/settings.spec.js
+++ b/frontend-ng/src/angularjs/channel/actions/settings/settings.spec.js
@@ -147,6 +147,7 @@ describe('ChannelSettings', () => {
 
   it('marks required fields as dirty on save', () => {
 channelInfoDescription.propertyDefinitions.dropDown.isRequired = true;
+channelInfoDescription.editable = true;
 const ChannelSettingsCtrl = compileDirectiveAndGetController();
 expect(ChannelSettingsCtrl.form.dropDown.$dirty).toEqual(false);
 
@@ -166,6 +167,7 @@ describe('ChannelSettings', () => {
   });
 
   it('notifies the event "on-success" when saving is successful', () => {
+channelInfoDescription.editable = true;
 spyOn(ChannelService, 'saveChannel').and.returnValue($q.when());
 spyOn(ChannelService, 'recordOwnChange');
 spyOn(HippoIframeService, 'reload');
@@ -180,6 +182,7 @@ describe('ChannelSettings', () => {
   });
 
   it('shows feedback message when saving is failed', () => {
+channelInfoDescription.editable = true;
 spyOn(ChannelService, 'saveChannel').and.returnValue($q.reject());
 compileDirectiveAndGetController();
 
@@ -200,6 +203,7 @@ describe('ChannelSettings', () => {
   it('displays an alert message when the current channel is locked', () => {
 ConfigService.cmsUser = 'admin';
 channelInfoDescription.lockedBy = 'tester';
+channelInfoDescription.editable = true;
 compileDirectiveAndGetController();
 
expect(FeedbackService.showErrorOnSubpage).toHaveBeenCalledWith('ERROR_CHANNEL_SETTINGS_READONLY',
 { lockedBy: 'tester' });
 


=
frontend-ng/src/angularjs/services/project.service.js
=
--- a/frontend-ng/src/angularjs/services/project.service.js
+++ b/frontend-ng/src/angularjs/services/project.service.js
@@ -42,14 +42,13 @@ class ProjectService {
   }
 
   projects() {
-const url = 
`${this.ConfigService.getCmsContextPath()}${REST_API_PATH}/${this._mountId}/channel`;
-return this.$http({ method: 'GET', url, headers: {}, data: {} })
+return this._getProjects(this._mountId)
   .then((result) => {
 this.currentBranch()
   .then((branchId) => {
 this.withBranch = [this._master];
-this.withBranch = this.withBranch.concat(result.data

[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] CHANNELMGR-1247 Select project from branch

2017-05-02 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
89efa2b9 by Michiel Rop at 2017-05-03T00:09:57+02:00
CHANNELMGR-1247 Select project from branch

- Fixed create / select issue
- Update the client side model upon createBranch instead of updating
  from server
- When switching Channel set the correct project

- - - - -


3 changed files:

- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
- frontend-ng/src/angularjs/services/project.service.js


Changes:

=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
=
--- 
a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
+++ 
b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
@@ -17,39 +17,65 @@
 
 
 class ProjectToggleController {
-  constructor($translate, OverlayService, ChannelService, ProjectService, 
ConfigService, HippoIframeService) {
+  constructor($scope, $translate, OverlayService, ChannelService, 
ProjectService, ConfigService, HippoIframeService, SessionService) {
 'ngInject';
 
 this.$translate = $translate;
 this.OverlayService = OverlayService;
 this.ProjectService = ProjectService;
 this.available = ProjectService.available;
-const channel = ChannelService.getChannel();
-this.MASTER = { name: channel.name, id: channel.id };
-this.withBranch = [this.MASTER];
-this.selectedProject = this.MASTER;
+this.ChannelService = ChannelService;
 this.projectsEnabled = ConfigService.projectsEnabled;
 this.HippoIframeService = HippoIframeService;
 if (this.projectsEnabled) {
-  this._setProjects();
+  // In order to have a way to trigger the reloading of the global 
variants, we tie the reloading
+  // to a successful SessionService.initialize call, which happens upon 
channel switching.
+  SessionService.registerInitCallback('reloadProjects', () => 
this._setCurrentBranch());
+  $scope.$on('$destroy', () => 
SessionService.unregisterInitCallback('reloadProjects'));
+  this._setProjectsAndSelectedProject();
 }
   }
-  _setProjects() {
+  _setProjectsAndSelectedProject() {
+const channel = this.ChannelService.getChannel();
+this.MASTER = { name: channel.name, id: channel.id };
+this.withBranch = [this.MASTER];
 this.ProjectService.projects()
   .then((response) => {
 this.withBranch = this.withBranch.concat(response.withBranch);
 this.withoutBranch = response.withoutBranch;
+this._setCurrentBranch();
   });
   }
+
+  _setCurrentBranch() {
+this.ProjectService.currentBranch()
+  .then((branchId) => {
+if (branchId) {
+  const currentProject = this.withBranch.find(project => project.id 
=== branchId);
+  this.selectedProject = currentProject || this.MASTER;
+} else {
+  this.selectedProject = this.MASTER;
+}
+  });
+  }
+
+  compareId(p1) {
+return p2 => p1.id === p2.id;
+  }
+
   projectChanged() {
-if (this.selectedProject === this.MASTER) {
+const p = this.selectedProject;
+if (this.compareId(this.MASTER)(p)) {
   this.ProjectService.selectMaster();
-  return;
-}
-if (this.withBranch.indexOf(this.selectedProject) === -1) {
-  this.ProjectService.selectBranch(this.selectedProject);
-} else {
-  this.ProjectService.createBranch(this.selectedProject);
+} else
+if (this.withBranch.some(this.compareId(p))) {
+  this.ProjectService.selectBranch(p);
+} else
+if (this.withoutBranch.some(this.compareId(p))) {
+  this.ProjectService.createBranch(p);
+  this.withBranch = this.withBranch.concat(p);
+  this.withoutBranch = this.withoutBranch.filter(project => project.id !== 
p.id);
+  this.selectedProject = p;
 }
 this.HippoIframeService.reload();
   }


=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
=
--- a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
+++ b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
@@ -19,7 +19,7 @@
   
 


=
frontend-ng/src/angularjs/services/project.service.js
=
--- a/frontend-ng/src/angularjs/services/project.service.js
+++ b/frontend-ng/src/angularjs/services/project.service.js
@@ -35,6 +35,11 @@ class ProjectService {
   .then(result => result.data);
   }
 
+  currentBranch() {
+return this.HstService.doGet(this.ChannelService.getChannel().mountId, 
'currentbranch')
+  .then(result => result.data);
+  }
+
   createBranch(project) {
 this.HstService.doPut(null, this.ChannelService.getChannel().mountId, 
'createbranch', project.id);
 

[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] CHANNELMGR-1247 Reload site

2017-05-02 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
3e7848e8 by Michiel Rop at 2017-05-02T12:02:09+02:00
CHANNELMGR-1247 Reload site

- Fixed selecting a project
- Upon selecting the iframe that contains the site is reloaded

- - - - -


3 changed files:

- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
- frontend-ng/src/angularjs/services/project.service.js


Changes:

=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
=
--- 
a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
+++ 
b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
@@ -17,7 +17,7 @@
 
 
 class ProjectToggleController {
-  constructor($translate, OverlayService, ChannelService, ProjectService, 
ConfigService) {
+  constructor($translate, OverlayService, ChannelService, ProjectService, 
ConfigService, HippoIframeService) {
 'ngInject';
 
 this.$translate = $translate;
@@ -29,6 +29,7 @@ class ProjectToggleController {
 this.withBranch = [this.MASTER];
 this.selectedProject = this.MASTER;
 this.projectsEnabled = ConfigService.projectsEnabled;
+this.HippoIframeService = HippoIframeService;
 if (this.projectsEnabled) {
   this._setProjects();
 }
@@ -41,15 +42,16 @@ class ProjectToggleController {
   });
   }
   projectChanged() {
-if (this.selectedProject.id === this.MASTER.id) {
-  this.ProjectService.doSelectMaster();
+if (this.selectedProject === this.MASTER) {
+  this.ProjectService.selectMaster();
   return;
 }
-if (this.withBranch.contains(this.selectedProject)) {
-  this.ProjectService.doSelectBranch(this.selectedProject);
+if (this.withBranch.indexOf(this.selectedProject) === -1) {
+  this.ProjectService.selectBranch(this.selectedProject);
 } else {
-  this.ProjectService.doCreateBranch(this.selectedProject);
+  this.ProjectService.createBranch(this.selectedProject);
 }
+this.HippoIframeService.reload();
   }
 }
 


=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
=
--- a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
+++ b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
@@ -19,7 +19,7 @@
   
 


=
frontend-ng/src/angularjs/services/project.service.js
=
--- a/frontend-ng/src/angularjs/services/project.service.js
+++ b/frontend-ng/src/angularjs/services/project.service.js
@@ -35,15 +35,15 @@ class ProjectService {
   .then(result => result.data);
   }
 
-  doCreateBranch(project) {
+  createBranch(project) {
 this.HstService.doPut(null, this.ChannelService.getChannel().mountId, 
'createbranch', project.id);
   }
 
-  doSelectBranch(project) {
+  selectBranch(project) {
 this.HstService.doPut(null, this.ChannelService.getChannel().mountId, 
'selectbranch', project.id);
   }
 
-  doSelectMaster() {
+  selectMaster() {
 this.HstService.doPut(null, this.ChannelService.getChannel().mountId, 
'selectmaster');
   }
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/3e7848e84acdbc83b737aa13004a38cbbf5c3acd
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] CHANNELMGR-1253 Show projects only in Enterprise

2017-05-01 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
f61b7a84 by Michiel Rop at 2017-05-01T16:21:17+02:00
CHANNELMGR-1253 Show projects only in Enterprise

It is necessary to add the path to the ChannelManagerPlugin config,
because if a user does not have read rights on this projects node or the
projects tree does not exist the projects dropdown should not be
shown.

The ChannelEditor class get its config from the RootPanel and that one
in turn from the ChannelManagerPerspective. The ExtJs Wicket bridge makes
sure the properties are set on the config object. That object is loaded
into the cms service angular object that is loaded in turn in the
configservice.

- - - - -


4 changed files:

- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
- 
frontend/src/main/java/org/onehippo/cms7/channelmanager/channeleditor/ChannelEditor.java
- repository/src/main/resources/channel-manager-cluster.xml


Changes:

=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
=
--- 
a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
+++ 
b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
@@ -17,7 +17,7 @@
 
 
 class ProjectToggleController {
-  constructor($translate, OverlayService, ChannelService, ProjectService) {
+  constructor($translate, OverlayService, ChannelService, ProjectService, 
ConfigService) {
 'ngInject';
 
 this.$translate = $translate;
@@ -28,7 +28,10 @@ class ProjectToggleController {
 this.MASTER = { name: channel.name, id: channel.id };
 this.withBranch = [this.MASTER];
 this.selectedProject = this.MASTER;
-this._setProjects();
+this.projectsEnabled = ConfigService.projectsEnabled;
+if (this.projectsEnabled) {
+  this._setProjects();
+}
   }
   _setProjects() {
 this.ProjectService.projects()


=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
=
--- a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
+++ b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.html
@@ -14,7 +14,7 @@
   ~ limitations under the License.
   ~
   -->
-
+
   {{ 'TOOLBAR_PROJECT_LABEL' | translate }}
this.variantsUuid = uuid);
+Optional.of(config).ifPresent(
+(c -> getUuid(c.getString("projectsPath"))
+.ifPresent(uuid -> this.projectsEnabled = true))
+);
+
 // TODO: decide how to show hide hst-config-editor. Probably a config 
option in ChannelEditor constructor
 // and a message from the ng app (a click) to show the 
hst-config-editor card
 this.hideHstConfigEditor = true;
@@ -174,22 +184,23 @@ public class ChannelEditor extends ExtPanel {
 }
 }
 
-private static String getVariantsUuidOrNull(final String variantsPath) {
-if (StringUtils.isNotEmpty(variantsPath)) {
+private static Optional getUuid(final String path) {
+String result = null;
+if (StringUtils.isNotEmpty(path)) {
 final javax.jcr.Session session = 
UserSession.get().getJcrSession();
 try {
-if (session.nodeExists(variantsPath)) {
-return session.getNode(variantsPath).getIdentifier();
+if (session.nodeExists(path)) {
+result =  session.getNode(path).getIdentifier();
 } else {
-log.info("No node at '{}': variants will not be 
available.", variantsPath);
+log.info("No node at '{}': variants will not be 
available.", path);
 }
 } catch (RepositoryException e) {
-log.error("Failed to retrieve variants node '" + variantsPath 
+ "'", e);
+log.error("Failed to retrieve variants node '" + path + "'", 
e);
 }
 } else {
 log.info("Variants path not configured. Only the default variant 
will be available.");
 }
-return null;
+return Optional.ofNullable(result);
 }
 
 /**


=
repository/src/main/resources/channel-manager-cluster.xml
=
--- a/repository/src/main/resources/channel-manager-cluster.xml
+++ b/repository/src/main/resources/channel-manager-cluster.xml
@@ -67,6 +67,9 @@
   
 
   
+  
+
+  
 
 
   



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/f61b7a84d48e6d542a2758ad0e05a35446512555
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] CHANNELMGR-1252 Branch created instead of selected

2017-05-01 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
a5f217f9 by Michiel Rop at 2017-05-01T16:18:11+02:00
CHANNELMGR-1252 Branch created instead of selected

Call select branch if project is branch of master.

- - - - -


1 changed file:

- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js


Changes:

=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
=
--- 
a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
+++ 
b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
@@ -42,7 +42,7 @@ class ProjectToggleController {
   this.ProjectService.doSelectMaster();
   return;
 }
-if (this.withBranch.indexOf(this.selectedProject) >= 0) {
+if (this.withBranch.contains(this.selectedProject)) {
   this.ProjectService.doSelectBranch(this.selectedProject);
 } else {
   this.ProjectService.doCreateBranch(this.selectedProject);



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/a5f217f9ccb7c029848106aeefe4a80c7f06d41a
___
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/wpm] HSTTWO-3980 Persist the creation of a new branch

2017-04-25 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-site-toolkit


Commits:
d7c806d2 by Michiel Rop at 2017-04-25T09:30:53+02:00
HSTTWO-3980 Persist the creation of a new branch

- - - - -


1 changed file:

- 
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java


Changes:

=
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
=
--- 
a/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
+++ 
b/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
@@ -231,6 +231,7 @@ public class MountResource extends AbstractConfigResource {
 // TODO as well to the preview config, see HSTTWO-3965
 JcrUtils.copy(session, liveConfigurationPath + "/" + 
NODENAME_HST_WORKSPACE, liveBranchConfigNode.getPath() + "/" + 
NODENAME_HST_WORKSPACE);
 createMandatoryWorkspaceNodesIfMissing(liveBranchConfigNode.getPath());
+session.save();
 }
 
 private void assertValidName(final String branchId) {



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/d7c806d220f7375d7d5513d68aac37652aeec641
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] CHANNELMGR-1240 Change HTTP method and parameter

2017-04-25 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
4f9716fa by Michiel Rop at 2017-04-25T09:28:41+02:00
CHANNELMGR-1240 Change HTTP method and parameter

In order to make the channel manager REST API adhere to the REST
standards as much as practically feasible for now, make the methods use
PUT instead of POST and move the branchId from a parameter to a url
parameter.

- - - - -


1 changed file:

- frontend-ng/src/angularjs/services/project.service.js


Changes:

=
frontend-ng/src/angularjs/services/project.service.js
=
--- a/frontend-ng/src/angularjs/services/project.service.js
+++ b/frontend-ng/src/angularjs/services/project.service.js
@@ -36,15 +36,15 @@ class ProjectService {
   }
 
   doCreateBranch(project) {
-this.HstService.doPut(project.id, 
this.ChannelService.getChannel().mountId, 'createbranch');
+this.HstService.doPut(null, this.ChannelService.getChannel().mountId, 
'createbranch', project.id);
   }
 
   doSelectBranch(project) {
-this.HstService.doPost(project.id, 
this.ChannelService.getChannel().mountId, 'selectbranch');
+this.HstService.doPut(null, this.ChannelService.getChannel().mountId, 
'selectbranch', project.id);
   }
 
   doSelectMaster() {
-this.HstService.doPost(null, this.ChannelService.getChannel().mountId, 
'selectmaster');
+this.HstService.doPut(null, this.ChannelService.getChannel().mountId, 
'selectmaster');
   }
 
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/4f9716fa3c83a3c92b028dafa88a61c412e4de06
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] CHANNELMGR-1240 Select Master Branch

2017-04-24 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
48e8cd07 by Michiel Rop at 2017-04-24T16:34:47+02:00
CHANNELMGR-1240 Select Master Branch

When the item with the name of the current channel is selected a call is
made to the HST MountService to select the master mount for that
channel.

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
- frontend-ng/src/angularjs/services/project.service.js


Changes:

=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
=
--- 
a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
+++ 
b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
@@ -22,7 +22,6 @@ class ProjectToggleController {
 
 this.$translate = $translate;
 this.OverlayService = OverlayService;
-this.ChannelService = ChannelService;
 this.ProjectService = ProjectService;
 this.available = ProjectService.available;
 const channel = ChannelService.getChannel();
@@ -30,27 +29,25 @@ class ProjectToggleController {
 this.withBranch = [this.MASTER];
 this.selectedProject = this.MASTER;
 this._setProjects();
-this.available = false;
-  }
-  $OnInit() {
-this.available = this.ProjectService.available;
   }
   _setProjects() {
-this.ProjectService.projects(this.ChannelService.getChannel().id)
+this.ProjectService.projects()
   .then((response) => {
 this.withBranch = this.withBranch.concat(response.withBranch);
 this.withoutBranch = response.withoutBranch;
   });
   }
   projectChanged() {
-if (this.selectedProject.id === this.MASTER.id) return;
+if (this.selectedProject.id === this.MASTER.id) {
+  this.ProjectService.doSelectMaster();
+  return;
+}
 if (this.withBranch.indexOf(this.selectedProject) >= 0) {
   this.ProjectService.doSelectBranch(this.selectedProject);
 } else {
   this.ProjectService.doCreateBranch(this.selectedProject);
 }
   }
-
 }
 
 export default ProjectToggleController;


=
frontend-ng/src/angularjs/services/project.service.js
=
--- a/frontend-ng/src/angularjs/services/project.service.js
+++ b/frontend-ng/src/angularjs/services/project.service.js
@@ -29,8 +29,8 @@ class ProjectService {
 this.HstService = HstService;
   }
 
-  projects(id) {
-const url = 
`${this.ConfigService.getCmsContextPath()}${REST_API_PATH}/${id}/channel`;
+  projects() {
+const url = 
`${this.ConfigService.getCmsContextPath()}${REST_API_PATH}/${this.ChannelService.getChannel().mountId}/channel`;
 return this.$http({ method: 'GET', url, headers: {}, data: {} })
   .then(result => result.data);
   }
@@ -43,6 +43,10 @@ class ProjectService {
 this.HstService.doPost(project.id, 
this.ChannelService.getChannel().mountId, 'selectbranch');
   }
 
+  doSelectMaster() {
+this.HstService.doPost(null, this.ChannelService.getChannel().mountId, 
'selectmaster');
+  }
+
 }
 
 export default ProjectService;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/48e8cd0771e983c46bb483118191a6525071fe43
___
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/wpm] HSTTWO-3980 Create url for select master branch

2017-04-24 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-site-toolkit


Commits:
136bc763 by Michiel Rop at 2017-04-24T15:51:36+02:00
HSTTWO-3980 Create url for select master branch

- - - - -


1 changed file:

- 
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java


Changes:

=
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
=
--- 
a/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
+++ 
b/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
@@ -186,6 +186,14 @@ public class MountResource extends AbstractConfigResource {
 return ok("Branch selected successfully");
 }
 
+@POST
+@Path("/selectmaster")
+@Produces(MediaType.APPLICATION_JSON)
+public Response selectMaster(@QueryParam("mountId") final String mountId) {
+log.debug("Select master  of mount:{}", mountId);
+return ok("Master branch selected successfully");
+}
+
 @PUT
 @Path("/createbranch")
 @Produces(MediaType.APPLICATION_JSON)



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/136bc76301afbe9ee6132dae2a575005dcb0e127
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] CHANNELMGR-1240 Add endpoint logic

2017-04-24 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
c1782ddf by Michiel Rop at 2017-04-24T15:17:59+02:00
CHANNELMGR-1240 Add endpoint logic

- Add logic for calling correct endpoint for select and create project.

- - - - -


1 changed file:

- frontend-ng/src/angularjs/services/project.service.js


Changes:

=
frontend-ng/src/angularjs/services/project.service.js
=
--- a/frontend-ng/src/angularjs/services/project.service.js
+++ b/frontend-ng/src/angularjs/services/project.service.js
@@ -19,12 +19,14 @@ const REST_API_PATH = 'ws/projects';
 
 class ProjectService {
 
-  constructor($http, ConfigService, PathService) {
+  constructor($http, ConfigService, PathService, ChannelService, HstService) {
 'ngInject';
 
 this.$http = $http;
 this.ConfigService = ConfigService;
 this.PathService = PathService;
+this.ChannelService = ChannelService;
+this.HstService = HstService;
   }
 
   projects(id) {
@@ -34,15 +36,11 @@ class ProjectService {
   }
 
   doCreateBranch(project) {
-// todo(mrop) add url
-const url = '';
-return this.$http({ method: 'POST', url, headers: {}, data: project });
+this.HstService.doPut(project.id, 
this.ChannelService.getChannel().mountId, 'createbranch');
   }
 
   doSelectBranch(project) {
-// todo(mrop) add url
-const url = '';
-return this.$http({ method: 'POST', url, headers: {}, data: project });
+this.HstService.doPost(project.id, 
this.ChannelService.getChannel().mountId, 'selectbranch');
   }
 
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/c1782ddf399196ec7f9572b74ae0e56d187934c7
___
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/wpm] HSTTWO-3980 Add url for create and select branch

2017-04-24 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-site-toolkit


Commits:
f2de294c by Michiel Rop at 2017-04-24T15:16:54+02:00
HSTTWO-3980 Add url for create and select branch

- add url for creating a new branch for a certain project
- add url for selecting a project

These urls are called from the project.service.js in the channel
manager to select and associate a project from a channel.

- - - - -


1 changed file:

- 
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java


Changes:

=
client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
=
--- 
a/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
+++ 
b/client-modules/page-composer/src/main/java/org/hippoecm/hst/pagecomposer/jaxrs/services/MountResource.java
@@ -31,6 +31,7 @@ import javax.jcr.query.QueryManager;
 import javax.jcr.query.QueryResult;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
@@ -177,6 +178,24 @@ public class MountResource extends AbstractConfigResource {
 return ok("New Page model loaded successfully", 
newPageModelRepresentation);
 }
 
+@POST
+@Path("/selectbranch")
+@Produces(MediaType.APPLICATION_JSON)
+public Response selectBranch(@QueryParam("mountId") final String mountId, 
String branchId) {
+log.debug("Select branch:{} of mount:{}", branchId, mountId);
+return ok("Branch selected successfully");
+}
+
+@PUT
+@Path("/createbranch")
+@Produces(MediaType.APPLICATION_JSON)
+public Response createBranch(@QueryParam("mountId") final String mountId, 
String branchId) {
+log.debug("Create branch:{} from mount:{}", branchId, mountId);
+return ok("Branch created successfully");
+}
+
+
+
 private NewPageModelRepresentation getNewPageModelRepresentation(final 
Mount mount) {
 PrototypesRepresentation prototypePagesRepresentation = new 
PrototypesRepresentation().represent(mount.getHstSite(),
 true, getPageComposerContextService());



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/f2de294c9ce89041c9da952bb195c4f4b0056f51
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager][feature/wpm] CHANNELMGR-1240 Add Full Channel Name to dropdown

2017-04-24 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / 
hippo-addon-channel-manager


Commits:
792ca7c2 by Michiel Rop at 2017-04-24T12:41:47+02:00
CHANNELMGR-1240 Add Full Channel Name to dropdown

- Add Full Channel Name to dropdown.
- Make backend call on to project ( when selecting the default no
  call is made )
- Remove $OnInit, because functionally is does not add anything.

- - - - -


2 changed files:

- frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
- frontend-ng/src/angularjs/services/project.service.js


Changes:

=
frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
=
--- 
a/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
+++ 
b/frontend-ng/src/angularjs/channel/projectToggle/projectToggle.controller.js
@@ -15,7 +15,6 @@
  *
  */
 
-const MASTER = { name: 'Default', id: 'master' };
 
 class ProjectToggleController {
   constructor($translate, OverlayService, ChannelService, ProjectService) {
@@ -26,14 +25,16 @@ class ProjectToggleController {
 this.ChannelService = ChannelService;
 this.ProjectService = ProjectService;
 this.available = ProjectService.available;
-this.withBranch = [MASTER];
-this.selectedProject = MASTER;
+const channel = ChannelService.getChannel();
+this.MASTER = { name: channel.name, id: channel.id };
+this.withBranch = [this.MASTER];
+this.selectedProject = this.MASTER;
 this._setProjects();
+this.available = false;
   }
-  $onInit() {
-this._activate();
+  $OnInit() {
+this.available = this.ProjectService.available;
   }
-
   _setProjects() {
 this.ProjectService.projects(this.ChannelService.getChannel().id)
   .then((response) => {
@@ -41,12 +42,8 @@ class ProjectToggleController {
 this.withoutBranch = response.withoutBranch;
   });
   }
-
-  _activate() {
-this._projectChanged();
-  }
-
-  _projectChanged() {
+  projectChanged() {
+if (this.selectedProject.id === this.MASTER.id) return;
 if (this.withBranch.indexOf(this.selectedProject) >= 0) {
   this.ProjectService.doSelectBranch(this.selectedProject);
 } else {


=
frontend-ng/src/angularjs/services/project.service.js
=
--- a/frontend-ng/src/angularjs/services/project.service.js
+++ b/frontend-ng/src/angularjs/services/project.service.js
@@ -25,21 +25,6 @@ class ProjectService {
 this.$http = $http;
 this.ConfigService = ConfigService;
 this.PathService = PathService;
-this.available = false;
-this.doInitializeIsAvailable();
-  }
-
-  doInitializeIsAvailable() {
-this.$http({
-  method: 'GET',
-  url: `${this.ConfigService.getCmsContextPath()}${REST_API_PATH}`,
-}).then(() => {
-  this.available = true;
-});
-  }
-
-  get isAvailable() {
-return this.available;
   }
 
   projects(id) {
@@ -48,13 +33,6 @@ class ProjectService {
   .then(result => result.data);
   }
 
-  _addBranch(branch) {
-return (project) => {
-  project.isBranch = branch;
-  return project;
-};
-  }
-
   doCreateBranch(project) {
 // todo(mrop) add url
 const url = '';



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/792ca7c2ff1b28c4fa5c7eb8de60c53518a22d27
___
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][feature/wpm] CMS-10705 Use the wpm branch of channel manager

2017-04-20 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-cms-release


Commits:
0bb2ffdb by Michiel Rop at 2017-04-20T21:17:45+02:00
CMS-10705 Use the wpm branch of channel manager

In order to use the 5.0.0-wpm version of the Channel Manager
[feature/wpm] in the hap [feature/wpm] we set the Channel Manager
dependency in the hippo-cms7-release, so that the hap use that
transitive dependency.

- - - - -


1 changed file:

- pom.xml


Changes:

=
pom.xml
=
--- a/pom.xml
+++ b/pom.xml
@@ -44,7 +44,7 @@
 2.14.0-h1-SNAPSHOT
 
 
4.0.0-SNAPSHOT
-
5.0.0-SNAPSHOT
+
5.0.0-wpm-SNAPSHOT
 
4.0.0-SNAPSHOT
 4.0.0-SNAPSHOT
 5.0.0-SNAPSHOT



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms-release/commit/0bb2ffdb4953f105e980a46163c74b8977593b16
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-addon-channel-manager] Pushed new branch feature/wpm

2017-04-20 Thread Michiel Rop
Michiel Rop pushed new branch feature/wpm at cms-community / 
hippo-addon-channel-manager
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][master] REPO-1646 Add reason to accept and cancel methods

2017-04-03 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-repository


Commits:
ec0fee96 by Michiel Rop at 2017-04-03T21:16:11+02:00
REPO-1646 Add reason to accept and cancel methods

The reason is needed in order to provide feedback. The implementation in
DocumentWorkflowImpl ignores the parameter, because the developer
edition does intentionally not provide this functionality.

- - - - -


2 changed files:

- 
builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java


Changes:

=
builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
=
--- 
a/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
+++ 
b/builtin/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflow.java
@@ -338,6 +338,20 @@ public interface DocumentWorkflow extends Workflow, 
EditableWorkflow, CopyWorkfl
 throws WorkflowException, RepositoryException, RemoteException;
 
 /**
+ * Delete a specific outstanding, rejected or scheduled request.
+ *
+ * @param requestIdentifier the request node identifier
+ *
+ * @throws WorkflowException   indicates that the work-flow call failed 
due work-flow specific conditions
+ * @throws RepositoryException indicates that the work-flow call failed 
because of storage problems internal to the
+ * repository
+ * @throws RemoteException indicates that the work-flow call failed 
because of a connection problem with the
+ * repository
+ */
+void cancelRequest(String requestIdentifier, String reason)
+throws WorkflowException, RepositoryException, RemoteException;
+
+/**
  * Approve and execute or schedule a specific request
  *
  * @param requestIdentifier the request node identifier
@@ -352,6 +366,20 @@ public interface DocumentWorkflow extends Workflow, 
EditableWorkflow, CopyWorkfl
 throws WorkflowException, RepositoryException, RemoteException;
 
 /**
+ * Approve and execute or schedule a specific request
+ *
+ * @param requestIdentifier the request node identifier
+ *
+ * @throws WorkflowException   indicates that the work-flow call failed 
due work-flow specific conditions
+ * @throws RepositoryException indicates that the work-flow call failed 
because of storage problems internal to the
+ * repository
+ * @throws RemoteException indicates that the work-flow call failed 
because of a connection problem with the
+ * repository
+ */
+void acceptRequest(String requestIdentifier, String reason)
+throws WorkflowException, RepositoryException, RemoteException;
+
+/**
  * Rejects a specific request with an optional reason
  *
  * @param requestIdentifier the request node identifier


=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
@@ -295,6 +295,11 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 }
 
 @Override
+public void cancelRequest(String requestIdentifier, String reason) throws 
WorkflowException {
+cancelRequest(requestIdentifier);
+}
+
+@Override
 public void acceptRequest(String requestIdentifier) throws 
WorkflowException {
 workflowExecutor.start();
 workflowExecutor.triggerAction("acceptRequest", 
getRequestActionActions(requestIdentifier, "acceptRequest"),
@@ -302,6 +307,11 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 }
 
 @Override
+public void acceptRequest(String requestIdentifier, String reason) throws 
WorkflowException{
+acceptRequest(requestIdentifier);
+}
+
+@Override
 public void rejectRequest(String requestIdentifier, final String reason) 
throws WorkflowException {
 workflowExecutor.start();
 workflowExecutor.triggerAction("rejectRequest", 
getRequestActionActions(requestIdentifier, "rejectRequest"),
@@ -358,7 +368,7 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
  * @throws WorkflowException
  * @throws RepositoryException
  */
-protected Object transition(String action, Map<String, Object> payload) 
throws WorkflowException, RepositoryException {
+protected Object transition(String action, Map<String, Object> payload) 
throw

[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm-refactoring] 3 commits: REPO-1641: Remove unnecessary orderable from hipposys:applicationfolder

2017-03-27 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm-refactoring at cms-community / 
hippo-repository


Commits:
6e1ed122 by Ate Douma at 2017-03-27T12:18:23+02:00
REPO-1641: Remove unnecessary orderable from hipposys:applicationfolder

- - - - -
4a638da4 by Michiel Rop at 2017-03-27T20:45:10+02:00
REPO-1636 Fix testParseMath(Add|Subtract)Days

- Refactor and Rename for readability
- Compare milliseconds instead of days, because comparing days will have
  to include a division and consequently a comparison with a delta. The
  test could have been fixed using rounding as well just for daylight
  saving time, but that wont really test the functionality.
- Get the proper offset, not on the (start|end)TimeInMillis, but on the
  Calendar instances, otherwise the difference in offset will be applied
  two times.

- - - - -
b7d86ae7 by Michiel Rop at 2017-03-27T21:01:25+02:00
REPO-1633 Merge branch master into feature/wpm-refactoring

- - - - -


2 changed files:

- engine/src/main/resources/hipposys.cnd
- utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java


Changes:

=
engine/src/main/resources/hipposys.cnd
=
--- a/engine/src/main/resources/hipposys.cnd
+++ b/engine/src/main/resources/hipposys.cnd
@@ -128,7 +128,7 @@
 
 [hipposys:temporaryfolder] > nt:unstructured
 
-[hipposys:applicationfolder] > nt:unstructured orderable
+[hipposys:applicationfolder] > nt:unstructured
 
 // The hipposys type should be used for internal repository purposes
 // only, where a transative state is needed allowing any kind of child


=
utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
=
--- 
a/utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
+++ 
b/utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
@@ -1,11 +1,11 @@
 /*
- * Copyright 2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2015-2017 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
+ *  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,
@@ -15,17 +15,16 @@
  */
 package org.onehippo.repository.util;
 
+import org.junit.Test;
+
+import java.text.ParseException;
 import java.util.Calendar;
 import java.util.Date;
-import java.text.ParseException;
-
-import org.junit.Test;
 
 import static org.junit.Assert.*;
 
 public class DateMathParserTest  {
 
-public static final int DAY_IN_MILLIS = 1000 * 60 * 60 * 24;
 
 private static Calendar getNow() {
 Calendar startCal = Calendar.getInstance();
@@ -36,48 +35,48 @@ public class DateMathParserTest  {
 @Test
 public void testParseMathAddDays() throws ParseException {
 try {
-Calendar now = getNow();
-Date startDate = now.getTime();
-Date endDate = DateMathParser.parseMath(now, "+7D").getTime();
-assertNotNull(endDate);
-long startTime = startDate.getTime();
-long endTime = endDate.getTime();
-long diffTime = endTime - startTime;
-long diff = diffTime / DAY_IN_MILLIS;
-Calendar nextWeek = getNow();
-nextWeek.add(Calendar.DATE,7);
-final long utcEndTime = endTime - 
nextWeek.getTimeZone().getOffset(endTime);
-final long utcStartTime = startTime - 
now.getTimeZone().getOffset(startTime);
-long utcDiff = utcEndTime - utcStartTime;
-assertEquals(utcDiff/ DAY_IN_MILLIS, diff);
+assertExpectedDuration(7, "+7D");
 }
 catch (IllegalStateException ex) {
 fail();
 }
 }
-
+
 @Test
 public void testParseMathSubtractDays() throws ParseException {
 try {
-Calendar now = getNow();
-Date startDate = now.getTime();
-Date endDate = DateMathParser.parseMath(now, "-7D").getTime();
-assertNotNull(endDate);
-long startTime = startDate.getTime();
-long endTime = endDate.getTime();
-long diff = (startTime / DAY_IN_MILLIS) - (endTime / 
DAY_IN_MILLIS);
-Calendar previousWeek = getNow();
-previousWeek.add(Calendar.DATE,-7);
-final long utcStartTime = startTime - 
now.getTimeZone().getOffset(startTime);
-final long utcEndTime = endTime - 
previousWeek.getTimeZone().getOffset(endTime);
-long utcDiff = utcStartTime - utcEndTime;
-assertEquals(utcDiff/ DAY_IN_

[HippoCMS-scm] [Git][cms-community/hippo-repository][master] REPO-1636 Fix testParseMath(Add|Subtract)Days

2017-03-27 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-repository


Commits:
4a638da4 by Michiel Rop at 2017-03-27T20:45:10+02:00
REPO-1636 Fix testParseMath(Add|Subtract)Days

- Refactor and Rename for readability
- Compare milliseconds instead of days, because comparing days will have
  to include a division and consequently a comparison with a delta. The
  test could have been fixed using rounding as well just for daylight
  saving time, but that wont really test the functionality.
- Get the proper offset, not on the (start|end)TimeInMillis, but on the
  Calendar instances, otherwise the difference in offset will be applied
  two times.

- - - - -


1 changed file:

- utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java


Changes:

=
utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
=
--- 
a/utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
+++ 
b/utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
@@ -1,11 +1,11 @@
 /*
- * Copyright 2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2015-2017 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
+ *  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,
@@ -15,17 +15,16 @@
  */
 package org.onehippo.repository.util;
 
+import org.junit.Test;
+
+import java.text.ParseException;
 import java.util.Calendar;
 import java.util.Date;
-import java.text.ParseException;
-
-import org.junit.Test;
 
 import static org.junit.Assert.*;
 
 public class DateMathParserTest  {
 
-public static final int DAY_IN_MILLIS = 1000 * 60 * 60 * 24;
 
 private static Calendar getNow() {
 Calendar startCal = Calendar.getInstance();
@@ -36,48 +35,48 @@ public class DateMathParserTest  {
 @Test
 public void testParseMathAddDays() throws ParseException {
 try {
-Calendar now = getNow();
-Date startDate = now.getTime();
-Date endDate = DateMathParser.parseMath(now, "+7D").getTime();
-assertNotNull(endDate);
-long startTime = startDate.getTime();
-long endTime = endDate.getTime();
-long diffTime = endTime - startTime;
-long diff = diffTime / DAY_IN_MILLIS;
-Calendar nextWeek = getNow();
-nextWeek.add(Calendar.DATE,7);
-final long utcEndTime = endTime - 
nextWeek.getTimeZone().getOffset(endTime);
-final long utcStartTime = startTime - 
now.getTimeZone().getOffset(startTime);
-long utcDiff = utcEndTime - utcStartTime;
-assertEquals(utcDiff/ DAY_IN_MILLIS, diff);
+assertExpectedDuration(7, "+7D");
 }
 catch (IllegalStateException ex) {
 fail();
 }
 }
-
+
 @Test
 public void testParseMathSubtractDays() throws ParseException {
 try {
-Calendar now = getNow();
-Date startDate = now.getTime();
-Date endDate = DateMathParser.parseMath(now, "-7D").getTime();
-assertNotNull(endDate);
-long startTime = startDate.getTime();
-long endTime = endDate.getTime();
-long diff = (startTime / DAY_IN_MILLIS) - (endTime / 
DAY_IN_MILLIS);
-Calendar previousWeek = getNow();
-previousWeek.add(Calendar.DATE,-7);
-final long utcStartTime = startTime - 
now.getTimeZone().getOffset(startTime);
-final long utcEndTime = endTime - 
previousWeek.getTimeZone().getOffset(endTime);
-long utcDiff = utcStartTime - utcEndTime;
-assertEquals(utcDiff/ DAY_IN_MILLIS, diff);
+assertExpectedDuration(-7, "-7D");
 }
 catch (IllegalStateException ex) {
 fail();
 }
 }
-
+
+private void assertExpectedDuration(int expectedDuration, String math) 
throws ParseException {
+final Calendar startCalendar = getNow();
+final Date startDate = startCalendar.getTime();
+final Date endDate = DateMathParser.parseMath(startCalendar, 
math).getTime();
+assertNotNull(endDate);
+final long startTimeInMillis = startDate.getTime();
+final long endTimeInMillis = endDate.getTime();
+final long durationInMillis = endTimeInMillis - startTimeInMillis;
+
+
+final Calendar endCalendar = (Calendar) startCalendar.clone();
+endCalendar.add(Calendar.DATE, expectedDuration);
+final int endTimeOffset = getOffset(

[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm-refactoring] REPO-1640 Make the request state extensible

2017-03-24 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm-refactoring at cms-community / 
hippo-repository


Commits:
551562e2 by Michiel Rop at 2017-03-24T13:07:13+01:00
REPO-1640 Make the request state extensible

Extending classes may implement their own implementation
for the initialization of the request state, while reusing
the initialization of the document variants.

- - - - -


1 changed file:

- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java


Changes:

=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
@@ -1,11 +1,11 @@
 /*
- * Copyright 2013-2017 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2017 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
+ *  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,
@@ -16,12 +16,6 @@
 
 package org.onehippo.repository.documentworkflow;
 
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.jcr.Node;
-import javax.jcr.RepositoryException;
-
 import org.hippoecm.repository.HippoStdPubWfNodeType;
 import org.hippoecm.repository.api.WorkflowException;
 import org.hippoecm.repository.util.JcrUtils;
@@ -30,6 +24,11 @@ import org.onehippo.repository.scxml.SCXMLWorkflowData;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import java.util.HashMap;
+import java.util.Map;
+
 import static org.hippoecm.repository.HippoStdNodeType.HIPPOSTD_STATE;
 
 /**
@@ -61,6 +60,10 @@ public class DocumentHandle implements SCXMLWorkflowData {
 return initialized;
 }
 
+public void setInitialized(boolean initialized) {
+this.initialized = initialized;
+}
+
 @Override
 public void initialize() throws WorkflowException {
 if (initialized) {
@@ -69,34 +72,39 @@ public class DocumentHandle implements SCXMLWorkflowData {
 initialized = true;
 
 try {
-for (Node variant : new 
NodeIterable(handle.getNodes(handle.getName( {
-DocumentVariant doc = createDocumentVariant(variant);
-if (documents.containsKey(doc.getState())) {
-log.warn("Document at path {} has multiple variants with 
state {}. Variant with identifier {} ignored.",
-handle.getPath(), doc.getState(), 
variant.getIdentifier());
-}
-documents.put(doc.getState(), doc);
+initializeDocuments();
+initializeRequestState();
+} catch (RepositoryException e) {
+throw new WorkflowException("DocumentHandle initialization 
failed", e);
+}
+}
+
+public void initializeDocuments() throws RepositoryException {
+for (Node variant : new 
NodeIterable(handle.getNodes(handle.getName( {
+DocumentVariant doc = createDocumentVariant(variant);
+if (documents.containsKey(doc.getState())) {
+log.warn("Document at path {} has multiple variants with state 
{}. Variant with identifier {} ignored.",
+handle.getPath(), doc.getState(), 
variant.getIdentifier());
 }
+documents.put(doc.getState(), doc);
+}
+}
 
-for (Node requestNode : new 
NodeIterable(handle.getNodes(HippoStdPubWfNodeType.HIPPO_REQUEST))) {
-Request request = createRequest(requestNode);
-if (request != null) {
-if (request.isWorkflowRequest()) {
-requests.put(request.getIdentity(), request);
-if 
(!HippoStdPubWfNodeType.REJECTED.equals(((WorkflowRequest)request).getType())) {
-requestPending = true;
-}
-}
-else if (request.isScheduledRequest()) {
-requests.put(request.getIdentity(), request);
+public void initializeRequestState() throws RepositoryException {
+for (Node requestNode : new 
NodeIterable(handle.getNodes(HippoStdPubWfNodeType.HIPPO_REQUEST))) {
+Request request = createRequest(requestNode);
+if (request != null) {
+if (request.isWorkflowRequest()) {
+requests.put(request.getIdentity(), request);
+ 

[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm-refactoring] 2 commits: REPO-1 adding delta to explicitly set property type

2017-03-21 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm-refactoring at cms-community / 
hippo-repository


Commits:
fa70c8c2 by Oscar Scholten at 2017-03-21T15:57:51+01:00
REPO-1 adding delta to explicitly set property type

- - - - -
bd36b2de by Michiel Rop at 2017-03-21T15:57:51+01:00
REPO-1636:Take into account daylight saving

* Take into account time zones to calculate the expected length of the
  interval between dates.

java.util.Date has not been designed for internationalization and does
not have a timezone concept. In the unit test java.util.Date was used to
calcutate the length of the interval in days. Since the timezone was not
taken into account that fails if the moment of changing to daylight
saving and back lies within the interval.

The tested method returns the correct value.

- - - - -


3 changed files:

- + config/src/main/resources/group-everybody-systemgroup-delta.xml
- config/src/main/resources/hippoecm-extension.xml
- utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java


Changes:

=
config/src/main/resources/group-everybody-systemgroup-delta.xml
=
--- /dev/null
+++ b/config/src/main/resources/group-everybody-systemgroup-delta.xml
@@ -0,0 +1,22 @@
+
+
+http://www.jcp.org/jcr/sv/1.0; 
xmlns:esv="http://www.onehippo.org/jcr/xmlimport;
+ sv:name="everybody" esv:merge="combine">
+  
+true
+  
+
\ No newline at end of file


=
config/src/main/resources/hippoecm-extension.xml
=
--- a/config/src/main/resources/hippoecm-extension.xml
+++ b/config/src/main/resources/hippoecm-extension.xml
@@ -1,6 +1,6 @@
 
 
   
 


=
utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
=
--- 
a/utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
+++ 
b/utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
@@ -21,12 +21,12 @@ import java.text.ParseException;
 
 import org.junit.Test;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 public class DateMathParserTest  {
 
+public static final int DAY_IN_MILLIS = 1000 * 60 * 60 * 24;
+
 private static Calendar getNow() {
 Calendar startCal = Calendar.getInstance();
 startCal.setTime(new Date());
@@ -43,8 +43,13 @@ public class DateMathParserTest  {
 long startTime = startDate.getTime();
 long endTime = endDate.getTime();
 long diffTime = endTime - startTime;
-long diff = diffTime / (1000 * 60 * 60 * 24);
-assertTrue(diff == 7);
+long diff = diffTime / DAY_IN_MILLIS;
+Calendar nextWeek = getNow();
+nextWeek.add(Calendar.DATE,7);
+final long utcEndTime = endTime - 
nextWeek.getTimeZone().getOffset(endTime);
+final long utcStartTime = startTime - 
now.getTimeZone().getOffset(startTime);
+long utcDiff = utcEndTime - utcStartTime;
+assertEquals(utcDiff/ DAY_IN_MILLIS, diff);
 }
 catch (IllegalStateException ex) {
 fail();
@@ -60,8 +65,13 @@ public class DateMathParserTest  {
 assertNotNull(endDate);
 long startTime = startDate.getTime();
 long endTime = endDate.getTime();
-long diff = (startTime / (1000 * 60 * 60 * 24)) - (endTime / (1000 
* 60 * 60 * 24));
-assertTrue(diff == 7);
+long diff = (startTime / DAY_IN_MILLIS) - (endTime / 
DAY_IN_MILLIS);
+Calendar previousWeek = getNow();
+previousWeek.add(Calendar.DATE,-7);
+final long utcStartTime = startTime - 
now.getTimeZone().getOffset(startTime);
+final long utcEndTime = endTime - 
previousWeek.getTimeZone().getOffset(endTime);
+long utcDiff = utcStartTime - utcEndTime;
+assertEquals(utcDiff/ DAY_IN_MILLIS, diff);
 }
 catch (IllegalStateException ex) {
 fail();



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/67e24685721768e85d925b1378bd9625d45202b3...bd36b2dee26123d98fda10c3dee01fb01df032a5
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][master] REPO-1636:Take into account daylight saving

2017-03-21 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-repository


Commits:
e8ab0978 by Michiel Rop at 2017-03-21T15:54:31+01:00
REPO-1636:Take into account daylight saving

* Take into account time zones to calculate the expected length of the
  interval between dates.

java.util.Date has not been designed for internationalization and does
not have a timezone concept. In the unit test java.util.Date was used to
calcutate the length of the interval in days. Since the timezone was not
taken into account that fails if the moment of changing to daylight
saving and back lies within the interval.

The tested method returns the correct value.

- - - - -


1 changed file:

- utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java


Changes:

=
utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
=
--- 
a/utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
+++ 
b/utilities/src/test/java/org/onehippo/repository/util/DateMathParserTest.java
@@ -21,12 +21,12 @@ import java.text.ParseException;
 
 import org.junit.Test;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 public class DateMathParserTest  {
 
+public static final int DAY_IN_MILLIS = 1000 * 60 * 60 * 24;
+
 private static Calendar getNow() {
 Calendar startCal = Calendar.getInstance();
 startCal.setTime(new Date());
@@ -43,8 +43,13 @@ public class DateMathParserTest  {
 long startTime = startDate.getTime();
 long endTime = endDate.getTime();
 long diffTime = endTime - startTime;
-long diff = diffTime / (1000 * 60 * 60 * 24);
-assertTrue(diff == 7);
+long diff = diffTime / DAY_IN_MILLIS;
+Calendar nextWeek = getNow();
+nextWeek.add(Calendar.DATE,7);
+final long utcEndTime = endTime - 
nextWeek.getTimeZone().getOffset(endTime);
+final long utcStartTime = startTime - 
now.getTimeZone().getOffset(startTime);
+long utcDiff = utcEndTime - utcStartTime;
+assertEquals(utcDiff/ DAY_IN_MILLIS, diff);
 }
 catch (IllegalStateException ex) {
 fail();
@@ -60,8 +65,13 @@ public class DateMathParserTest  {
 assertNotNull(endDate);
 long startTime = startDate.getTime();
 long endTime = endDate.getTime();
-long diff = (startTime / (1000 * 60 * 60 * 24)) - (endTime / (1000 
* 60 * 60 * 24));
-assertTrue(diff == 7);
+long diff = (startTime / DAY_IN_MILLIS) - (endTime / 
DAY_IN_MILLIS);
+Calendar previousWeek = getNow();
+previousWeek.add(Calendar.DATE,-7);
+final long utcStartTime = startTime - 
now.getTimeZone().getOffset(startTime);
+final long utcEndTime = endTime - 
previousWeek.getTimeZone().getOffset(endTime);
+long utcDiff = utcStartTime - utcEndTime;
+assertEquals(utcDiff/ DAY_IN_MILLIS, diff);
 }
 catch (IllegalStateException ex) {
 fail();



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/e8ab0978b4ca35c44f62b0a9977fe993bde1ca19
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm-refactoring] 2 commits: REPO-1634:Add test jar for module workflow

2017-03-21 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm-refactoring at cms-community / 
hippo-repository


Commits:
6f93b9c6 by Michiel Rop at 2017-03-21T13:57:48+01:00
REPO-1634:Add test jar for module workflow

See
https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html

Add test jar for module workflow, so that tests in other projects can
use and extend them.

- - - - -
67e24685 by Michiel Rop at 2017-03-21T13:58:42+01:00
REPO-1634:Change access for  #actions, #info and #getRequestActions

* Change access from protected to public for #getRequestActions
* Add getter for #actions and #info

In order to extend or wrap HintBuilder public access is needed.

- - - - -


2 changed files:

- workflow/pom.xml
- 
workflow/src/test/java/org/onehippo/repository/documentworkflow/HintsBuilder.java


Changes:

=
workflow/pom.xml
=
--- a/workflow/pom.xml
+++ b/workflow/pom.xml
@@ -1,7 +1,6 @@
 
 

[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm-refactoring] REPO-1634 update cnd for wpm use

2017-03-20 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm-refactoring at cms-community / 
hippo-repository


Commits:
3b7fac75 by Michiel Eggermont at 2017-03-20T11:35:56+01:00
REPO-1634 update cnd for wpm use

- Add scheduledpublishdepublish as a request type to support request
  of combined scheduled publication/depublication.

(cherry picked and modifiedfrom commit f0954e9 by meggermont)

- - - - -


1 changed file:

- workflow/src/main/resources/hippostdpubwf.cnd


Changes:

=
workflow/src/main/resources/hippostdpubwf.cnd
=
--- a/workflow/src/main/resources/hippostdpubwf.cnd
+++ b/workflow/src/main/resources/hippostdpubwf.cnd
@@ -30,7 +30,7 @@
 - hippostdpubwf:publicationDate (Date)
 
 [hippostdpubwf:request] > hippo:request
-- hippostdpubwf:type (String) < 'rejected', 'publish', 'depublish', 
'scheduledpublish', 'scheduleddepublish', 'delete', 'collection'
+- hippostdpubwf:type (String) < 'rejected', 'publish', 'depublish', 
'scheduledpublish', 'scheduleddepublish', 'delete', 'collection', 
'scheduledpublishdepublish'
 - hippostdpubwf:reason (String)
 - hippostdpubwf:reqdate (Date)
 - hippostdpubwf:username (String)



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/3b7fac750574758f5f7c056773fa96bbe24dfe7c
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm-refactoring] 4 commits: REPO-1634: Change access modifier to public to expose methods

2017-03-20 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm-refactoring at cms-community / 
hippo-repository


Commits:
dd15b9ae by Michiel Rop at 2017-03-20T10:07:00+01:00
REPO-1634: Change access modifier to public to expose methods

In order to be able to wrap the DocumentHandle instead of overriding it
in another package the following methods need to be publicly accessible:
* createDocumentVariant
* createRequest
* isInitialized

- - - - -
3ef3f6a3 by Michiel Rop at 2017-03-20T10:07:31+01:00
REPO-1634: Make setWorkflowContext overridable.

The setWorkflowContext method is called from
org/hippoecm/repository/impl/WorkflowManagerImpl.java:294
When wrapping this class the method needs public access in order to be
able to override it in another package without extending it.

- - - - -
00c8bf15 by Michiel Rop at 2017-03-20T10:08:08+01:00
REPO-1634: Give method getWorkflowExecutor public access

- - - - -
bde6bd4b by Michiel Rop at 2017-03-20T10:09:00+01:00
REPO-1634: Update copyright headers

- - - - -


3 changed files:

- api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java


Changes:

=
api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
=
--- a/api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
+++ b/api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2008-2013 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2008-2017 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.
@@ -53,7 +53,7 @@ public abstract class WorkflowImpl implements Remote, Workflow
  * This call is not (yet) part of the API, but under evaluation.
  * @param context the new context that should be used
  */
-final public void setWorkflowContext(WorkflowContext context) {
+public void setWorkflowContext(WorkflowContext context) {
 this.context = context;
 }
 


=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013-2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2013-2017 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.
@@ -49,15 +49,15 @@ public class DocumentHandle implements SCXMLWorkflowData {
 this.handle = handle;
 }
 
-protected DocumentVariant createDocumentVariant(Node node) throws 
RepositoryException {
+public DocumentVariant createDocumentVariant(Node node) throws 
RepositoryException {
 return new DocumentVariant(node);
 }
 
-protected Request createRequest(Node node) throws RepositoryException {
+public Request createRequest(Node node) throws RepositoryException {
 return Request.createRequest(node);
 }
 
-protected boolean isInitialized() {
+public boolean isInitialized() {
 return initialized;
 }
 


=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
@@ -88,7 +88,7 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 return new DocumentHandle(node);
 }
 
-SCXMLWorkflowExecutor getWorkflowExecutor() {
+public SCXMLWorkflowExecutor getWorkflowExecutor() {
 return workflowExecutor;
 }
 



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/e0aedfa23cb2a1ed4dee43ff795f7a07f5e87eae...bde6bd4ba29d61af46468418e2f96d2bb103af48
___
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/wpm] CMS-10644: Remove exceptions thrown by hints

2017-03-20 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-cms


Commits:
42288161 by Michiel Rop at 2017-03-20T11:11:25+01:00
CMS-10644: Remove exceptions thrown by hints

During refactoring of hippo-repository[feature/wpm] the exceptions were
initially added to WorkflowImpl#hints. After reconsideration those
changes were not essentials. The ReportBrokenLinkWorkflowImpl#hints was
changes as result of that change. This commit reverts that individual
change.

- - - - -


1 changed file:

- 
brokenlinks/repository/src/main/java/org/onehippo/cms7/brokenlinks/ReportBrokenLinksWorkflowImpl.java


Changes:

=
brokenlinks/repository/src/main/java/org/onehippo/cms7/brokenlinks/ReportBrokenLinksWorkflowImpl.java
=
--- 
a/brokenlinks/repository/src/main/java/org/onehippo/cms7/brokenlinks/ReportBrokenLinksWorkflowImpl.java
+++ 
b/brokenlinks/repository/src/main/java/org/onehippo/cms7/brokenlinks/ReportBrokenLinksWorkflowImpl.java
@@ -87,18 +87,19 @@ public class ReportBrokenLinksWorkflowImpl extends 
WorkflowImpl implements Repor
  * 'broken since' date of the reported broken link. That way, links that 
remain broken over a number of checks
  * will keep their initial 'broken since' date.
  *
- * @param reportNode  the report node
+ * @param reportNode the report node
  * @param brokenLinks the list of new broken links
+ *
  * @throws RepositoryException when the broken links under the report node 
cannot be read or removed.
  */
 private void cleanupExistingReport(final Node reportNode, final 
Collection brokenLinks) throws RepositoryException {
-for (NodeIterator iter = 
reportNode.getNodes(NodeType.BROKENLINKS_NODE); iter.hasNext(); ) {
+for (NodeIterator iter = 
reportNode.getNodes(NodeType.BROKENLINKS_NODE); iter.hasNext();) {
 Node brokenLinkNode = iter.nextNode();
 String url = 
brokenLinkNode.getProperty(NodeType.PROPERTY_URL).getString();
 for (Link link : brokenLinks) {
 if (link.getUrl().equals(url)) {
 if 
(brokenLinkNode.hasProperty(NodeType.PROPERTY_BROKEN_SINCE)) {
-
link.setBrokenSince(brokenLinkNode.getProperty(NodeType.PROPERTY_BROKEN_SINCE).getDate());
+ 
link.setBrokenSince(brokenLinkNode.getProperty(NodeType.PROPERTY_BROKEN_SINCE).getDate());
 }
 }
 }
@@ -128,7 +129,7 @@ public class ReportBrokenLinksWorkflowImpl extends 
WorkflowImpl implements Repor
 }
 
 @Override
-public Map<String, Serializable> hints() throws WorkflowException, 
RemoteException, RepositoryException {
+public Map<String, Serializable> hints() throws WorkflowException {
 Map<String, Serializable> m = super.hints();
 m.put("reportBrokenLinks", Boolean.TRUE);
 return m;



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/4228816151e19113e203322529c58fa1b670dea1
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository] Pushed new branch feature/wpm-refactoring

2017-03-20 Thread Michiel Rop
Michiel Rop pushed new branch feature/wpm-refactoring at cms-community / 
hippo-repository
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm] 2 commits: REPO-1634: Remove externalId

2017-03-16 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-repository


Commits:
24361aba by Michiel Rop at 2017-03-16T21:53:13+01:00
REPO-1634: Remove externalId

- - - - -
59dd4fe5 by Michiel Rop at 2017-03-16T21:56:17+01:00
REPO-1634: Remove schedulepublishdepublish from request types

- - - - -


2 changed files:

- engine/src/main/resources/hippo.cnd
- workflow/src/main/resources/hippostdpubwf.cnd


Changes:

=
engine/src/main/resources/hippo.cnd
=
--- a/engine/src/main/resources/hippo.cnd
+++ b/engine/src/main/resources/hippo.cnd
@@ -47,7 +47,6 @@
 - hippo:discriminator (string) multiple // deprecated
 + * (hippo:document) = hippo:document multiple version
 + hippo:request (hippo:request) multiple ignore
-- hippo:externalid (string)
 
 [hippo:hardhandle] > mix:versionable mixin
 


=
workflow/src/main/resources/hippostdpubwf.cnd
=
--- a/workflow/src/main/resources/hippostdpubwf.cnd
+++ b/workflow/src/main/resources/hippostdpubwf.cnd
@@ -30,7 +30,7 @@
 - hippostdpubwf:publicationDate (Date)
 
 [hippostdpubwf:request] > hippo:request
-- hippostdpubwf:type (String) < 'rejected', 'publish', 'depublish', 
'scheduledpublish', 'scheduleddepublish', 'delete', 'collection', 
'scheduledpublishdepublish'
+- hippostdpubwf:type (String) < 'rejected', 'publish', 'depublish', 
'scheduledpublish', 'scheduleddepublish', 'delete', 'collection'
 - hippostdpubwf:reason (String)
 - hippostdpubwf:reqdate (Date)
 - hippostdpubwf:username (String)



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/237a371487cb9e7d4efd813b8cf7c6340a23b5c9...59dd4fe5e59b756b7321a5b07086f94d6192684d
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm] 3 commits: REPO-1634: remove methods for setting and getting processInstanceId

2017-03-16 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-repository


Commits:
c4bfaf59 by Michiel Rop at 2017-03-16T12:31:55+01:00
REPO-1634: remove methods for setting and getting processInstanceId

- - - - -
5a34e454 by Michiel Rop at 2017-03-16T12:32:04+01:00
REPO-1634: change access modifier to public to expose methods

- - - - -
237a3714 by Michiel Rop at 2017-03-16T12:32:08+01:00
REPO-1634: update copyright

- - - - -


1 changed file:

- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java


Changes:

=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2013-2015 Hippo B.V. (http://www.onehippo.com)
+ * Copyright 2013-2017 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.
@@ -49,15 +49,15 @@ public class DocumentHandle implements SCXMLWorkflowData {
 this.handle = handle;
 }
 
-protected DocumentVariant createDocumentVariant(Node node) throws 
RepositoryException {
+public DocumentVariant createDocumentVariant(Node node) throws 
RepositoryException {
 return new DocumentVariant(node);
 }
 
-protected Request createRequest(Node node) throws RepositoryException {
+public Request createRequest(Node node) throws RepositoryException {
 return Request.createRequest(node);
 }
 
-protected boolean isInitialized() {
+public boolean isInitialized() {
 return initialized;
 }
 
@@ -134,12 +134,4 @@ public class DocumentHandle implements SCXMLWorkflowData {
 }
 return count > 1;
 }
-
-public void setProcessInstanceId(final String processInstanceId) throws 
RepositoryException {
-handle.setProperty("hippo:externalid", processInstanceId);
-}
-
-public String getProcessInstanceId() throws RepositoryException {
-return JcrUtils.getStringProperty(handle, "hippo:externalid", null);
-}
 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/f0954e9626c069100e6eda8fb2267f914aa3fbcf...237a371487cb9e7d4efd813b8cf7c6340a23b5c9
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm] REPO-1634: Reverted method modifiers to old situation, because accessing them in…

2017-03-14 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-repository


Commits:
56914d17 by Michiel Rop at 2017-03-14T21:10:42+01:00
REPO-1634: Reverted method modifiers to old situation, because accessing them 
in wrapper was not crucial

- - - - -


1 changed file:

- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java


Changes:

=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
@@ -72,10 +72,6 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 @SuppressWarnings("unchecked")
 protected DocumentHandle createDocumentHandle(Node node) throws 
WorkflowException {
 final RepositoryMap workflowConfiguration = 
getWorkflowContext().getWorkflowConfiguration();
-return createDocumentHandle(node, workflowConfiguration);
-}
-
-public static DocumentHandle createDocumentHandle(final Node node, final 
RepositoryMap workflowConfiguration) throws WorkflowException {
 Object configurationValue;
 if (workflowConfiguration != null && workflowConfiguration.exists() &&
 (configurationValue = 
workflowConfiguration.get(DOCUMENT_HANDLE_FACTORY_CLASS_KEY)) != null) {
@@ -102,7 +98,7 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 return map;
 }
 
-public static Map<String, Object> createPayload(String var1, Object val1, 
String var2, Object val2) {
+protected Map<String, Object> createPayload(String var1, Object val1, 
String var2, Object val2) {
 HashMap<String, Object> map = new HashMap<>();
 map.put(var1, val1);
 map.put(var2, val2);



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/56914d17fd95f395ab8be10fc77a07f44098a036
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/wpm] 4 commits: REPO-1634: Exposed createdDocumentHandle, createPayload and made hints Exception adhere to interface

2017-03-14 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-repository


Commits:
fce029d7 by Michiel Rop at 2017-03-14T15:38:49+01:00
REPO-1634: Exposed createdDocumentHandle, createPayload and made hints 
Exception adhere to interface

- - - - -
e26cacae by Michiel Rop at 2017-03-14T15:38:49+01:00
REPO-1634: Made hints Exceptions adhere to interface

- - - - -
05e0ce9c by Michiel Rop at 2017-03-14T15:38:49+01:00
REPO-1634: Make getWorkflowExecutor accessible

- - - - -
e2a8e253 by Michiel Rop at 2017-03-14T15:38:49+01:00
REPO-1634: Made setWorkflowContext overridable.

- - - - -


2 changed files:

- api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java


Changes:

=
api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
=
--- a/api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
+++ b/api/src/main/java/org/hippoecm/repository/ext/WorkflowImpl.java
@@ -53,7 +53,7 @@ public abstract class WorkflowImpl implements Remote, Workflow
  * This call is not (yet) part of the API, but under evaluation.
  * @param context the new context that should be used
  */
-final public void setWorkflowContext(WorkflowContext context) {
+public void setWorkflowContext(WorkflowContext context) {
 this.context = context;
 }
 
@@ -89,7 +89,7 @@ public abstract class WorkflowImpl implements Remote, Workflow
 /**
  * {@inheritDoc}
  */
-public Map<String,Serializable> hints() throws WorkflowException {
+public Map<String,Serializable> hints() throws WorkflowException, 
RepositoryException, RemoteException {
 return hints(this);
 }
 


=
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
=
--- 
a/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
+++ 
b/workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2013-2014 Hippo B.V. (http://www.onehippo.com)
+ *  Copyright 2013-2017 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.
@@ -72,6 +72,10 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 @SuppressWarnings("unchecked")
 protected DocumentHandle createDocumentHandle(Node node) throws 
WorkflowException {
 final RepositoryMap workflowConfiguration = 
getWorkflowContext().getWorkflowConfiguration();
+return createDocumentHandle(node, workflowConfiguration);
+}
+
+public static DocumentHandle createDocumentHandle(final Node node, final 
RepositoryMap workflowConfiguration) throws WorkflowException {
 Object configurationValue;
 if (workflowConfiguration != null && workflowConfiguration.exists() &&
 (configurationValue = 
workflowConfiguration.get(DOCUMENT_HANDLE_FACTORY_CLASS_KEY)) != null) {
@@ -88,7 +92,7 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 return new DocumentHandle(node);
 }
 
-SCXMLWorkflowExecutor getWorkflowExecutor() {
+public SCXMLWorkflowExecutor getWorkflowExecutor() {
 return workflowExecutor;
 }
 
@@ -98,7 +102,7 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 return map;
 }
 
-protected Map<String, Object> createPayload(String var1, Object val1, 
String var2, Object val2) {
+public static Map<String, Object> createPayload(String var1, Object val1, 
String var2, Object val2) {
 HashMap<String, Object> map = new HashMap<>();
 map.put(var1, val1);
 map.put(var2, val2);
@@ -148,7 +152,7 @@ public class DocumentWorkflowImpl extends WorkflowImpl 
implements DocumentWorkfl
 }
 
 @Override
-public Map<String, Serializable> hints() throws WorkflowException {
+public Map<String, Serializable> hints() throws WorkflowException, 
RemoteException, RepositoryException {
 workflowExecutor.start();
 Map<String, Serializable> hints = super.hints();
 hints.putAll(workflowExecutor.getContext().getFeedback());



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/5ce1717ce38a8af9b7b1597fe96e3a5ceada3e85...e2a8e253b572f20c1a80a4f6bf9404d96f9e64be
___
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/wpm] CMS-10644: replace request date by publication / depublication date

2017-03-13 Thread Michiel Rop
Michiel Rop pushed to branch feature/wpm at cms-community / hippo-cms


Commits:
f0b6a9ea by Michiel Rop at 2017-03-13T13:54:45+01:00
CMS-10644: replace request date by publication / depublication date

- - - - -


1 changed file:

- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/model/RequestModel.java


Changes:

=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/model/RequestModel.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/model/RequestModel.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/model/RequestModel.java
@@ -53,8 +53,8 @@ public class RequestModel extends 
LoadableDetachableModel {
 Date schedule = null;
 if 
(node.isNodeType(HippoStdPubWfNodeType.NT_HIPPOSTDPUBWF_REQUEST)) {
 state = "request-"+ 
node.getProperty(HippoStdPubWfNodeType.HIPPOSTDPUBWF_TYPE).getString();
-if 
(node.hasProperty(HippoStdPubWfNodeType.HIPPOSTDPUBWF_REQDATE)) {
-schedule = new 
Date(node.getProperty(HippoStdPubWfNodeType.HIPPOSTDPUBWF_REQDATE).getLong());
+if 
(node.hasProperty(HippoStdPubWfNodeType.HIPPOSTDPUBWF_PUBLICATION_DATE)) {
+schedule = new 
Date(node.getProperty(HippoStdPubWfNodeType.HIPPOSTDPUBWF_PUBLICATION_DATE).getLong());
 }
 }
 else if (node.isNodeType("hipposched:workflowjob")) {



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-cms/commit/f0b6a9eaa4bf8a62b48b67c2fbfaf913e8afc709
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][master] 4 commits: Revert "REPO-1633 Set feature/wpm development version"

2017-03-13 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-repository


Commits:
ef3f9971 by Michiel Rop at 2017-03-13T12:05:35+01:00
Revert REPO-1633 Set feature/wpm development version

This reverts commit b1c8da979e5ead930baef14657a6ca0b2c23de39.

- - - - -
c906fb74 by Michiel Rop at 2017-03-13T12:06:17+01:00
Revert REPO-1634: Replaced targetDate by publication and depublication 
Date

This reverts commit d2364d0451e521cf2a2fecfd5047904704d04429.

- - - - -
213a368d by Michiel Rop at 2017-03-13T12:06:20+01:00
Revert REPO-1634: Fixed DocumentWorkflowTest after replacing targetData 
by publication/depublication date

This reverts commit ec9b4caf70bdf1d83e9ba636a9b354509a183eb0.

- - - - -
21acc889 by Michiel Rop at 2017-03-13T12:06:22+01:00
Revert REPO-1634: Fixes after merge

This reverts commit a0ef04ca3236739e91f78519be4aa97a9a709293.

- - - - -


30 changed files:

- api/pom.xml
- builtin/pom.xml
- builtin/src/main/java/org/hippoecm/repository/HippoStdPubWfNodeType.java
- config/pom.xml
- connector/pom.xml
- dependencies/pom.xml
- deprecated/facetsearch/pom.xml
- deprecated/facetselectmirror/pom.xml
- deprecated/pom.xml
- engine/pom.xml
- jaxrs/pom.xml
- mockutils/pom.xml
- modules/pom.xml
- pom.xml
- provider/pom.xml
- resources/pom.xml
- scripts/pom.xml
- servlets/pom.xml
- test/pom.xml
- testcontent/pom.xml
- testutils/pom.xml
- upgrade/pom.xml
- utilities/pom.xml
- workflow/pom.xml
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
- workflow/src/main/java/org/onehippo/repository/documentworkflow/Request.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/WorkflowRequest.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/action/ScheduleWorkflowAction.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/action/WorkflowRequestAction.java


The diff was not included because it is too large.


View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/a0ef04ca3236739e91f78519be4aa97a9a709293...21acc88958824490f279fa9440f8354681b1b567
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository][master] 4 commits: REPO-1633 Set feature/wpm development version

2017-03-13 Thread Michiel Rop
Michiel Rop pushed to branch master at cms-community / hippo-repository


Commits:
b1c8da97 by Michiel Eggermont at 2017-03-07T11:03:31+01:00
REPO-1633 Set feature/wpm development version

- - - - -
d2364d04 by Michiel Eggermont at 2017-03-10T11:24:28+01:00
REPO-1634: Replaced targetDate by publication and depublication Date

- - - - -
ec9b4caf by Michiel Rop at 2017-03-13T09:17:52+01:00
REPO-1634: Fixed DocumentWorkflowTest after replacing targetData by 
publication/depublication date

- - - - -
a0ef04ca by Michiel Rop at 2017-03-13T11:56:46+01:00
REPO-1634: Fixes after merge

- Add functionality to store instanceId on request node
- replace request date by publication / depublication date
- fixed typo in scml

- - - - -


30 changed files:

- api/pom.xml
- builtin/pom.xml
- builtin/src/main/java/org/hippoecm/repository/HippoStdPubWfNodeType.java
- config/pom.xml
- connector/pom.xml
- dependencies/pom.xml
- deprecated/facetsearch/pom.xml
- deprecated/facetselectmirror/pom.xml
- deprecated/pom.xml
- engine/pom.xml
- jaxrs/pom.xml
- mockutils/pom.xml
- modules/pom.xml
- pom.xml
- provider/pom.xml
- resources/pom.xml
- scripts/pom.xml
- servlets/pom.xml
- test/pom.xml
- testcontent/pom.xml
- testutils/pom.xml
- upgrade/pom.xml
- utilities/pom.xml
- workflow/pom.xml
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentHandle.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/DocumentWorkflowImpl.java
- workflow/src/main/java/org/onehippo/repository/documentworkflow/Request.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/WorkflowRequest.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/action/ScheduleWorkflowAction.java
- 
workflow/src/main/java/org/onehippo/repository/documentworkflow/action/WorkflowRequestAction.java


The diff was not included because it is too large.


View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/compare/22cac27ffa0062182ee693f0c76977f3c9694ce7...a0ef04ca3236739e91f78519be4aa97a9a709293
___
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/dap] 38 commits: CMS-10600 clean up poc files

2017-02-27 Thread Michiel Rop
Michiel Rop pushed to branch feature/dap at cms-community / hippo-cms


Commits:
ec1b05e1 by Joeri de Gooijer at 2017-02-14T16:48:59+01:00
CMS-10600 clean up poc files

- - - - -
5a3db692 by Bert Leunis at 2017-02-14T16:49:04+01:00
CMS-10061 set min-width for name column in document listing

- - - - -
142e47ba by Tobias Jeger at 2017-02-15T08:56:56+01:00
CMS-10608 Exclude undesired automatic exports

- - - - -
a1583d5a by Mathijs den Burger at 2017-02-15T09:58:34+01:00
CMS-10592 Let list items in HTML fields inherit their parents type

A user can set a specific list-style-type on the lists main tag
(ol or ul) via the liststyle plugin, but the old CSS overruled
such a more specific list style.

The default list style types remain the same (decimal for ol and
disc for ul), but can now be overridden.

- - - - -
94a2b44e by Mathijs den Burger at 2017-02-15T10:00:10+01:00
CMS-10592 Change indentation to 2 spaces

- - - - -
6ce93e15 by Mathijs den Burger at 2017-02-15T16:37:18+01:00
CMS-10613 Add whitelist for public package resources

- - - - -
6538a171 by Mathijs den Burger at 2017-02-16T09:26:21+01:00
CMS-10613 Put most common prefix first

Makes the iteration of prefixes a tiny bit cheaper.

- - - - -
d2f80419 by Mathijs den Burger at 2017-02-16T09:51:21+01:00
CMS-10613 Improve naming and performance

- simplify class name to WhitelistedClassesResourceGuard
- use an ArrayList instead of a HashSet to improve iteration speed
- check whitelist before isUserLoggedIn() because the latter is
  a more expensive check

- - - - -
89a952e2 by Bert Leunis at 2017-02-16T11:13:37+01:00
CMS-10043 give toggle buttons div a background color

- - - - -
c06bccca by Mathijs den Burger at 2017-02-16T12:30:05+01:00
CMS-10613 Reintegrate feature/CMS-10613

- - - - -
9465872c by Mathijs den Burger at 2017-02-16T13:10:13+01:00
CMS-10592 Remove duplicate selector

- - - - -
f8fe1fc8 by Mathijs den Burger at 2017-02-16T13:10:34+01:00
CMS-10592 Reintegrate bugfix/CMS-10592

- - - - -
11413bbf by Mathijs den Burger at 2017-02-16T15:01:36+01:00
CMS-10613 Use default package resource whitelist if config is missing

Having no whitelisted package resource classes is a configuration
smell. It also happens during unit tests that dont bootstrap the
full default CMS configuration. In those cases, fall back to a
default whitelist.

Also added wicket.contrib. to the default whitelist because
several unit tests load resources from this package.

- - - - -
a25afec6 by Joeri de Gooijer at 2017-02-16T15:16:42+01:00
CMS-10600 Move hippo theme variables and mixins to CMS/api sass

- - - - -
87ad651f by Arent-Jan Banck at 2017-02-16T15:20:15+01:00
CMS-10615 prepare for next development iteration (v12.0)

- - - - -
7b154ae5 by Joeri de Gooijer at 2017-02-16T15:23:14+01:00
CMS-10600 clean up dependencies

- - - - -
f0f557ae by Joeri de Gooijer at 2017-02-16T15:53:36+01:00
CMS-10600 Create svg sprite from svg in styles/svgsprite/

- - - - -
b8f69676 by Joeri de Gooijer at 2017-02-16T15:53:36+01:00
CMS-10600 Add svg icons from hippo theme

- - - - -
34fd4ac8 by Mathijs den Burger at 2017-02-16T16:06:02+01:00
CMS-10600 Fix whitespace

- - - - -
784dfc84 by Mathijs den Burger at 2017-02-16T16:09:34+01:00
CMS-10600 Bump copyright year

- - - - -
16cf98f6 by Mathijs den Burger at 2017-02-16T16:16:16+01:00
CMS-10600 Remove Maven dependency on hippo-theme

- - - - -
1600c4da by Mathijs den Burger at 2017-02-16T16:17:09+01:00
CMS-10600 Reintegrate feature/CMS-10600

- - - - -
0bc8127c by Arthur Bogaart at 2017-02-17T10:59:31+01:00
CMS-10613 Fix NPE when retrieving class name

Class#getCanonicalName returns null if it is a local or anonymous
class or an array whose componenttype does not have a canonical name).
In that case Class#getName should be used as fallback.

Apart from that I did a bit of performance testing and it seems that
the check if the userIsLoggedIn is almost always faster than the
isWhitelisted check (probably because the getCanonicalName can be a
bit expensive).

- - - - -
976c9135 by Mathijs den Burger at 2017-02-20T09:49:04+01:00
CMS-10613 Add unit test for scope class without canonical name

- - - - -
ba752537 by Mathijs den Burger at 2017-02-20T15:23:34+01:00
CMS-10613 Use empty whitelist for package resources on app init

Ensures that the whitelisted resource guard is set even when no page
has been rendered yet (e.g. when a resource URL is requested directly
after the application has just started). Since we use an empty
whitelist in that case, public access to any resource is forbidden.

Also initialize the resource guard once the session has been
logged in instead of on each page render (which was quite
frequent, for no good reason). As a result, all unit test
application classes have to use the real registerSessionListeners
call in Main, otherwise the default package resource whitelist wont
be used and many unit tests fail.

- - - - -
7f3a2cd6 by Mathijs den Burger at 2017-02-20T15:44:09+01:00
CMS-10592 Inherit list item type in preview

[HippoCMS-scm] [Git][cms-community/hippo-cms][feature/dap] 2 commits: CMS-10623: Add Approval Policy to PublishDepublishDialog

2017-02-24 Thread Michiel Rop
Michiel Rop pushed to branch feature/dap at cms-community / hippo-cms


Commits:
1eaac051 by Michiel Rop at 2017-02-24T16:09:28+01:00
CMS-10623: Add Approval Policy to PublishDepublishDialog

- Added Approval Policy to notification section of dialog.

- - - - -
49227a0f by Michiel Rop at 2017-02-24T16:35:04+01:00
CMS-10623: Add Approval Policy to PublishDepublishDialog

- Use ProcessDescription instead of processId

- - - - -


4 changed files:

- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PublicationWorkflowPlugin.java
- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/dialogs/SchedulePublishDialog.java
- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/dialogs/SchedulePublishDialog.properties
- 
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/model/ApprovalRequest.java


Changes:

=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PublicationWorkflowPlugin.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PublicationWorkflowPlugin.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/PublicationWorkflowPlugin.java
@@ -338,8 +338,6 @@ public class PublicationWorkflowPlugin extends 
AbstractDocumentWorkflowPlugin {
 WorkflowDescriptorModel wdm = getModel();
 try {
 final BPMConfigurationService bpmConfigurationService = 
HippoServiceRegistry.getService(BPMConfigurationService.class);
-final String processId = 
bpmConfigurationService.getProcessId();
-log.info("Retrieved {\"processId\":{}}", processId);
 Node unpublished = getVariant(wdm.getNode(), 
HippoStdNodeType.UNPUBLISHED);
 final IModel titleModel = new 
StringResourceModel("schedule-publish-title",
 PublicationWorkflowPlugin.this, null, 
getDocumentName());
@@ -348,7 +346,9 @@ public class PublicationWorkflowPlugin extends 
AbstractDocumentWorkflowPlugin {
 final Date now = new Date();
 return new ApprovalRequest(id)
 .setPublicationDate(now)
-.setDepublicationDate(now);
+.setDepublicationDate(now)
+
.setProcessId(bpmConfigurationService.getProcessId())
+
.setProcessDescription(bpmConfigurationService.getDescription());
 };
 approvalRequestModel = new 
ApprovalRequestModel(wdm.getNode().getIdentifier(), loader);
 return new SchedulePublishDialog(this, 
approvalRequestModel, new JcrNodeModel(unpublished), titleModel, 
getEditorManager());


=
workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/dialogs/SchedulePublishDialog.java
=
--- 
a/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/dialogs/SchedulePublishDialog.java
+++ 
b/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/dialogs/SchedulePublishDialog.java
@@ -15,6 +15,8 @@
  */
 package org.hippoecm.frontend.plugins.reviewedactions.dialogs;
 
+import java.util.Optional;
+
 import javax.jcr.Node;
 
 import org.apache.wicket.model.IModel;
@@ -24,6 +26,7 @@ import 
org.hippoecm.frontend.plugins.reviewedactions.UnpublishedReferenceNodePro
 import org.hippoecm.frontend.plugins.reviewedactions.model.ApprovalRequest;
 import org.hippoecm.frontend.plugins.reviewedactions.model.ReferenceProvider;
 import 
org.hippoecm.frontend.plugins.reviewedactions.model.UnpublishedReferenceProvider;
+import org.hippoecm.frontend.plugins.standards.ClassResourceModel;
 import org.hippoecm.frontend.service.IEditorManager;
 
 public class SchedulePublishDialog extends WorkflowDialog {
@@ -34,6 +37,7 @@ public class SchedulePublishDialog extends 
WorkflowDialog {
  final IModel titleModel,
  final IEditorManager editorMgr) {
 super(invoker, nodeModel, titleModel);
+addApprovalPolicyNotification(approvalRequestModel);
 
 setCssClass("hippo-workflow-dialog");
 setFocusOnCancel();
@@ -47,4 +51,12 @@ public class SchedulePublishDialog extends 
WorkflowDialog {
 
approvalRequestComponent.getDateRangeFormValidator().ifPresent(this::add);
 }
 
+private void addApprovalPolicyNotification(final IModel 
approvalRequestModel) {
+final Optional processDescription = 
approvalRequestModel.getObject().getProcessDescription();
+if (processDescription.isPresent()){
+ClassResourceMode

[HippoCMS-scm] [Git][cms-community/hippo-repository][feature/dap] REPO-1625: Make default publish/depublish actions unavailable for editor

2017-02-23 Thread Michiel Rop
Michiel Rop pushed to branch feature/dap at cms-community / hippo-repository


Commits:
c1e838ac by Michiel Rop at 2017-02-23T20:04:25+01:00
REPO-1625: Make default publish/depublish actions unavailable for editor

- - - - -


4 changed files:

- config/src/main/resources/domain-hippodocuments.xml
- config/src/main/resources/hippoecm-extension.xml
- workflow/src/main/resources/documentworkflow.scxml
- workflow/src/main/resources/hippoecm-extension.xml


Changes:

=
config/src/main/resources/domain-hippodocuments.xml
=
--- a/config/src/main/resources/domain-hippodocuments.xml
+++ b/config/src/main/resources/domain-hippodocuments.xml
@@ -1,6 +1,6 @@
 
   
   
-  
+  
   
   
   
@@ -330,8 +330,8 @@
  enable request publication operation -->
 
 
-
-  
+
+  
   
 
   
@@ -379,8 +379,8 @@
 
   
   
-  
-
+  
+
 
   
 
@@ -395,8 +395,8 @@
 
 
-
-  
+
+  
   
 
   


=
workflow/src/main/resources/hippoecm-extension.xml
=
--- a/workflow/src/main/resources/hippoecm-extension.xml
+++ b/workflow/src/main/resources/hippoecm-extension.xml
@@ -562,7 +562,7 @@
   true
 
 
-  4.0.0
+  5.0.0
 
   
   



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/c1e838ac78c9d18b1da4889747783a5857c50878
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository] Deleted branch BPMWorkflowRequestTask

2017-02-20 Thread Michiel Rop
Michiel Rop deleted branch BPMWorkflowRequestTask at cms-community / 
hippo-repository
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-repository] Pushed new branch BPMWorkflowRequestTask

2017-02-20 Thread Michiel Rop
Michiel Rop pushed new branch BPMWorkflowRequestTask at cms-community / 
hippo-repository
___
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/dap] CMS-10603: Create CMS ApprovalPolicyService - added method to request publicatio…

2017-02-16 Thread Michiel Rop
Michiel Rop pushed to branch feature/dap at cms-community / hippo-cms


Commits:
1bdd1158 by michiel@bloomreach.com at 2017-02-16T15:25:10+01:00
CMS-10603: Create CMS ApprovalPolicyService - added method to request 
publications ( and dummy implementation )

- - - - -


4 changed files:

- 
engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalPolicyService.java
 → api/src/main/java/org/hippoecm/frontend/service/ApprovalPolicyService.java
- 
engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalPolicyDaemonModule.java
- + 
engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalStrategy.java
- + 
engine/src/main/java/org/hippoecm/frontend/approval/policy/QuestionMarkStrategy.java


Changes:

=
engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalPolicyService.java
 → api/src/main/java/org/hippoecm/frontend/service/ApprovalPolicyService.java
=
--- 
a/engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalPolicyService.java
+++ b/api/src/main/java/org/hippoecm/frontend/service/ApprovalPolicyService.java
@@ -13,7 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.hippoecm.frontend.approval.policy;
+package org.hippoecm.frontend.service;
+
+import java.util.Date;
 
 import org.onehippo.cms7.services.SingletonService;
 
@@ -28,4 +30,7 @@ public interface ApprovalPolicyService {
  * @return processId of Approval Policy
  */
 String getProcessId();
+
+void requestPublication(String identifier, Date publicationDate, Date 
takeOfflineDate);
+
 }


=
engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalPolicyDaemonModule.java
=
--- 
a/engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalPolicyDaemonModule.java
+++ 
b/engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalPolicyDaemonModule.java
@@ -15,10 +15,13 @@
  */
 package org.hippoecm.frontend.approval.policy;
 
+import java.util.Date;
+
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
+import org.hippoecm.frontend.service.ApprovalPolicyService;
 import org.hippoecm.repository.util.JcrUtils;
 import org.onehippo.cms7.services.HippoServiceRegistry;
 import org.onehippo.repository.modules.AbstractReconfigurableDaemonModule;
@@ -31,10 +34,11 @@ import org.slf4j.LoggerFactory;
 public class ApprovalPolicyDaemonModule extends 
AbstractReconfigurableDaemonModule {
 
 private static final String PROCESS_ID = "processId";
-private static Logger log = 
LoggerFactory.getLogger(ApprovalPolicyDaemonModule.class);
+private static final Logger log = 
LoggerFactory.getLogger(ApprovalPolicyDaemonModule.class);
 private final Object configurationLock = new Object();
 private ApprovalPolicyService service;
 private String processId;
+private final ApprovalStrategy approvalStrategy = new 
QuestionMarkStrategy();
 
 @Override
 protected void doConfigure(final Node moduleConfig) throws 
RepositoryException {
@@ -46,7 +50,20 @@ public class ApprovalPolicyDaemonModule extends 
AbstractReconfigurableDaemonModu
 
 @Override
 protected void doInitialize(final Session session) throws 
RepositoryException {
-HippoServiceRegistry.registerService(service = () -> processId, 
ApprovalPolicyService.class);
+HippoServiceRegistry.registerService(service = new 
ApprovalPolicyService() {
+@Override
+public String getProcessId() {
+return processId;
+}
+
+@Override
+public void requestPublication(final String identifier, final Date 
publicationDate, final Date takeOfflineDate) {
+log.info("Requesting publication: 
{\"identifier\":{},\"publicationDate\":{},\"takeOfflineDate\":{}"
+, identifier, publicationDate, takeOfflineDate);
+approvalStrategy.requestPublication(identifier, 
publicationDate, takeOfflineDate, processId);
+
+}
+}, ApprovalPolicyService.class);
 }
 
 @Override


=
engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalStrategy.java
=
--- /dev/null
+++ 
b/engine/src/main/java/org/hippoecm/frontend/approval/policy/ApprovalStrategy.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2017 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
+ * d

[HippoCMS-scm] [Git][cms-community/hippo-repository] Pushed new branch feature/dap

2017-02-14 Thread Michiel Rop
Michiel Rop pushed new branch feature/dap at cms-community / hippo-repository
___
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/dap] HSTTWO-3919 Set Document Approval Process development version

2017-02-13 Thread Michiel Rop
Michiel Rop pushed to branch feature/dap at cms-community / hippo-site-toolkit


Commits:
6300524f by michiel@bloomreach.com at 2017-02-13T14:41:16+01:00
HSTTWO-3919 Set Document Approval Process development version

- - - - -


30 changed files:

- api/pom.xml
- client-modules/cms-rest/pom.xml
- client-modules/google-analytics/hst/pom.xml
- client-modules/google-analytics/pom.xml
- client-modules/google-analytics/repository/pom.xml
- client-modules/page-composer/pom.xml
- client-modules/pom.xml
- client/pom.xml
- cms-restapi/pom.xml
- commons/pom.xml
- components/core/pom.xml
- components/jaxrs/pom.xml
- components/pom.xml
- components/resourcebundle-cnd/pom.xml
- components/resourcebundle/pom.xml
- components/restapi/pom.xml
- components/rewriter/pom.xml
- components/security/pom.xml
- components/session-pool/pom.xml
- content-beans/pom.xml
- dependencies/client-dependencies/pom.xml
- dependencies/cms-dependencies/pom.xml
- dependencies/pom.xml
- dependencies/repository-dependencies/pom.xml
- dependencies/server-dependencies/pom.xml
- dependencies/spring-dependencies/pom.xml
- integration/pom.xml
- integration/tests/pom.xml
- integration/war/pom.xml
- mock/pom.xml


The diff was not included because it is too large.


View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/6300524ff9ed4c0e2b7c54b846bb3722cda5902a
___
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] Pushed new branch feature/dap

2017-02-13 Thread Michiel Rop
Michiel Rop pushed new branch feature/dap at cms-community / hippo-site-toolkit
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


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

2017-02-13 Thread Michiel Rop
Michiel Rop pushed new branch feature/dap at cms-community / hippo-cms
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn


[HippoCMS-scm] [Git][cms-community/hippo-essentials][bugfix/ESSENTIALS-760] ESSENTIALS-760

2016-09-15 Thread Michiel Rop
Michiel Rop pushed to branch bugfix/ESSENTIALS-760 at cms-community / 
hippo-essentials


Commits:
25eca325 by Michiel Rop at 2016-09-15T13:42:26+02:00
ESSENTIALS-760
Templates for newspage are placed in the wrong folder

- update copyright headers

- - - - -


2 changed files:

- 
plugins/news/src/main/resources/xml/hst/templates/newslist-main-newslist-freemarker.xml
- 
plugins/news/src/main/resources/xml/hst/templates/newslist-main-newslist-jsp.xml


Changes:

=
plugins/news/src/main/resources/xml/hst/templates/newslist-main-newslist-freemarker.xml
=
--- 
a/plugins/news/src/main/resources/xml/hst/templates/newslist-main-newslist-freemarker.xml
+++ 
b/plugins/news/src/main/resources/xml/hst/templates/newslist-main-newslist-freemarker.xml
@@ -1,6 +1,6 @@
 
 

[HippoCMS-scm] [Git][cms-community/hippo-essentials] Pushed new branch bugfix/ESSENTIALS-1005

2016-09-15 Thread Michiel Rop
Michiel Rop pushed new branch bugfix/ESSENTIALS-1005 at cms-community / 
hippo-essentials
___
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn