public abstract class DatabaseAttributeLocator extends StorageAttributeLocator
NOTE: Subclasses should try to override the getColumnValue(URI, EvaluationCtx)
method if the DB is not a true RDBMS
Modifier and Type | Field and Description |
---|---|
protected String |
columnName |
static String |
DB_FILE_NAME |
protected String |
dbFileName |
static String |
DS_JNDI_NAME |
protected String |
dsJNDIName |
protected String |
sqlStatement |
attributeValue, dataTypeOfSubstituteValue, substituteValue
attributeDesignatorSupported, attributeSelectorSupported, designatorTypes, identifier, ids, map, options
ATTRIBUTE_DESIGNATOR_INTEGER_TAG, ATTRIBUTE_DESIGNATOR_SUPPORT_TAG, ATTRIBUTE_SELECTOR_SUPPORT_TAG, ATTRIBUTE_SUPPORTED_ID_TAG, IDENTIFIER_TAG, RESOURCE_CHILD_SUPPORTED_TAG, RESOURCE_DESCENDANT_SUPPORTED_TAG
Constructor and Description |
---|
DatabaseAttributeLocator() |
Modifier and Type | Method and Description |
---|---|
EvaluationResult |
findAttribute(URI attributeType,
URI attributeId,
URI issuer,
URI subjectCategory,
EvaluationCtx context,
int designatorType)
Tries to find attribute values based on the given designator data.
|
protected Object |
getColumnValue(URI attributeType,
EvaluationCtx context)
Get the value of the attribute we are interested in
|
protected Connection |
getConnection() |
protected void |
usePassedOption(String optionTag,
String optionValue)
An opportunity for sub-classes to process the passed option tag and value
|
getSubstituteValue
get, getAttributeValue, getIdentifier, getOptionValue, getSupportedDesignatorTypes, getSupportedIds, isDesignatorSupported, isSelectorSupported, set, setOptions
findAttribute, invalidateCache
protected String dsJNDIName
protected String dbFileName
protected String sqlStatement
protected String columnName
public static final String DS_JNDI_NAME
public static final String DB_FILE_NAME
public EvaluationResult findAttribute(URI attributeType, URI attributeId, URI issuer, URI subjectCategory, EvaluationCtx context, int designatorType)
AttributeFinderModule
BagAttribute
, even if only one value was found. If no
values were found, but no other error occurred, an empty bag is
returned. This method may need to invoke the context data to look
for other attribute values, so a module writer must take care not
to create a scenario that loops forever.findAttribute
in class AttributeFinderModule
attributeType
- the datatype of the attributes to findattributeId
- the identifier of the attributes to findissuer
- the issuer of the attributes, or null if unspecifiedsubjectCategory
- the category of the attribute if the
designatorType is SUBJECT_TARGET, otherwise nullcontext
- the representation of the request datadesignatorType
- the type of designator as named by the *_TARGET
fields in AttributeDesignator
protected void usePassedOption(String optionTag, String optionValue)
AttributeLocator
An opportunity for sub-classes to process the passed option tag and value
NOTE: Subclasses should override this method and allow super class processing before their own processing in the method via the super.usePassedOption() call.
usePassedOption
in class AttributeLocator
protected Connection getConnection()
protected Object getColumnValue(URI attributeType, EvaluationCtx context)
attributeType
- context
- Copyright © 2023 JBoss by Red Hat. All rights reserved.