Class PageInfo


  • public class PageInfo
    extends java.lang.Object
    A repository for various info about the translation unit under compilation.
    • Method Detail

      • isTagFile

        public boolean isTagFile()
        Checks if this is a tag file.
        Returns:
        true if this is a tag file
      • isPluginDeclared

        public boolean isPluginDeclared​(java.lang.String id)
        Check if the plugin ID has been previously declared. Make a note that this Id is now declared.
        Parameters:
        id - The plugin ID to check
        Returns:
        true if Id has been declared.
      • addImports

        public void addImports​(java.util.List<java.lang.String> imports)
        Adds multiple imports to this page.
        Parameters:
        imports - The imports to add
      • addImport

        public void addImport​(java.lang.String imp)
        Adds a single import to this page.
        Parameters:
        imp - The import to add
      • getImports

        public java.util.List<java.lang.String> getImports()
        Returns the list of imports for this page.
        Returns:
        The imports list
      • getJspFile

        public java.lang.String getJspFile()
        Returns the JSP file path.
        Returns:
        The JSP file path
      • addDependant

        public void addDependant​(java.lang.String d,
                                 java.lang.Long lastModified)
        Adds a dependent file to this page.
        Parameters:
        d - The dependent file path
        lastModified - The last modified timestamp
      • getDependants

        public java.util.Map<java.lang.String,​java.lang.Long> getDependants()
        Returns the map of dependent files.
        Returns:
        The dependants map
      • getBeanRepository

        public BeanRepository getBeanRepository()
        Returns the bean repository for this page.
        Returns:
        The bean repository
      • setScriptless

        public void setScriptless​(boolean s)
        Sets whether this page is scriptless.
        Parameters:
        s - true if the page is scriptless
      • isScriptless

        public boolean isScriptless()
        Checks if this page is scriptless.
        Returns:
        true if the page is scriptless
      • setScriptingInvalid

        public void setScriptingInvalid​(boolean s)
        Sets whether scripting is invalid for this page.
        Parameters:
        s - true if scripting is invalid
      • isScriptingInvalid

        public boolean isScriptingInvalid()
        Checks if scripting is invalid for this page.
        Returns:
        true if scripting is invalid
      • getIncludePrelude

        public java.util.Collection<java.lang.String> getIncludePrelude()
        Returns the collection of include prelude files.
        Returns:
        The include prelude files
      • setIncludePrelude

        public void setIncludePrelude​(java.util.Collection<java.lang.String> prelude)
        Sets the collection of include prelude files.
        Parameters:
        prelude - The include prelude files
      • getIncludeCoda

        public java.util.Collection<java.lang.String> getIncludeCoda()
        Returns the collection of include coda files.
        Returns:
        The include coda files
      • setIncludeCoda

        public void setIncludeCoda​(java.util.Collection<java.lang.String> coda)
        Sets the collection of include coda files.
        Parameters:
        coda - The include coda files
      • setHasJspRoot

        public void setHasJspRoot​(boolean s)
        Sets whether this page has a JSP root.
        Parameters:
        s - true if the page has a JSP root
      • hasJspRoot

        public boolean hasJspRoot()
        Checks if this page has a JSP root.
        Returns:
        true if the page has a JSP root
      • getOmitXmlDecl

        public java.lang.String getOmitXmlDecl()
        Returns the omit XML declaration setting.
        Returns:
        The omit XML declaration value
      • setOmitXmlDecl

        public void setOmitXmlDecl​(java.lang.String omit)
        Sets the omit XML declaration setting.
        Parameters:
        omit - The omit XML declaration value
      • getDoctypeName

        public java.lang.String getDoctypeName()
        Returns the DOCTYPE name.
        Returns:
        The DOCTYPE name
      • setDoctypeName

        public void setDoctypeName​(java.lang.String doctypeName)
        Sets the DOCTYPE name.
        Parameters:
        doctypeName - The DOCTYPE name
      • getDoctypeSystem

        public java.lang.String getDoctypeSystem()
        Returns the DOCTYPE system identifier.
        Returns:
        The DOCTYPE system identifier
      • setDoctypeSystem

        public void setDoctypeSystem​(java.lang.String doctypeSystem)
        Sets the DOCTYPE system identifier.
        Parameters:
        doctypeSystem - The DOCTYPE system identifier
      • getDoctypePublic

        public java.lang.String getDoctypePublic()
        Returns the DOCTYPE public identifier.
        Returns:
        The DOCTYPE public identifier
      • setDoctypePublic

        public void setDoctypePublic​(java.lang.String doctypePublic)
        Sets the DOCTYPE public identifier.
        Parameters:
        doctypePublic - The DOCTYPE public identifier
      • setIsJspPrefixHijacked

        public void setIsJspPrefixHijacked​(boolean isHijacked)
        Sets whether the JSP prefix has been hijacked.
        Parameters:
        isHijacked - true if the JSP prefix has been hijacked
      • isJspPrefixHijacked

        public boolean isJspPrefixHijacked()
        Checks if the JSP prefix has been hijacked.
        Returns:
        true if the JSP prefix has been hijacked
      • addPrefix

        public void addPrefix​(java.lang.String prefix)
        Adds the given prefix to the set of prefixes of this translation unit.
        Parameters:
        prefix - The prefix to add
      • containsPrefix

        public boolean containsPrefix​(java.lang.String prefix)
        Checks to see if this translation unit contains the given prefix.
        Parameters:
        prefix - The prefix to check
        Returns:
        true if this translation unit contains the given prefix
      • addTaglib

        public void addTaglib​(java.lang.String uri,
                              TagLibraryInfo info)
        Maps the given URI to the given tag library.
        Parameters:
        uri - The URI to map
        info - The tag library to be associated with the given URI
      • getTaglib

        public TagLibraryInfo getTaglib​(java.lang.String uri)
        Gets the tag library corresponding to the given URI.
        Parameters:
        uri - The URI to look up
        Returns:
        Tag library corresponding to the given URI
      • getTaglibs

        public java.util.Collection<TagLibraryInfo> getTaglibs()
        Gets the collection of tag libraries that are associated with a URI.
        Returns:
        Collection of tag libraries
      • hasTaglib

        public boolean hasTaglib​(java.lang.String uri)
        Checks to see if the given URI is mapped to a tag library.
        Parameters:
        uri - The URI to check
        Returns:
        true if the given URI is mapped to a tag library
      • addPrefixMapping

        public void addPrefixMapping​(java.lang.String prefix,
                                     java.lang.String uri)
        Maps the given prefix to the given URI.
        Parameters:
        prefix - The prefix to map
        uri - The URI to be associated with the given prefix
      • pushPrefixMapping

        public void pushPrefixMapping​(java.lang.String prefix,
                                      java.lang.String uri)
        Pushes the given URI onto the stack of URIs to which the given prefix is mapped.
        Parameters:
        prefix - The prefix whose stack of URIs is to be pushed
        uri - The URI to be pushed onto the stack
      • popPrefixMapping

        public void popPrefixMapping​(java.lang.String prefix)
        Removes the URI at the top of the stack of URIs to which the given prefix is mapped.
        Parameters:
        prefix - The prefix whose stack of URIs is to be popped
      • getURI

        public java.lang.String getURI​(java.lang.String prefix)
        Returns the URI to which the given prefix maps.
        Parameters:
        prefix - The prefix whose URI is sought
        Returns:
        The URI to which the given prefix maps
      • setLanguage

        public void setLanguage​(java.lang.String value,
                                Node n,
                                ErrorDispatcher err,
                                boolean pagedir)
                         throws JasperException
        Sets the language attribute.
        Parameters:
        value - The language value
        n - The node
        err - The error dispatcher
        pagedir - Whether this is a page directive
        Throws:
        JasperException - if the language is not Java
      • getLanguage

        public java.lang.String getLanguage​(boolean useDefault)
        Returns the language attribute value.
        Parameters:
        useDefault - Whether to use the default if not set
        Returns:
        The language value
      • setExtends

        public void setExtends​(java.lang.String value)
        Sets the extends attribute value.
        Parameters:
        value - The extends value
      • getExtends

        public java.lang.String getExtends​(boolean useDefault)
        Gets the value of the 'extends' page directive attribute.
        Parameters:
        useDefault - TRUE if the default (org.apache.jasper.runtime.HttpJspBase) should be returned if this attribute has not been set, FALSE otherwise
        Returns:
        The value of the 'extends' page directive attribute, or the default (org.apache.jasper.runtime.HttpJspBase) if this attribute has not been set and useDefault is TRUE
      • getExtends

        public java.lang.String getExtends()
        Gets the value of the 'extends' page directive attribute.
        Returns:
        The value of the 'extends' page directive attribute, or the default (org.apache.jasper.runtime.HttpJspBase) if this attribute has not been set
      • setContentType

        public void setContentType​(java.lang.String value)
        Sets the content type.
        Parameters:
        value - The content type value
      • getContentType

        public java.lang.String getContentType()
        Returns the content type.
        Returns:
        The content type
      • setBufferValue

        public void setBufferValue​(java.lang.String value,
                                   Node n,
                                   ErrorDispatcher err)
                            throws JasperException
        Sets the buffer value.
        Parameters:
        value - The buffer value
        n - The node
        err - The error dispatcher
        Throws:
        JasperException - if the buffer value is invalid
      • getBufferValue

        public java.lang.String getBufferValue()
        Returns the buffer value.
        Returns:
        The buffer value
      • getBuffer

        public int getBuffer()
        Returns the buffer size in bytes.
        Returns:
        The buffer size
      • setSession

        public void setSession​(java.lang.String value,
                               Node n,
                               ErrorDispatcher err)
                        throws JasperException
        Sets the session attribute.
        Parameters:
        value - The session value
        n - The node
        err - The error dispatcher
        Throws:
        JasperException - if the session value is invalid
      • getSession

        public java.lang.String getSession()
        Returns the session attribute value.
        Returns:
        The session value
      • isSession

        public boolean isSession()
        Checks if session is enabled.
        Returns:
        true if session is enabled
      • setAutoFlush

        public void setAutoFlush​(java.lang.String value,
                                 Node n,
                                 ErrorDispatcher err)
                          throws JasperException
        Sets the autoFlush attribute.
        Parameters:
        value - The autoFlush value
        n - The node
        err - The error dispatcher
        Throws:
        JasperException - if the autoFlush value is invalid
      • getAutoFlush

        public java.lang.String getAutoFlush()
        Returns the autoFlush attribute value.
        Returns:
        The autoFlush value
      • isAutoFlush

        public boolean isAutoFlush()
        Checks if autoFlush is enabled.
        Returns:
        true if autoFlush is enabled
      • getIsThreadSafe

        public java.lang.String getIsThreadSafe()
      • isThreadSafe

        public boolean isThreadSafe()
      • setInfo

        public void setInfo​(java.lang.String value)
        Sets the page info string.
        Parameters:
        value - The info string
      • getInfo

        public java.lang.String getInfo()
        Returns the page info string.
        Returns:
        The info string
      • setErrorPage

        public void setErrorPage​(java.lang.String value)
        Sets the error page URL.
        Parameters:
        value - The error page URL
      • getErrorPage

        public java.lang.String getErrorPage()
        Returns the error page URL.
        Returns:
        The error page URL
      • setIsErrorPage

        public void setIsErrorPage​(java.lang.String value,
                                   Node n,
                                   ErrorDispatcher err)
                            throws JasperException
        Sets the isErrorPage attribute.
        Parameters:
        value - The isErrorPage value
        n - The node
        err - The error dispatcher
        Throws:
        JasperException - if the value is invalid
      • getIsErrorPage

        public java.lang.String getIsErrorPage()
        Returns the isErrorPage attribute value.
        Returns:
        The isErrorPage value
      • isErrorPage

        public boolean isErrorPage()
        Checks if this page is an error page.
        Returns:
        true if this is an error page
      • setIsELIgnored

        public void setIsELIgnored​(java.lang.String value,
                                   Node n,
                                   ErrorDispatcher err,
                                   boolean pagedir)
                            throws JasperException
        Sets the isELIgnored attribute.
        Parameters:
        value - The isELIgnored value
        n - The node
        err - The error dispatcher
        pagedir - Whether this is a page directive
        Throws:
        JasperException - if the value is invalid
      • setErrorOnELNotFound

        public void setErrorOnELNotFound​(java.lang.String value,
                                         Node n,
                                         ErrorDispatcher err,
                                         boolean pagedir)
                                  throws JasperException
        Sets the errorOnELNotFound attribute.
        Parameters:
        value - The errorOnELNotFound value
        n - The node
        err - The error dispatcher
        pagedir - Whether this is a page directive
        Throws:
        JasperException - if the value is invalid
      • setDeferredSyntaxAllowedAsLiteral

        public void setDeferredSyntaxAllowedAsLiteral​(java.lang.String value,
                                                      Node n,
                                                      ErrorDispatcher err,
                                                      boolean pagedir)
                                               throws JasperException
        Sets the deferredSyntaxAllowedAsLiteral attribute.
        Parameters:
        value - The deferredSyntaxAllowedAsLiteral value
        n - The node
        err - The error dispatcher
        pagedir - Whether this is a page directive
        Throws:
        JasperException - if the value is invalid
      • setTrimDirectiveWhitespaces

        public void setTrimDirectiveWhitespaces​(java.lang.String value,
                                                Node n,
                                                ErrorDispatcher err,
                                                boolean pagedir)
                                         throws JasperException
        Sets the trimDirectiveWhitespaces attribute.
        Parameters:
        value - The trimDirectiveWhitespaces value
        n - The node
        err - The error dispatcher
        pagedir - Whether this is a page directive
        Throws:
        JasperException - if the value is invalid
      • setELIgnored

        public void setELIgnored​(boolean s)
        Sets the EL ignored flag.
        Parameters:
        s - The EL ignored flag
      • getIsELIgnored

        public java.lang.String getIsELIgnored()
        Returns the isELIgnored attribute value.
        Returns:
        The isELIgnored value
      • isELIgnored

        public boolean isELIgnored()
        Checks if EL is ignored.
        Returns:
        true if EL is ignored
      • setErrorOnELNotFound

        public void setErrorOnELNotFound​(boolean s)
        Sets the error on EL not found flag.
        Parameters:
        s - The error on EL not found flag
      • getErrorOnELNotFound

        public java.lang.String getErrorOnELNotFound()
        Returns the errorOnELNotFound attribute value.
        Returns:
        The errorOnELNotFound value
      • isErrorOnELNotFound

        public boolean isErrorOnELNotFound()
        Checks if error on EL not found is enabled.
        Returns:
        true if error on EL not found is enabled
      • putNonCustomTagPrefix

        public void putNonCustomTagPrefix​(java.lang.String prefix,
                                          Mark where)
        Puts a non-custom tag prefix in the map.
        Parameters:
        prefix - The prefix
        where - The mark location
      • getNonCustomTagPrefix

        public Mark getNonCustomTagPrefix​(java.lang.String prefix)
        Gets the mark for a non-custom tag prefix.
        Parameters:
        prefix - The prefix
        Returns:
        The mark location
      • getDeferredSyntaxAllowedAsLiteral

        public java.lang.String getDeferredSyntaxAllowedAsLiteral()
        Returns the deferredSyntaxAllowedAsLiteral attribute value.
        Returns:
        The deferredSyntaxAllowedAsLiteral value
      • isDeferredSyntaxAllowedAsLiteral

        public boolean isDeferredSyntaxAllowedAsLiteral()
        Checks if deferred syntax is allowed as literal.
        Returns:
        true if deferred syntax is allowed as literal
      • setDeferredSyntaxAllowedAsLiteral

        public void setDeferredSyntaxAllowedAsLiteral​(boolean isELDeferred)
        Sets whether deferred syntax is allowed as literal.
        Parameters:
        isELDeferred - true if deferred syntax is allowed
      • getExpressionFactory

        public ExpressionFactory getExpressionFactory()
        Returns the expression factory.
        Returns:
        The expression factory
      • getTrimDirectiveWhitespaces

        public java.lang.String getTrimDirectiveWhitespaces()
        Returns the trimDirectiveWhitespaces attribute value.
        Returns:
        The trimDirectiveWhitespaces value
      • isTrimDirectiveWhitespaces

        public boolean isTrimDirectiveWhitespaces()
        Checks if directive whitespaces are trimmed.
        Returns:
        true if directive whitespaces are trimmed
      • setTrimDirectiveWhitespaces

        public void setTrimDirectiveWhitespaces​(boolean trimDirectiveWhitespaces)
        Sets whether directive whitespaces are trimmed.
        Parameters:
        trimDirectiveWhitespaces - true if directive whitespaces are trimmed
      • getVarInfoNames

        public java.util.Set<java.lang.String> getVarInfoNames()
        Returns the set of variable info names.
        Returns:
        The variable info names
      • isErrorOnUndeclaredNamespace

        public boolean isErrorOnUndeclaredNamespace()
        Checks if error on undeclared namespace is enabled.
        Returns:
        true if error on undeclared namespace is enabled
      • setErrorOnUndeclaredNamespace

        public void setErrorOnUndeclaredNamespace​(boolean errorOnUndeclaredNamespace)
        Sets whether error on undeclared namespace is enabled.
        Parameters:
        errorOnUndeclaredNamespace - true if error on undeclared namespace is enabled