Salome HOME
Refactoring continues: UserService is created instead of UserDirectory. Database...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / PublicationService.java
index 39d8b8eebd74aa227e5737ae7bd4d05f1c87f158..192dc66a66e9f558f5f6c751184865fd51539e04 100644 (file)
@@ -54,9 +54,10 @@ public interface PublicationService {
 
        /**
         * Promotes the document referenced by this publication from In-Check to Approved state, if not out-dated, and attaches the
-        * corresponding time-stamp to the document.<br/> If the promoted document is the final result of the owner study, the study is itself
-        * is promoted as well.<br/> <br/> Limitation: the way this promotion is propagated to the study supposes that the study has only ONE
-        * final result document.
+        * corresponding time-stamp to the document.<br/>
+        * If the promoted document is the final result of the owner study, the study is itself is promoted as well.<br/>
+        * <br/>
+        * Limitation: the way this promotion is propagated to the study supposes that the study has only ONE final result document.
         * 
         * @param aPublication
         *            the document publication
@@ -71,10 +72,11 @@ public interface PublicationService {
        public Timestamp approve(Publication aPublication, Date adate);
 
        /**
-        * Demotes the document referenced by this publication to In-Work state, and removes the Promoter of the document, if exist.<br/> The
-        * In-Draft state is skipped (direct demotion to In-Work) if the validation cycle of the document does not include the review step.<br/>
-        * If the demoted document is the final result of the owner study, the study is itself is demoted as well.<br/> <br/> Limitation: the
-        * way this demotion is propagated to the study supposes that the study has only ONE final result document.
+        * Demotes the document referenced by this publication to In-Work state, and removes the Promoter of the document, if exist.<br/>
+        * The In-Draft state is skipped (direct demotion to In-Work) if the validation cycle of the document does not include the review step.<br/>
+        * If the demoted document is the final result of the owner study, the study is itself is demoted as well.<br/>
+        * <br/>
+        * Limitation: the way this demotion is propagated to the study supposes that the study has only ONE final result document.
         * 
         * @param aPublication
         *            the document publication
@@ -87,7 +89,9 @@ public interface PublicationService {
 
        /**
         * Undo the review operation by demoting the document referenced by this publication from In-Check to In-Draft state and removing the
-        * Reviewer.<br/> If the demoted document is the final result of the owner study, the study is itself is demoted as well.<br/> <br/>
+        * Reviewer.<br/>
+        * If the demoted document is the final result of the owner study, the study is itself is demoted as well.<br/>
+        * <br/>
         * Limitation: the way this demotion is propagated to the study supposes that the study has only ONE final result document.
         * 
         * @param aPublication
@@ -102,10 +106,13 @@ public interface PublicationService {
 
        /**
         * Promotes the document referenced by this publication from In-Work to In-Draft or In-Check state, if not out-dated, and attaches the
-        * corresponding time-stamp to the document.<br/> The In-Draft state is skipped (direct promotion to In-Check) if the validation cycle
-        * of the document does not include the review step.<br/> Also, if the promoted document is the final result of the owner study, the
-        * study is itself promoted as well.<br/> This operation can be undo-ed by demote().<br/> <br/> Limitation: the way this promotion is
-        * propagated to the study supposes that the study has only ONE final result document.
+        * corresponding time-stamp to the document.<br/>
+        * The In-Draft state is skipped (direct promotion to In-Check) if the validation cycle of the document does not include the review
+        * step.<br/>
+        * Also, if the promoted document is the final result of the owner study, the study is itself promoted as well.<br/>
+        * This operation can be undo-ed by demote().<br/>
+        * <br/>
+        * Limitation: the way this promotion is propagated to the study supposes that the study has only ONE final result document.
         * 
         * @param aPublication
         *            the document publication
@@ -121,9 +128,11 @@ public interface PublicationService {
 
        /**
         * Promotes the document referenced by this publication from In-Draft to In-Check state, if not out-dated, and attaches the
-        * corresponding time-stamp to the document.<br/> If the promoted document is the final result of the owner study, the study is itself
-        * is promoted as well.<br/> This operation can be undo-ed by invalidate().<br/> <br/> Limitation: the way this promotion is
-        * propagated to the study supposes that the study has only ONE final result document.
+        * corresponding time-stamp to the document.<br/>
+        * If the promoted document is the final result of the owner study, the study is itself is promoted as well.<br/>
+        * This operation can be undo-ed by invalidate().<br/>
+        * <br/>
+        * Limitation: the way this promotion is propagated to the study supposes that the study has only ONE final result document.
         * 
         * @param aPublication
         *            the document publication
@@ -156,11 +165,11 @@ public interface PublicationService {
                        throws FileNotFoundException, NotApplicableException;
 
        /**
-        * Publishes the document referenced by this publication into the owner Project Element under the given revision number.<br/> The state
-        * of the referenced document is supposed being automatically set according to the given revision number, but, due to the versioning
-        * scheme, as it is not possible to differentiate In-Work and In-Draft states, this function has been deprecated (it is currently used
-        * only for the need of integration of Microsoft Office which anyway has to be redesigned). <br/> Note: in the context of branch
-        * versioning, the given revision may be modified by an update of the branch name.
+        * Publishes the document referenced by this publication into the owner Project Element under the given revision number.<br/>
+        * The state of the referenced document is supposed being automatically set according to the given revision number, but, due to the
+        * versioning scheme, as it is not possible to differentiate In-Work and In-Draft states, this function has been deprecated (it is
+        * currently used only for the need of integration of Microsoft Office which anyway has to be redesigned). <br/>
+        * Note: in the context of branch versioning, the given revision may be modified by an update of the branch name.
         * 
         * @param aPublication
         *            the document publication
@@ -212,4 +221,27 @@ public interface PublicationService {
         */
        public ConvertsRelation attach(Publication aPublication, String format,
                        String description);
+
+       /**
+        * Undo the out-date operation.
+        * 
+        * @param aPublication
+        *            the publication
+        * @return true if the acceptance succeeds
+        * @see #outdate()
+        * @see DocumentRights#canAccept()
+        */
+       public boolean actualize(Publication aPublication);
+
+       /**
+        * Out-dates this publication and recursively all publications using this one. Typically, a publication is out-dated when modifying a
+        * document to which it depends.
+        * 
+        * @param aPublication
+        *            the publication
+        * @see #isOutdated()
+        * @see #getProgressState()
+        * @see #actualize()
+        */
+       public void outdate(Publication aPublication);
 }