WebObjects 5.2

com.webobjects.jndiadaptor
Class JNDIPlugIn

java.lang.Object
  |
  +--com.webobjects.jndiadaptor.JNDIPlugIn
Direct Known Subclasses:
LDAPPlugIn

public abstract class JNDIPlugIn
extends Object

The JNDIPlugIn class represents a plug-in to the JNDIAdaptor.


Inner Class Summary
static interface JNDIPlugIn.ChannelOperation
          The ChannelOperation interface encapsulates an operation to be performed in the JNDIChannel.
 
Field Summary
static String MagicPrimaryKey
          The initial value of a primary key for a new row; the empty string.
 
Constructor Summary
JNDIPlugIn()
          Creates a new instance of JNDIPlugIn.
 
Method Summary
abstract  String base(EOFetchSpecification fetchSpecification, EOEntity entity)
          Creates a base with the specified fetch specification and entity.
 InitialDirContext createInitialDirContext(JNDIAdaptor adaptor)
          Creates a new instance of InitialDirContext with the specified adaptor.
abstract  JNDIType defaultType()
          Gets the default JNDI type.
abstract  String filter(EOFetchSpecification fetchSpecification, EOEntity entity)
          Creates a filter with the specified fetch specification and entity.
abstract  NSArray jndiTypes()
          Gets the JNDI types.
 Object performChannelOperation(JNDIPlugIn.ChannelOperation operation)
           
 String relativeDistinguishedNameForNewRow(NSDictionary row, EOAttribute relativeDistinguishedNameAttribute, String currentRelativeDistinguishedNameAttributeValue)
          Gets the relative distinguished name for a new row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MagicPrimaryKey

public static final String MagicPrimaryKey
The initial value of a primary key for a new row; the empty string.
See Also:
relativeDistinguishedNameForNewRow(NSDictionary, EOAttribute, String), JNDIChannel.primaryKeysForNewRowsWithEntity(int, com.webobjects.eoaccess.EOEntity)
Constructor Detail

JNDIPlugIn

public JNDIPlugIn()
Creates a new instance of JNDIPlugIn.
Method Detail

base

public abstract String base(EOFetchSpecification fetchSpecification,
                            EOEntity entity)
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
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[])

createInitialDirContext

public InitialDirContext createInitialDirContext(JNDIAdaptor adaptor)
Creates a new instance of InitialDirContext with the specified adaptor.
Parameters:
adaptor - - the instance of JNDIAdaptor
Returns:
instance of InitialDirContext
Throws:
- - JNDIAdaptorException - if adaptor is null
See Also:
JNDIAdaptor, InitialDirContext

defaultType

public abstract JNDIType defaultType()
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.
Returns:
the default JNDI type
See Also:
jndiTypes(), JNDIType, JNDIChannel.describeModelWithTableNames(com.webobjects.foundation.NSArray)

filter

public abstract String filter(EOFetchSpecification fetchSpecification,
                              EOEntity entity)
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
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 abstract NSArray jndiTypes()
Gets the JNDI types. EOModeler requires external types, primarily for reverse engineering.
Returns:
instance of NSArray
See Also:
JNDIType, JNDIAdaptor.externalTypesWithModel(com.webobjects.eoaccess.EOModel), JNDIChannel.describeModelWithTableNames(com.webobjects.foundation.NSArray)

performChannelOperation

public Object performChannelOperation(JNDIPlugIn.ChannelOperation operation)

relativeDistinguishedNameForNewRow

public String relativeDistinguishedNameForNewRow(NSDictionary row,
                                                 EOAttribute relativeDistinguishedNameAttribute,
                                                 String currentRelativeDistinguishedNameAttributeValue)
Gets the relative distinguished name for a new row. The default implementation returns the current value of the relative distinguished name attribute. In most cases, the current value will be the Magic Primary Key, and the default implementation will not suffice. See RFC 2253 UTF-8 String Representation of Distinguished Names
Parameters:
row - - the row
relativeDistinguishedNameAttribute - - the primary key attribute
currentRelativeDistinguishedNameAttributeValue - - the current value of the primary key
See Also:
MagicPrimaryKey, JNDIChannel.insertRow(com.webobjects.foundation.NSDictionary, com.webobjects.eoaccess.EOEntity)

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.