|
||||||||||
| 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
public class CmsNewResourceUpload
The new resource upload dialog handles the upload of single files or zipped files.
The following files use this class:
| Field Summary | |
|---|---|
static int |
ACTION_APPLET
The value for the resource upload applet action. |
static int |
ACTION_NEWFORM2
The value for the resource name form action. |
static int |
ACTION_SHOWERROR
The value for the resource upload applet action: error occured. |
static int |
ACTION_SUBMITFORM2
The value for the resource name form submission action. |
static String |
DIALOG_SHOWERROR
The name for the resource form submission action. |
static String |
DIALOG_SUBMITFORM2
The name for the resource form submission action. |
static String |
PARAM_NEWRESOURCENAME
Request parameter name for the new resource file name. |
static String |
PARAM_REDIRECTURL
Request parameter name for the redirect url. |
static String |
PARAM_TARGETFRAME
Request parameter name for the redirect target frame name. |
static String |
PARAM_UNZIPFILE
Request parameter name for the upload file unzip flag. |
static String |
PARAM_UPLOADERROR
Request parameter name for the upload file name. |
static String |
PARAM_UPLOADFILE
Request parameter name for the upload file name. |
static String |
PARAM_UPLOADFOLDER
Request parameter name for the upload folder name. |
| Fields inherited from class org.opencms.workplace.explorer.CmsNewResource |
|---|
ACTION_NEWFORM, ACTION_SUBMITFORM, BUTTON_NEXT, DIALOG_NEWFORM, DIALOG_SUBMITFORM, DIALOG_TYPE, PARAM_CURRENTFOLDER, PARAM_NEWRESOURCEEDITPROPS, PARAM_NEWRESOURCETYPE, PARAM_NEWRESOURCEURI |
| Fields inherited from class org.opencms.workplace.tools.CmsToolDialog |
|---|
PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW |
| Constructor Summary | |
|---|---|
CmsNewResourceUpload(CmsJspActionElement jsp)
Public constructor with JSP action element. |
|
CmsNewResourceUpload(PageContext context,
HttpServletRequest req,
HttpServletResponse res)
Public constructor with JSP variables. |
|
| Method Summary | |
|---|---|
void |
actionCloseDialog()
Used to close the current JSP dialog. |
void |
actionUpdateFile()
Updates the file type and renames the file if desired. |
void |
actionUpload()
Uploads the specified file and unzips it, if selected. |
String |
buildTypeList()
Builds the list of possible types for the uploaded file. |
String |
createAppletCode()
Creates the HTML code of the file upload applet with all required parameters. |
String |
getParamNewResourceName()
Returns the new resource name of the uploaded file. |
String |
getParamRedirectUrl()
Returns the paramRedirectUrl. |
String |
getParamTargetFrame()
Returns the paramTargetFrame. |
String |
getParamUnzipFile()
Returns true if the upload file should be unzipped, otherwise false. |
String |
getParamUploadError()
Returns the upload error message for the error dialog. |
String |
getParamUploadFile()
Returns the upload file name. |
String |
getParamUploadFolder()
Returns the upload folder name. |
protected void |
initWorkplaceRequestValues(CmsWorkplaceSettings settings,
HttpServletRequest request)
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly. |
void |
setParamNewResourceName(String newResourceName)
Sets the new resource name of the uploaded file. |
void |
setParamRedirectUrl(String paramRedirectUrl)
Sets the paramRedirectUrl. |
void |
setParamTargetFrame(String paramTargetFrame)
Sets the paramTargetFrame. |
void |
setParamUnzipFile(String unzipFile)
Sets if the upload file should be unzipped. |
void |
setParamUploadError(String uploadError)
Sets the upload error message for the error dialog. |
void |
setParamUploadFile(String uploadFile)
Sets the upload file name. |
void |
setParamUploadFolder(String uploadFolder)
Sets the upload folder name. |
boolean |
unzipUpload()
Returns if the upload file should be unzipped. |
| Methods inherited from class org.opencms.workplace.tools.CmsToolDialog |
|---|
dialogTitle, getAdminTool, getCurrentToolPath, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, 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 int ACTION_APPLET
public static final int ACTION_NEWFORM2
public static final int ACTION_SHOWERROR
public static final int ACTION_SUBMITFORM2
public static final String DIALOG_SHOWERROR
public static final String DIALOG_SUBMITFORM2
public static final String PARAM_NEWRESOURCENAME
public static final String PARAM_REDIRECTURL
public static final String PARAM_TARGETFRAME
public static final String PARAM_UNZIPFILE
public static final String PARAM_UPLOADERROR
public static final String PARAM_UPLOADFILE
public static final String PARAM_UPLOADFOLDER
| Constructor Detail |
|---|
public CmsNewResourceUpload(CmsJspActionElement jsp)
jsp - an initialized JSP action element
public CmsNewResourceUpload(PageContext context,
HttpServletRequest req,
HttpServletResponse res)
context - the JSP page contextreq - the JSP requestres - the JSP response| Method Detail |
|---|
public void actionCloseDialog()
throws JspException
This method overwrites the close dialog method in the super class, because in case a new file was uploaded and the cancel button pressed, the uploaded file has to be deleted.
It tries to include the URI stored in the workplace settings. This URI is determined by the frame name, which has to be set in the framename parameter.
actionCloseDialog in class CmsDialogJspException - if including an element fails
public void actionUpdateFile()
throws JspException
JspException - if inclusion of error dialog fails
public void actionUpload()
throws JspException
JspException - if inclusion of error dialog failspublic String buildTypeList()
public String createAppletCode()
public String getParamNewResourceName()
public String getParamRedirectUrl()
public String getParamTargetFrame()
public String getParamUnzipFile()
public String getParamUploadError()
public String getParamUploadFile()
public String getParamUploadFolder()
public void setParamNewResourceName(String newResourceName)
newResourceName - the new resource name of the uploaded filepublic void setParamRedirectUrl(String paramRedirectUrl)
paramRedirectUrl - the paramRedirectUrl to setpublic void setParamTargetFrame(String paramTargetFrame)
paramTargetFrame - the paramTargetFrame to setpublic void setParamUnzipFile(String unzipFile)
unzipFile - true if the upload file should be unzippedpublic void setParamUploadError(String uploadError)
uploadError - the upload error message for the error dialogpublic void setParamUploadFile(String uploadFile)
uploadFile - the upload file namepublic void setParamUploadFolder(String uploadFolder)
uploadFolder - the upload folder namepublic boolean unzipUpload()
protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings,
HttpServletRequest request)
CmsWorkplace
initWorkplaceRequestValues in class CmsNewResourcesettings - the workplace settingsrequest - the current requestCmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||