public class ComponentContext
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
ComponentContext()
Constructor.
|
ComponentContext(java.util.Map attributes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAll(java.util.Map newAttributes)
Add all attributes to this context.
|
void |
addMissing(java.util.Map defaultAttributes)
Add all missing attributes to this context.
|
java.lang.Object |
findAttribute(java.lang.String beanName,
javax.servlet.jsp.PageContext pageContext)
Find object in one of the contexts.
|
java.lang.Object |
getAttribute(java.lang.String name)
Get an attribute from context.
|
java.lang.Object |
getAttribute(java.lang.String beanName,
int scope,
javax.servlet.jsp.PageContext pageContext)
Get object from requested context.
|
java.util.Iterator |
getAttributeNames()
Get names of all attributes.
|
static ComponentContext |
getContext(javax.servlet.ServletRequest request)
Get component context from request.
|
void |
putAttribute(java.lang.String name,
java.lang.Object value)
Put a new attribute to context.
|
static void |
setContext(ComponentContext context,
javax.servlet.ServletRequest request)
Store component context into request.
|
public ComponentContext()
public ComponentContext(java.util.Map attributes)
attributes
- Attributes to initialize context.public void addAll(java.util.Map newAttributes)
newAttributes
- Attributes to add.public void addMissing(java.util.Map defaultAttributes)
defaultAttributes
- Attributes to add.public java.lang.Object getAttribute(java.lang.String name)
name
- Name of the attribute.public java.util.Iterator getAttributeNames()
public void putAttribute(java.lang.String name, java.lang.Object value)
name
- Name of the attribute.value
- Value of the attribute.public java.lang.Object findAttribute(java.lang.String beanName, javax.servlet.jsp.PageContext pageContext)
beanName
- Name of the bean to find.pageContext
- Page context.null
if not found.public java.lang.Object getAttribute(java.lang.String beanName, int scope, javax.servlet.jsp.PageContext pageContext)
beanName
- Name of the bean to find.scope
- Search scope (see PageContext
).pageContext
- Page context.null
if not found.public static ComponentContext getContext(javax.servlet.ServletRequest request)
request
- ServletRequest.public static void setContext(ComponentContext context, javax.servlet.ServletRequest request)
context
- ComponentContext to store.request
- Request to store ComponentContext.Copyright © 2000–2021 Apache Software Foundation. All rights reserved.