Class ResultProperties

java.lang.Object
com.saperion.ngc.model.resultset.ResultProperties
All Implemented Interfaces:
Serializable

public class ResultProperties extends Object implements Serializable
Converter class that is responsible for transfer the query results from backend to view. Represents a row in a result list.
See Also:
  • Constructor Details

    • ResultProperties

      public ResultProperties(int index, ResultProperties.Type itemType, String ddcName)
      Constructor.
      Parameters:
      index - the index of this ResultProperties in the original result list
      itemType - the item ResultProperties.Type representation
      ddcName - ddc name of the represented document
  • Method Details

    • getDocId

      Deprecated.
      will be replaced with getDocumentId
      Get 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(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(String displayName)
      Returns the specified property.
      Parameters:
      displayName - display name of the property
      Returns:
      ResultProperty
    • getPropertyAsString

      public String[] getPropertyAsString(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(String propertyName)
      Checks if the specified property is contained.
      Parameters:
      propertyName - property name
      Returns:
      true if contained
    • getPropertyNames

      public Set<String> getPropertyNames()
      Returns a set containing all property names.
      Returns:
      property names
    • getEntries

      public Set<Map.Entry<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 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, String ddcName)
      Constructs a new ResultProperties object containing the supplied properties.
      Parameters:
      values - property values
      ddcName - 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 values
      ddcName - ddc name
      objectId - object id
      revisionId - 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:
    • isOfflineConflict

      public boolean isOfflineConflict()
      Returns:
      document is in offline-conflict-state
      See Also:
    • isSigned

      public boolean isSigned()
      Returns:
      document is signed
      See Also:
    • getCheckoutInfos

      public List<com.saperion.rmi.SaCheckoutInfo> getCheckoutInfos()
      Returns:
      Checkout information
      See Also:
    • isCheckedout

      public boolean isCheckedout()
      Returns:
      Is checked out
      See Also:
    • getDdcName

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