Class CmsNewResourceXmlPage


  • public class CmsNewResourceXmlPage
    extends java.lang.Object
    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

      Fields 
      Modifier and Type Field Description
      static java.lang.String PARAM_BODYFILE
      Request parameter name for the selected body.
      static java.lang.String PARAM_SUFFIXCHECK
      Request parameter name for the suffix check.
      static java.lang.String PARAM_TEMPLATE
      Request parameter name for the selected template.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.TreeMap<java.lang.String,​java.lang.String> getBodies​(org.opencms.file.CmsObject cms, java.lang.String currWpPath)
      Returns a sorted Map of all available body files of the OpenCms modules.
      static java.util.TreeMap<java.lang.String,​java.lang.String> getBodies​(org.opencms.file.CmsObject cms, java.lang.String currWpPath, boolean emptyMap)
      Returns a sorted Map of all available body files of the OpenCms modules.
      protected static java.util.TreeMap<java.lang.String,​java.lang.String> getElements​(org.opencms.file.CmsObject cms, java.lang.String elementFolder, java.lang.String currWpPath, boolean emptyMap)
      Returns a sorted Map of all available elements in the specified subfolder of the OpenCms modules.
      static java.util.TreeMap<java.lang.String,​java.lang.String> getTemplates​(org.opencms.file.CmsObject cms, java.lang.String currWpPath)
      Returns a sorted Map of all available templates of the OpenCms modules.
      static java.util.TreeMap<java.lang.String,​java.lang.String> getTemplates​(org.opencms.file.CmsObject cms, java.lang.String currWpPath, boolean emptyMap)
      Returns a sorted Map of all available templates of the OpenCms modules.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getBodies

        public static java.util.TreeMap<java.lang.String,​java.lang.String> getBodies​(org.opencms.file.CmsObject cms,
                                                                                           java.lang.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 object
        currWpPath - 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 java.util.TreeMap<java.lang.String,​java.lang.String> getBodies​(org.opencms.file.CmsObject cms,
                                                                                           java.lang.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 object
        currWpPath - the current path in the OpenCms workplace
        emptyMap - 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 java.util.TreeMap<java.lang.String,​java.lang.String> getTemplates​(org.opencms.file.CmsObject cms,
                                                                                              java.lang.String currWpPath)
                                                                                       throws org.opencms.main.CmsException
        Returns a sorted Map of all available templates of the OpenCms modules.

        Parameters:
        cms - the current cms object
        currWpPath - 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 java.util.TreeMap<java.lang.String,​java.lang.String> getTemplates​(org.opencms.file.CmsObject cms,
                                                                                              java.lang.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 object
        currWpPath - the current path in the OpenCms workplace
        emptyMap - 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 java.util.TreeMap<java.lang.String,​java.lang.String> getElements​(org.opencms.file.CmsObject cms,
                                                                                                java.lang.String elementFolder,
                                                                                                java.lang.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 object
        elementFolder - the module subfolder to search for elements
        currWpPath - the current path in the OpenCms workplace
        emptyMap - 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