Class JcrFileVersionExportBean
java.lang.Object
com.webmethods.caf.jcr.faces.bean.JcrFileVersionExportBean
- All Implemented Interfaces:
IFileExportBean
,IFileExportBeanEx
Handles the export of a version of a jcr file.
- Since:
- 8.0
-
Field Summary
FieldsFields inherited from interface com.webmethods.caf.faces.bean.IFileExportBean
UNKNOWN_CONTENT_LENGTH
-
Constructor Summary
ConstructorsConstructorDescriptionJcrFileVersionExportBean
(javax.jcr.Node fileNode, boolean forceDownload) Constructor -
Method Summary
Modifier and TypeMethodDescriptionReturns character encoding for this export file content (valid only when isExportBinary() == false)int
Return the length of the content that is to be exported.Gets the content type of the response being sent to the client.Return the file name for the exported databoolean
Return true to send the response headers that will force the user to choose what to do with the file (Open vs.boolean
Return true if the export will be sending binary data to the response, false if the export will be sending text.void
writeExportBytes
(OutputStream outStream) Invoked to allow the bean to write binary data to the output stream.void
writeExportText
(PrintWriter writer) Invoked to allow the bean to write the export text to the output writer.
-
Field Details
-
fileNode
protected javax.jcr.Node fileNodeHolds the file Node to export
-
-
Constructor Details
-
JcrFileVersionExportBean
public JcrFileVersionExportBean(javax.jcr.Node fileNode, boolean forceDownload) throws javax.jcr.RepositoryException Constructor- Parameters:
fileNode
- the JCR version node to exportforceDownload
- if true, forces a prompt to the end user to ask if they want to save or open- Throws:
javax.jcr.RepositoryException
-
-
Method Details
-
getExportCharacterEncoding
Description copied from interface:IFileExportBeanEx
Returns character encoding for this export file content (valid only when isExportBinary() == false)- Specified by:
getExportCharacterEncoding
in interfaceIFileExportBeanEx
- Returns:
- java character encoding name
-
getExportContentLength
public int getExportContentLength()Description copied from interface:IFileExportBean
Return the length of the content that is to be exported.- Specified by:
getExportContentLength
in interfaceIFileExportBean
- Returns:
- the length of the content or return
IFileExportBean.UNKNOWN_CONTENT_LENGTH
if it is not known
-
getExportContentType
Description copied from interface:IFileExportBean
Gets the content type of the response being sent to the client. The content type may include the type of character encoding used, for example, text/html; charset=ISO-8859-4.- Specified by:
getExportContentType
in interfaceIFileExportBean
- Returns:
- content type of the exported content
-
getExportFileName
Description copied from interface:IFileExportBean
Return the file name for the exported data- Specified by:
getExportFileName
in interfaceIFileExportBean
- Returns:
- file name for the exported file
-
isDownloadForced
public boolean isDownloadForced()Description copied from interface:IFileExportBean
Return true to send the response headers that will force the user to choose what to do with the file (Open vs. Save).- Specified by:
isDownloadForced
in interfaceIFileExportBean
- Returns:
- true to force a download
-
isExportBinary
public boolean isExportBinary()Description copied from interface:IFileExportBean
Return true if the export will be sending binary data to the response, false if the export will be sending text.- Specified by:
isExportBinary
in interfaceIFileExportBean
- Returns:
- true for binary export, false for text
-
writeExportBytes
Description copied from interface:IFileExportBean
Invoked to allow the bean to write binary data to the output stream.- Specified by:
writeExportBytes
in interfaceIFileExportBean
- Parameters:
outStream
- the output stream- Throws:
IOException
- thrown if there is an I/O exception during the export
-
writeExportText
Description copied from interface:IFileExportBean
Invoked to allow the bean to write the export text to the output writer.- Specified by:
writeExportText
in interfaceIFileExportBean
- Parameters:
writer
- the output writer
-