public class VariableManager extends Object
Note that you should never have to use this class directly. It is really meant only as a utility for the internal parsing routines. Also, note that the operations on this class are not thread-safe. Typically this doesn't matter, since the code doesn't support using more than one thread to parse a single Policy.
Constructor and Description |
---|
VariableManager(Map variableIds,
PolicyMetaData metaData)
Creates a manager with a fixed set of supported identifiers.
|
Modifier and Type | Method and Description |
---|---|
VariableDefinition |
getDefinition(String variableId)
Returns the definition with the given identifier.
|
URI |
getVariableType(String variableId)
Returns the datatype that the identified definition's expression
resolves to on evaluation.
|
boolean |
returnsBag(String variableId)
Returns true if the identified definition's expression resolves to
a bag on evaluation.
|
public VariableManager(Map variableIds, PolicyMetaData metaData)
Note that the use of a DOM node may change to an arbitrary interface, so that you could use your own mechanism, but this is still being hashed out. This interface will be forzed before a 2.0 release.
variableIds
- a Map
from an identifier to the
Node
that is the root of the
cooresponding variable definition, or nullmetaData
- the meta-data associated with the containing policypublic VariableDefinition getDefinition(String variableId)
variableId
- the definition's identifierProcessingException
- if the definition cannot be resolvedpublic URI getVariableType(String variableId)
variableId
- the identifier for the definitionProcessingException
- if the identifier is not supported or if
the result cannot be resolvedpublic boolean returnsBag(String variableId)
variableId
- the identifier for the definitionProcessingException
- if the identifier is not supported or if
the result cannot be resolvedCopyright © 2023 JBoss by Red Hat. All rights reserved.