|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.workplace.CmsWorkplace
org.opencms.workplace.tools.CmsToolDialog
org.opencms.workplace.CmsDialog
org.opencms.workplace.explorer.CmsNewResource
org.opencms.workplace.explorer.CmsNewResourceUpload
org.opencms.workplace.explorer.CmsNewCsvFile
The new resource upload dialog handles the upload of cvs files. They are converted in a first step to xml and in a second step transformed via a xsl stylesheet.
The following files use this class:
Field Summary | |
static java.lang.String |
BEST_DELIMITER
Constant for automatically selecting the best fitting delimiter. |
static java.lang.String |
FRAMEHEIGHT
Constant for the height of the dialog frame. |
static java.lang.String |
PARAM_CSVCONTENT
Request parameter name for the CSV content. |
static java.lang.String |
PARAM_DELIMITER
Request parameter name for the delimiter. |
static java.lang.String |
PARAM_XSLTFILE
Request parameter name for the XSLT file. |
static java.lang.String |
TABLE_XSLT_SUFFIX
Constant for the xslt file suffix for table transformations. |
static java.lang.String |
TABULATOR
Constant for the tab-value inside delimiter the select. |
Fields inherited from class org.opencms.workplace.explorer.CmsNewResourceUpload |
ACTION_APPLET, ACTION_NEWFORM2, ACTION_SHOWERROR, ACTION_SUBMITFORM2, DIALOG_SHOWERROR, DIALOG_SUBMITFORM2, PARAM_NEWRESOURCENAME, PARAM_REDIRECTURL, PARAM_TARGETFRAME, PARAM_UNZIPFILE, PARAM_UPLOADERROR, PARAM_UPLOADFILE, PARAM_UPLOADFOLDER |
Fields inherited from class org.opencms.workplace.explorer.CmsNewResource |
ACTION_NEWFORM, ACTION_SUBMITFORM, BUTTON_NEXT, DELIM_PROPERTYVALUES, DIALOG_ADVANCED, DIALOG_NEWFORM, DIALOG_SUBMITFORM, DIALOG_TYPE, PARAM_APPENDSUFFIXHTML, PARAM_CURRENTFOLDER, PARAM_NEWRESOURCEEDITPROPS, PARAM_NEWRESOURCETYPE, PARAM_NEWRESOURCEURI, VALUE_DEFAULT |
Fields inherited from class org.opencms.workplace.tools.CmsToolDialog |
PARAM_BASE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW |
Constructor Summary | |
CmsNewCsvFile(CmsJspActionElement jsp)
Public constructor with JSP action element. |
|
CmsNewCsvFile(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables. |
Method Summary | |
void |
actionUpload()
Uploads the specified file and transforms it to HTML. |
java.lang.String |
buildDelimiterSelect()
Builds a html select for Delimiters. |
java.lang.String |
buildXsltSelect()
Builds a html select for the XSLT files. |
byte[] |
getFileContentFromUpload()
Returns the content of the file upload and sets the resource name. |
java.lang.String |
getHeadFrameSetHeight()
Returns the height of the head frameset. |
java.lang.String |
getParamCsvContent()
Returns the pasted csv content. |
java.lang.String |
getParamDelimiter()
Returns the delimiter to separate the CSV values. |
java.lang.String |
getParamXsltFile()
Returns the xslt file to transform the xml with. |
java.util.List |
getXsltFiles()
Returns a list of CmsResources with the xslt files in the modules folder. |
void |
setParamCsvContent(java.lang.String csvContent)
Sets the pasted csv content. |
void |
setParamDelimiter(java.lang.String delimiter)
Sets the delimiter to separate the CSV values. |
void |
setParamXsltFile(java.lang.String xsltFile)
Sets the path to the xslt file. |
Methods inherited from class org.opencms.workplace.explorer.CmsNewResourceUpload |
actionCloseDialog, actionUpdateFile, buildTypeList, createAppletCode, getParamNewResourceName, getParamRedirectUrl, getParamTargetFrame, getParamUnzipFile, getParamUploadError, getParamUploadFile, getParamUploadFolder, initWorkplaceRequestValues, setParamNewResourceName, setParamRedirectUrl, setParamTargetFrame, setParamUnzipFile, setParamUploadError, setParamUploadFile, setParamUploadFolder, unzipUpload |
Methods inherited from class org.opencms.workplace.tools.CmsToolDialog |
dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamPath, setParamRoot, setParamStyle, useNewStyle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String BEST_DELIMITER
public static final java.lang.String FRAMEHEIGHT
public static final java.lang.String PARAM_CSVCONTENT
public static final java.lang.String PARAM_DELIMITER
public static final java.lang.String PARAM_XSLTFILE
public static final java.lang.String TABLE_XSLT_SUFFIX
public static final java.lang.String TABULATOR
Constructor Detail |
public CmsNewCsvFile(CmsJspActionElement jsp)
jsp
- an initialized JSP action elementpublic CmsNewCsvFile(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
context
- the JSP page contextreq
- the JSP requestres
- the JSP responseMethod Detail |
public void actionUpload() throws javax.servlet.jsp.JspException
actionUpload
in class CmsNewResourceUpload
javax.servlet.jsp.JspException
- if inclusion of error dialog failspublic java.lang.String buildDelimiterSelect()
public java.lang.String buildXsltSelect()
public byte[] getFileContentFromUpload() throws CmsWorkplaceException
CmsWorkplaceException
- if the filesize if greater that maxFileSizeBytes or if the upload file cannot be foundpublic java.lang.String getHeadFrameSetHeight()
public java.lang.String getParamCsvContent()
public java.lang.String getParamDelimiter()
public java.lang.String getParamXsltFile()
public java.util.List getXsltFiles()
public void setParamCsvContent(java.lang.String csvContent)
csvContent
- the csv content to setpublic void setParamDelimiter(java.lang.String delimiter)
delimiter
- the delimiter to separate the CSV values.public void setParamXsltFile(java.lang.String xsltFile)
xsltFile
- the file to transform the xml with.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |