com.ibm.di.connector.tam
Class CommonBase

java.lang.Object
  extended by com.ibm.di.connector.tam.CommonBase
Direct Known Subclasses:
Domain, Group, Policy, SSOCredentials, SSOResource, SSOResourceGroup, User

public class CommonBase
extends Object

Utility class to enable classes to log to the LogProxyImpl

LogProxyImpl contains a copy of the log passed in from the Connector


Field Summary
static String DATE_FORMAT
           
static int MAX_SIGNED_DWORD
           
static long MAX_UNSIGNED_DWORD
           
protected  Log mLogProxy
           
protected  com.tivoli.pd.jutil.PDContext mPDContext
           
protected  com.tivoli.pd.jutil.PDMessages mPDMessages
           
static String QSS_BOOLEAN
           
static String QSS_BYTE_ARRAY
           
static String QSS_DATE
           
static String QSS_INTEGER
           
static String QSS_LONG
           
static String QSS_STRING
           
static String QSS_VECTOR
           
 
Constructor Summary
protected CommonBase()
           
protected CommonBase(com.tivoli.pd.jutil.PDContext context)
           
protected CommonBase(com.tivoli.pd.jutil.PDContext context, Log logger)
           
 
Method Summary
protected static void addSchemaEntry(Vector vector, String name, String syntax, Object size)
          Create and add the a schema entry to a schema vector.
protected  void createAndAddEntryAttribute(Entry entry, String attributeName, Object value)
          Create and add attribute to an entry object.
protected  void debug(String msg)
           
protected  void debug(String msg, Log log)
           
protected  void error(String error)
           
protected  Boolean getBooleanEntryAttributeValue(Entry entry, String s)
          Retrieve an attribute from the entry object as a Boolean.
protected  byte[] getByteArrayEntryAttributeValue(Entry entry, String s)
          Retrieve an attribute from the entry object as a byte array.
protected  Date getDateEntryAttributeValue(Entry entry, String s)
          Retrieve an attribute from the entry object as a Date.
protected  Integer getIntegerEntryAttributeValue(Entry entry, String s)
          Retrieve an attribute from the entry object as an integer.
protected  Long getLongEntryAttributeValue(Entry entry, String s)
          Retrieve an attribute from the entry object as a Long.
protected  String getPDMessage(com.tivoli.pd.jutil.PDException pde)
           
protected  String getStringEntryAttributeValue(Entry entry, String s)
          Retrieve an attribute from the entry object as a string.
protected  void logmsg(String msg)
           
protected  void printEntry(Entry entry)
           
protected  void processMsgs(com.tivoli.pd.jutil.PDMessages msgs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SIGNED_DWORD

public static final int MAX_SIGNED_DWORD
See Also:
Constant Field Values

MAX_UNSIGNED_DWORD

public static final long MAX_UNSIGNED_DWORD
See Also:
Constant Field Values

QSS_BOOLEAN

public static final String QSS_BOOLEAN
See Also:
Constant Field Values

QSS_BYTE_ARRAY

public static final String QSS_BYTE_ARRAY
See Also:
Constant Field Values

QSS_DATE

public static final String QSS_DATE
See Also:
Constant Field Values

QSS_INTEGER

public static final String QSS_INTEGER
See Also:
Constant Field Values

QSS_LONG

public static final String QSS_LONG
See Also:
Constant Field Values

QSS_STRING

public static final String QSS_STRING
See Also:
Constant Field Values

QSS_VECTOR

public static final String QSS_VECTOR
See Also:
Constant Field Values

DATE_FORMAT

public static final String DATE_FORMAT
See Also:
Constant Field Values

mLogProxy

protected Log mLogProxy

mPDMessages

protected com.tivoli.pd.jutil.PDMessages mPDMessages

mPDContext

protected com.tivoli.pd.jutil.PDContext mPDContext
Constructor Detail

CommonBase

protected CommonBase()

CommonBase

protected CommonBase(com.tivoli.pd.jutil.PDContext context)

CommonBase

protected CommonBase(com.tivoli.pd.jutil.PDContext context,
                     Log logger)
Method Detail

logmsg

protected void logmsg(String msg)

debug

protected void debug(String msg)

debug

protected void debug(String msg,
                     Log log)

error

protected void error(String error)

processMsgs

protected void processMsgs(com.tivoli.pd.jutil.PDMessages msgs)

addSchemaEntry

protected static void addSchemaEntry(Vector vector,
                                     String name,
                                     String syntax,
                                     Object size)
Create and add the a schema entry to a schema vector.

Parameters:
vector - - Vector to add the schema entry to
name - - Name of the schema element to add
syntax - - Syntax of the schema element (QSS_*)
size - - Size of the schema element

createAndAddEntryAttribute

protected void createAndAddEntryAttribute(Entry entry,
                                          String attributeName,
                                          Object value)
Create and add attribute to an entry object.

Parameters:
entry - - Entry to add the attribute to
attributeName - - Name of the attribute to add
value - - Value of the attribute to add

getStringEntryAttributeValue

protected String getStringEntryAttributeValue(Entry entry,
                                              String s)
Retrieve an attribute from the entry object as a string.

Parameters:
entry - - Entry to read the attribute from
s - - Name of the attribute value to return
Returns:
String value of specified attribute name from the provided entry

getIntegerEntryAttributeValue

protected Integer getIntegerEntryAttributeValue(Entry entry,
                                                String s)
Retrieve an attribute from the entry object as an integer.

Parameters:
entry - - Entry to read the attribute from
s - - Name of the attribute value to return
Returns:
Integer value of specified attribute name from the provided entry

getLongEntryAttributeValue

protected Long getLongEntryAttributeValue(Entry entry,
                                          String s)
Retrieve an attribute from the entry object as a Long.

Parameters:
entry - - Entry to read the attribute from
s - - Name of the attribute value to return
Returns:
Long value of specified attribute name from the provided entry

getBooleanEntryAttributeValue

protected Boolean getBooleanEntryAttributeValue(Entry entry,
                                                String s)
Retrieve an attribute from the entry object as a Boolean.

Parameters:
entry - - Entry to read the attribute from
s - - Name of the attribute value to return
Returns:
Boolean value of specified attribute name from the provided entry

getDateEntryAttributeValue

protected Date getDateEntryAttributeValue(Entry entry,
                                          String s)
Retrieve an attribute from the entry object as a Date.

Parameters:
entry - - Entry to read the attribute from
s - - Name of the attribute value to return
Returns:
Date value of specified attribute name from the provided entry

getByteArrayEntryAttributeValue

protected byte[] getByteArrayEntryAttributeValue(Entry entry,
                                                 String s)
Retrieve an attribute from the entry object as a byte array.

Parameters:
entry - Entry to read the attribute from
s - Name of the attribute value to return
Returns:
Attribute from the entry object as a byte array.

printEntry

protected void printEntry(Entry entry)

getPDMessage

protected String getPDMessage(com.tivoli.pd.jutil.PDException pde)