Salome HOME
Modifications done to respect PMD rules. Versioning a document is fixed. Validation...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / DocumentService.java
index c4b2c3cd6cff2090c42029a006d07e3388a9acd0..1c65b18edfbeb93d4a427961c8cfb00c58178fc4 100644 (file)
@@ -9,8 +9,6 @@
 
 package org.splat.service;
 
-import java.util.List;
-
 import org.splat.dal.bo.som.ConvertsRelation;
 import org.splat.dal.bo.som.Document;
 import org.splat.dal.bo.som.DocumentType;
@@ -21,12 +19,9 @@ import org.splat.dal.bo.som.Timestamp;
 import org.splat.dal.bo.som.Document.Properties;
 import org.splat.kernel.InvalidPropertyException;
 import org.splat.kernel.MissedPropertyException;
-import org.splat.kernel.MultiplyDefinedException;
 import org.splat.kernel.NotApplicableException;
-import org.splat.service.technical.ProjectSettingsService;
 import org.splat.som.Revision;
 import org.splat.som.Step;
-import org.springframework.transaction.annotation.Transactional;
 
 /**
  * Document service interface.
@@ -43,7 +38,7 @@ public interface DocumentService {
         *            the document path
         * @return the document if found or null
         */
-       public Document getDocumentByPath(String path);
+       Document getDocumentByPath(String path);
 
        /**
         * Defines this document.
@@ -61,7 +56,7 @@ public interface DocumentService {
         * @see Step#createDocument(Properties)
         * @see #isUndefined()
         */
-       public void initialize(Document aDoc, Properties dprop)
+       void initialize(Document aDoc, Properties dprop)
                        throws MissedPropertyException, InvalidPropertyException,
                        NotApplicableException;
 
@@ -72,7 +67,7 @@ public interface DocumentService {
         *            document id
         * @return found document
         */
-       public Document selectDocument(long index);
+       Document selectDocument(long index);
 
        /**
         * Find a document by its reference and version.
@@ -83,7 +78,7 @@ public interface DocumentService {
         *            document version
         * @return found document
         */
-       public Document selectDocument(String refid, String version);
+       Document selectDocument(String refid, String version);
 
        /**
         * Generate document reference.
@@ -93,7 +88,7 @@ public interface DocumentService {
         * @param dprop
         *            document properties (owner project element is used)
         */
-       public void generateDocumentId(Document aDoc, Properties dprop);
+       void generateDocumentId(Document aDoc, Properties dprop);
 
        /**
         * Get a directory where the document file is saved.
@@ -102,7 +97,7 @@ public interface DocumentService {
         *            the document
         * @return a directory
         */
-       public java.io.File getSaveDirectory(Document aDoc);
+       java.io.File getSaveDirectory(Document aDoc);
 
        /**
         * Extract title and reference properties from the given file.
@@ -111,7 +106,7 @@ public interface DocumentService {
         *            the file to parse
         * @return the extracted properties
         */
-       public Properties extractProperties(java.io.File file);
+       Properties extractProperties(java.io.File file);
 
        /**
         * Create "Converts" relation for the given document and the given format.
@@ -122,7 +117,7 @@ public interface DocumentService {
         *            the format
         * @return the created "Converts" relation
         */
-       public ConvertsRelation attach(Document aDoc, String format);
+       ConvertsRelation attach(Document aDoc, String format);
 
        /**
         * Create "Converts" relation for the given document, format and description.
@@ -135,7 +130,7 @@ public interface DocumentService {
         *            the description of the relation
         * @return the created "Converts" relation
         */
-       public ConvertsRelation attach(Document aDoc, String format,
+       ConvertsRelation attach(Document aDoc, String format,
                        String description);
 
        /**
@@ -149,7 +144,7 @@ public interface DocumentService {
         *            the original document
         * @return true if the new reference is set
         */
-       public boolean buildReferenceFrom(Document aDoc, ProjectElement scope,
+       boolean buildReferenceFrom(Document aDoc, ProjectElement scope,
                        Document lineage);
 
        /**
@@ -161,7 +156,7 @@ public interface DocumentService {
         *            the study
         * @return true if the new reference is set
         */
-       public boolean buildReferenceFrom(Document aDoc, Study scope);
+       boolean buildReferenceFrom(Document aDoc, Study scope);
 
        /**
         * Demote a document.
@@ -170,7 +165,7 @@ public interface DocumentService {
         *            the document to demote
         * @return true if demoting succeeded
         */
-       public boolean demote(Document aDoc);
+       boolean demote(Document aDoc);
 
        /**
         * Promote a document.
@@ -181,7 +176,7 @@ public interface DocumentService {
         *            the timestamp of the promotion
         * @return true if promotion succeeded
         */
-       public boolean promote(Document aDoc, Timestamp stamp);
+       boolean promote(Document aDoc, Timestamp stamp);
 
        /**
         * Increments the reference count of this document following its publication in a Study step.
@@ -190,7 +185,7 @@ public interface DocumentService {
         *            the document to hold
         * @see #release()
         */
-       public void hold(Document aDoc);
+       void hold(Document aDoc);
 
        /**
         * Decrements the reference count of this document following the removal of a Publication from a Study step.
@@ -199,7 +194,7 @@ public interface DocumentService {
         *            the document to release
         * @see #hold()
         */
-       public void release(Document aDoc);
+       void release(Document aDoc);
 
        /**
         * Rename a document.
@@ -211,7 +206,7 @@ public interface DocumentService {
         * @throws InvalidPropertyException
         *             if the new title is empty
         */
-       public void rename(Document aDoc, String title)
+       void rename(Document aDoc, String title)
                        throws InvalidPropertyException;
 
        /**
@@ -222,7 +217,7 @@ public interface DocumentService {
         * @param newvers
         *            the new version
         */
-       public void updateAs(Document aDoc, Revision newvers);
+       void updateAs(Document aDoc, Revision newvers);
 
        /**
         * Update a state of the given document.
@@ -232,7 +227,7 @@ public interface DocumentService {
         * @param state
         *            the new state
         */
-       public void updateAs(Document aDoc, ProgressState state);
+       void updateAs(Document aDoc, ProgressState state);
 
        /**
         * Checks if documents of this type are result of a study. A document is the result of a study when it is the result of the last step of
@@ -244,5 +239,5 @@ public interface DocumentService {
         * @see #isStepResult()
         * @see #isResultOf(org.splat.service.technical.ProjectSettingsServiceImpl.Step)
         */
-       public boolean isStudyResult(DocumentType aType);
+       boolean isStudyResult(DocumentType aType);
 }