org.opencms.workplace.explorer
Class CmsNewResource

java.lang.Object
  extended by org.opencms.workplace.CmsWorkplace
      extended by org.opencms.workplace.tools.CmsToolDialog
          extended by org.opencms.workplace.CmsDialog
              extended by org.opencms.workplace.list.A_CmsListDialog
                  extended by org.opencms.workplace.list.A_CmsListResourceTypeDialog
                      extended by org.opencms.workplace.explorer.CmsNewResource
Direct Known Subclasses:
CmsNewResourcePointer, CmsNewResourceUpload, CmsNewResourceXmlContent, CmsNewResourceXmlPage

public class CmsNewResource
extends A_CmsListResourceTypeDialog

The new resource entry dialog which displays the possible "new actions" for the current user.

It handles the creation of "simple" resource types like plain or JSP resources.

The following files use this class:

Since:
6.0.0
Version:
$Revision: 1.41 $
Author:
Andreas Zahner, Armen Markarian, Peter Bonrad

Field Summary
static int ACTION_NEWFORM
          The value for the resource name form action.
static int ACTION_SUBMITFORM
          The value for the resource name form submission action.
static int BUTTON_NEXT
          Constant for the "Next" button in the build button methods.
static java.lang.String DEFAULT_SUFFIX
          The default suffix.
static char DELIM_PROPERTYVALUES
          Delimiter for property values, e.g. for available resource types or template sites.
static java.lang.String DIALOG_ADVANCED
          The name for the advanced resource form action.
static java.lang.String DIALOG_NEWFORM
          The name for the resource form action.
static java.lang.String DIALOG_SUBMITFORM
          The name for the resource form submission action.
static java.lang.String DIALOG_TYPE
          The dialog type.
static java.lang.String LIST_COLUMN_URI
          List column id constant.
static java.lang.String PARAM_APPENDSUFFIXHTML
          Request parameter name for the append html suffix checkbox.
static java.lang.String PARAM_CURRENTFOLDER
          Request parameter name for the current folder name.
static java.lang.String PARAM_NEWFORMURI
          Request parameter name for the new form uri.
static java.lang.String PARAM_NEWRESOURCEEDITPROPS
          Request parameter name for the new resource edit properties flag.
static java.lang.String PARAM_NEWRESOURCETYPE
          Request parameter name for the new resource type.
static java.lang.String PARAM_NEWRESOURCEURI
          Request parameter name for the new resource uri.
static java.lang.String SESSION_ATTR_ADVANCED
          Session attribute to store advanced mode.
static java.lang.String SESSION_ATTR_PAGE
          Session attribute to store current page.
static java.lang.String VALUE_DEFAULT
          The property value for available resource to reset behaviour to default dialog.
 
Fields inherited from class org.opencms.workplace.list.A_CmsListResourceTypeDialog
LIST_ACTION_SEL, LIST_COLUMN_ICON, LIST_COLUMN_NAME, LIST_COLUMN_SELECT, LIST_DETAIL_DESCRIPTION, LIST_ID, PARAM_SELECTED_TYPE
 
Fields inherited from class org.opencms.workplace.list.A_CmsListDialog
ACTION_LIST_INDEPENDENT_ACTION, ACTION_LIST_MULTI_ACTION, ACTION_LIST_SEARCH, ACTION_LIST_SELECT_PAGE, ACTION_LIST_SINGLE_ACTION, ACTION_LIST_SORT, ICON_ACTIVE, ICON_ADD, ICON_DELETE, ICON_DETAILS_HIDE, ICON_DETAILS_SHOW, ICON_DISABLED, ICON_INACTIVE, ICON_MINUS, ICON_MULTI_ACTIVATE, ICON_MULTI_ADD, ICON_MULTI_DEACTIVATE, ICON_MULTI_DELETE, ICON_MULTI_MINUS, LIST_INDEPENDENT_ACTION, LIST_MULTI_ACTION, LIST_SEARCH, LIST_SELECT_PAGE, LIST_SINGLE_ACTION, LIST_SORT, PARAM_FORMNAME, PARAM_LIST_ACTION, PARAM_PAGE, PARAM_SEARCH_FILTER, PARAM_SEL_ITEMS, PARAM_SORT_COL
 
Fields inherited from class org.opencms.workplace.CmsDialog
ACTION_CANCEL, ACTION_CLOSEPOPUP, ACTION_CLOSEPOPUP_SAVE, ACTION_CONFIRMED, ACTION_CONTINUE, ACTION_DEFAULT, ACTION_LOCKS_CONFIRMED, ACTION_OK, ACTION_REPORT_BEGIN, ACTION_REPORT_END, ACTION_REPORT_UPDATE, ACTION_SET, ACTION_WAIT, ATTRIBUTE_THROWABLE, BUTTON_ADVANCED, BUTTON_BACK, BUTTON_CANCEL, BUTTON_CLOSE, BUTTON_CONTINUE, BUTTON_DETAILS, BUTTON_DISCARD, BUTTON_EDIT, BUTTON_OK, BUTTON_OK_NO_SUBMIT, BUTTON_SET, DIALOG_BACK, DIALOG_CANCEL, DIALOG_CONFIRMED, DIALOG_CONTINUE, DIALOG_INITIAL, DIALOG_LOCKS_CONFIRMED, DIALOG_OK, DIALOG_SET, DIALOG_WAIT, PARAM_ACTION, PARAM_CLOSELINK, PARAM_DIALOGTYPE, PARAM_ERRORSTACK, PARAM_FILE, PARAM_FRAMENAME, PARAM_ISPOPUP, PARAM_LOCK, PARAM_MESSAGE, PARAM_ORIGINALPARAMS, PARAM_PREACTIONDONE, PARAM_REDIRECT, PARAM_RESOURCE, PARAM_TARGET, PARAM_THREAD, PARAM_THREAD_HASNEXT, PARAM_TITLE, REPORT_BEGIN, REPORT_END, REPORT_UPDATE
 
Fields inherited from class org.opencms.workplace.tools.CmsToolDialog
PARAM_BASE, PARAM_FORCE, PARAM_PATH, PARAM_ROOT, PARAM_STYLE, STYLE_NEW
 
Fields inherited from class org.opencms.workplace.CmsWorkplace
DEBUG, DEFAULT_LANGUAGE, DEFAULT_LOCALE, DIALOG_PATH_COMMON, FILE_DIALOG_CLOSE, FILE_DIALOG_SCREEN_CONFIRM, FILE_DIALOG_SCREEN_ERROR, FILE_DIALOG_SCREEN_ERRORPAGE, FILE_DIALOG_SCREEN_WAIT, FILE_EXPLORER_FILELIST, FILE_REPORT_OUTPUT, HTML_END, HTML_START, PARAM_WP_EXPLORER_RESOURCE, PARAM_WP_PROJECT, PARAM_WP_SITE, PATH_DIALOGS, PATH_WORKPLACE, REQUEST_ATTRIBUTE_MULTIPART, REQUEST_ATTRIBUTE_RELOADTREE, RFS_PATH_RESOURCES, SESSION_WORKPLACE_CLASS, TEMP_FILE_PREFIX, VFS_DIR_DEFAULTBODIES, VFS_DIR_TEMPLATES, VFS_PATH_COMMONS, VFS_PATH_EDITORS, VFS_PATH_GALLERIES, VFS_PATH_LOCALES, VFS_PATH_MODULES, VFS_PATH_RESOURCES, VFS_PATH_SYSTEM, VFS_PATH_VIEWS, VFS_PATH_WORKPLACE
 
Constructor Summary
CmsNewResource(CmsJspActionElement jsp)
          Public constructor with JSP action element.
CmsNewResource(javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Public constructor with JSP variables.
 
Method Summary
 void actionCloseDialog()
          Used to close the current JSP dialog.
 void actionCreateResource()
          Creates the resource using the specified resource name and the newresourcetype parameter.
 void actionDialog()
          Performs the dialog actions depending on the initialized action.
 void actionEditProperties()
          Forwards to the property dialog if the resourceeditprops parameter is true.
 void actionSelect()
          Forwards to the next page of the new resource wizard after selecting the new resource type.
protected  java.lang.String appendSuffixHtml(java.lang.String resourceName, boolean forceSuffix)
          Appends the suffix of the first default file suffix to the given resource name if no suffix is present and the append suffix option is checked.
protected  void clearSession()
          Clears the session attributes storing the page and dialog mode.
protected  java.lang.String computeFullResourceName()
          Appends the full path to the new resource name given in the resource parameter.
 java.lang.String computeNewTitleProperty()
          Returns the value for the Title property from the given resource name.
static java.lang.String computeNewTitleProperty(java.lang.String name)
          Returns the value for the Title property from the given resource name.
protected static CmsProperty createPropertyObject(java.lang.String name, java.lang.String value)
          Creates a single property object and sets the value individual or shared depending on the OpenCms settings.
protected static java.util.List createResourceProperties(CmsObject cms, java.lang.String resourceName, java.lang.String resTypeName, java.lang.String title)
          Returns the properties to create automatically with the new VFS resource.
protected  java.util.List createResourceProperties(java.lang.String resourceName, java.lang.String resTypeName, java.lang.String title)
          Returns the properties to create automatically with the new VFS resource.
protected  java.lang.String customHtmlStart()
          Can be overwritten to add some code before the list.
 java.lang.String dialogButtons()
          Builds a default button row with a continue and cancel button.
 java.lang.String dialogButtonsAdvancedNextCancel(java.lang.String advancedAttrs, java.lang.String nextAttrs, java.lang.String cancelAttrs)
          Builds a button row with an optional "next", "advanced" and a "cancel" button.
protected  void dialogButtonsHtml(java.lang.StringBuffer result, int button, java.lang.String attribute)
          Renders the HTML for a single input button of a specified type.
 java.lang.String dialogButtonsNextCancel(java.lang.String nextAttrs, java.lang.String cancelAttrs)
          Builds a button row with a "next" and a "cancel" button.
protected  java.util.List getListItems()
          Should generate a list with the list items to be displayed.
static java.lang.Object getNewResourceHandler(java.lang.String type, java.lang.String defaultClassName, javax.servlet.jsp.PageContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          A factory to return handlers to create new resources.
 java.lang.String getParamAppendSuffixHtml()
          Returns the parameter to check if a ".html" suffix should be added to the new resource name.
 java.lang.String getParamCurrentFolder()
          Returns the current folder set by the http request.
 java.lang.String getParamDialogmode()
          Returns the value of the dialogmode parameter, or null if this parameter was not provided.
 java.lang.String getParamNewFormUri()
          Returns the new form URI parameter.
 java.lang.String getParamNewResourceEditProps()
          Returns the new resource edit properties flag parameter.
 java.lang.String getParamNewResourceType()
          Returns the new resource type parameter.
 java.lang.String getParamNewResourceUri()
          Returns the new resource URI parameter.
 java.lang.String getParamPage()
          Returns the paramPage.
 java.lang.String getSuffixHtml()
          Returns the suffix of the first default file.
protected  java.lang.String getTitle()
          Returns the title to use for the dialog.
protected  void initWorkplaceRequestValues(CmsWorkplaceSettings settings, javax.servlet.http.HttpServletRequest request)
          Analyzes the request for workplace parameters and adjusts the workplace settings accordingly.
 boolean isCreateIndexMode()
          Returns true if the current mode is: create an index page in a newly created folder.
 boolean isResourceCreated()
          Returns true if the resource is created successfully; otherwise false.
 java.lang.String paramsAsHidden()
          Overrides the super implementation to avoid problems with double reqource input fields.
protected  void setColumns(CmsListMetadata metadata)
          Should create the columns and add them to the given list metadata object.
protected  void setInitialResourceName()
          Sets the initial resource name of the new page.
 void setParamAppendSuffixHtml(java.lang.String paramAppendSuffixHtml)
          Sets the parameter to check if a ".html" suffix should be added to the new resource name.
 void setParamCurrentFolder(java.lang.String paramCurrentFolder)
          Sets the current folder.
 void setParamDialogmode(java.lang.String value)
          Sets the value of the dialogmode parameter.
 void setParamNewFormUri(java.lang.String paramNewFormUri)
          Sets the new form URI parameter.
 void setParamNewResourceEditProps(java.lang.String newResourceEditProps)
          Sets the new resource edit properties flag parameter.
 void setParamNewResourceType(java.lang.String newResourceType)
          Sets the new resource type parameter.
 void setParamNewResourceUri(java.lang.String newResourceUri)
          Sets the new resource URI parameter.
 void setParamPage(java.lang.String paramPage)
          Sets the paramPage.
 void setResourceCreated(boolean successfullyCreated)
          Sets the boolean flag successfullyCreated.
 
Methods inherited from class org.opencms.workplace.list.A_CmsListResourceTypeDialog
customHtmlBeforeList, customHtmlEnd, defaultActionHtmlContent, executeListMultiActions, executeListSingleActions, fillDetails, getParamSelectedType, paramsAsHidden, setIndependentActions, setMultiActions, setParamSelectedType
 
Methods inherited from class org.opencms.workplace.list.A_CmsListDialog
defaultActionHtml, defaultActionHtmlEnd, defaultActionHtmlStart, displayDialog, displayDialog, executeDefaultActions, executeListIndepActions, executeSearch, executeSelectPage, executeSort, fillList, getList, getListId, getListObject, getListState, getMetadata, getMetadata, getParamFormName, getParamListAction, getParamSearchFilter, getParamSelItems, getParamSortCol, getSelectedItem, getSelectedItems, initializeDetail, isActive, listRecovery, listSave, refreshList, removeList, setList, setListObject, setParamFormName, setParamListAction, setParamSearchFilter, setParamSelItems, setParamSortCol, setSearchAction, throwListUnsupportedActionException, validateParamaters, writeDialog
 
Methods inherited from class org.opencms.workplace.CmsDialog
appendDelimiter, buildAjaxResultContainer, buildAjaxWaitMessage, buildLockAdditionalOptions, buildLockConfirmationMessageJS, buildLockDialog, buildLockDialog, buildLockHeaderBox, checkResourcePermissions, checkResourcePermissions, computeCurrentFolder, dialog, dialogBlock, dialogBlockEnd, dialogBlockStart, dialogButtonRow, dialogButtonRowEnd, dialogButtonRowStart, dialogButtons, dialogButtonsClose, dialogButtonsClose, dialogButtonsCloseDetails, dialogButtonsOk, dialogButtonsOk, dialogButtonsOkCancel, dialogButtonsOkCancel, dialogButtonsOkCancelAdvanced, dialogButtonsSetOkCancel, dialogContent, dialogContentEnd, dialogContentStart, dialogEnd, dialogHead, dialogHorizontalSpacer, dialogLockButtons, dialogRow, dialogRowEnd, dialogRowStart, dialogScriptSubmit, dialogSeparator, dialogSpacer, dialogStart, dialogStart, dialogSubheadline, dialogToggleStart, dialogWhiteBox, dialogWhiteBoxEnd, dialogWhiteBoxStart, getAction, getAdministrationBackLink, getCancelAction, getDialogRealUri, getDialogUri, getOnlineHelpUriCustom, getParamAction, getParamCloseLink, getParamDialogtype, getParamFramename, getParamIsPopup, getParamMessage, getParamOriginalParams, getParamPreActionDone, getParamRedirect, getParamResource, getParamTitle, getState, hasCorrectLockstate, hasSiblings, htmlStart, htmlStart, htmlStart, htmlStartStyle, includeErrorpage, initCmsDialog, isPopup, isPreEditor, pageHtml, pageHtml, setAction, setOnlineHelpUriCustom, setParamAction, setParamCloseLink, setParamDialogtype, setParamFramename, setParamIsPopup, setParamMessage, setParamOriginalParams, setParamPreActionDone, setParamRedirect, setParamResource, setParamTitle
 
Methods inherited from class org.opencms.workplace.tools.CmsToolDialog
dialogTitle, getAdminTool, getCurrentToolPath, getParamBase, getParamForce, getParamPath, getParamRoot, getParamStyle, getParentPath, getToolManager, iconsBlockArea, iconsBlockAreaEnd, iconsBlockAreaStart, initAdminTool, pageBody, pageHtmlStyle, setParamBase, setParamForce, setParamPath, setParamRoot, setParamStyle, useNewStyle
 
Methods inherited from class org.opencms.workplace.CmsWorkplace
addMessages, addMessages, allParamsAsHidden, allParamsAsRequest, allParamValues, bodyEnd, bodyStart, bodyStart, buildSelect, buildSelect, button, button, buttonBar, buttonBar, buttonBarHorizontalLine, buttonBarLabel, buttonBarLabel, buttonBarLine, buttonBarLineSpacer, buttonBarSeparator, buttonBarSpacer, buttonBarStartTab, checkLock, checkLock, checkRole, decodeParamValue, fillParamValues, fillParamValues, getBroadcastMessageString, getCms, getEncoding, getExplorerFileListFullUri, getFrameSource, getJsp, getLocale, getMacroResolver, getMessages, getMultiPartFileItems, getParameterMap, getResourceUri, getResourceUri, getSession, getSettings, getSkinUri, getStyleUri, getStyleUri, getStyleUri, getTemporaryFileName, htmlEnd, initMessages, initSettings, initTimeWarp, initUserSettings, initWorkplaceMembers, initWorkplaceSettings, isForwarded, isHelpEnabled, isSubElement, isTemporaryFile, isTemporaryFileName, key, key, keyDefault, nullToEmpty, paramsAsParameterMap, paramsAsRequest, paramValues, resolveMacros, sendCmsRedirect, sendForward, setForwarded, shortKey, switchToCurrentProject, switchToTempProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_NEWFORM

public static final int ACTION_NEWFORM
The value for the resource name form action.

See Also:
Constant Field Values

ACTION_SUBMITFORM

public static final int ACTION_SUBMITFORM
The value for the resource name form submission action.

See Also:
Constant Field Values

BUTTON_NEXT

public static final int BUTTON_NEXT
Constant for the "Next" button in the build button methods.

See Also:
Constant Field Values

DEFAULT_SUFFIX

public static final java.lang.String DEFAULT_SUFFIX
The default suffix.

See Also:
Constant Field Values

DELIM_PROPERTYVALUES

public static final char DELIM_PROPERTYVALUES
Delimiter for property values, e.g. for available resource types or template sites.

See Also:
Constant Field Values

DIALOG_ADVANCED

public static final java.lang.String DIALOG_ADVANCED
The name for the advanced resource form action.

See Also:
Constant Field Values

DIALOG_NEWFORM

public static final java.lang.String DIALOG_NEWFORM
The name for the resource form action.

See Also:
Constant Field Values

DIALOG_SUBMITFORM

public static final java.lang.String DIALOG_SUBMITFORM
The name for the resource form submission action.

See Also:
Constant Field Values

DIALOG_TYPE

public static final java.lang.String DIALOG_TYPE
The dialog type.

See Also:
Constant Field Values

LIST_COLUMN_URI

public static final java.lang.String LIST_COLUMN_URI
List column id constant.

See Also:
Constant Field Values

PARAM_APPENDSUFFIXHTML

public static final java.lang.String PARAM_APPENDSUFFIXHTML
Request parameter name for the append html suffix checkbox.

See Also:
Constant Field Values

PARAM_CURRENTFOLDER

public static final java.lang.String PARAM_CURRENTFOLDER
Request parameter name for the current folder name.

See Also:
Constant Field Values

PARAM_NEWFORMURI

public static final java.lang.String PARAM_NEWFORMURI
Request parameter name for the new form uri.

See Also:
Constant Field Values

PARAM_NEWRESOURCEEDITPROPS

public static final java.lang.String PARAM_NEWRESOURCEEDITPROPS
Request parameter name for the new resource edit properties flag.

See Also:
Constant Field Values

PARAM_NEWRESOURCETYPE

public static final java.lang.String PARAM_NEWRESOURCETYPE
Request parameter name for the new resource type.

See Also:
Constant Field Values

PARAM_NEWRESOURCEURI

public static final java.lang.String PARAM_NEWRESOURCEURI
Request parameter name for the new resource uri.

See Also:
Constant Field Values

SESSION_ATTR_ADVANCED

public static final java.lang.String SESSION_ATTR_ADVANCED
Session attribute to store advanced mode.

See Also:
Constant Field Values

SESSION_ATTR_PAGE

public static final java.lang.String SESSION_ATTR_PAGE
Session attribute to store current page.

See Also:
Constant Field Values

VALUE_DEFAULT

public static final java.lang.String VALUE_DEFAULT
The property value for available resource to reset behaviour to default dialog.

See Also:
Constant Field Values
Constructor Detail

CmsNewResource

public CmsNewResource(CmsJspActionElement jsp)
Public constructor with JSP action element.

Parameters:
jsp - an initialized JSP action element

CmsNewResource

public CmsNewResource(javax.servlet.jsp.PageContext context,
                      javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse res)
Public constructor with JSP variables.

Parameters:
context - the JSP page context
req - the JSP request
res - the JSP response
Method Detail

computeNewTitleProperty

public static java.lang.String computeNewTitleProperty(java.lang.String name)
Returns the value for the Title property from the given resource name.

Parameters:
name - the name of the resource
Returns:
the value for the Title property from the given resource name

getNewResourceHandler

public static java.lang.Object getNewResourceHandler(java.lang.String type,
                                                     java.lang.String defaultClassName,
                                                     javax.servlet.jsp.PageContext context,
                                                     javax.servlet.http.HttpServletRequest req,
                                                     javax.servlet.http.HttpServletResponse res)
                                              throws CmsRuntimeException
A factory to return handlers to create new resources.

Parameters:
type - the resource type name to get a new resource handler for, as specified in the explorer type settings
defaultClassName - a default handler class name, to be used if the handler class specified in the explorer type settings cannot be found
context - the JSP page context
req - the JSP request
res - the JSP response
Returns:
a new instance of the handler class
Throws:
CmsRuntimeException - if something goes wrong

createPropertyObject

protected static CmsProperty createPropertyObject(java.lang.String name,
                                                  java.lang.String value)
Creates a single property object and sets the value individual or shared depending on the OpenCms settings.

Parameters:
name - the name of the property
value - the value to set
Returns:
an initialized property object

createResourceProperties

protected static java.util.List createResourceProperties(CmsObject cms,
                                                         java.lang.String resourceName,
                                                         java.lang.String resTypeName,
                                                         java.lang.String title)
Returns the properties to create automatically with the new VFS resource.

If configured, the Title and Navigation properties are set on resource creation.

Parameters:
cms - the initialized CmsObject
resourceName - the full resource name
resTypeName - the name of the resource type
title - the Title String to use for the property values
Returns:
the List of initialized property objects

actionCloseDialog

public void actionCloseDialog()
                       throws javax.servlet.jsp.JspException
Used to close the current JSP dialog.

This method overwrites the close dialog method in the super class, because in case a new folder was created before, after this dialog the tree view has to be refreshed.

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.

Overrides:
actionCloseDialog in class CmsDialog
Throws:
javax.servlet.jsp.JspException - if including an element fails

actionCreateResource

public void actionCreateResource()
                          throws javax.servlet.jsp.JspException
Creates the resource using the specified resource name and the newresourcetype parameter.

Throws:
javax.servlet.jsp.JspException - if inclusion of error dialog fails

actionDialog

public void actionDialog()
                  throws javax.servlet.jsp.JspException,
                         javax.servlet.ServletException,
                         java.io.IOException
Description copied from class: A_CmsListDialog
Performs the dialog actions depending on the initialized action.

Overrides:
actionDialog in class A_CmsListResourceTypeDialog
Throws:
javax.servlet.jsp.JspException - if dialog actions fail
javax.servlet.ServletException - in case of errors forwarding to the required result page
java.io.IOException - in case of errors forwarding to the required result page
See Also:
A_CmsListDialog.actionDialog()

actionEditProperties

public void actionEditProperties()
                          throws java.io.IOException,
                                 javax.servlet.jsp.JspException,
                                 javax.servlet.ServletException
Forwards to the property dialog if the resourceeditprops parameter is true.

If the parameter is not true, the dialog will be closed.

Throws:
java.io.IOException - if forwarding to the property dialog fails
javax.servlet.ServletException - if forwarding to the property dialog fails
javax.servlet.jsp.JspException - if an inclusion fails

actionSelect

public void actionSelect()
                  throws java.io.IOException,
                         javax.servlet.ServletException
Forwards to the next page of the new resource wizard after selecting the new resource type.

Throws:
java.io.IOException - if forwarding fails
javax.servlet.ServletException - if forwarding fails

computeNewTitleProperty

public java.lang.String computeNewTitleProperty()
Returns the value for the Title property from the given resource name.

Returns:
the value for the Title property from the given resource name

dialogButtons

public java.lang.String dialogButtons()
Builds a default button row with a continue and cancel button.

Override this to have special buttons for your dialog.

Overrides:
dialogButtons in class A_CmsListResourceTypeDialog
Returns:
the button row

dialogButtonsAdvancedNextCancel

public java.lang.String dialogButtonsAdvancedNextCancel(java.lang.String advancedAttrs,
                                                        java.lang.String nextAttrs,
                                                        java.lang.String cancelAttrs)
Builds a button row with an optional "next", "advanced" and a "cancel" button.

Parameters:
advancedAttrs - optional attributes for the advanced button
nextAttrs - optional attributes for the next button
cancelAttrs - optional attributes for the cancel button
Returns:
the button row

dialogButtonsNextCancel

public java.lang.String dialogButtonsNextCancel(java.lang.String nextAttrs,
                                                java.lang.String cancelAttrs)
Builds a button row with a "next" and a "cancel" button.

Parameters:
nextAttrs - optional attributes for the next button
cancelAttrs - optional attributes for the cancel button
Returns:
the button row

getParamAppendSuffixHtml

public java.lang.String getParamAppendSuffixHtml()
Returns the parameter to check if a ".html" suffix should be added to the new resource name.

Returns:
the parameter to check if a ".html" suffix should be added to the new resource name

getParamCurrentFolder

public java.lang.String getParamCurrentFolder()
Returns the current folder set by the http request.

If the request parameter value is null/empty then returns the default computed folder.

Returns:
the current folder set by the request param or the computed current folder

getParamDialogmode

public java.lang.String getParamDialogmode()
Returns the value of the dialogmode parameter, or null if this parameter was not provided.

The dialogmode parameter stores the different modes of the property dialog, e.g. for displaying other buttons in the new resource wizard.

Returns:
the value of the usetempfileproject parameter

getParamNewFormUri

public java.lang.String getParamNewFormUri()
Returns the new form URI parameter.

Returns:
the new form URI parameter

getParamNewResourceEditProps

public java.lang.String getParamNewResourceEditProps()
Returns the new resource edit properties flag parameter.

Returns:
the new resource edit properties flag parameter

getParamNewResourceType

public java.lang.String getParamNewResourceType()
Returns the new resource type parameter.

Returns:
the new resource type parameter

getParamNewResourceUri

public java.lang.String getParamNewResourceUri()
Returns the new resource URI parameter.

Returns:
the new resource URI parameter

getParamPage

public java.lang.String getParamPage()
Returns the paramPage.

Overrides:
getParamPage in class A_CmsListDialog
Returns:
the paramPage

getSuffixHtml

public java.lang.String getSuffixHtml()
Returns the suffix of the first default file. If nothing is defined, then ".html" is returned.

Returns:
the suffix of the first default file otherwise ".html"

isCreateIndexMode

public boolean isCreateIndexMode()
Returns true if the current mode is: create an index page in a newly created folder.

Returns:
true if we are in wizard mode to create an index page, otherwise false

isResourceCreated

public boolean isResourceCreated()
Returns true if the resource is created successfully; otherwise false.

Returns:
true if the resource is created successfully; otherwise false

paramsAsHidden

public java.lang.String paramsAsHidden()
Overrides the super implementation to avoid problems with double reqource input fields.

Overrides:
paramsAsHidden in class A_CmsListResourceTypeDialog
Returns:
all initialized parameters of the current workplace class as hidden field tags that can be inserted in a html form
See Also:
CmsWorkplace.paramsAsHidden()

setParamAppendSuffixHtml

public void setParamAppendSuffixHtml(java.lang.String paramAppendSuffixHtml)
Sets the parameter to check if a ".html" suffix should be added to the new resource name.

Parameters:
paramAppendSuffixHtml - the parameter to check if a ".html" suffix should be added to the new resource name

setParamCurrentFolder

public void setParamCurrentFolder(java.lang.String paramCurrentFolder)
Sets the current folder.

Parameters:
paramCurrentFolder - the current folder to set

setParamDialogmode

public void setParamDialogmode(java.lang.String value)
Sets the value of the dialogmode parameter.

Parameters:
value - the value to set

setParamNewFormUri

public void setParamNewFormUri(java.lang.String paramNewFormUri)
Sets the new form URI parameter.

Parameters:
paramNewFormUri - the new form URI parameter to set

setParamNewResourceEditProps

public void setParamNewResourceEditProps(java.lang.String newResourceEditProps)
Sets the new resource edit properties flag parameter.

Parameters:
newResourceEditProps - the new resource edit properties flag parameter

setParamNewResourceType

public void setParamNewResourceType(java.lang.String newResourceType)
Sets the new resource type parameter.

Parameters:
newResourceType - the new resource type parameter

setParamNewResourceUri

public void setParamNewResourceUri(java.lang.String newResourceUri)
Sets the new resource URI parameter.

Parameters:
newResourceUri - the new resource URI parameter

setParamPage

public void setParamPage(java.lang.String paramPage)
Sets the paramPage.

Overrides:
setParamPage in class A_CmsListDialog
Parameters:
paramPage - the paramPage to set

setResourceCreated

public void setResourceCreated(boolean successfullyCreated)
Sets the boolean flag successfullyCreated.

Parameters:
successfullyCreated - a boolean flag that indicates if the create resource operation was successfull or not

appendSuffixHtml

protected java.lang.String appendSuffixHtml(java.lang.String resourceName,
                                            boolean forceSuffix)
Appends the suffix of the first default file suffix to the given resource name if no suffix is present and the append suffix option is checked.

Parameters:
resourceName - the resource name to check
forceSuffix - if true, the suffix is appended overriding the append suffix option
Returns:
the resource name with the default file suffix if no suffix was present and the append suffix option is checked

clearSession

protected void clearSession()
Clears the session attributes storing the page and dialog mode.


computeFullResourceName

protected java.lang.String computeFullResourceName()
Appends the full path to the new resource name given in the resource parameter.

Returns:
the full path of the new resource

createResourceProperties

protected java.util.List createResourceProperties(java.lang.String resourceName,
                                                  java.lang.String resTypeName,
                                                  java.lang.String title)
Returns the properties to create automatically with the new VFS resource.

If configured, the Title and Navigation properties are set on resource creation.

Parameters:
resourceName - the full resource name
resTypeName - the name of the resource type
title - the Title String to use for the property values
Returns:
the List of initialized property objects

customHtmlStart

protected java.lang.String customHtmlStart()
Description copied from class: A_CmsListDialog
Can be overwritten to add some code before the list.

Overrides:
customHtmlStart in class A_CmsListResourceTypeDialog
Returns:
custom html code
See Also:
A_CmsListDialog.customHtmlStart()

dialogButtonsHtml

protected void dialogButtonsHtml(java.lang.StringBuffer result,
                                 int button,
                                 java.lang.String attribute)
Description copied from class: CmsDialog
Renders the HTML for a single input button of a specified type.

Overrides:
dialogButtonsHtml in class CmsDialog
Parameters:
result - a string buffer where the rendered HTML gets appended to
button - a integer key to identify the button
attribute - an optional string with possible tag attributes, or null
See Also:
CmsDialog.dialogButtonsHtml(java.lang.StringBuffer, int, java.lang.String)

getListItems

protected java.util.List getListItems()
Description copied from class: A_CmsListDialog
Should generate a list with the list items to be displayed.

Specified by:
getListItems in class A_CmsListDialog
Returns:
a list of CmsListItems
See Also:
A_CmsListDialog.getListItems()

getTitle

protected java.lang.String getTitle()
Returns the title to use for the dialog.

Checks if a custom title key is given in the explorer type settings and otherwise returns the default title from CmsWorkplaceMessages.getNewResourceTitle(org.opencms.workplace.CmsWorkplace, String).

Returns:
the title to use for the dialog

initWorkplaceRequestValues

protected void initWorkplaceRequestValues(CmsWorkplaceSettings settings,
                                          javax.servlet.http.HttpServletRequest request)
Description copied from class: CmsWorkplace
Analyzes the request for workplace parameters and adjusts the workplace settings accordingly.

Overrides:
initWorkplaceRequestValues in class A_CmsListDialog
Parameters:
settings - the workplace settings
request - the current request
See Also:
CmsWorkplace.initWorkplaceRequestValues(org.opencms.workplace.CmsWorkplaceSettings, javax.servlet.http.HttpServletRequest)

setColumns

protected void setColumns(CmsListMetadata metadata)
Description copied from class: A_CmsListDialog
Should create the columns and add them to the given list metadata object.

This method will be just executed once, the first time the constructor is called.

Overrides:
setColumns in class A_CmsListResourceTypeDialog
Parameters:
metadata - the list metadata
See Also:
A_CmsListDialog.setColumns(org.opencms.workplace.list.CmsListMetadata)

setInitialResourceName

protected void setInitialResourceName()
Sets the initial resource name of the new page.

This is used for the "new" wizard after creating a new folder followed by the "create index file" procedure.