Package com.saperion.ngc.model.resultset
Class ResultProperties
java.lang.Object
com.saperion.ngc.model.resultset.ResultProperties
- All Implemented Interfaces:
Serializable
Converter class that is responsible for transfer the query results from backend to view.
Represents a row in a result list.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionResultProperties
(int index, ResultProperties.Type itemType, String ddcName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
canEdit()
boolean
canIndex()
boolean
canPrint()
boolean
canSave()
boolean
static ResultProperties
cloneEmpty
(ResultProperties origin) Returns a DocumentId containing the ID of the attachment of a task represented by this result.List<com.saperion.rmi.SaCheckoutInfo>
final com.saperion.intf.wf.CommandInfo[]
getDocId()
Deprecated.will be replaced with getDocumentIdReturns the string describing the document as set in SYSDOCUMENTDESCRIPTION field in ddc.Returns a new DocumentId containing the object ID of the document represented by this result.Returns a set of entries containing all property-name / value pairs.static ResultProperties
getFromPropertyList
(com.saperion.intf.SaPropertyValue[] values, String ddcName) Constructs a new ResultProperties object containing the supplied properties.static ResultProperties
getFromPropertyList
(com.saperion.intf.SaPropertyValue[] values, String ddcName, String objectId, String revisionId) Constructs a new ResultProperties object containing the supplied properties.final String
int
getProperty
(String displayName) Returns the specified property.String[]
Returns the specified property as array of strings.Returns a set containing all property names.com.saperion.intf.SaPropertyValue
getPropertyValue
(String displayName) Retrieves a property.final com.saperion.intf.wf.TaskInfo
getType()
boolean
Returns true if the document has active workflows.boolean
boolean
hasHDoc()
boolean
boolean
hasProperty
(String propertyName) Checks if the specified property is contained.boolean
boolean
Returns true if the document has active or finished workflows.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isLink()
boolean
final boolean
isLocked()
final boolean
Returns true, if the documen is locked by the current user.final boolean
Returns true, if the document is locked by another user.boolean
boolean
boolean
Checks if this is an item from a lookup table that can be displayed only.boolean
boolean
isSigned()
boolean
boolean
final void
setCommands
(com.saperion.intf.wf.CommandInfo[] cmd) void
void
setOriginalIndex
(int originalIndex) Updates the original index of this ResultProperties instance.void
setProperty
(ResultProperty value) Sets a property.void
setReadOnlyLookupItem
(boolean readOnlyLookupItem) Sets the read only lookup item property.final void
setTaskInfo
(com.saperion.intf.wf.TaskInfo info)
-
Constructor Details
-
ResultProperties
Constructor.- Parameters:
index
- the index of this ResultProperties in the original result listitemType
- the itemResultProperties.Type
representationddcName
- ddc name of the represented document
-
-
Method Details
-
getDocId
Deprecated.will be replaced with getDocumentIdGet the HDoc that identifies this result in the backend system.- Returns:
- HDoc
- Throws:
DocumentIdentificationException
- if the id was not found
-
getDocumentId
Returns a new DocumentId containing the object ID of the document represented by this result. The revision ID and the DDC name will be contained if available.- Returns:
- DocumentId that identifies the document
- Throws:
DocumentIdentificationException
- if the object id was not found
-
getDocumentInfo
- Returns:
- document info
-
getOriginalIndex
public int getOriginalIndex()- Returns:
- the original index
-
setOriginalIndex
public void setOriginalIndex(int originalIndex) Updates the original index of this ResultProperties instance. Use with care. This method is meant to be used when a single row is updated.- Parameters:
originalIndex
- the new original index
-
setDocumentInfo
- Parameters:
info
- Document info
-
getAttachmentId
Returns a DocumentId containing the ID of the attachment of a task represented by this result. The revision ID and the DDC name will be contained if available.- Returns:
- DocumentId that identifies the attachment; null, if none exits
-
setProperty
Sets a property.- Parameters:
value
- property values
-
getPropertyValue
Retrieves a property.- Parameters:
displayName
- display name of the property to retrieve- Returns:
- property values or null if the property does not exist
-
getProperty
Returns the specified property.- Parameters:
displayName
- display name of the property- Returns:
- ResultProperty
-
getPropertyAsString
Returns the specified property as array of strings. If the property does not exist or is empty, the result will contain an empty string.- Parameters:
key
- key of the property- Returns:
- array of strings representing the values
-
hasProperty
Checks if the specified property is contained.- Parameters:
propertyName
- property name- Returns:
- true if contained
-
getPropertyNames
Returns a set containing all property names.- Returns:
- property names
-
getEntries
Returns a set of entries containing all property-name / value pairs.- Returns:
- entry set
-
hasHDoc
public boolean hasHDoc()- Returns:
- Checks, if this item has a HDOC.
-
isWorkflowItem
public boolean isWorkflowItem()- Returns:
- true, if this is a workflow item
-
isWorkflowAuditItem
public boolean isWorkflowAuditItem()- Returns:
- true, if this is a workflow audit item
-
isDocumentItem
public boolean isDocumentItem()- Returns:
- true, if this is a document item
-
isFolderItem
public boolean isFolderItem()- Returns:
- true, if this is a folder item
-
isLookupItem
public boolean isLookupItem()- Returns:
- true, if this is a lookup item
-
isLaunchable
public boolean isLaunchable()- Returns:
- True, if launch)able
-
isLocked
public final boolean isLocked()- Returns:
- true, if the document is locked
-
isLockedByOtherUser
public final boolean isLockedByOtherUser()Returns true, if the document is locked by another user.- Returns:
- true, if locked by other user
-
isLockedByCurrentUser
public final boolean isLockedByCurrentUser()Returns true, if the documen is locked by the current user.- Returns:
- true, if locked by current user
-
getLockUser
- Returns:
- Lock user name
-
cloneEmpty
- Parameters:
origin
- Origin instance- Returns:
- Cloned instance without properties. Settings like launchable, litigation hold and retention are preserved.
-
getFromPropertyList
public static ResultProperties getFromPropertyList(com.saperion.intf.SaPropertyValue[] values, String ddcName) Constructs a new ResultProperties object containing the supplied properties.- Parameters:
values
- property valuesddcName
- ddc name- Returns:
- ResultProperties instance
-
getFromPropertyList
public static ResultProperties getFromPropertyList(com.saperion.intf.SaPropertyValue[] values, String ddcName, String objectId, String revisionId) throws SystemException Constructs a new ResultProperties object containing the supplied properties. ObjectID and revisionId are set separately even if they are included in values.- Parameters:
values
- property valuesddcName
- ddc nameobjectId
- object idrevisionId
- revision id- Returns:
- ResultProperties instance
- Throws:
SystemException
- when setting a property value failed
-
getType
- Returns:
- the type
-
getCommands
public final com.saperion.intf.wf.CommandInfo[] getCommands()- Returns:
- the commands
-
setCommands
public final void setCommands(com.saperion.intf.wf.CommandInfo[] cmd) - Parameters:
cmd
- the commands to set
-
getTaskInfo
public final com.saperion.intf.wf.TaskInfo getTaskInfo()- Returns:
- the taskInfo
-
setTaskInfo
public final void setTaskInfo(com.saperion.intf.wf.TaskInfo info) - Parameters:
info
- the taskInfo to set, attachmentId will be extracted
-
canEdit
public boolean canEdit()- Returns:
- Can edit
- See Also:
-
SaStatusInfo.canEdit()
-
canIndex
public boolean canIndex()- Returns:
- Can index
- See Also:
-
SaStatusInfo.canIndex()
-
canPrint
public boolean canPrint()- Returns:
- Can print
- See Also:
-
SaStatusInfo.canPrint()
-
canSave
public boolean canSave()- Returns:
- Can save
- See Also:
-
SaStatusInfo.canSave()
-
hasObjects
public boolean hasObjects()- Returns:
- Has objects
- See Also:
-
SaStatusInfo.hasObjects()
-
hasRealACL
public boolean hasRealACL()- Returns:
- Has real acl
- See Also:
-
SaStatusInfo.hasRealACL()
-
hasWorkflows
public boolean hasWorkflows()Returns true if the document has active or finished workflows.- Returns:
- Has workflow
- See Also:
-
SaStatusInfo.hasWorkflows()
-
hasActiveWorkflows
public boolean hasActiveWorkflows()Returns true if the document has active workflows.- Returns:
- has active workflows
-
isCheckedIn
public boolean isCheckedIn()- Returns:
- Is checked in
- See Also:
-
SaStatusInfo.isCheckedIn()
-
isDeleted
public boolean isDeleted()- Returns:
- Is deleted
- See Also:
-
SaStatusInfo.isDeleted()
-
isLink
public boolean isLink()- Returns:
- Is link
- See Also:
-
SaStatusInfo.isLink()
-
isRevised
public boolean isRevised()- Returns:
- Is revised
- See Also:
-
SaStatusInfo.isRevised()
-
canStream
public boolean canStream()- Returns:
- document can be streamed
- See Also:
-
isOfflineConflict
public boolean isOfflineConflict()- Returns:
- document is in offline-conflict-state
- See Also:
-
isSigned
public boolean isSigned()- Returns:
- document is signed
- See Also:
-
getCheckoutInfos
- Returns:
- Checkout information
- See Also:
-
isCheckedout
public boolean isCheckedout()- Returns:
- Is checked out
- See Also:
-
getDdcName
- Returns:
- DDC name or null if not set
-
isLitigationHold
public boolean isLitigationHold()- Returns:
- litigation hold state
-
isInRetention
public boolean isInRetention()- Returns:
- retention state
-
isInDisposition
public boolean isInDisposition()- Returns:
- disposition state
-
isFilingSupported
public boolean isFilingSupported()- Returns:
- true if the represented document's ddc supports filing
-
getDocumentDescription
Returns the string describing the document as set in SYSDOCUMENTDESCRIPTION field in ddc. If the field is not available or if the value is emtpy, an empty string is returned.- Returns:
- string describing the document
-
hasDocumentDescription
public boolean hasDocumentDescription()- Returns:
- true, if the document-description is available
-
isReadOnlyLookupItem
public boolean isReadOnlyLookupItem()Checks if this is an item from a lookup table that can be displayed only.- Returns:
- true, if read-only
-
setReadOnlyLookupItem
public void setReadOnlyLookupItem(boolean readOnlyLookupItem) Sets the read only lookup item property.- Parameters:
readOnlyLookupItem
- value
-