Class 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
    • 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 list
        itemType - the item ResultProperties.Type representation
        ddcName - ddc name of the represented document
    • Method Detail

      • 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
      • 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
      • 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 values
        ddcName - 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 values
        ddcName - ddc name
        objectId - object id
        revisionId - revision id
        Returns:
        ResultProperties instance
        Throws:
        SystemException - when setting a property value failed
      • 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()
      • 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