WebObjects 5.2.3

com.webobjects.jndiadaptor
Class LDAPPlugIn

java.lang.Object
  extended bycom.webobjects.jndiadaptor.JNDIPlugIn
      extended bycom.webobjects.jndiadaptor.LDAPPlugIn

public class LDAPPlugIn
extends JNDIPlugIn

The LDAPPlugIn class represents a plug-in to the JNDIAdaptor for Lightweight Directory Access Protocol services.


Nested Class Summary
 
Nested classes inherited from class com.webobjects.jndiadaptor.JNDIPlugIn
JNDIPlugIn.ChannelOperation
 
Field Summary
 
Fields inherited from class com.webobjects.jndiadaptor.JNDIPlugIn
MagicPrimaryKey
 
Constructor Summary
LDAPPlugIn()
          Creates a new instance of LDAPPlugIn.
 
Method Summary
 String base(EOFetchSpecification fetchSpecification, EOEntity entity)
          Creates a base with the specified fetch specification and entity.
 String convertSpecialCharactersForDistinguishedName(String name)
          Creates a version of the specified name that is a valid relative distinguished name.
 JNDIType defaultType()
          Gets the default JNDI type.
 String filter(EOFetchSpecification fetchSpecification, EOEntity entity)
          Creates a filter with the specified fetch specification and entity.
 NSArray jndiTypes()
          Gets the JNDI types.
 String relativeDistinguishedNameForNewRow(NSDictionary row, EOAttribute relativeDistinguishedNameAttribute, String currentRelativeDistinguishedNameAttributeValue)
          Gets the relative distinguished name for a new row.
 
Methods inherited from class com.webobjects.jndiadaptor.JNDIPlugIn
createInitialDirContext, performChannelOperation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPPlugIn

public LDAPPlugIn()
Creates a new instance of LDAPPlugIn.

See Also:
JNDIPlugIn.JNDIPlugIn()
Method Detail

base

public String base(EOFetchSpecification fetchSpecification,
                   EOEntity entity)
Description copied from class: JNDIPlugIn
Creates a base with the specified fetch specification and entity. The base represents the relative name of a context or object in a search. For a typical fetch-all operation, the base will be the empty string. For fetching a particular row, the base will be the relative distinguished name. See RFC 2253 UTF-8 String Representation of Distinguished Names

Specified by:
base in class JNDIPlugIn
Parameters:
fetchSpecification - - the fetch specification
entity - - the entity
Returns:
base
See Also:
EOFetchSpecification, EOEntity, DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[])

convertSpecialCharactersForDistinguishedName

public String convertSpecialCharactersForDistinguishedName(String name)
Creates a version of the specified name that is a valid relative distinguished name. The following special characters are escaped:
 , ; + = # " \ < >
 
See RFC 2253 UTF-8 String Representation of Distinguished Names

Parameters:
name - - the relative distinguished name
Returns:
converted name
See Also:
relativeDistinguishedNameForNewRow(NSDictionary, EOAttribute, String)

defaultType

public JNDIType defaultType()
Description copied from class: JNDIPlugIn
Gets the default JNDI type. The default type is used by EOModeler for reverse engineering in case the external type of an attribute cannot be determined.

Specified by:
defaultType in class JNDIPlugIn
Returns:
the default JNDI type
See Also:
JNDIPlugIn.jndiTypes(), JNDIType, JNDIChannel.describeModelWithTableNames(com.webobjects.foundation.NSArray)

filter

public String filter(EOFetchSpecification fetchSpecification,
                     EOEntity entity)
Description copied from class: JNDIPlugIn
Creates a filter with the specified fetch specification and entity. The filter represents the filter expression to use in a search. See RFC 2254 The String Representation of LDAP Search Filters

Specified by:
filter in class JNDIPlugIn
Parameters:
fetchSpecification - - the fetch specification
entity - - the entity
Returns:
filter
See Also:
EOFetchSpecification, EOEntity, DirContext.search(javax.naming.Name, javax.naming.directory.Attributes, java.lang.String[])

jndiTypes

public NSArray jndiTypes()
Gets the JNDI types. EOModeler requires external types, primarily for reverse engineering. The LDAP plug-in defines JNDI types for all LDAP attribute syntaxes. See RFC 2252 Attribute Syntax Definitions

Specified by:
jndiTypes in class JNDIPlugIn
Returns:
instance of NSArray
See Also:
JNDIType, JNDIPlugIn.jndiTypes(), JNDIAdaptor.externalTypesWithModel(com.webobjects.eoaccess.EOModel), JNDIChannel.describeModelWithTableNames(com.webobjects.foundation.NSArray)

relativeDistinguishedNameForNewRow

public String relativeDistinguishedNameForNewRow(NSDictionary row,
                                                 EOAttribute relativeDistinguishedNameAttribute,
                                                 String currentRelativeDistinguishedNameAttributeValue)
Gets the relative distinguished name for a new row. Uses the write format for automatic primary key generation. For example, the following pattern specifies the constant string "cn=" to be followed by the value of the attribute named "cn":
 cn=<cn>
 
See RFC 2253 UTF-8 String Representation of Distinguished Names

Overrides:
relativeDistinguishedNameForNewRow in class JNDIPlugIn
Parameters:
row - - the row
relativeDistinguishedNameAttribute - - the primary key attribute
currentRelativeDistinguishedNameAttributeValue - - the current value of the primary key
See Also:
convertSpecialCharactersForDistinguishedName(String), JNDIPlugIn.relativeDistinguishedNameForNewRow(com.webobjects.foundation.NSDictionary, com.webobjects.eoaccess.EOAttribute, java.lang.String), JNDIChannel.insertRow(com.webobjects.foundation.NSDictionary, com.webobjects.eoaccess.EOEntity), EOAttribute.writeFormat()

Last updated Thu Oct 21 15:04:16 PDT 2004.

Copyright © 2004 Apple Computer, Inc.