Class AbstractEnvironment

    • Constructor Detail

      • AbstractEnvironment

        public AbstractEnvironment()
    • Method Detail

      • getWServletPath

        public String getWServletPath()
        Construct the path to the support servlet. Web components that need to construct a URL to target this servlet will use this method.
        Specified by:
        getWServletPath in interface Environment
        Returns:
        the path to the AJAX servlet.
      • getThemePath

        public String getThemePath()
        Description copied from interface: Environment
        Gets the base URL under which the web content for the Theme is hosted. Web content is static content such as css, js, html, and image files.
        Specified by:
        getThemePath in interface Environment
        Returns:
        the theme path.
      • getPostPath

        public String getPostPath()
        Description copied from interface: Environment
        Gets the relative URL path to which this WComponent application should post its requests.

        Examples of what this method may return:

        Servlet
        /app
        Specified by:
        getPostPath in interface Environment
        Returns:
        the post path.
      • setPostPath

        public void setPostPath​(String postPath)
        Sets the post path.
        Specified by:
        setPostPath in interface Environment
        Parameters:
        postPath - the post path.
      • getAppHostPath

        public String getAppHostPath()
        Description copied from interface: Environment
        Gets the base URL under which web applications are hosted. This AppHostPath can be used to create url links to applications that have been given fixed relative names.
        Specified by:
        getAppHostPath in interface Environment
        Returns:
        the app host path.
      • getBaseUrl

        public String getBaseUrl()
        Description copied from interface: Environment
        Get the base url at which this web application is hosted.

        Implementations ensure that this method returns a URL WITHOUT a trailing slash, as in above example.

        Specified by:
        getBaseUrl in interface Environment
        Returns:
        the base url.
      • getHostFreeBaseUrl

        public String getHostFreeBaseUrl()
        Description copied from interface: Environment
        Get the "host-free" part of the base url for this web application. Eg, if the base url is http://localhost:8080/visas, then the "host-free" part is "/visas".
        Specified by:
        getHostFreeBaseUrl in interface Environment
        Returns:
        the host name free base url.
      • getSessionToken

        public String getSessionToken()
        Description copied from interface: Environment
        Gets the session token. This is intended to make sure the request is for the correct session.
        Specified by:
        getSessionToken in interface Environment
        Returns:
        the current session token.
      • setSessionToken

        public void setSessionToken​(String sessionToken)
        Sets the current session token.
        Specified by:
        setSessionToken in interface Environment
        Parameters:
        sessionToken - the session token to set.
      • getStep

        public int getStep()
        Description copied from interface: Environment
        Gets the page step number. This is intended to make sure the request being processed is on the correct step.
        Specified by:
        getStep in interface Environment
        Returns:
        the current step.
      • setStep

        public void setStep​(int step)
        Sets the current set.
        Specified by:
        setStep in interface Environment
        Parameters:
        step - the step to set.
      • getActionStep

        @Deprecated
        public int getActionStep()
        Deprecated.
        portal specific
        Gets the page action step number. This is intended to make sure the request being processed is on the correct action step.
        Specified by:
        getActionStep in interface Environment
        Returns:
        the page action step number.
      • setActionStep

        @Deprecated
        public void setActionStep​(int actionStep)
        Deprecated.
        portal specific
        Sets the page action step number.
        Specified by:
        setActionStep in interface Environment
        Parameters:
        actionStep - the step action number.
      • setFormEncType

        public void setFormEncType​(String formEncType)
        Sets the form encoding type.
        Specified by:
        setFormEncType in interface Environment
        Parameters:
        formEncType - the form encoding type.
      • setAppHostPath

        protected void setAppHostPath​(String appHostPath)
        Sets the app host path.
        Parameters:
        appHostPath - the app host path.
      • setBaseUrl

        protected void setBaseUrl​(String baseUrl)
        Sets the base url.
        Parameters:
        baseUrl - the base url
      • setHostFreeBaseUrl

        protected void setHostFreeBaseUrl​(String hostFreeBaseUrl)
        Sets the host free base url.
        Parameters:
        hostFreeBaseUrl - the host free base url.
      • setUserAgentInfo

        public void setUserAgentInfo​(UserAgentInfo userAgentInfo)
        Sets the user-agent info.
        Parameters:
        userAgentInfo - the user-agent info to set.