Class InfoUtil


  • public class InfoUtil
    extends java.lang.Object
    The InfoUtil class encapsulates common constants and static methods for processing User/Group data structures.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static int MAX_SIGNED_DWORD
      querySchema signed integer attribute limits
      protected static long MAX_UNSIGNED_DWORD
      querySchema unsigned integer attribute limits
      protected static java.lang.String QSS_BOOLEAN
      querySchema attribute syntaxes - Boolean
      protected static java.lang.String QSS_BYTE_ARRAY
      querySchema attribute syntaxes - Byte array
      protected static java.lang.String QSS_DATE
      querySchema attribute syntaxes - Date
      protected static java.lang.String QSS_INTEGER
      querySchema attribute syntaxes - Integer
      protected static java.lang.String QSS_LONG
      querySchema attribute syntaxes - Long
      protected static java.lang.String QSS_STRING
      querySchema attribute syntaxes - String
      protected static java.lang.String QSS_VECTOR
      querySchema attribute syntaxes - Vector
    • Constructor Summary

      Constructors 
      Constructor Description
      InfoUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static void addSchemaEntry​(java.util.Vector aSchema, java.lang.String aName, java.lang.String aSyntax, java.lang.Object aSize)
      Adds an entry describing an attribute's structure to the given vector.
      protected static void createAndAddEntryAttribute​(Entry aEntry, java.lang.String aAttrName, java.lang.Object aAttrValue)
      Creates and adds attribute to the given Entry object.
      protected static java.lang.Boolean getBooleanEntryAttributeValue​(Entry aEntry, java.lang.String aAttrName)
      Retrieves the specified Attribute's value as a Boolean object.
      protected static byte[] getByteArrayEntryAttributeValue​(Entry aEntry, java.lang.String aAttrName)
      Retrieves the specified Attribute's value as a byte array object.
      protected static java.util.Date getDateEntryAttributeValue​(Entry aEntry, java.lang.String aAttrName)
      Retrieves the specified Attribute's value as a java.util.Date object.
      protected static java.lang.Integer getIntegerEntryAttributeValue​(Entry aEntry, java.lang.String aAttrName)
      Retrieves the specified Attribute's value as an Integer object.
      protected static java.lang.Long getLongEntryAttributeValue​(Entry aEntry, java.lang.String aAttrName)
      Retrieves the specified Attribute's value as a Long object.
      protected static java.lang.String getStringEntryAttributeValue​(Entry aEntry, java.lang.String aAttrName)
      Retrieves the specified Attribute's value as a String object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAX_SIGNED_DWORD

        protected static final int MAX_SIGNED_DWORD
        querySchema signed integer attribute limits
        See Also:
        Constant Field Values
      • MAX_UNSIGNED_DWORD

        protected static final long MAX_UNSIGNED_DWORD
        querySchema unsigned integer attribute limits
        See Also:
        Constant Field Values
      • QSS_BOOLEAN

        protected static final java.lang.String QSS_BOOLEAN
        querySchema attribute syntaxes - Boolean
        See Also:
        Constant Field Values
      • QSS_BYTE_ARRAY

        protected static final java.lang.String QSS_BYTE_ARRAY
        querySchema attribute syntaxes - Byte array
        See Also:
        Constant Field Values
      • QSS_DATE

        protected static final java.lang.String QSS_DATE
        querySchema attribute syntaxes - Date
        See Also:
        Constant Field Values
      • QSS_INTEGER

        protected static final java.lang.String QSS_INTEGER
        querySchema attribute syntaxes - Integer
        See Also:
        Constant Field Values
      • QSS_LONG

        protected static final java.lang.String QSS_LONG
        querySchema attribute syntaxes - Long
        See Also:
        Constant Field Values
      • QSS_STRING

        protected static final java.lang.String QSS_STRING
        querySchema attribute syntaxes - String
        See Also:
        Constant Field Values
      • QSS_VECTOR

        protected static final java.lang.String QSS_VECTOR
        querySchema attribute syntaxes - Vector
        See Also:
        Constant Field Values
    • Constructor Detail

      • InfoUtil

        public InfoUtil()
    • Method Detail

      • addSchemaEntry

        protected static void addSchemaEntry​(java.util.Vector aSchema,
                                             java.lang.String aName,
                                             java.lang.String aSyntax,
                                             java.lang.Object aSize)
        Adds an entry describing an attribute's structure to the given vector.
        Parameters:
        aSchema - The vector representing the connector's entry schema. The new entry will be added to this vector.
        aName - The name of the attribute.
        aSyntax - The definition of the attribute.
        aSize - The size of the attribute . If null it is not included in the schema.
      • createAndAddEntryAttribute

        protected static void createAndAddEntryAttribute​(Entry aEntry,
                                                         java.lang.String aAttrName,
                                                         java.lang.Object aAttrValue)
        Creates and adds attribute to the given Entry object.
        Parameters:
        aEntry - The entry object to attach the new attribute to.
        aAttrName - The name of the new attribute.
        aAttrValue - The value of the new attribute.
      • getStringEntryAttributeValue

        protected static java.lang.String getStringEntryAttributeValue​(Entry aEntry,
                                                                       java.lang.String aAttrName)
        Retrieves the specified Attribute's value as a String object.
        Parameters:
        aEntry - The Entry object which Attribute's value will be retrieved.
        aAttrName - The name of the Entry's Attribute.
        Returns:
        The String value of the specified Entry's Attribute; "null" if the specified Attribute does not exist.
      • getIntegerEntryAttributeValue

        protected static java.lang.Integer getIntegerEntryAttributeValue​(Entry aEntry,
                                                                         java.lang.String aAttrName)
        Retrieves the specified Attribute's value as an Integer object. This method performs conversion from Double,Long and String to Integer.
        Parameters:
        aEntry - The Entry object which Attribute's value will be retrieved.
        aAttrName - The name of the Entry's Attribute.
        Returns:
        The Integer value of the specified Entry's Attribute; "null" if the specified Attribute does not exist.
      • getLongEntryAttributeValue

        protected static java.lang.Long getLongEntryAttributeValue​(Entry aEntry,
                                                                   java.lang.String aAttrName)
        Retrieves the specified Attribute's value as a Long object. This method performs conversion from Double,Integer and String to Long.
        Parameters:
        aEntry - The Entry object which Attribute's value will be retrieved.
        aAttrName - The name of the Entry's Attribute.
        Returns:
        The Long value of the specified Entry's Attribute; "null" if the specified Attribute does not exist.
      • getBooleanEntryAttributeValue

        protected static java.lang.Boolean getBooleanEntryAttributeValue​(Entry aEntry,
                                                                         java.lang.String aAttrName)
        Retrieves the specified Attribute's value as a Boolean object. This method performs conversion from String to Boolean.
        Parameters:
        aEntry - The Entry object which Attribute's value will be retrieved.
        aAttrName - The name of the Entry's Attribute.
        Returns:
        The Boolean value of the specified Entry's Attribute; "null" if the specified Attribute does not exist.
      • getDateEntryAttributeValue

        protected static java.util.Date getDateEntryAttributeValue​(Entry aEntry,
                                                                   java.lang.String aAttrName)
        Retrieves the specified Attribute's value as a java.util.Date object.
        Parameters:
        aEntry - The Entry object which Attribute's value will be retrieved.
        aAttrName - The name of the Entry's Attribute.
        Returns:
        The java.util.Date value of the specified Entry's Attribute; "null" if the specified Attribute does not exist.
      • getByteArrayEntryAttributeValue

        protected static byte[] getByteArrayEntryAttributeValue​(Entry aEntry,
                                                                java.lang.String aAttrName)
        Retrieves the specified Attribute's value as a byte array object.
        Parameters:
        aEntry - The Entry object which Attribute's value will be retrieved.
        aAttrName - The name of the Entry's Attribute.
        Returns:
        The byte[] value of the specified Entry's Attribute; "null" if the specified Attribute does not exist.