Class CmsUgcSessionFactory


  • public class CmsUgcSessionFactory
    extends java.lang.Object
    Factory to create the form editing sessions.

    • Method Detail

      • setAdminCms

        public static void setAdminCms​(CmsObject adminCms)
        Sets the admin CmsObject instance.
        Parameters:
        adminCms - the admin CmsObject
      • createSession

        public CmsUgcSession createSession​(CmsObject cms,
                                           javax.servlet.http.HttpServletRequest request,
                                           java.lang.String sitePath)
                                    throws CmsUgcException
        Creates a new editing session.

        Parameters:
        cms - the cms context
        request - the request
        sitePath - the configuration site path
        Returns:
        the form session
        Throws:
        CmsUgcException - if creating the session fails
      • createSessionForFile

        public CmsUgcSession createSessionForFile​(CmsObject cms,
                                                  javax.servlet.http.HttpServletRequest request,
                                                  java.lang.String configPath,
                                                  java.lang.String fileName)
                                           throws CmsUgcException
        Creates a new session for a given file.

        Parameters:
        cms - the CMS context to use
        request - the current request
        configPath - the path of the form configuration
        fileName - the file name (*not* path) of the XML content for which the session should be initialized
        Returns:
        the newly created session
        Throws:
        CmsUgcException - if something goes wrong
      • getSession

        public CmsUgcSession getSession​(javax.servlet.http.HttpServletRequest request,
                                        CmsUUID sessionId)
        Returns the session, if already initialized.

        Parameters:
        request - the request
        sessionId - the form session id
        Returns:
        the session