netcom.util
Class LDAPCommunicator

java.lang.Object
  extended bynetcom.util.LDAPCommunicator

public class LDAPCommunicator
extends java.lang.Object

Title: LDAPCommunicator

Description: LDAPCommunicator class is responsible for the communication with an LDAP server. It handles two main data types. Authentication entries represent the login/logout information for PClients and PServers. The are validated against the LDAP server database Node entries contain the information about available MDS and MDSProxies

Company: NETCOM


Constructor Summary
LDAPCommunicator()
          Constructor to create a LDAPCommunicator object
 
Method Summary
 boolean addAuthenticationEntry(AuthenticationEntry entry)
          Adds new username/password pair if not already exists
 boolean addNodeEntry(NodeEntry entry)
          Adds new PClient/PServer node to LDAP if not already exists
 AuthenticationEntry[] getAuthenticationList()
          Returns array of all AuthenticationEntry that are registered on LDAP
 NodeEntry getNodeEntry(java.lang.String thisID)
          Returns NodeEntry for corresponding node_name that is registered on LDAP
 NodeEntry[] getNodeList(int type)
           
 int isAuthenticated(AuthenticationEntry entry)
          Checks to see if AuthenticationEntry is authenticated.
 boolean removeAuthenticationEntry(AuthenticationEntry entry)
          Removes username/password pair if it already exists
 void removeNodeEntry(NodeEntry entry)
          Removes PClient/PServer node from LDAP if it already exists
 boolean updateNodeEntry(NodeEntry entry)
          Modifies PClient/PServer node on LDAP if it already exists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LDAPCommunicator

public LDAPCommunicator()
Constructor to create a LDAPCommunicator object

Method Detail

addAuthenticationEntry

public boolean addAuthenticationEntry(AuthenticationEntry entry)
Adds new username/password pair if not already exists

Parameters:
entry - AuthenticationEntry to register on LDAP Server

removeAuthenticationEntry

public boolean removeAuthenticationEntry(AuthenticationEntry entry)
Removes username/password pair if it already exists

Parameters:
entry - AuthenticationEntry to remove from LDAP Server

getAuthenticationList

public AuthenticationEntry[] getAuthenticationList()
Returns array of all AuthenticationEntry that are registered on LDAP

Returns:
AuthenticationEntry[] that stores all registered AuthenticationEntry

isAuthenticated

public int isAuthenticated(AuthenticationEntry entry)
Checks to see if AuthenticationEntry is authenticated.

Parameters:
entry - AuthenticationEntry to check
Returns:
boolean of authentication status

addNodeEntry

public boolean addNodeEntry(NodeEntry entry)
Adds new PClient/PServer node to LDAP if not already exists

Parameters:
entry - NodeEntry to register on LDAP Server

removeNodeEntry

public void removeNodeEntry(NodeEntry entry)
Removes PClient/PServer node from LDAP if it already exists

Parameters:
entry - NodeEntry to deregister on LDAP Server

updateNodeEntry

public boolean updateNodeEntry(NodeEntry entry)
Modifies PClient/PServer node on LDAP if it already exists

Parameters:
entry - NodeEntry to modify on LDAP Server

getNodeList

public NodeEntry[] getNodeList(int type)

getNodeEntry

public NodeEntry getNodeEntry(java.lang.String thisID)
Returns NodeEntry for corresponding node_name that is registered on LDAP

Returns:
NodeEntry that is the registered NodeEntry that corresponds to node_name Note: This method does not work yet.