Package com.saperion.ngc.model.resultset
Class ResultProperties
- java.lang.Object
-
- com.saperion.ngc.model.resultset.ResultProperties
-
- All Implemented Interfaces:
java.io.Serializable
public class ResultProperties extends java.lang.Object implements java.io.Serializable
Converter class that is responsible for transfer the query results from backend to view. Represents a row in a result list.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResultProperties.Type
ResultProperties item type.
-
Constructor Summary
Constructors Constructor Description ResultProperties(int index, ResultProperties.Type itemType, java.lang.String ddcName)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
canEdit()
boolean
canIndex()
boolean
canPrint()
boolean
canSave()
boolean
canStream()
static ResultProperties
cloneEmpty(ResultProperties origin)
DocumentId
getAttachmentId()
Returns a DocumentId containing the ID of the attachment of a task represented by this result.java.util.List<com.saperion.rmi.SaCheckoutInfo>
getCheckoutInfos()
com.saperion.intf.wf.CommandInfo[]
getCommands()
java.lang.String
getDdcName()
java.lang.String
getDocId()
Deprecated.will be replaced with getDocumentIdjava.lang.String
getDocumentDescription()
Returns the string describing the document as set in SYSDOCUMENTDESCRIPTION field in ddc.DocumentId
getDocumentId()
Returns a new DocumentId containing the object ID of the document represented by this result.DocumentDatabaseMetaInfo
getDocumentInfo()
java.util.Set<java.util.Map.Entry<java.lang.String,ResultProperty>>
getEntries()
Returns a set of entries containing all property-name / value pairs.static ResultProperties
getFromPropertyList(com.saperion.intf.SaPropertyValue[] values, java.lang.String ddcName)
Constructs a new ResultProperties object containing the supplied properties.static ResultProperties
getFromPropertyList(com.saperion.intf.SaPropertyValue[] values, java.lang.String ddcName, java.lang.String objectId, java.lang.String revisionId)
Constructs a new ResultProperties object containing the supplied properties.java.lang.String
getLockUser()
int
getOriginalIndex()
ResultProperty
getProperty(java.lang.String displayName)
Returns the specified property.java.lang.String[]
getPropertyAsString(java.lang.String key)
Returns the specified property as array of strings.java.util.Set<java.lang.String>
getPropertyNames()
Returns a set containing all property names.com.saperion.intf.SaPropertyValue
getPropertyValue(java.lang.String displayName)
Retrieves a property.com.saperion.intf.wf.TaskInfo
getTaskInfo()
ResultProperties.Type
getType()
boolean
hasActiveWorkflows()
Returns true if the document has active workflows.boolean
hasDocumentDescription()
boolean
hasHDoc()
boolean
hasObjects()
boolean
hasProperty(java.lang.String propertyName)
Checks if the specified property is contained.boolean
hasRealACL()
boolean
hasWorkflows()
Returns true if the document has active or finished workflows.boolean
isCheckedIn()
boolean
isCheckedout()
boolean
isDeleted()
boolean
isDocumentItem()
boolean
isFilingSupported()
boolean
isFolderItem()
boolean
isInDisposition()
boolean
isInRetention()
boolean
isLaunchable()
boolean
isLink()
boolean
isLitigationHold()
boolean
isLocked()
boolean
isLockedByCurrentUser()
Returns true, if the documen is locked by the current user.boolean
isLockedByOtherUser()
Returns true, if the document is locked by another user.boolean
isLookupItem()
boolean
isOfflineConflict()
boolean
isReadOnlyLookupItem()
Checks if this is an item from a lookup table that can be displayed only.boolean
isRevised()
boolean
isSigned()
boolean
isWorkflowAuditItem()
boolean
isWorkflowItem()
void
setCommands(com.saperion.intf.wf.CommandInfo[] cmd)
void
setDocumentInfo(DocumentDatabaseMetaInfo info)
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.void
setTaskInfo(com.saperion.intf.wf.TaskInfo info)
-
-
-
Constructor Detail
-
ResultProperties
public ResultProperties(int index, ResultProperties.Type itemType, java.lang.String ddcName)
Constructor.- Parameters:
index
- the index of this ResultProperties in the original result listitemType
- the itemResultProperties.Type
representationddcName
- ddc name of the represented document
-
-
Method Detail
-
getDocId
@Deprecated public java.lang.String getDocId() throws DocumentIdentificationException
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
public DocumentId getDocumentId() throws DocumentIdentificationException
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
public DocumentDatabaseMetaInfo 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
public void setDocumentInfo(DocumentDatabaseMetaInfo info)
- Parameters:
info
- Document info
-
getAttachmentId
public DocumentId 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
public void setProperty(ResultProperty value)
Sets a property.- Parameters:
value
- property values
-
getPropertyValue
public com.saperion.intf.SaPropertyValue getPropertyValue(java.lang.String displayName)
Retrieves a property.- Parameters:
displayName
- display name of the property to retrieve- Returns:
- property values or null if the property does not exist
-
getProperty
public ResultProperty getProperty(java.lang.String displayName)
Returns the specified property.- Parameters:
displayName
- display name of the property- Returns:
- ResultProperty
-
getPropertyAsString
public java.lang.String[] getPropertyAsString(java.lang.String key)
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
public boolean hasProperty(java.lang.String propertyName)
Checks if the specified property is contained.- Parameters:
propertyName
- property name- Returns:
- true if contained
-
getPropertyNames
public java.util.Set<java.lang.String> getPropertyNames()
Returns a set containing all property names.- Returns:
- property names
-
getEntries
public java.util.Set<java.util.Map.Entry<java.lang.String,ResultProperty>> 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
public final java.lang.String getLockUser()
- Returns:
- Lock user name
-
cloneEmpty
public static ResultProperties cloneEmpty(ResultProperties origin)
- 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, java.lang.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, java.lang.String ddcName, java.lang.String objectId, java.lang.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
public ResultProperties.Type 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:
DocumentDatabaseMetaInfo.canStream()
-
isOfflineConflict
public boolean isOfflineConflict()
- Returns:
- document is in offline-conflict-state
- See Also:
DocumentDatabaseMetaInfo.isOfflineConflict()
-
isSigned
public boolean isSigned()
- Returns:
- document is signed
- See Also:
DocumentDatabaseMetaInfo.isSigned()
-
getCheckoutInfos
public java.util.List<com.saperion.rmi.SaCheckoutInfo> getCheckoutInfos()
- Returns:
- Checkout information
- See Also:
DocumentDatabaseMetaInfo.getCheckoutInfos()
-
isCheckedout
public boolean isCheckedout()
- Returns:
- Is checked out
- See Also:
DocumentDatabaseMetaInfo.isCheckedout()
-
getDdcName
public java.lang.String 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
public java.lang.String 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
-
-