us.openinternet.luge.transformer
Class LugeTransformer

java.lang.Object
  |
  +--us.openinternet.luge.transformer.LugeTransformer

public class LugeTransformer
extends java.lang.Object

This class should not be directly instantiated. It is used by the Facades and as a base class for the other Transformers.


Field Summary
protected  java.lang.String appCN
           
protected  java.lang.String applicationBase
           
protected  java.lang.String groupBase
           
protected  java.lang.String groupType
           
protected  java.lang.String ldapBaseDN
           
protected  java.lang.String peopleBase
           
protected  java.lang.String personLeafID
           
protected  java.lang.String personType
           
 
Constructor Summary
LugeTransformer(java.lang.String appCN, java.lang.String key)
           
 
Method Summary
protected  void destroy()
           
protected  void finalize()
           
protected  java.lang.String[] fixMembers(java.lang.String[] members)
          This method strips the dn's and takes out the DefaultMember
protected  java.lang.String getApplicationDn(java.lang.String appCN)
           
protected  java.util.Hashtable getEntries(java.lang.String filter, java.util.ArrayList attrs, java.lang.String base, int timeLimit)
           
protected  java.lang.String getFirstRdnValue(java.lang.String dn)
          A convenient method that returns foo for cn=foo,ou=people,dc=mysuffix
protected  java.lang.String getGroupDn(java.lang.String groupName)
           
 LdapDAO getLdapConnection()
          Factory method returns an LdapDAO instance
protected  java.lang.String getUserDn(java.lang.String userId)
           
 boolean groupExists(java.lang.String grpCN)
           
 boolean ifNotConnected()
          Returns true if already connected
 boolean isMember(java.lang.String uid, java.lang.String grpCN)
           
protected  java.lang.String makeFilter(java.util.Hashtable includes, java.util.Hashtable excludes)
          This method may be deprecated.
protected  boolean modifyObject(java.lang.String objectType, java.lang.String objectName, java.util.Hashtable modifyAttrs, boolean appendAttr)
           
 boolean personExists(java.lang.String uid)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ldapBaseDN

protected java.lang.String ldapBaseDN

applicationBase

protected java.lang.String applicationBase

groupBase

protected java.lang.String groupBase

peopleBase

protected java.lang.String peopleBase

groupType

protected java.lang.String groupType

personType

protected java.lang.String personType

personLeafID

protected java.lang.String personLeafID

appCN

protected java.lang.String appCN
Constructor Detail

LugeTransformer

public LugeTransformer(java.lang.String appCN,
                       java.lang.String key)
                throws LugeException
Method Detail

getLdapConnection

public LdapDAO getLdapConnection()
Factory method returns an LdapDAO instance


ifNotConnected

public boolean ifNotConnected()
Returns true if already connected


personExists

public boolean personExists(java.lang.String uid)
Returns:
true if the person exists, else return false

groupExists

public boolean groupExists(java.lang.String grpCN)
Returns:
true if the group exists, else returns false

isMember

public boolean isMember(java.lang.String uid,
                        java.lang.String grpCN)
                 throws LugeException
LugeException

getFirstRdnValue

protected java.lang.String getFirstRdnValue(java.lang.String dn)
A convenient method that returns foo for cn=foo,ou=people,dc=mysuffix


getApplicationDn

protected java.lang.String getApplicationDn(java.lang.String appCN)
Returns:
the full DN application according to the luge.properties file

getUserDn

protected java.lang.String getUserDn(java.lang.String userId)
Returns:
the full DN for a person based on the personLeafID, peopleBase, and ldapBase attributes retreived from the application bootsrap entry.

getGroupDn

protected java.lang.String getGroupDn(java.lang.String groupName)
Returns:
the full DN for a person based on the groupBase, and ldapBase attributes retreived from the application bootsrap entry. Note: this method assumes the leafID for the group is cn per RFC 2377

fixMembers

protected java.lang.String[] fixMembers(java.lang.String[] members)
This method strips the dn's and takes out the DefaultMember


makeFilter

protected java.lang.String makeFilter(java.util.Hashtable includes,
                                      java.util.Hashtable excludes)
This method may be deprecated. ValueObject has a better makeFilter method


getEntries

protected java.util.Hashtable getEntries(java.lang.String filter,
                                         java.util.ArrayList attrs,
                                         java.lang.String base,
                                         int timeLimit)
                                  throws LugeException
LugeException

modifyObject

protected boolean modifyObject(java.lang.String objectType,
                               java.lang.String objectName,
                               java.util.Hashtable modifyAttrs,
                               boolean appendAttr)
                        throws LugeException
LugeException

destroy

protected void destroy()

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
java.lang.Throwable

Copyright 2003, Michael Schwartz All Rights Reserved.