IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.services.ldap
Class LDAPRequestFormat

java.lang.Object
  extended by com.ibm.btt.base.FormatElement
      extended by com.ibm.btt.services.ldap.LDAPRequestFormat
All Implemented Interfaces:
Cacheable, java.io.Externalizable, java.io.Serializable

public class LDAPRequestFormat
extends FormatElement

This class provides formatting support for the LDAP Access service. It is initialized from externalized data, and after initialization contains the data and definitions needed to create an LDAP request model object. The request model object is created, initialized, and returned when the doFormat(Context) method is called on this class. Note that unlike regular format objects, this class does not use the format(Context) method, and does not implement any functionality in the unformat(String, DataElement) method.

See Also:
Serialized Form

Field Summary
protected static java.lang.String RST_ATTR_LIST
           
protected static java.lang.String RST_FILTER_LIST
           
protected static java.lang.String RST_LDAP_NAME
           
protected static java.lang.String RST_MOD_LIST
           
 
Fields inherited from class com.ibm.btt.base.FormatElement
dataElementName
 
Constructor Summary
LDAPRequestFormat()
          LDAPRequestFormat constructor.
 
Method Summary
 LDAPRequest doFormat(Context context)
          The format() method defined in FormatElement does not support the functionality required of this particular format class.
 LDAPRequest doFormat(Operation operation)
          Provides equivalent functionality as doFormat(operation.getContext())
 java.lang.String format(DataElement data)
          Format abstract class.
 java.lang.String getFilterType()
          Returns the filter type (for search requests) defined for this format element.
 java.lang.String getName()
          Returns the name of this format element.
 java.lang.String getRequestType()
          Returns the request type defined for this format element.
 java.lang.Object getValue(Context context, java.lang.String name, boolean required)
          Obtains a named value from the supplied context and returns it.
 java.lang.Object initializeFrom(Tag aTag)
          Initializes this format with externalized data.
 void removeExternal()
          Removes the XML tags used to externalize this object from the SGML file they are in.
 void setFilterType(java.lang.String newFilterType)
          Sets the filter type (for search requests) for this format element.
 void setName(java.lang.String newName)
          Sets the name of this format element.
 void setRequestType(java.lang.String type)
          Sets the request type for this format element.
 void setValueAt(Context targetCtx, Context sourceCtx, java.lang.String dataName, boolean required)
          Transfers named value from the source context to the target context.
 java.lang.String toString()
          Returns the string representation of this class.
 Vector toStrings()
          Returns a vector containing the string representation of the XML tags used to externalize this object.
 DataElement unformat(java.lang.String str, DataElement element)
          Unformat abstract method.
 
Methods inherited from class com.ibm.btt.base.FormatElement
checkIndexes, exceptionInfo, externalizer, extract, format, getDataElementName, getExternalizer, getTagName, isCacheable, isConstant, isItConstant, isNull, readExternal, readExternal, readObject, reinitialize, rootDecorated, setDataElementName, setExternalizer, setSize, toTags, unformat, unformat, unformat, writeExternal, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RST_LDAP_NAME

protected static final java.lang.String RST_LDAP_NAME
See Also:
Constant Field Values

RST_FILTER_LIST

protected static final java.lang.String RST_FILTER_LIST
See Also:
Constant Field Values

RST_MOD_LIST

protected static final java.lang.String RST_MOD_LIST
See Also:
Constant Field Values

RST_ATTR_LIST

protected static final java.lang.String RST_ATTR_LIST
See Also:
Constant Field Values
Constructor Detail

LDAPRequestFormat

public LDAPRequestFormat()
LDAPRequestFormat constructor.

Method Detail

doFormat

public LDAPRequest doFormat(Context context)
                     throws DSEException,
                            DSEInvalidClassException,
                            DSEInvalidRequestException,
                            DSEInvalidArgumentException
The format() method defined in FormatElement does not support the functionality required of this particular format class. Therefore, this method serves the same purpose of format(Context) in FormatElement, except that it has a different signature. It returns an instance of LDAPRequest for use by the LDAP Service.

Parameters:
context - com.ibm.btt.base.Context
Returns:
com.ibm.btt.services.ldap.LDAPRequest
Throws:
DSEException
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

doFormat

public LDAPRequest doFormat(Operation operation)
                     throws DSEException,
                            DSEInvalidClassException,
                            DSEInvalidRequestException,
                            DSEInvalidArgumentException
Provides equivalent functionality as doFormat(operation.getContext())

Parameters:
operation - com.ibm.btt.base.Operation
Returns:
com.ibm.btt.services.ldap.LDAPRequest
Throws:
DSEException
DSEInvalidClassException
DSEInvalidRequestException
DSEInvalidArgumentException

format

public java.lang.String format(DataElement data)
Description copied from class: FormatElement
Format abstract class.

Specified by:
format in class FormatElement
Parameters:
data - DataElement
Returns:
String

getFilterType

public java.lang.String getFilterType()
Returns the filter type (for search requests) defined for this format element.

Returns:
java.lang.String

getName

public java.lang.String getName()
Returns the name of this format element.

Specified by:
getName in interface Cacheable
Overrides:
getName in class FormatElement
Returns:
java.lang.String

getRequestType

public java.lang.String getRequestType()
Returns the request type defined for this format element. The request type determines what type of request model will be returned after calling doFormat(Context) on this format.

Returns:
java.lang.String

getValue

public java.lang.Object getValue(Context context,
                                 java.lang.String name,
                                 boolean required)
                          throws DSEException
Obtains a named value from the supplied context and returns it. If the value does not exist in the context and the required flag is set to true, an exception is thrown. Otherwise, the value null is returned.

Parameters:
context - com.ibm.btt.base.Context
name - java.lang.String
required - boolean
Returns:
java.lang.Object
Throws:
DSEException

initializeFrom

public java.lang.Object initializeFrom(Tag aTag)
                                throws java.io.IOException,
                                       DSEException
Initializes this format with externalized data.

Specified by:
initializeFrom in class FormatElement
Parameters:
aTag - com.ibm.btt.base.Tag
Returns:
java.lang.Object
Throws:
java.io.IOException
DSEException

removeExternal

public void removeExternal()
                    throws java.io.IOException
Removes the XML tags used to externalize this object from the SGML file they are in.

Overrides:
removeExternal in class FormatElement
Throws:
java.io.IOException

setFilterType

public void setFilterType(java.lang.String newFilterType)
Sets the filter type (for search requests) for this format element. Value may be attributes, expression, or value.

Parameters:
newFilterType - java.lang.String

setName

public void setName(java.lang.String newName)
Sets the name of this format element.

Overrides:
setName in class FormatElement
Parameters:
newName - java.lang.String

setRequestType

public void setRequestType(java.lang.String type)
Sets the request type for this format element. The request type determines the type of request model that will be returned as a result of calling doFormat(Context) on this format. Value may be: list listbindings lookup search create destroy modify getattributes Caveat: list and listbindings are supported by the same request model.

Parameters:
str - java.lang.String

setValueAt

public void setValueAt(Context targetCtx,
                       Context sourceCtx,
                       java.lang.String dataName,
                       boolean required)
                throws DSEException
Transfers named value from the source context to the target context.

Parameters:
targetCtx - com.ibm.btt.base.Context
sourceCtx - com.ibm.btt.base.Context
dataName - java.lang.String
required - boolean
Throws:
DSEException

toString

public java.lang.String toString()
Returns the string representation of this class.

Overrides:
toString in class FormatElement
Returns:
java.lang.String

toStrings

public Vector toStrings()
Returns a vector containing the string representation of the XML tags used to externalize this object.

Overrides:
toStrings in class FormatElement
Returns:
com.ibm.btt.base.Vector

unformat

public DataElement unformat(java.lang.String str,
                            DataElement element)
Description copied from class: FormatElement
Unformat abstract method. To be implemented by the subclasses.

Specified by:
unformat in class FormatElement

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011