Package com.ibm.di.connector.tam
Class CommonBase
- java.lang.Object
-
- com.ibm.di.connector.tam.CommonBase
-
- Direct Known Subclasses:
Domain
,Group
,Policy
,SSOCredentials
,SSOResource
,SSOResourceGroup
,User
public class CommonBase extends java.lang.Object
Utility class to enable classes to log to the LogProxyImplLogProxyImpl contains a copy of the log passed in from the Connector
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.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 java.lang.String
QSS_BOOLEAN
static java.lang.String
QSS_BYTE_ARRAY
static java.lang.String
QSS_DATE
static java.lang.String
QSS_INTEGER
static java.lang.String
QSS_LONG
static java.lang.String
QSS_STRING
static java.lang.String
QSS_VECTOR
-
Constructor Summary
Constructors Modifier Constructor Description protected
CommonBase()
protected
CommonBase(com.tivoli.pd.jutil.PDContext context)
protected
CommonBase(com.tivoli.pd.jutil.PDContext context, Log logger)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
addSchemaEntry(java.util.Vector vector, java.lang.String name, java.lang.String syntax, java.lang.Object size)
Create and add the a schema entry to a schema vector.protected void
createAndAddEntryAttribute(Entry entry, java.lang.String attributeName, java.lang.Object value)
Create and add attribute to an entry object.protected void
debug(java.lang.String msg)
protected void
debug(java.lang.String msg, Log log)
protected void
error(java.lang.String error)
protected java.lang.Boolean
getBooleanEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a Boolean.protected byte[]
getByteArrayEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a byte array.protected java.util.Date
getDateEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a Date.protected java.lang.Integer
getIntegerEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as an integer.protected java.lang.Long
getLongEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a Long.protected java.lang.String
getPDMessage(com.tivoli.pd.jutil.PDException pde)
protected java.lang.String
getStringEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a string.protected void
logmsg(java.lang.String msg)
protected void
printEntry(Entry entry)
protected void
processMsgs(com.tivoli.pd.jutil.PDMessages msgs)
-
-
-
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 java.lang.String QSS_BOOLEAN
- See Also:
- Constant Field Values
-
QSS_BYTE_ARRAY
public static final java.lang.String QSS_BYTE_ARRAY
- See Also:
- Constant Field Values
-
QSS_DATE
public static final java.lang.String QSS_DATE
- See Also:
- Constant Field Values
-
QSS_INTEGER
public static final java.lang.String QSS_INTEGER
- See Also:
- Constant Field Values
-
QSS_LONG
public static final java.lang.String QSS_LONG
- See Also:
- Constant Field Values
-
QSS_STRING
public static final java.lang.String QSS_STRING
- See Also:
- Constant Field Values
-
QSS_VECTOR
public static final java.lang.String QSS_VECTOR
- See Also:
- Constant Field Values
-
DATE_FORMAT
public static final java.lang.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(java.lang.String msg)
-
debug
protected void debug(java.lang.String msg)
-
debug
protected void debug(java.lang.String msg, Log log)
-
error
protected void error(java.lang.String error)
-
processMsgs
protected void processMsgs(com.tivoli.pd.jutil.PDMessages msgs)
-
addSchemaEntry
protected static void addSchemaEntry(java.util.Vector vector, java.lang.String name, java.lang.String syntax, java.lang.Object size)
Create and add the a schema entry to a schema vector.- Parameters:
vector
- - Vector to add the schema entry toname
- - Name of the schema element to addsyntax
- - Syntax of the schema element (QSS_*)size
- - Size of the schema element
-
createAndAddEntryAttribute
protected void createAndAddEntryAttribute(Entry entry, java.lang.String attributeName, java.lang.Object value)
Create and add attribute to an entry object.- Parameters:
entry
- - Entry to add the attribute toattributeName
- - Name of the attribute to addvalue
- - Value of the attribute to add
-
getStringEntryAttributeValue
protected java.lang.String getStringEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a string.- Parameters:
entry
- - Entry to read the attribute froms
- - Name of the attribute value to return- Returns:
- String value of specified attribute name from the provided entry
-
getIntegerEntryAttributeValue
protected java.lang.Integer getIntegerEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as an integer.- Parameters:
entry
- - Entry to read the attribute froms
- - Name of the attribute value to return- Returns:
- Integer value of specified attribute name from the provided entry
-
getLongEntryAttributeValue
protected java.lang.Long getLongEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a Long.- Parameters:
entry
- - Entry to read the attribute froms
- - Name of the attribute value to return- Returns:
- Long value of specified attribute name from the provided entry
-
getBooleanEntryAttributeValue
protected java.lang.Boolean getBooleanEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a Boolean.- Parameters:
entry
- - Entry to read the attribute froms
- - Name of the attribute value to return- Returns:
- Boolean value of specified attribute name from the provided entry
-
getDateEntryAttributeValue
protected java.util.Date getDateEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a Date.- Parameters:
entry
- - Entry to read the attribute froms
- - Name of the attribute value to return- Returns:
- Date value of specified attribute name from the provided entry
-
getByteArrayEntryAttributeValue
protected byte[] getByteArrayEntryAttributeValue(Entry entry, java.lang.String s)
Retrieve an attribute from the entry object as a byte array.- Parameters:
entry
- Entry to read the attribute froms
- 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 java.lang.String getPDMessage(com.tivoli.pd.jutil.PDException pde)
-
-