com.ibm.tscc.rtss.authz.api
Class AttributeFactory
- java.lang.Object
com.ibm.tscc.rtss.authz.api.AttributeFactory
- public class AttributeFactory
- extends java.lang.Object
Is the mechanism by which implementations of the IExternalFinder interface should construct their return values.
This factory provides convenience methods to construct Attribute instances based on both the string representation of an object, and an actual instance of an object.
Since:
7.1.0.1
See Also:
Nested Class Summary
Modifier and Type | Class and Description |
---|---|
|
AttributeFactory.DataType
Defines Attribute data types.
|
Constructor Summary
Constructor and Description |
---|
AttributeFactory()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
createAttribute(java.lang.String attributeId,java.lang.Object value)
Create an Attribute object from an instantiated object.
|
|
createAttribute(java.lang.String attributeId,java.lang.String dataType,java.lang.String representation)
Create an Attribute object based on the string representation of a value.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
AttributeFactory
- public AttributeFactory()
Method Detail
createAttribute
- public static Attribute createAttribute( java.lang.String attributeId,
- java.lang.String dataType,
- java.lang.String representation)
- throws AttributeInstantiationException
Create an Attribute object based on the string representation of a value. The
string representation is automatically converted to the correct underlying type
and validated accordingly.
Parameters:
attributeId
- The id of the attribute in the policy. dataType
- The data type will determine how "representation" is handled. representation
- The data. Returns:
an Attribute.
Throws:
AttributeInstantiationException
- if there is a problem instantiating the Attribute, or if the dataType is
null or not supported or if the representation is invalid. createAttribute
- public static Attribute createAttribute( java.lang.String attributeId,
- java.lang.Object value)
- throws AttributeInstantiationException
Create an Attribute object from an instantiated object. The type of the object is validated
against the known set of DataTypes.
Parameters:
attributeId
- The id of the attribute in the policy. value
- The attribute value. Returns:
an Attribute
Throws:
AttributeInstantiationException
- if there is a problem instantiating the Attribute.