com.ibm.tscc.rtss.authz.api

Class AttributeFactory

  1. java.lang.Object
  2. extended bycom.ibm.tscc.rtss.authz.api.AttributeFactory

  1. public class AttributeFactory
  2. 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:
Attribute, RequestContext

Nested Class Summary

Modifier and Type Class and Description
  1. static class
AttributeFactory.DataType
Defines Attribute data types.

Constructor Summary

Constructor and Description
AttributeFactory()

Method Summary

Modifier and Type Method and Description
  1. static
  2. Attribute
createAttribute(java.lang.String attributeId,java.lang.Object value)
Create an Attribute object from an instantiated object.
  1. static
  2. Attribute
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

  1. public AttributeFactory()

Method Detail

createAttribute

  1. public static Attribute createAttribute( java.lang.String attributeId,
  2. java.lang.String dataType,
  3. java.lang.String representation)
  4. 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

  1. public static Attribute createAttribute( java.lang.String attributeId,
  2. java.lang.Object value)
  3. 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.