Package com.saperion.ngc.viewer
Class OpenDocumentBean
- java.lang.Object
-
- com.saperion.ngc.viewer.OpenDocumentBean
-
- All Implemented Interfaces:
java.io.Serializable
public class OpenDocumentBean extends java.lang.Object implements java.io.SerializableBean holding information for a viewer-popup.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOpenDocumentBean.MemorizeAnnotationsBeanBean used to memorize annotations.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringANNOTATION_COUNTProperty annotationCount in OpenDocumentBean.static java.lang.StringANNOTATIONS_INIProperty used to store the annotations of the current element.static java.lang.StringDOCUMENT_FORMATProperty used to memorize the document's formats.static java.lang.StringDOCUMENT_ROTATE_ANGLEProperty used to store the angle the document was rotated.static java.lang.StringVIRTUAL_VIEWER_ERRORProperty used to signal an error.
-
Constructor Summary
Constructors Constructor Description OpenDocumentBean(DocumentId documentId, boolean currentRevision, boolean editMode, ResultSetViewImpl view, java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList, java.io.InputStream pageStream)Instantiates a new open document bean.OpenDocumentBean(DocumentId documentId, boolean currentRevision, boolean editMode, java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList, java.io.InputStream pageStream)Instantiates a new open document bean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProperty(java.lang.String key, java.lang.Object value)Adds the property.intgetCurrentElement()Gets the current element.java.lang.StringgetCurrentFilename()Gets the current filename.DocumentArchiveMetaInfo.ElementArchiveMetaInfogetCurrentMetaInfo()Gets the current element info.DocumentIdgetDocumentId()Gets the document id.java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo>getElements()Gets the elements.intgetFirstElementNumber()java.lang.StringgetFirstFilename()Gets the filename of the first element that is not a chunk or a structure-element.PageListgetPageList()Reads the page list for this document.java.lang.ObjectgetProperty(java.lang.String key)Gets the property.java.util.Map<java.lang.String,int[]>getSearchList()Reads the search index list.TemporaryDocumentIdgetTemporaryDocumentId()ResultSetViewImplgetView()booleanhasProperty(java.lang.String key)Checks for property.booleanisCurrentRevision()Checks if current revision is set.booleanisDocumentRendered()booleanisDocumentUpdated()booleanisEditMode()Checks if edit mode is set.booleanisTemporary()java.lang.ObjectremoveProperty(java.lang.String key)Removes the property.voidsetCurrentElement(int element)Sets the current element.voidsetCurrentRevision(boolean currentRevision)Sets the currentRevision flag.voidsetDocumentId(DocumentId id)Sets the document id.voidsetDocumentRendered(boolean documentRendered)voidsetDocumentUpdated(boolean documentUpdated)voidsetEditMode(boolean editMode)Sets the edit mode.voidsetElements(java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList)Sets the elements.voidsetSearchList(java.util.Map<java.lang.String,int[]> searchList)Sets the search index list.voidsetTemporaryDocumentId(TemporaryDocumentId tempDocId)java.lang.StringtoString()
-
-
-
Field Detail
-
ANNOTATION_COUNT
public static final java.lang.String ANNOTATION_COUNT
Property annotationCount in OpenDocumentBean. Used to remember the number of annotations for editing.- See Also:
- Constant Field Values
-
DOCUMENT_FORMAT
public static final java.lang.String DOCUMENT_FORMAT
Property used to memorize the document's formats.- See Also:
- Constant Field Values
-
VIRTUAL_VIEWER_ERROR
public static final java.lang.String VIRTUAL_VIEWER_ERROR
Property used to signal an error.- See Also:
- Constant Field Values
-
DOCUMENT_ROTATE_ANGLE
public static final java.lang.String DOCUMENT_ROTATE_ANGLE
Property used to store the angle the document was rotated.- See Also:
- Constant Field Values
-
ANNOTATIONS_INI
public static final java.lang.String ANNOTATIONS_INI
Property used to store the annotations of the current element.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OpenDocumentBean
public OpenDocumentBean(DocumentId documentId, boolean currentRevision, boolean editMode, java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList, java.io.InputStream pageStream)
Instantiates a new open document bean.- Parameters:
documentId- the document idcurrentRevision- resolve current revision or not when displaying the documenteditMode- edit mode of viewer enabled or disabledelementList- the list of structure-elements of the documentpageStream- stream containing the content of the page file or null if not available
-
OpenDocumentBean
public OpenDocumentBean(DocumentId documentId, boolean currentRevision, boolean editMode, ResultSetViewImpl view, java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList, java.io.InputStream pageStream)
Instantiates a new open document bean.- Parameters:
documentId- the document idcurrentRevision- resolve current revision or not when displaying the documenteditMode- edit mode of viewer enabled or disabledview- the result set viewelementList- the list of structure-elements of the documentpageStream- stream containing the content of the page file or null if not available
-
-
Method Detail
-
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
public java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> getElements()
Gets the elements.- Returns:
- the elements
-
setElements
public void setElements(java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList)
Sets the elements.- Parameters:
elementList- the new elements
-
getFirstFilename
public java.lang.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 java.lang.String getCurrentFilename()
Gets the current filename.- Returns:
- the current filename
-
getCurrentElement
public int getCurrentElement()
Gets the current element.- Returns:
- the current element
-
getCurrentMetaInfo
public DocumentArchiveMetaInfo.ElementArchiveMetaInfo 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(java.lang.String key, java.lang.Object value)Adds the property.- Parameters:
key- the keyvalue- the value
-
removeProperty
public java.lang.Object removeProperty(java.lang.String key)
Removes the property.- Parameters:
key- the key- Returns:
- the propertie's value
-
getProperty
public java.lang.Object getProperty(java.lang.String key)
Gets the property.- Parameters:
key- the key- Returns:
- the property
-
hasProperty
public boolean hasProperty(java.lang.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 java.util.Map<java.lang.String,int[]> getSearchList()
Reads the search index list.- Returns:
- Search index list
-
setSearchList
public final void setSearchList(java.util.Map<java.lang.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.
-
getView
public ResultSetViewImpl getView()
- Returns:
- view
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-