Class FolderUpdateInfo

  • All Implemented Interfaces:
    java.io.Serializable

    public class FolderUpdateInfo
    extends java.lang.Object
    implements java.io.Serializable
    Container for informational objects that describe the folders (workflow or simple) that shall be refreshed on ngclient side.
    Author:
    chg
    See Also:
    Serialized Form
    • Constructor Detail

      • FolderUpdateInfo

        public FolderUpdateInfo​(java.lang.String sysrowId,
                                java.lang.String ddcName,
                                long cacheTime,
                                boolean refreshChilds)
        Parameters:
        sysrowId - - SYSROWID
        ddcName - - DDC name
        cacheTime - - time stamp the object has been cached.
        refreshChilds - - shall the children of this folder be refreshed or not.
      • FolderUpdateInfo

        public FolderUpdateInfo​(SaDocumentInfo folderInfo,
                                boolean refreshChilds,
                                long cacheTime)
        Constructor for simple Folders. Just give FolderUpdateInfo the SaFolderInfo and whether the childs for this folder shall also be refreshed.
        Parameters:
        folderInfo - - FolderInfo that stores XHDOC, SysRowId etc.
        refreshChilds - - shall the children of this folder be refreshed or not.
        cacheTime - - time stamp the object has been cached.
        See Also:
        isRefreshChildren()
      • FolderUpdateInfo

        public FolderUpdateInfo​(BoxDefinition wfBoxDef,
                                boolean refreshChilds,
                                long cacheTime)
        Constructor for Workflow Folders. The FolderType is internally set to WORKFLOW_FORM so the client just needs to check if the folder to refresh is a workflow folder or not. Just give FolderUpdateInfo the BoxDefinition and whether the childs for this folder shall also be refreshed.
        Parameters:
        wfBoxDef - - the Workflow Box Definition that stores the BoxId, the BoxName and the BoxType
        refreshChilds - - shall the children of this folder be refreshed or not.
        cacheTime - - time stamp the object has been cached.
        See Also:
        isRefreshChildren()
    • Method Detail

      • getTotalCount

        public long getTotalCount()
        Returns the number of total workflows. This method also can be used to check if it is a simple folder. In this case the returned Value is -1.
        Returns:
        the totalCount for Folders.
      • getUnreadCount

        public long getUnreadCount()
        Returns the number of unread of workflows. This Method also can be used to check if it is a simple folder. In this case the returned Value is -1.
        Returns:
        the unreadCount for Workflow Folders.
      • isRefreshChildren

        public boolean isRefreshChildren()
        We have to differentiate two cases.
        1. File & Unfile

          The given folder information are the one of the current folder the documents are filed or unfiled in. The folder can be refreshed directly.

        2. Add & Delete

          If a folder was deleted the ngclient still holds this folder. If a new folder was added the ngclient doesn't know the added folder, yet. For both cases a refresh it would be a refresh for a non existing folder. Thus, the here given folder to refresh is the parent folder of the added or deleted one. The client needs to update this parent folder including its children to recognize the changes.

        Returns:
        whether to refresh the children of the given folderId.
      • getFolderSysrowId

        public java.lang.String getFolderSysrowId()
        Returns the sysrowid of the folder.
        Returns:
        the folderSysrowId
      • getFolderXhdoc

        public java.lang.String getFolderXhdoc()
        Returns the xhdoc of the folder.
        Returns:
        the folderXhdoc
      • getFolderDDC

        public java.lang.String getFolderDDC()
        Returns the DDX of the folder.
        Returns:
        the folderDDC
      • getWfBoxId

        public int getWfBoxId()
        The Id of the Workflow Box.
        Returns:
        the wfBoxId
      • getWfBoxType

        public BoxDefinition.BoxType getWfBoxType()
        The Type of the Workflow Box.
        Returns:
        the wfBoxType
      • getWfBoxName

        public java.lang.String getWfBoxName()
        The name of the Workflow Box.
        Returns:
        the wfBoxName
      • getTimeStamp

        public long getTimeStamp()
        The time stamp the object has been put into cache.
        Returns:
        the time stamp.