Class OpenDocumentBean

java.lang.Object
com.saperion.ngc.viewer.OpenDocumentBean
All Implemented Interfaces:
Serializable

public class OpenDocumentBean extends Object implements Serializable
Bean holding information for a viewer-popup.
See Also:
  • Field Details

    • ANNOTATION_COUNT

      public static final String ANNOTATION_COUNT
      Property annotationCount in OpenDocumentBean. Used to remember the number of annotations for editing.
      See Also:
    • DOCUMENT_FORMAT

      public static final String DOCUMENT_FORMAT
      Property used to memorize the document's formats.
      See Also:
    • VIRTUAL_VIEWER_ERROR

      public static final String VIRTUAL_VIEWER_ERROR
      Property used to signal an error.
      See Also:
    • DOCUMENT_ROTATE_ANGLE

      public static final String DOCUMENT_ROTATE_ANGLE
      Property used to store the angle the document was rotated.
      See Also:
    • ANNOTATIONS_INI

      public static final String ANNOTATIONS_INI
      Property used to store the annotations of the current element.
      See Also:
  • Constructor Details

    • OpenDocumentBean

      public OpenDocumentBean(DocumentId documentId, boolean currentRevision, boolean editMode, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList, InputStream pageStream)
      Instantiates a new open document bean.
      Parameters:
      documentId - the document id
      currentRevision - resolve current revision or not when displaying the document
      editMode - edit mode of viewer enabled or disabled
      elementList - the list of structure-elements of the document
      pageStream - stream containing the content of the page file or null if not available
  • Method Details

    • getDocumentId

      public DocumentId getDocumentId()
      Gets the document id.
      Returns:
      the document id
    • setDocumentId

      public void setDocumentId(DocumentId id)
      Sets the document id.
      Parameters:
      id - the new document id
    • isCurrentRevision

      public boolean isCurrentRevision()
      Checks if current revision is set.
      Returns:
      true, if current revision is set
    • setCurrentRevision

      public void setCurrentRevision(boolean currentRevision)
      Sets the currentRevision flag.
      Parameters:
      currentRevision - true or false
    • isEditMode

      public boolean isEditMode()
      Checks if edit mode is set.
      Returns:
      true, if edit mode is set
    • setEditMode

      public void setEditMode(boolean editMode)
      Sets the edit mode.
      Parameters:
      editMode - the new edit mode
    • getElements

      Gets the elements.
      Returns:
      the elements
    • setElements

      public void setElements(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList)
      Sets the elements.
      Parameters:
      elementList - the new elements
    • getFirstFilename

      public String getFirstFilename()
      Gets the filename of the first element that is not a chunk or a structure-element.
      Returns:
      filename or empty string if not available
    • getFirstElementNumber

      public int getFirstElementNumber()
      Returns:
      the number of the first element that is not a chunk or a structure-element.
    • getCurrentFilename

      public String getCurrentFilename()
      Gets the current filename.
      Returns:
      the current filename
    • getCurrentElement

      public int getCurrentElement()
      Gets the current element.
      Returns:
      the current element
    • getCurrentMetaInfo

      Gets the current element info.
      Returns:
      the current element info
    • setCurrentElement

      public void setCurrentElement(int element)
      Sets the current element.
      Parameters:
      element - the new current element
    • setTemporaryDocumentId

      public void setTemporaryDocumentId(TemporaryDocumentId tempDocId)
    • getTemporaryDocumentId

      public TemporaryDocumentId getTemporaryDocumentId()
    • isTemporary

      public boolean isTemporary()
    • addProperty

      public void addProperty(String key, Object value)
      Adds the property.
      Parameters:
      key - the key
      value - the value
    • removeProperty

      public Object removeProperty(String key)
      Removes the property.
      Parameters:
      key - the key
      Returns:
      the propertie's value
    • getProperty

      public Object getProperty(String key)
      Gets the property.
      Parameters:
      key - the key
      Returns:
      the property
    • hasProperty

      public boolean hasProperty(String key)
      Checks for property.
      Parameters:
      key - the key
      Returns:
      true, if successful
    • getPageList

      public PageList getPageList()
      Reads the page list for this document.
      Returns:
      The page list object or null, if no page list exists
    • getSearchList

      public final Map<String,int[]> getSearchList()
      Reads the search index list.
      Returns:
      Search index list
    • setSearchList

      public final void setSearchList(Map<String,int[]> searchList)
      Sets the search index list.
      Parameters:
      searchList - Search index list
    • isDocumentUpdated

      public boolean isDocumentUpdated()
      Returns:
      true if the document was updated.
    • setDocumentUpdated

      public void setDocumentUpdated(boolean documentUpdated)
      Parameters:
      documentUpdated - whether the document was updated or not
    • isDocumentRendered

      public boolean isDocumentRendered()
      Returns:
      true if the document was rendered from renderengine.
    • setDocumentRendered

      public void setDocumentRendered(boolean documentRendered)
      Parameters:
      documentRendered - whether the document was rendered from renderengine or not.
    • toString

      public String toString()
      Overrides:
      toString in class Object