public interface Context
Modifier and Type | Method and Description |
---|---|
Set<Property> |
getProperties()
Returns the set of all properties in this context.
|
Set<Property> |
getProperties(Scope scope)
Returns the set of all properties in this context in the specified scope.
|
Set<Property> |
getProperties(String label)
Get all properties with a given label.
|
Property |
getProperty(String name)
Retrieves the named property within this context, regardless
of the scope.
|
Property |
getProperty(String name,
Scope scope)
Retrieves the value of the named property with the given scope in this
context.
|
<T> T |
getPropertyValue(String name)
Retrieves the value of the named property within this context, regardless
of the scope.
|
void |
mergeInto(Context context)
Merges the properties in this Context instance into the specified Context instance,
adding missing values and overwriting existing values.
|
void |
removeProperties()
Removes all properties from this context.
|
void |
removeProperties(Scope scope)
Removes properties from the specified scope from this context.
|
void |
removeProperties(String label)
Remove all properties with a given label.
|
void |
removeProperty(Property property)
Removes the named property from this context.
|
Context |
setProperties(Set<Property> properties)
Adds the set of properties to this context.
|
Property |
setProperty(String name,
Object val)
Sets the named context property with the specified value.
|
Property |
setProperty(String name,
Object val,
Scope scope)
Sets the named context property with the specified value in a specific
scope.
|
void mergeInto(Context context)
context
- context properties are copied from this contextProperty getProperty(String name)
name
- property nameProperty getProperty(String name, Scope scope)
name
- property namescope
- property scope<T> T getPropertyValue(String name)
getProperty(name).getValue()
.T
- Expected type of property.name
- property nameSet<Property> getProperties()
Set<Property> getProperties(Scope scope)
scope
- scope from which properties will be retrievedSet<Property> getProperties(String label)
label
- the label each property must havevoid removeProperty(Property property)
property
- property to remove
not existvoid removeProperties()
void removeProperties(Scope scope)
scope
- scope of the properties to removevoid removeProperties(String label)
label
- the label each property must haveProperty setProperty(String name, Object val)
name
- name of the property to setval
- the value to set for the propertyProperty setProperty(String name, Object val, Scope scope)
name
- name of the property to setval
- the value to set for the propertyscope
- scope of the property to addCopyright © 2013–2019 JBoss by Red Hat. All rights reserved.