Class DocForumService
java.lang.Object
sk.iway.iwcm.components.forum.rest.DocForumService
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresent recursive action's upon forum's. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringclearMsOfficeTags(String text) Odstrani Microsot Office tagy z textu.static booleandocForumRecursiveAction(DocForumService.ActionType actionType, int forumId, int docId, Identity user) Perform recursive supported action uppon forum.static intfindParentRecursive(List<DocForumEntity> msgList, int parentId) Rekurzivne vyhlada forumId pod-temystatic StringgetChildForumIdsRecursive(List<DocForumEntity> msgList, int forumId) BAsed on give forumId, return string where are joined all children id's.static DocForumEntitygetForumBean(int forumId, boolean sortAscending) Get DocForumEntity based on forumId (id), is entity is present, convert it to dDocForumEntity or return null.static List<DocForumEntity>getForumFieldsForDoc(javax.servlet.http.HttpServletRequest request, int docId, boolean onlyConfirmed, int parentId, boolean sortAscending, boolean showDeleted, boolean isForumSearch) static DocForumEntitygetForumStat(int docId) static List<DocForumEntity>getForumTopics(int docId, boolean onlyConfirmed, boolean showDeleted, String flagSearch, ForumSortBy sortBy) static DocForumEntitygetLastMessage(int docId) static List<LabelValue>getStatusIconOptions(Prop prop) Return icon options for status icon select.static booleantestuje, ci nie je prispevok vulgarny, alebo obsahuje nepovoleny HTML kodstatic voidrecursiveSort(List<DocForumEntity> unsorted, List<DocForumEntity> sorted, int level, int parent) Recursively sort List (unsorted) and sorted values add into List (sorted).static StringsaveDocForum(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DocForumEntity forumForm) Save given ForumFormBean entity, update and send confirmation notification emailstatic voidupdateForumStatInfo(int docId, int forumId) static StringuploadForumFile(org.springframework.web.multipart.MultipartFile uploadFile, javax.servlet.http.HttpServletRequest request) Upload file for specific forum.
-
Method Details
-
getStatusIconOptions
Return icon options for status icon select.- Parameters:
prop-- Returns:
-
saveDocForum
public static String saveDocForum(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DocForumEntity forumForm) Save given ForumFormBean entity, update and send confirmation notification email- Parameters:
request-response-forumForm- - entity to be saved (forum)- Returns:
- Throws:
IOException
-
docForumRecursiveAction
public static boolean docForumRecursiveAction(DocForumService.ActionType actionType, int forumId, int docId, Identity user) Perform recursive supported action uppon forum. More details in this fn code coments.- Parameters:
actionType- - Supported recursive actionsforumId-docId-user- - logged user- Returns:
-
isVulgar
testuje, ci nie je prispevok vulgarny, alebo obsahuje nepovoleny HTML kod- Parameters:
message-- Returns:
-
clearMsOfficeTags
Odstrani Microsot Office tagy z textu. Tieto tagy mozu sposobovat zle odsadzovanie textu.- Returns:
- String - povodny text ostripovany o tagy
-
getForumBean
Get DocForumEntity based on forumId (id), is entity is present, convert it to dDocForumEntity or return null.- Parameters:
forumId- - entity idsortAscending- - true = ASC, false = DESC- Returns:
-
recursiveSort
public static void recursiveSort(List<DocForumEntity> unsorted, List<DocForumEntity> sorted, int level, int parent) Recursively sort List (unsorted) and sorted values add into List (sorted).- Parameters:
unsorted-sorted-level-parent-
-
getForumFieldsForDoc
public static List<DocForumEntity> getForumFieldsForDoc(javax.servlet.http.HttpServletRequest request, int docId, boolean onlyConfirmed, int parentId, boolean sortAscending, boolean showDeleted, boolean isForumSearch) -
getChildForumIdsRecursive
BAsed on give forumId, return string where are joined all children id's.- Parameters:
msgList- - list of entities to loopforumId- - forumId of root parent- Returns:
-
updateForumStatInfo
public static void updateForumStatInfo(int docId, int forumId) -
findParentRecursive
Rekurzivne vyhlada forumId pod-temy- Parameters:
msgList-parentId-- Returns:
-
uploadForumFile
public static String uploadForumFile(org.springframework.web.multipart.MultipartFile uploadFile, javax.servlet.http.HttpServletRequest request) Upload file for specific forum. Using MediaDB.- Parameters:
uploadFile- - file to uploadrequest-- Returns:
- - path to file (forward)
-
getForumStat
-
getForumTopics
public static List<DocForumEntity> getForumTopics(int docId, boolean onlyConfirmed, boolean showDeleted, String flagSearch, ForumSortBy sortBy) -
getLastMessage
-