]> SALOME platform Git repositories - tools/siman.git/blob - Workspace/Siman-Common/src/org/splat/service/KnowledgeElementService.java
Salome HOME
2ccef0cec1b943b9d5ada308c5df537eac52bc96
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / KnowledgeElementService.java
1 /*****************************************************************************
2  * Company         OPEN CASCADE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   06.10.2012
6  * @author         $Author$
7  * @version        $Revision$
8  *****************************************************************************/
9
10 package org.splat.service;
11
12 import java.util.List;
13
14 import org.splat.dal.bo.som.KnowledgeElement;
15 import org.splat.dal.bo.som.KnowledgeElementType;
16 import org.splat.dal.bo.som.ProgressState;
17 import org.splat.kernel.InvalidPropertyException;
18
19 /**
20  * Knowledge element service interface.
21  * 
22  * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
23  */
24 public interface KnowledgeElementService {
25
26         /**
27          * Approve the knowledge element.
28          * 
29          * @param knowledgeElement
30          *            the knowledge element to approve
31          * @return true if approving succeeded
32          */
33         public boolean approve(KnowledgeElement knowledgeElement);
34
35         /**
36          * Demote the knowledge element.
37          * 
38          * @param knowledgeElement
39          *            the knowledge element to demote
40          * @return true if demoting succeeded
41          */
42         public boolean demote(KnowledgeElement knowledgeElement);
43
44         /**
45          * Promote the knowledge element.
46          * 
47          * @param knowledgeElement
48          *            the knowledge element to promote
49          * @return true if promotion succeeded
50          */
51         public boolean promote(KnowledgeElement knowledgeElement);
52
53         /**
54          * Rename the knowledge element.
55          * 
56          * @param knowledgeElement
57          *            the knowledge element to rename
58          * @param title
59          *            the new title of the knowledge element
60          * @throws InvalidPropertyException
61          *             if renaming is failed
62          */
63         public void rename(KnowledgeElement knowledgeElement, String title)
64                         throws InvalidPropertyException;
65
66         /**
67          * Get a knowledge element by its id.
68          * 
69          * @param index
70          *            the knowledge element id
71          * @return the found knowledge element
72          */
73         public KnowledgeElement selectKnowledgeElement(long index);
74
75         /**
76          * Update the description of the knowledge element.
77          * 
78          * @param kelm
79          *            the knoledge element to update
80          * @param description
81          *            the new description
82          */
83         public void update(KnowledgeElement kelm, String description);
84 }