Class ShortViewURLConstructor

    • Method Detail

      • initialize

        public void initialize​(Engine engine,
                               java.util.Properties properties)

        Initializes this Engine component. Note that the engine is not fully initialized at this point, so don't do anything fancy here - use lazy init, if you have to.

        Specified by:
        initialize in interface Initializable
        initialize in class ShortURLConstructor
        engine - Engine performing the initialization.
        properties - Properties for setup.
      • makeURL

        public java.lang.String makeURL​(java.lang.String context,
                                        java.lang.String name,
                                        java.lang.String parameters)
        Constructs the URL with a bunch of parameters.
        Specified by:
        makeURL in interface URLConstructor
        makeURL in class ShortURLConstructor
        context - The request context (@see WikiContext) that you want the URL for
        name - The page name (or in case of WikiContext.NONE, the auxiliary JSP page or resource you want to point at). This must be URL encoded. Null is NOT safe.
        parameters - If null or empty, no parameters are added. If null or empty, no parameters are added. An URL parameter string (these must be URL-encoded, and separated with &)
        An URL pointing to the resource. Must never return null - throw an InternalWikiException if something goes wrong.
      • getForwardPage

        public java.lang.String getForwardPage​(javax.servlet.http.HttpServletRequest request)
        Since we're only called from WikiServlet, where we get the VIEW requests, we can safely return this.
        Specified by:
        getForwardPage in interface URLConstructor
        getForwardPage in class ShortURLConstructor
        request - The HTTP Request that was used to end up in this page.
        always returns "Wiki.jsp"