Class DefaultBufferedContent
java.lang.Object
org.eclnt.jsfserver.bufferedcontent.DefaultBufferedContent
- All Implemented Interfaces:
Serializable,IBufferedContent,ICCServerConstants
- Direct Known Subclasses:
LogViewer.MyBufferedContent
public abstract class DefaultBufferedContent
extends Object
implements IBufferedContent, ICCServerConstants
Default implementation of IBufferedContent interface. Should be used
for all implementations. This class will be updated in case the interface
is extended.
- See Also:
-
Field Summary
Fields inherited from interface org.eclnt.jsfserver.util.ICCServerConstants
CLIENTDEVICETYPE_DESKTOP, CLIENTDEVICETYPE_MOBILE, CLIENTJAVATYPE_FX, CLIENTJAVATYPE_SWING, CLIENTTYPE_APPLET, CLIENTTYPE_APPLICATION, CLIENTTYPE_BROWSER, CLIENTTYPE_RISC, CLIENTTYPE_UI5, CLIENTTYPE_WEBSTART, EXPLICIT_EMPTY, EXPLICIT_NULL, FOCUSSEQUENCE_FIX_PREFIX, HEADER_ATTRIBUTE_CLIENT, HEADER_ATTRIBUTE_CLIENTJAVATYPE, HEADER_ATTRIBUTE_COOKIESENABLED, HEADER_ATTRIBUTE_COUNTRY, HEADER_ATTRIBUTE_DEVICESCREENHEIGHT, HEADER_ATTRIBUTE_DEVICESCREENWIDTH, HEADER_ATTRIBUTE_DEVICETYPE, HEADER_ATTRIBUTE_LANGUAGE, HEADER_ATTRIBUTE_MEDIADEVICES, HEADER_ATTRIBUTE_ORIGINALURL, HEADER_ATTRIBUTE_PERFORMANCEDATA, HEADER_ATTRIBUTE_REQUESTID, HEADER_ATTRIBUTE_TIMEZONEOFFSET, HEADER_ATTRIBUTE_USERAGENT, HEADER_ATTRIBUTE_XFRAMEOPTIONS, HEADER_RESPONSE_ATTRIBUTE_HTTPSESSIONID, HEADER_RESPONSE_ATTRIBUTE_HTTPSESSIONREFERENCEURL, HEADER_RESPONSE_ATTRIBUTE_HTTPSESSIONTRACKINGMODE, HEADER_RESPONSE_ATTRIBUTE_OVERRIDE, HEADER_RESPONSE_ATTRIBUTE_RELOAD, HEADER_RESPONSE_ATTRIBUTE_STYLE, INPUTMASK_VALUEMODE_WITHMASK, INPUTMASK_VALUEMODE_WITHOUTMASK, LAYOUTEXTENSION_JSP, LAYOUTEXTENSION_XML, LITERAL_LINK_PREFIX, LITERAL_TEMP_PREFIX, QP_CCSTYLE, QP_KEEPDIALOGSESSION, QP_SUBPAGEID, SECURITY_ROLE_CCADMIN, SESSION_TRACKING_COOKIE, SESSION_TRACKING_URL, SIZE_UNDEFINED, TEXTPANE_CONTENTTYPE_HTML, TEXTPANE_CONTENTTYPE_PLAIN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidWhen overriding this method always call super() in your implementation!voidWhen overriding this method always call super() in your implementation!longDefault implementation callsIBufferedContent.getContent()and passes back the length of the array.Deprecated.When the buffered content is accessed then you may be interested in the URL by which the buffered content is called. - This parameter is only valid when the buffered content is actually requested from the client side.When the buffered content is accessed then you may be interested in the URL by which the buffered content is called. - This parameter is only valid when the buffered content is actually requested from the client side.File name for download, which is set within the http header response parameters.getId()Returns the id under which the buffered content is registered.getURL()The URL that can be passed back to client side for accessing the buffered content.Deprecated.voidpassClientFileName(String clientFileName) Internal usage. - The ccfilename-parameter of the current request, accessing the buffered content is passed.voidpassCurrentRequestQueryString(String queryString) Internal usage. - The request query string of the current request, accessing the buffered content is passed.voidInternal usage. - The request URL of the current request, accessing the buffered content is passed.voidpreProcessResponse(jakarta.servlet.http.HttpServletResponse response) This method is called before building the content: you still may e.g. set special http header parameters for the responsevoidsetExtension(String value) You may pass an optional extension (e.g.voidsetFileName(String value) You may pass an optional file name (e.g.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclnt.jsfserver.bufferedcontent.IBufferedContent
getContent, getContentType
-
Constructor Details
-
DefaultBufferedContent
public DefaultBufferedContent()
-
-
Method Details
-
getContentLength
public long getContentLength()Default implementation callsIBufferedContent.getContent()and passes back the length of the array. Please pay attention: if getContent() is a complex method then you definitely should override the getContentLength-implementation so thatIBufferedContent.getContent()is not called twice - first time for finding the length and second time for finding the content. - This method is called in the download scenario only, if the corresponding download component is explicitly marked (e.g. FILEDOWNLOADBUTTON-WITHCONTENTSIZE).- Specified by:
getContentLengthin interfaceIBufferedContent
-
setExtension
You may pass an optional extension (e.g. "xls", "txt", "pdf", "html", ...). This extension is appended to the URL. If the URL is sent to the browser then the extension helps the browser to start the right application that is associated with the content.
The definition of the extension will be ignored if passing an explicit file name by callingsetFileName(String).
PLEASE CHECK: when using the extension then the servlet mapping of the BufferedContentServlet needs to be up to date - please check your web.xml file against the template (web.xml_template). -
getExtension
-
setFileName
You may pass an optional file name (e.g. "harry.xls", "jo.txt", ...). The URL that is internally built up will end with this file name, so that it gets automatically proposed when doing direct downloads via a web browser.
The purpose for adding a file name is to pass a file name into the URL so that browsers propose the file name when e.g. downloading data from this URL.
If setting an explicit file name, then this definition will override the extension-definition that you may do withsetExtension(String).
PLEASE CHECK: when using the extension then the servlet mapping of the BufferedContentServlet needs to be up to date - please check your web.xml file against the template (web.xml_template). -
getFileName
Description copied from interface:IBufferedContentFile name for download, which is set within the http header response parameters. Only is used in the context of browser processing.- Specified by:
getFileNamein interfaceIBufferedContent
-
getId
Returns the id under which the buffered content is registered.- Specified by:
getIdin interfaceIBufferedContent
-
getURL
The URL that can be passed back to client side for accessing the buffered content. The URL contains the session id. The URL is a relative URL that can be passed to all Swing-based components (e.g. FILEDOWNLOADLINK) in any scenario.
When using CaptainCasa in embedded usage mode (UI is running with stand alone Tomcat within one virtual machine) and passing the URL to the BROWSER component then there will be problems. Use the function getURLForBrowserUsage() instead.- Specified by:
getURLin interfaceIBufferedContent
-
getURLForBROWSERUsage
Deprecated.Depreacted - usrgetURL(). The embedded mode ist not supported with the RISC client.
Passes back a "normal URL" when running in "normal scenarios". When using CaptainCasa Enterprise Client in embedded usage mode (Tomcat running directly inside client) then the URL passed back is a file:///-URL. In this case the content is directly resolved within this method and written into a temporary location (work directory).- Specified by:
getURLForBROWSERUsagein interfaceIBufferedContent
-
passClientFileName
Internal usage. - The ccfilename-parameter of the current request, accessing the buffered content is passed.- Specified by:
passClientFileNamein interfaceIBufferedContent
-
passCurrentRequestURL
Internal usage. - The request URL of the current request, accessing the buffered content is passed.- Specified by:
passCurrentRequestURLin interfaceIBufferedContent
-
getCurrentRequestURL
When the buffered content is accessed then you may be interested in the URL by which the buffered content is called. - This parameter is only valid when the buffered content is actually requested from the client side. -
passCurrentRequestQueryString
Internal usage. - The request query string of the current request, accessing the buffered content is passed.- Specified by:
passCurrentRequestQueryStringin interfaceIBufferedContent
-
getCurrentRequestQueryString
When the buffered content is accessed then you may be interested in the URL by which the buffered content is called. - This parameter is only valid when the buffered content is actually requested from the client side. -
getCurrentClientFileName
Deprecated.This function is not available in the RISC client! The browser never tells details about the local file system of the client... This is the reason for setting this method to deprecated.
If the access to the buffered content is associated with a client file download, then the name of the client file is available via this method. -
beginGetting
public void beginGetting()When overriding this method always call super() in your implementation!- Specified by:
beginGettingin interfaceIBufferedContent
-
endGetting
public void endGetting()When overriding this method always call super() in your implementation!- Specified by:
endGettingin interfaceIBufferedContent
-
preProcessResponse
public void preProcessResponse(jakarta.servlet.http.HttpServletResponse response) This method is called before building the content: you still may e.g. set special http header parameters for the response- Specified by:
preProcessResponsein interfaceIBufferedContent
-