org.gridbus.broker.util
Class LdapReplicaAccessUtil

java.lang.Object
  extended by org.gridbus.broker.util.LdapReplicaAccessUtil
All Implemented Interfaces:
ReplicaAccess

public class LdapReplicaAccessUtil
extends java.lang.Object
implements ReplicaAccess

This class has methods to access and query the Globus replica catalog using LDAP


Field Summary
static java.lang.String initial_context_factory
           
static int NO_COUNT_LIMIT
           
static int scope
           
static int timeout
           
 
Constructor Summary
LdapReplicaAccessUtil()
          Constructor for LdapReplicaAccessUtil.
LdapReplicaAccessUtil(java.lang.String URL, java.lang.String LDAPtop)
          Constructor for LdapReplicaAccessUtil.
 
Method Summary
 void connect()
          Connect to the LDAP server
 void disconnect()
          Disconnect from LDAP server
 void getAttributeValues(javax.naming.NamingEnumeration answer, java.lang.String[] attr_req, java.util.Vector result)
          Gets the attributes specified in the String[] param
 java.util.Hashtable getEnv()
          Returns the env.
 java.lang.String getLDAPtop()
          Returns the lDAPtop.
 java.lang.String getLDAPUrl()
          Returns the lDAPUrl.
 void getValue(javax.naming.directory.Attributes attribs, java.lang.String[] attr_req, java.util.Vector result)
          Gets the attribute value specified in the String[] param
 void printAttrs(javax.naming.directory.Attribute attrib)
          Prints the attribute lists passed in
 void printSearchEnumeration(javax.naming.NamingEnumeration result)
          Prints the result list passed in
 void searchAndRetrieve(java.lang.String filter, java.lang.String[] ret_attrs, java.util.Vector result)
          Searches for the specified attributes for the objects satisfying the filter in the catalog
 void searchByFilename(java.lang.String filename, java.lang.Object result)
          Searches the Replica Service based on a filename.
 void searchByFilter(java.lang.String filter, java.lang.Object result)
          Not implemented for LDAP replica access.
 void setEnv()
          Sets the env.
 void setLDAPtop(java.lang.String ldaptop)
          Sets the lDAPtop.
 void setLDAPUrl(java.lang.String ldapUrl)
          Sets the lDAPUrl.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_COUNT_LIMIT

public static final int NO_COUNT_LIMIT
See Also:
Constant Field Values

initial_context_factory

public static final java.lang.String initial_context_factory
See Also:
Constant Field Values

scope

public static final int scope
See Also:
Constant Field Values

timeout

public static final int timeout
See Also:
Constant Field Values
Constructor Detail

LdapReplicaAccessUtil

public LdapReplicaAccessUtil()
Constructor for LdapReplicaAccessUtil.


LdapReplicaAccessUtil

public LdapReplicaAccessUtil(java.lang.String URL,
                             java.lang.String LDAPtop)
Constructor for LdapReplicaAccessUtil.

Parameters:
URL -
LDAPtop -
Method Detail

connect

public void connect()
Connect to the LDAP server


disconnect

public void disconnect()
Disconnect from LDAP server


getAttributeValues

public void getAttributeValues(javax.naming.NamingEnumeration answer,
                               java.lang.String[] attr_req,
                               java.util.Vector result)
Gets the attributes specified in the String[] param

Parameters:
answer - : the enu to be filled in by the query
attr_req -
result -

getEnv

public java.util.Hashtable getEnv()
Returns the env.

Returns:
Hashtable

getLDAPtop

public java.lang.String getLDAPtop()
Returns the lDAPtop.

Returns:
String

getLDAPUrl

public java.lang.String getLDAPUrl()
Returns the lDAPUrl.

Returns:
String

getValue

public void getValue(javax.naming.directory.Attributes attribs,
                     java.lang.String[] attr_req,
                     java.util.Vector result)
Gets the attribute value specified in the String[] param

Parameters:
attribs -
attr_req - : attribute to get
result -

printAttrs

public void printAttrs(javax.naming.directory.Attribute attrib)
Prints the attribute lists passed in

Parameters:
attrib -

printSearchEnumeration

public void printSearchEnumeration(javax.naming.NamingEnumeration result)
Prints the result list passed in

Parameters:
result -

searchAndRetrieve

public void searchAndRetrieve(java.lang.String filter,
                              java.lang.String[] ret_attrs,
                              java.util.Vector result)
Searches for the specified attributes for the objects satisfying the filter in the catalog

Parameters:
filter - : condition to search for objects
ret_attrs - : attributes to return
result -

setEnv

public void setEnv()
Sets the env.


setLDAPtop

public void setLDAPtop(java.lang.String ldaptop)
Sets the lDAPtop.

Parameters:
ldaptop -

setLDAPUrl

public void setLDAPUrl(java.lang.String ldapUrl)
Sets the lDAPUrl.

Parameters:
ldapUrl -

searchByFilename

public void searchByFilename(java.lang.String filename,
                             java.lang.Object result)
Description copied from interface: ReplicaAccess
Searches the Replica Service based on a filename.

Specified by:
searchByFilename in interface ReplicaAccess
See Also:
ReplicaAccess.searchByFilename(java.lang.String, java.lang.Object)

searchByFilter

public void searchByFilter(java.lang.String filter,
                           java.lang.Object result)
Not implemented for LDAP replica access.

Specified by:
searchByFilter in interface ReplicaAccess
See Also:
ReplicaAccess.searchByFilter(java.lang.String, java.lang.Object)