1 /*****************************************************************************
5 * Creation date 06.10.2012
8 *****************************************************************************/
10 package org.splat.service;
12 import org.splat.dal.bo.som.KnowledgeElement;
13 import org.splat.kernel.InvalidPropertyException;
14 import org.splat.service.dto.KnowledgeElementDTO;
17 * Knowledge element service interface.
19 * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
21 public interface KnowledgeElementService {
24 * Approve the knowledge element.
26 * @param knowledgeElement
27 * the knowledge element to approve
28 * @return true if approving succeeded
30 boolean approve(KnowledgeElement knowledgeElement);
33 * Demote the knowledge element.
35 * @param knowledgeElement
36 * the knowledge element to demote
37 * @return true if demoting succeeded
39 boolean demote(KnowledgeElement knowledgeElement);
42 * Promote the knowledge element.
44 * @param knowledgeElement
45 * the knowledge element to promote
46 * @return true if promotion succeeded
48 boolean promote(KnowledgeElement knowledgeElement);
51 * Rename the knowledge element.
53 * @param knowledgeElement
54 * the knowledge element to rename
56 * the new title of the knowledge element
57 * @throws InvalidPropertyException
58 * if renaming is failed
60 void rename(KnowledgeElementDTO knowledgeElement, String title)
61 throws InvalidPropertyException;
64 * Get a knowledge element by its id.
67 * the knowledge element id
68 * @return the found knowledge element
70 KnowledgeElement selectKnowledgeElement(long index);
73 * Get a knowledge element DTO by id.
76 * the knowledge element id
77 * @return the found knowledge element as DTO
79 KnowledgeElementDTO getKnowledgeElement(long index);
82 * Update the description of the knowledge element.
85 * the knoledge element to update
89 void update(KnowledgeElementDTO kelm, String description);