com.ibm.dse.services.ldap
Class LDAPRequestFormat

java.lang.Object
  |
  +--com.ibm.dse.base.FormatElement
        |
        +--com.ibm.dse.services.ldap.LDAPRequestFormat

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.dse.base.FormatElement
dataElementName, name
 
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)
          Functionally equivalent to 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()
          Remove the SGML 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 SGML tags used to externalize this object.
 DataElement unformat(java.lang.String str, DataElement element)
          Unformat abstract method.
 
Methods inherited from class com.ibm.dse.base.FormatElement
exceptionInfo, externalizer, extract, format, format, getDataElementName, getExternalizer, getTagName, isCacheable, isConstant, readExternal, readExternal, readObject, reinitialize, rootDecorated, setDataElementName, setExternalizer, setSize, toTags, 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

RST_FILTER_LIST

protected static final java.lang.String RST_FILTER_LIST

RST_MOD_LIST

protected static final java.lang.String RST_MOD_LIST

RST_ATTR_LIST

protected static final java.lang.String RST_ATTR_LIST
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 Composer Service.
Parameters:
context - com.ibm.dse.base.Context
Returns:
com.ibm.dse.services.ldap.LDAPRequest
Throws:
DSEException -  
DSEInvalidClassException -  
DSEInvalidRequestException -  
DSEInvalidArgumentException -  

doFormat

public LDAPRequest doFormat(Operation operation)
                     throws DSEException,
                            DSEInvalidClassException,
                            DSEInvalidRequestException,
                            DSEInvalidArgumentException
Functionally equivalent to doFormat(operation.getContext())
Parameters:
operation - com.ibm.dse.base.Operation
Returns:
com.ibm.dse.services.ldap.LDAPRequest
Throws:
DSEException -  
DSEInvalidClassException -  
DSEInvalidRequestException -  
DSEInvalidArgumentException -  

format

public java.lang.String format(DataElement data)
Description copied from class: FormatElement
Format abstract class.
Overrides:
format in class FormatElement
Tags copied from class: FormatElement
Parameters:
aDataElement - 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.
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.dse.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.
Overrides:
initializeFrom in class FormatElement
Parameters:
aTag - com.ibm.dse.base.Tag
Returns:
java.lang.Object
Throws:
java.io.IOException -  
DSEException -  

removeExternal

public void removeExternal()
                    throws java.io.IOException
Remove the SGML 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.dse.base.Context
sourceCtx - com.ibm.dse.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 SGML tags used to externalize this object.
Overrides:
toStrings in class FormatElement
Returns:
com.ibm.dse.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.
Overrides:
unformat in class FormatElement