Salome HOME
Compare method signature and DocToCompareDTO are added.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / KnowledgeElementService.java
index 62cec624baa806f0114df6f76ef47754cca96664..f5835bf9278b109ea8edc96c706408c8971010a7 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Company         EURIWARE
+ * Company         OPEN CASCADE
  * Application     SIMAN
  * File            $Id$ 
  * Creation date   06.10.2012
@@ -11,21 +11,80 @@ package org.splat.service;
 
 import org.splat.dal.bo.som.KnowledgeElement;
 import org.splat.kernel.InvalidPropertyException;
+import org.splat.service.dto.KnowledgeElementDTO;
 
 /**
- * @author RKV
+ * Knowledge element service interface.
  * 
+ * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
  */
 public interface KnowledgeElementService {
 
-       public boolean approve(KnowledgeElement knowledgeElement);
+       /**
+        * Approve the knowledge element.
+        * 
+        * @param knowledgeElement
+        *            the knowledge element to approve
+        * @return true if approving succeeded
+        */
+       boolean approve(KnowledgeElement knowledgeElement);
 
-       public boolean demote(KnowledgeElement knowledgeElement);
+       /**
+        * Demote the knowledge element.
+        * 
+        * @param knowledgeElement
+        *            the knowledge element to demote
+        * @return true if demoting succeeded
+        */
+       boolean demote(KnowledgeElement knowledgeElement);
 
-       public boolean promote(KnowledgeElement knowledgeElement);
+       /**
+        * Promote the knowledge element.
+        * 
+        * @param knowledgeElement
+        *            the knowledge element to promote
+        * @return true if promotion succeeded
+        */
+       boolean promote(KnowledgeElement knowledgeElement);
 
-       public void rename(KnowledgeElement knowledgeElement, String title)
+       /**
+        * Rename the knowledge element.
+        * 
+        * @param knowledgeElement
+        *            the knowledge element to rename
+        * @param title
+        *            the new title of the knowledge element
+        * @throws InvalidPropertyException
+        *             if renaming is failed
+        */
+       void rename(KnowledgeElementDTO knowledgeElement, String title)
                        throws InvalidPropertyException;
 
-       public KnowledgeElement selectKnowledgeElement(long index);
+       /**
+        * Get a knowledge element by its id.
+        * 
+        * @param index
+        *            the knowledge element id
+        * @return the found knowledge element
+        */
+       KnowledgeElement selectKnowledgeElement(long index);
+
+       /**
+        * Get a knowledge element DTO by id.
+        * 
+        * @param index
+        *            the knowledge element id
+        * @return the found knowledge element as DTO
+        */
+       KnowledgeElementDTO getKnowledgeElement(long index);
+
+       /**
+        * Update the description of the knowledge element.
+        * 
+        * @param kelm
+        *            the knoledge element to update
+        * @param description
+        *            the new description
+        */
+       void update(KnowledgeElementDTO kelm, String description);
 }