java.lang.Object
cloud.piranha.webapp.impl.DefaultAttributeManager
- All Implemented Interfaces:
AttributeManager
public class DefaultAttributeManager extends java.lang.Object implements AttributeManager
The default AttributeManager.
- Author:
- Manfred Riem ([email protected])
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.Object>
attributes
Stores the attributes. -
Constructor Summary
Constructors Constructor Description DefaultAttributeManager()
Constructor. -
Method Summary
Modifier and Type Method Description boolean
containsAttribute(java.lang.String name)
Checks if this manager has the given attributejava.lang.Object
getAttribute(java.lang.String name)
Get the attribute.java.util.Enumeration<java.lang.String>
getAttributeNames()
Get the attribute names.void
removeAttribute(java.lang.String name)
Remove the attribute.void
setAttribute(java.lang.String name, java.lang.Object value)
Set the attribute.
-
Field Details
-
attributes
protected java.util.Map<java.lang.String,java.lang.Object> attributesStores the attributes.
-
-
Constructor Details
-
DefaultAttributeManager
public DefaultAttributeManager()Constructor.
-
-
Method Details
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name)Description copied from interface:AttributeManager
Get the attribute.- Specified by:
getAttribute
in interfaceAttributeManager
- Parameters:
name
- the name.- Returns:
- the value.
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()Description copied from interface:AttributeManager
Get the attribute names.- Specified by:
getAttributeNames
in interfaceAttributeManager
- Returns:
- the attribute names.
-
removeAttribute
public void removeAttribute(java.lang.String name)Description copied from interface:AttributeManager
Remove the attribute.- Specified by:
removeAttribute
in interfaceAttributeManager
- Parameters:
name
- the name.
-
setAttribute
public void setAttribute(java.lang.String name, java.lang.Object value)Description copied from interface:AttributeManager
Set the attribute.- Specified by:
setAttribute
in interfaceAttributeManager
- Parameters:
name
- the name.value
- the value.
-
containsAttribute
public boolean containsAttribute(java.lang.String name)Description copied from interface:AttributeManager
Checks if this manager has the given attribute- Specified by:
containsAttribute
in interfaceAttributeManager
- Parameters:
name
- the name of the attribute to check for- Returns:
- true if this manager contains the attribute, false otherwise
-