Class PageWebResourceFunctionMapper

    • Field Detail

      • BEFORE_WRITE_FUNCTION_NAME

        protected static final java.lang.String BEFORE_WRITE_FUNCTION_NAME
        Define the before write function name.
        Since:
        7.0.0
        See Also:
        Constant Field Values
    • Constructor Detail

      • PageWebResourceFunctionMapper

        public PageWebResourceFunctionMapper​(PageWebResource pageWebResource,
                                             javax.servlet.http.HttpServletRequest request)
        Creates a new instance with the given parameters.
        Parameters:
        pageWebResource - the page web resource.
        Since:
        7.0.0
    • Method Detail

      • resolveFunction

        public java.lang.reflect.Method resolveFunction​(java.lang.String prefix,
                                                        java.lang.String localName)
        Specified by:
        resolveFunction in interface javax.servlet.jsp.el.FunctionMapper
        Overrides:
        resolveFunction in class PortalFunctionMapper
      • resolveURL

        public static java.lang.String resolveURL​(java.lang.String url)
                                           throws PortalException
        Resolves the given URL.
        The URL will only be resolved against the applied themes if the requested page was previously set within beforeEvaluation().
        Parameters:
        url - the URL to be resolved.
        Returns:
        the resolved URL.
        Throws:
        PortalException
        Since:
        7.0.0
      • writeIfNotYetWritten

        public static java.lang.String writeIfNotYetWritten​(java.lang.String fragment,
                                                            java.lang.String key)
                                                     throws java.io.IOException
        Returns the given fragment if the given key was not used yet. Otherwise returns null.
        Parameters:
        fragment - the fragment to be rendered in before writer.
        key - the unique key to use.
        Throws:
        java.io.IOException
        Since:
        7.0.0
      • localize

        public static java.lang.String localize​(java.lang.String[] args)
                                         throws PortalException
        Resolves the string.
        Parameters:
        args - the localize function parameters.
        1. First argument is the identifier of the string to be localized.
        2. Second argument is optional, and is a list of resource paths separated by ';' to be included in the localization.
        3+. Any extra argument will be considered a localization parameter.
        Returns:
        localized string.
        Throws:
        PortalException - if an error occur localizing the string.
        Since:
        11.0.0