Class AnnotationLayer


  • public class AnnotationLayer
    extends Object
    This class represents an annotation layer on a document.
    • Field Detail

      • PROPERTIES_KEY_REDACTION_FLAG

        public static final Object PROPERTIES_KEY_REDACTION_FLAG
        Key for redaction flag in the annotation properties map. Expected value type is Boolean.
      • PROPERTIES_KEY_PERMISSION_LEVEL

        public static final Object PROPERTIES_KEY_PERMISSION_LEVEL
        Key for annotation permission level in annotation properties map. Expected values can be seen in the properties of PermissionLevel.
    • Constructor Detail

      • AnnotationLayer

        public AnnotationLayer()
    • Method Detail

      • getPageSpecificIndex

        public int getPageSpecificIndex()
        -1 indicates that the annotations are not page-specific. A positive value indicates that the annotations are only for that page index.
        Returns:
        page index for this annotation; -1 if annotation is not page-specific.
      • setPageSpecificIndex

        public void setPageSpecificIndex​(int psIndex)
        Set the specific page index for this annotation. The default of -1 means this annotation layer can contain annotations for all pages.
        Parameters:
        psIndex - specific page index
      • getData

        public byte[] getData()
        Get the contents of this annotation layer.
        Returns:
        the contents of this annotation layer as a byte array.
      • setData

        public void setData​(byte[] data)
        Sets the contents of this annotation layer.
        Parameters:
        data - The data to set.
      • getDocumentId

        public String getDocumentId()
        Returns the key of the document to which this annotation layer belongs.
        Returns:
        Returns the documentId.
      • setDocumentId

        public void setDocumentId​(String documentId)
        Sets the document key of this annotation layer.
        Parameters:
        documentId - The document key to set.
      • getLayerName

        public String getLayerName()
        Returns the name/key of this annotation layer.
        Returns:
        Returns the layerId.
      • setLayerName

        public void setLayerName​(String layerId)
        Sets the name/key of this annotation layer.
        Parameters:
        layerId - The annotation layer key to set.
      • isNew

        public boolean isNew()
        Whether this annotation has been saved before.
        Returns:
        whether this annotation has been saved before
      • setNew

        public void setNew​(boolean pNew)
        Set whether this annotation is new.
        Parameters:
        pNew - whether annotation is new
      • getLayerObjectId

        public String getLayerObjectId()
        Returns:
        Returns the layerObjectId.
      • setLayerObjectId

        public void setLayerObjectId​(String layerObjectId)
        Parameters:
        layerObjectId - The layerObjectId to set.
      • getProperties

        public Map getProperties()

        The properties map contains additional properties for this Annotation Layer. The information in the map may contain data according to the following keys:

        Key: PROPERTIES_KEY_REDACTION_FLAG
        Value: Boolean true or false depending on if this is a redaction layer.

        Key: PROPERTIES_KEY_PERMISSION_LEVEL
        Value: One of the values from the PermissionLevel class.

        Returns:
        a map with the properties of this annotation layer
      • setProperties

        public void setProperties​(Map properties)
        Set the properties map for this annotation layer.
        Parameters:
        properties - map of String to custom property value
      • isModified

        public boolean isModified()
        Whether this annotation has been modified since it was last saved.
        Returns:
        Whether this annotation has been modified
      • setModified

        public void setModified​(boolean isModified)
        Set whether this annotation has been modified.
        Parameters:
        isModified - whether annotation has been modified