public class ViewerJspUtil extends Object
| Constructor and Description |
|---|
ViewerJspUtil(javax.servlet.http.HttpServletRequest request)
Instantiates a new viewer jsp util.
|
| Modifier and Type | Method and Description |
|---|---|
void |
collectDocumentsWithoutSize(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elements)
Collects all Elements of a given list of elements that have no file size.
|
String |
coreLocalize(String key)
Returns the localized resource with the specified key.
|
String |
getBaseUrl()
Gets the base url.
|
String |
getFileName(DocumentArchiveMetaInfo.ElementArchiveMetaInfo element)
Returns the file name for the specified element.
|
String |
getFileNameWithPageNr(DocumentArchiveMetaInfo.ElementArchiveMetaInfo element)
Returns the file name for the specified element.
|
long |
getFileSize(String hDoc,
int element)
Gets the file size of a given element number for a given hDoc.
|
OpenDocumentBean |
getPopupBean(String popupId)
Gets the popup-bean for this viewer-popup.
|
boolean |
isViewable(OpenDocumentBean bean,
long maxSize)
Checks if a specific element is viewable.
|
boolean |
isViewerSessionMapEnabled() |
String |
urlEncode(String toEncode)
URL-encodes a string.
|
String |
webLocalize(String key)
Returns the localized resource with the specified key.
|
public ViewerJspUtil(javax.servlet.http.HttpServletRequest request)
request - the requestpublic String webLocalize(String key)
key - the keypublic String coreLocalize(String key)
key - the keypublic String getBaseUrl()
public OpenDocumentBean getPopupBean(String popupId)
popupId - id of the popuppublic String getFileName(DocumentArchiveMetaInfo.ElementArchiveMetaInfo element)
element - structure elementpublic String getFileNameWithPageNr(DocumentArchiveMetaInfo.ElementArchiveMetaInfo element)
element - structure elementpublic void collectDocumentsWithoutSize(List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elements)
elements - List of elements to check for file size existance.public long getFileSize(String hDoc, int element)
hDoc - hDoc that holds the documents.element - number of the element we want to know the file size of.public boolean isViewable(OpenDocumentBean bean, long maxSize)
bean - OpenDocumentBean for the viewer-jspmaxSize - maximum allowed sizepublic String urlEncode(String toEncode) throws UnsupportedEncodingException
toEncode - String to encodeUnsupportedEncodingException - when encoding with UTF-8 failedpublic boolean isViewerSessionMapEnabled()
Copyright © 2016 SAPERION AG. All rights reserved.