Package org.opencms.workplace.explorer
Class CmsNewResourceXmlPage
java.lang.Object
org.opencms.workplace.explorer.CmsNewResourceXmlPage
The new resource page dialog handles the creation of an xml page.
The following files use this class:
- /commons/newresource_xmlpage.jsp
- Since:
- 6.0.0
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a sorted Map of all available body files of the OpenCms modules.Returns a sorted Map of all available body files of the OpenCms modules.getElements
(org.opencms.file.CmsObject cms, String elementFolder, String currWpPath, boolean emptyMap) Returns a sorted Map of all available elements in the specified subfolder of the OpenCms modules.getTemplates
(org.opencms.file.CmsObject cms, String currWpPath) Returns a sorted Map of all available templates of the OpenCms modules.getTemplates
(org.opencms.file.CmsObject cms, String currWpPath, boolean emptyMap) Returns a sorted Map of all available templates of the OpenCms modules.
-
Field Details
-
PARAM_BODYFILE
Request parameter name for the selected body.- See Also:
-
PARAM_SUFFIXCHECK
Request parameter name for the suffix check.- See Also:
-
PARAM_TEMPLATE
Request parameter name for the selected template.- See Also:
-
-
Constructor Details
-
CmsNewResourceXmlPage
public CmsNewResourceXmlPage()
-
-
Method Details
-
getBodies
public static TreeMap<String,String> getBodies(org.opencms.file.CmsObject cms, String currWpPath) throws org.opencms.main.CmsException Returns a sorted Map of all available body files of the OpenCms modules.- Parameters:
cms
- the current cms objectcurrWpPath
- the current path in the OpenCms workplace- Returns:
- a sorted map with the body file title as key and absolute path to the body file as value
- Throws:
org.opencms.main.CmsException
- if reading a folder or file fails
-
getBodies
public static TreeMap<String,String> getBodies(org.opencms.file.CmsObject cms, String currWpPath, boolean emptyMap) throws org.opencms.main.CmsException Returns a sorted Map of all available body files of the OpenCms modules.- Parameters:
cms
- the current cms objectcurrWpPath
- the current path in the OpenCms workplaceemptyMap
- flag indicating if it is OK to return a filtered empty Map- Returns:
- a sorted map with the body file title as key and absolute path to the body file as value
- Throws:
org.opencms.main.CmsException
- if reading a folder or file fails
-
getTemplates
public static TreeMap<String,String> getTemplates(org.opencms.file.CmsObject cms, String currWpPath) throws org.opencms.main.CmsException Returns a sorted Map of all available templates of the OpenCms modules.- Parameters:
cms
- the current cms objectcurrWpPath
- the current path in the OpenCms workplace- Returns:
- a sorted map with the template title as key and absolute path to the template as value
- Throws:
org.opencms.main.CmsException
- if reading a folder or file fails
-
getTemplates
public static TreeMap<String,String> getTemplates(org.opencms.file.CmsObject cms, String currWpPath, boolean emptyMap) throws org.opencms.main.CmsException Returns a sorted Map of all available templates of the OpenCms modules.- Parameters:
cms
- the current cms objectcurrWpPath
- the current path in the OpenCms workplaceemptyMap
- flag indicating if it is OK to return a filtered empty Map- Returns:
- a sorted map with the template title as key and absolute path to the template as value
- Throws:
org.opencms.main.CmsException
- if reading a folder or file fails
-
getElements
protected static TreeMap<String,String> getElements(org.opencms.file.CmsObject cms, String elementFolder, String currWpPath, boolean emptyMap) throws org.opencms.main.CmsException Returns a sorted Map of all available elements in the specified subfolder of the OpenCms modules.- Parameters:
cms
- the current cms objectelementFolder
- the module subfolder to search for elementscurrWpPath
- the current path in the OpenCms workplaceemptyMap
- flag indicating if it is OK to return a filtered empty Map- Returns:
- a sorted map with the element title as key and absolute path to the element as value
- Throws:
org.opencms.main.CmsException
- if reading a folder or file fails
-