public abstract class AbstractPostAuthenticationFilter extends java.lang.Object implements PostAuthenticationFilter
PostAuthenticationFilter
implementations. The class provides some convenience methods,
that are useful when configuring the custom filter.Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
Returns the specified attribute from the web application's
context, or
null if there is no
attribute by that name. |
java.util.Enumeration |
getAttributeNames()
Returns the attribute names from the web application's
context as an
Enumeration of String
objects, or an empty Enumeration if there are no
attributes. |
java.io.File |
getConfigurationFile(java.lang.String file)
The method creates a
File object for the specified
configuration file. |
java.lang.String |
getInitParameter(java.lang.String parameterName)
Returns the specified initialization parameter from the web
application's deployment descriptor.
|
java.util.Enumeration |
getInitParameterNames()
Returns the names of the web application's deployment
descriptor's initialization parameters as an
Enumeration
of String objects, or an empty Enumeration
if the deployment descriptor has no initialization
parameters. |
static java.lang.String |
getRealFilePath(java.lang.String file)
Convert the specified file path to an absolute file system path.
|
java.net.URL |
getResource(java.lang.String path)
Returns a
URL to the resource that is mapped to a
specified path. |
java.io.InputStream |
getResourceAsStream(java.lang.String path)
Returns the resource located at the named path as an InputStream
object.
|
java.lang.String |
getWebAppPath()
Returns the web application root's absolute file system path.
|
void |
removeAttribute(java.lang.String name)
Removes the attribute with the given name from the web
application's context.
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Binds an object to a given attribute name in the web
application's context.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
filter, setConfiguration
public java.lang.String getInitParameter(java.lang.String parameterName)
ServletContext.getInitParameter(java.lang.String)
method.parameterName
- the name of the initialization parameterpublic java.util.Enumeration getInitParameterNames()
Enumeration
of String
objects, or an empty Enumeration
if the deployment descriptor has no initialization
parameters. This method works just like the
ServletContext.getInitParameterNames()
method.public java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLException
URL
to the resource that is mapped to a
specified path. This method works just like the
AbstractPostAuthenticationFilter.getResource(java.lang.String)
method.path
- the path to the resourcenull
if the resource does not exist at that pathjava.net.MalformedURLException
- if the specified path is not given
in the correct formpublic java.io.InputStream getResourceAsStream(java.lang.String path)
ServletContext.getResourceAsStream(java.lang.String)
method.path
- the path to the resourceInputStream
for the resource located at
the specified path, or null
if the resource does not
exist at that pathpublic java.lang.String getWebAppPath()
public static java.lang.String getRealFilePath(java.lang.String file) throws java.io.IOException
null
is returned.file
- a file path, either absolute or relativejava.io.IOException
- if the conversion of an absolute path to a canonical path failspublic java.io.File getConfigurationFile(java.lang.String file) throws java.io.IOException
File
object for the specified
configuration file. The method returns null
if the
configuration file does not exist. The file
parameter
must either be an absolute file path or a path relative to the
web application's root directory.file
- the name of the configuration file, either
absolute or relative to the web application's root directoryFile
object if the specified file exists,
or null
if the specified does not existjava.io.IOException
- if the conversion of an absolute path to a canonical path failspublic java.lang.Object getAttribute(java.lang.String name)
null
if there is no
attribute by that name. This method works just like the
ServletContext.getAttribute(java.lang.String)
method.name
- the attribute namepublic java.util.Enumeration getAttributeNames()
Enumeration
of String
objects, or an empty Enumeration
if there are no
attributes. This method works just like the
ServletContext.getAttributeNames()
method.public void setAttribute(java.lang.String name, java.lang.Object value)
ServletContext.setAttribute(java.lang.String,java.lang.Object)
method.name
- the name of the attribute to be setvalue
- the attribute valuepublic void removeAttribute(java.lang.String name)
ServletContext.removeAttribute(java.lang.String)
method.name
- the name of the attribute to be removedCopyright © 2000-2020 TIBCO Software Inc. All Rights Reserved.