Package sk.iway.iwcm.doc.mirroring.rest
Class MirroringService
java.lang.Object
sk.iway.iwcm.doc.mirroring.rest.MirroringService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
deleteItem
(int syncId, javax.servlet.http.HttpServletRequest request) Delete syncId param for all GROUPS / DOCS witn given syncId.editItem
(MirroringDTO savedEntity, javax.servlet.http.HttpServletRequest request) Handle editItem request.Return List of fields specificly for TABLE view (not a editor view).org.springframework.data.domain.Page<MirroringDTO>
getFilteredPage
(org.springframework.data.domain.Pageable pageable, javax.servlet.http.HttpServletRequest request) Return page with MirroringDTO items.getOneItem
(int syncId, javax.servlet.http.HttpServletRequest request) Return MirroringDTO item by given syncId.org.springframework.data.domain.Page<MirroringDTO>
getPage
(org.springframework.data.domain.Pageable pageable, javax.servlet.http.HttpServletRequest request) Return page with MirroringDTO items.getStatusIconOptions
(Prop prop) Return list of status icon options for editorFields.statusIconsvoid
validateEditor
(MirroringDTO entity, org.springframework.validation.Errors errors, javax.servlet.http.HttpServletRequest request) Validate MirroringDTO entity for basic error checking.
-
Field Details
-
LAST_ALPHABET
-
-
Constructor Details
-
MirroringService
public MirroringService()
-
-
Method Details
-
getPage
public org.springframework.data.domain.Page<MirroringDTO> getPage(org.springframework.data.domain.Pageable pageable, javax.servlet.http.HttpServletRequest request) Return page with MirroringDTO items. Items are paged and sorted. EditorFields are not set yet.- Parameters:
pageable
-request
-- Returns:
-
getStatusIconOptions
Return list of status icon options for editorFields.statusIcons- Parameters:
prop
-- Returns:
-
getFilteredPage
public org.springframework.data.domain.Page<MirroringDTO> getFilteredPage(org.springframework.data.domain.Pageable pageable, javax.servlet.http.HttpServletRequest request) Return page with MirroringDTO items. Items are filtered by request parameters aka filtered by columns. They are paged and sorted.- Parameters:
pageable
-request
-- Returns:
-
getOneItem
Return MirroringDTO item by given syncId.- Parameters:
syncId
-request
-- Returns:
- - Return null if syncId is not valid or item is not found.
-
getFields
Return List of fields specificly for TABLE view (not a editor view).- Returns:
-
deleteItem
public boolean deleteItem(int syncId, javax.servlet.http.HttpServletRequest request) Delete syncId param for all GROUPS / DOCS witn given syncId. In case of GROUPS, remove syncId for all children groups and their docs.- Parameters:
syncId
-request
-- Returns:
- - Return FALSE in case of error, TRUE otherwise.
-
editItem
public MirroringDTO editItem(MirroringDTO savedEntity, javax.servlet.http.HttpServletRequest request) Handle editItem request. Remove/add sync ids for groups/docs.- Parameters:
savedEntity
-request
-- Returns:
- - Return newly loaded MirroringDTO item after change OR empty MirroringDTO if all connections were removed (like delete) OR null if error occurs
-
validateEditor
public void validateEditor(MirroringDTO entity, org.springframework.validation.Errors errors, javax.servlet.http.HttpServletRequest request) Validate MirroringDTO entity for basic error checking. In case, found error is set into Errors object.- Parameters:
entity
-errors
-request
-
-