|
||||||||||
| 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
public class 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 String |
BEST_DELIMITER
Constant for automatically selecting the best fitting delimiter. |
static String |
FRAMEHEIGHT
Constant for the height of the dialog frame. |
static String |
PARAM_CSVCONTENT
Request parameter name for the CSV content. |
static String |
PARAM_DELIMITER
Request parameter name for the delimiter. |
static String |
PARAM_XSLTFILE
Request parameter name for the XSLT file. |
static String |
TABLE_XSLT_SUFFIX
Constant for the xslt file suffix for table transformations. |
static 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(PageContext context,
HttpServletRequest req,
HttpServletResponse res)
Public constructor with JSP variables. |
|
| Method Summary | |
|---|---|
void |
actionUpload()
Uploads the specified file and transforms it to HTML. |
String |
buildDelimiterSelect()
Builds a html select for Delimiters. |
String |
buildXsltSelect()
Builds a html select for the XSLT files. |
byte[] |
getFileContentFromUpload()
Returns the content of the file upload and sets the resource name. |
String |
getHeadFrameSetHeight()
Returns the height of the head frameset. |
String |
getParamCsvContent()
Returns the pasted csv content. |
String |
getParamDelimiter()
Returns the delimiter to separate the CSV values. |
String |
getParamXsltFile()
Returns the xslt file to transform the xml with. |
List |
getXsltFiles()
Returns a list of CmsResources with the xslt files in the modules folder. |
void |
setParamCsvContent(String csvContent)
Sets the pasted csv content. |
void |
setParamDelimiter(String delimiter)
Sets the delimiter to separate the CSV values. |
void |
setParamXsltFile(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 String BEST_DELIMITER
public static final String FRAMEHEIGHT
public static final String PARAM_CSVCONTENT
public static final String PARAM_DELIMITER
public static final String PARAM_XSLTFILE
public static final String TABLE_XSLT_SUFFIX
public static final String TABULATOR
| Constructor Detail |
|---|
public CmsNewCsvFile(CmsJspActionElement jsp)
jsp - an initialized JSP action element
public CmsNewCsvFile(PageContext context,
HttpServletRequest req,
HttpServletResponse res)
context - the JSP page contextreq - the JSP requestres - the JSP response| Method Detail |
|---|
public void actionUpload()
throws JspException
actionUpload in class CmsNewResourceUploadJspException - if inclusion of error dialog failspublic String buildDelimiterSelect()
public String buildXsltSelect()
public byte[] getFileContentFromUpload()
throws CmsWorkplaceException
CmsWorkplaceException - if the filesize if greater that maxFileSizeBytes or if the upload file cannot be foundpublic String getHeadFrameSetHeight()
public String getParamCsvContent()
public String getParamDelimiter()
public String getParamXsltFile()
public List getXsltFiles()
public void setParamCsvContent(String csvContent)
csvContent - the csv content to setpublic void setParamDelimiter(String delimiter)
delimiter - the delimiter to separate the CSV values.public void setParamXsltFile(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 | |||||||||