Salome HOME
More business logic has been moved from BO to services. ServiceLocator is created...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / KnowledgeElementService.java
index 62cec624baa806f0114df6f76ef47754cca96664..2ccef0cec1b943b9d5ada308c5df537eac52bc96 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Company         EURIWARE
+ * Company         OPEN CASCADE
  * Application     SIMAN
  * File            $Id$ 
  * Creation date   06.10.2012
@@ -9,23 +9,76 @@
 
 package org.splat.service;
 
+import java.util.List;
+
 import org.splat.dal.bo.som.KnowledgeElement;
+import org.splat.dal.bo.som.KnowledgeElementType;
+import org.splat.dal.bo.som.ProgressState;
 import org.splat.kernel.InvalidPropertyException;
 
 /**
- * @author RKV
+ * Knowledge element service interface.
  * 
+ * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
  */
 public interface KnowledgeElementService {
 
+       /**
+        * Approve the knowledge element.
+        * 
+        * @param knowledgeElement
+        *            the knowledge element to approve
+        * @return true if approving succeeded
+        */
        public boolean approve(KnowledgeElement knowledgeElement);
 
+       /**
+        * Demote the knowledge element.
+        * 
+        * @param knowledgeElement
+        *            the knowledge element to demote
+        * @return true if demoting succeeded
+        */
        public boolean demote(KnowledgeElement knowledgeElement);
 
+       /**
+        * Promote the knowledge element.
+        * 
+        * @param knowledgeElement
+        *            the knowledge element to promote
+        * @return true if promotion succeeded
+        */
        public boolean promote(KnowledgeElement knowledgeElement);
 
+       /**
+        * 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
+        */
        public void rename(KnowledgeElement knowledgeElement, String title)
                        throws InvalidPropertyException;
 
+       /**
+        * Get a knowledge element by its id.
+        * 
+        * @param index
+        *            the knowledge element id
+        * @return the found knowledge element
+        */
        public KnowledgeElement selectKnowledgeElement(long index);
+
+       /**
+        * Update the description of the knowledge element.
+        * 
+        * @param kelm
+        *            the knoledge element to update
+        * @param description
+        *            the new description
+        */
+       public void update(KnowledgeElement kelm, String description);
 }