Package com.saperion.folder
Class FolderUpdateInfo
- java.lang.Object
-
- com.saperion.folder.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 Summary
Constructors Constructor Description FolderUpdateInfo(SaDocumentInfo folderInfo, boolean refreshChilds, long cacheTime)
Constructor for simple Folders.FolderUpdateInfo(BoxDefinition wfBoxDef, boolean refreshChilds, long cacheTime)
Constructor for Workflow Folders.FolderUpdateInfo(java.lang.String sysrowId, java.lang.String ddcName, long cacheTime, boolean refreshChilds)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFolderDDC()
Returns the DDX of the folder.java.lang.String
getFolderSysrowId()
Returns the sysrowid of the folder.SaFolderConstants.FOLDER_TYPE
getFolderType()
The Type of the Folder to refresh.java.lang.String
getFolderXhdoc()
Returns the xhdoc of the folder.long
getTimeStamp()
The time stamp the object has been put into cache.long
getTotalCount()
Returns the number of total workflows.long
getUnreadCount()
Returns the number of unread of workflows.int
getWfBoxId()
The Id of the Workflow Box.java.lang.String
getWfBoxName()
The name of the Workflow Box.BoxDefinition.BoxType
getWfBoxType()
The Type of the Workflow Box.boolean
isRefreshChildren()
We have to differentiate two cases.
-
-
-
Constructor Detail
-
FolderUpdateInfo
public FolderUpdateInfo(java.lang.String sysrowId, java.lang.String ddcName, long cacheTime, boolean refreshChilds)
- Parameters:
sysrowId
- - SYSROWIDddcName
- - DDC namecacheTime
- - 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 BoxTyperefreshChilds
- - 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.-
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.
-
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
-
getFolderType
public SaFolderConstants.FOLDER_TYPE getFolderType()
The Type of the Folder to refresh.- Returns:
- the folderType.
-
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.
-
-