Package com.saperion.ngc.viewer
Class OpenDocumentBean
java.lang.Object
com.saperion.ngc.viewer.OpenDocumentBean
- All Implemented Interfaces:
Serializable
Bean holding information for a viewer-popup.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBean used to memorize annotations. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty annotationCount in OpenDocumentBean.static final StringProperty used to store the annotations of the current element.static final StringProperty used to memorize the document's formats.static final StringProperty used to store the angle the document was rotated.static final StringProperty used to signal an error. -
Constructor Summary
ConstructorsConstructorDescriptionOpenDocumentBean(DocumentId documentId, boolean currentRevision, boolean editMode, ResultSetViewImpl view, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList, InputStream pageStream) Instantiates a new open document bean.OpenDocumentBean(DocumentId documentId, boolean currentRevision, boolean editMode, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList, InputStream pageStream) Instantiates a new open document bean. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String key, Object value) Adds the property.intGets the current element.Gets the current filename.Gets the current element info.Gets the document id.Gets the elements.intGets the filename of the first element that is not a chunk or a structure-element.Reads the page list for this document.getProperty(String key) Gets the property.Reads the search index list.getView()booleanhasProperty(String key) Checks for property.booleanChecks if current revision is set.booleanbooleanbooleanChecks if edit mode is set.booleanremoveProperty(String key) Removes the property.voidsetCurrentElement(int element) Sets the current element.voidsetCurrentRevision(boolean currentRevision) Sets the currentRevision flag.voidSets the document id.voidsetDocumentRendered(boolean documentRendered) voidsetDocumentUpdated(boolean documentUpdated) voidsetEditMode(boolean editMode) Sets the edit mode.voidsetElements(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList) Sets the elements.final voidsetSearchList(Map<String, int[]> searchList) Sets the search index list.voidsetTemporaryDocumentId(TemporaryDocumentId tempDocId) toString()
-
Field Details
-
ANNOTATION_COUNT
Property annotationCount in OpenDocumentBean. Used to remember the number of annotations for editing.- See Also:
-
DOCUMENT_FORMAT
Property used to memorize the document's formats.- See Also:
-
VIRTUAL_VIEWER_ERROR
Property used to signal an error.- See Also:
-
DOCUMENT_ROTATE_ANGLE
Property used to store the angle the document was rotated.- See Also:
-
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 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, List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList, 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 Details
-
getDocumentId
Gets the document id.- Returns:
- the document id
-
setDocumentId
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
Sets the elements.- Parameters:
elementList- the new elements
-
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
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
-
getTemporaryDocumentId
-
isTemporary
public boolean isTemporary() -
addProperty
Adds the property.- Parameters:
key- the keyvalue- the value
-
removeProperty
Removes the property.- Parameters:
key- the key- Returns:
- the propertie's value
-
getProperty
Gets the property.- Parameters:
key- the key- Returns:
- the property
-
hasProperty
Checks for property.- Parameters:
key- the key- Returns:
- true, if successful
-
getPageList
Reads the page list for this document.- Returns:
- The page list object or null, if no page list exists
-
getSearchList
Reads the search index list.- Returns:
- Search index list
-
setSearchList
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
- Returns:
- view
-
toString
-