Michiel Eggermont pushed to branch feature/wpm-refactoring at cms-community / 
hippo-repository


Commits:
e5adf9b0 by Michiel Eggermont at 2017-03-23T11:31:02+01:00
REPO-1637 Add publicationDepublication method

And deprecate the one with the same arguments but another name.

- - - - -


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
@@ -160,11 +160,31 @@ public interface DocumentWorkflow extends Workflow, 
EditableWorkflow, CopyWorkfl
      *                             repository
      * @throws RemoteException     indicates that the work-flow call failed 
because of a connection problem with the
      *                             repository
+     * @deprecated Deprecated since 5.0.0, use {@link 
DocumentWorkflow#requestPublicationDepublication(Date, Date)}
      */
+    @Deprecated
     public void requestPublication(Date publicationDate, Date 
depublicationDate)
             throws WorkflowException, MappingException, RepositoryException, 
RemoteException;
 
 
+    /**
+     * Request this document to be published at the given
+     * publication date and to be depublished again at given depublication 
date.
+     * <p>
+     * Note: this is currently <em>NOT</em> implemented nor supported in the 
default implementation.
+     * </p>
+     *
+     * @throws WorkflowException   indicates that the work-flow call failed 
due work-flow specific conditions
+     * @throws MappingException    indicates that the work-flow call failed 
because of configuration problems
+     * @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
+     */
+    public void requestPublicationDepublication(Date publicationDate, Date 
depublicationDate)
+            throws WorkflowException, MappingException, RepositoryException, 
RemoteException;
+
+
     // Operations previously provided through FullReviewedActionsWorkflow, 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
@@ -211,6 +211,11 @@ public class DocumentWorkflowImpl extends 
AbstractDocumentWorkflowImpl implement
         throw new WorkflowException("unsupported");
     }
 
+    @Override
+    public void requestPublicationDepublication(final Date publicationDate, 
final Date unpublicationDate) throws WorkflowException {
+        throw new WorkflowException("unsupported");
+    }
+
     // FullReviewedActionsWorkflow implementation
 
     @Override



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

Reply via email to