Class MirroringService

java.lang.Object
sk.iway.iwcm.doc.mirroring.rest.MirroringService

@Service public class MirroringService extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Character
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.
    Return list of status icon options for editorFields.statusIcons
    void
    validateEditor(MirroringDTO entity, org.springframework.validation.Errors errors, javax.servlet.http.HttpServletRequest request)
    Validate MirroringDTO entity for basic error checking.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LAST_ALPHABET

      public static final Character 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

      public List<LabelValue> getStatusIconOptions(Prop prop)
      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

      public MirroringDTO getOneItem(int syncId, javax.servlet.http.HttpServletRequest request)
      Return MirroringDTO item by given syncId.
      Parameters:
      syncId -
      request -
      Returns:
      - Return null if syncId is not valid or item is not found.
    • getFields

      public List<Field> 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 -