]> SALOME platform Git repositories - tools/siman.git/blob - Workspace/Siman-Common/src/org/splat/service/KnowledgeElementService.java
Salome HOME
DTO is introduced for knowledge elements. BeanHelper is modified so that setters...
[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 import org.splat.service.dto.KnowledgeElementDTO;
19
20 /**
21  * Knowledge element service interface.
22  * 
23  * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
24  */
25 public interface KnowledgeElementService {
26
27         /**
28          * Approve the knowledge element.
29          * 
30          * @param knowledgeElement
31          *            the knowledge element to approve
32          * @return true if approving succeeded
33          */
34         public boolean approve(KnowledgeElement knowledgeElement);
35
36         /**
37          * Demote the knowledge element.
38          * 
39          * @param knowledgeElement
40          *            the knowledge element to demote
41          * @return true if demoting succeeded
42          */
43         public boolean demote(KnowledgeElement knowledgeElement);
44
45         /**
46          * Promote the knowledge element.
47          * 
48          * @param knowledgeElement
49          *            the knowledge element to promote
50          * @return true if promotion succeeded
51          */
52         public boolean promote(KnowledgeElement knowledgeElement);
53
54         /**
55          * Rename the knowledge element.
56          * 
57          * @param knowledgeElement
58          *            the knowledge element to rename
59          * @param title
60          *            the new title of the knowledge element
61          * @throws InvalidPropertyException
62          *             if renaming is failed
63          */
64         public void rename(KnowledgeElement knowledgeElement, String title)
65                         throws InvalidPropertyException;
66
67         /**
68          * Get a knowledge element by its id.
69          * 
70          * @param index
71          *            the knowledge element id
72          * @return the found knowledge element
73          */
74         public KnowledgeElement selectKnowledgeElement(long index);
75
76         /**
77          * Get a knowledge element DTO by id.
78          * 
79          * @param index
80          *            the knowledge element id
81          * @return the found knowledge element as DTO
82          */
83         public KnowledgeElementDTO getKnowledgeElement(long index);
84
85         /**
86          * Update the description of the knowledge element.
87          * 
88          * @param kelm
89          *            the knoledge element to update
90          * @param description
91          *            the new description
92          */
93         public void update(KnowledgeElement kelm, String description);
94 }