Class DocumentInfo

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    UpdateDocumentInfo

    public class DocumentInfo
    extends Description
    A document representation.
    This object is used to set the data for a new document to be created via the SaClassicConnector.

    See com.saperion.connector.SaClassicConnector#createDocument(com.saperion.structures.DocumentInfo)
    Author:
    tfr
    See Also:
    Serialized Form
    • Field Detail

      • structure

        protected Structure structure
        This DocumentInfos structure.
    • Constructor Detail

      • DocumentInfo

        public DocumentInfo​(java.lang.String ddcName,
                            java.util.Map<java.lang.String,​java.lang.Object> metadatas,
                            ContentStream[] content,
                            java.lang.String versionComment)
        Creates a new UpdateDocumentInfo.
        Parameters:
        ddcName - The name of the database definition
        metadatas - The metadata of this document representation.
        content - Multiple content data. If the array is empty, all content of the document will be removed. If null, the content will not be changed. Otherwise only the contained elements will be replaced.
        versionComment - The comment for the version
    • Method Detail

      • setSelectedImage

        public void setSelectedImage​(int elementNumber)
        Parameters:
        elementNumber - Element to mark
      • getSelectedImage

        public int getSelectedImage()
        Returns:
        Element to mark
      • getContent

        public ContentStream[] getContent()
        Returns the contents of this document representation.
        Returns:
        the contents of this document representation.
      • getVariables

        public java.util.Map<java.lang.String,​java.lang.String> getVariables()
        Returns the variables of this document representation.
        Returns:
        the variables of this document representation.
      • getStructure

        public Structure getStructure()
        Returns this document representations structure.
        Returns:
        this document representations structure.
      • addVariable

        public DocumentInfo addVariable​(java.lang.String name,
                                        java.lang.String value)
        Adds a variable to this document representation.
        Parameters:
        name - The name of the variable.
        value - The value of the variable.
        Returns:
        This.