orca.sharp.plugins.db
Class LdapClientDatabase

java.lang.Object
  extended by orca.util.db.DatabaseBase
      extended by orca.util.db.LdapBase
          extended by orca.shirako.plugins.db.LdapDatabase
              extended by orca.sharp.plugins.db.LdapClientDatabase
All Implemented Interfaces:
ClientDatabase, IDatabase, IInitialize, IRecover, ISerialize
Direct Known Subclasses:
LdapCodDatabase

public class LdapClientDatabase
extends LdapDatabase
implements ClientDatabase

Implementation of ClientDatabase for LDAP


Field Summary
static java.lang.String Client
           
static java.lang.String Clients
           
protected  java.lang.String clientsDN
          DN for storing client records
static java.lang.String DefaultClientsLdapMapUrl
          The default schema mapping
 
Fields inherited from class orca.shirako.plugins.db.LdapDatabase
actorName, Brokers, brokersDN, ConfigMappings, configMappingsDN, Configs, configsDN, DefaultConfigUrl, Inventory, inventoryDN, ObjectClassReservation, ObjectClassSlice, Peers, peersDN, PropertyNodeState, PropertyReservationID, reservationListeners, Reservations, Slices, slicesDN, TypeBroker, TypeConfigMapping, TypeReservation, TypeSlice
 
Fields inherited from class orca.util.db.LdapBase
AllEntries, baseDN, bindDN, bindPasswd, bindPasswdBytes, cn, cnE, create, dc, dcE, DefaultMaxPhysicalConnections, DefaultMaxSharesPerPhysicalConnection, ldapServer, logger, mapFile, mapper, maxPhysicalConnections, maxSharesPerPhysicalConnection, obCodCluster, objectClass, objectClassE, obMisc, obOU, obShirako, obTop, ou, ouE, pool, PropertyLdapBaseDN, PropertyLdapBindDN, PropertyLdapPassword, PropertyLdapServer, resetState
 
Fields inherited from class orca.util.db.DatabaseBase
PropertyDBClassName
 
Constructor Summary
LdapClientDatabase()
          Create a new instance using the default schema mapping
LdapClientDatabase(java.lang.String mapFile)
          Create a new instance using the specified schema mapping file
 
Method Summary
 void addClient(Client client)
          Adds a new database record representing this client
protected  void createHierarchy(com.novell.ldap.LDAPConnection connection, java.lang.String topPrefix)
          
 java.util.Vector<java.util.Properties> getClient(java.lang.String name)
          Retrieves the specified client record
protected  java.lang.String getClientDN(java.lang.String name)
          Returns the DN for the specified client
protected  java.lang.String getClientPrefix(java.lang.String name)
          Returns the DN prefix for the specified client
 java.util.Vector<java.util.Properties> getClients()
          Retrieves all client records
protected  void initDNs()
          
 void removeClient(java.lang.String name)
          Removes the specified client record
 void updateClient(Client client)
          Updates the database record for the specified client
 
Methods inherited from class orca.shirako.plugins.db.LdapDatabase
actorAdded, addBroker, addConfigurationMapping, addReservation, addSlice, createSliceHierarchy, getAgentReservations, getAuthorityReservations, getBrokerDN, getBrokers, getClientReservations, getClientSlices, getConfigurationMapping, getConfigurationMappingDN, getConfigurationMappings, getHoldings, getInventorySlices, getReservation, getReservationDN, getReservationDN, getReservations, getReservations, getReservationsDN, getSlice, getSlice, getSliceDN, getSlices, initialize, notifyReservationListeners, registerReservationListener, removeBroker, removeConfigurationMapping, removeReservation, removeSlice, revisit, setActorName, unregisterReservationListener, updateBroker, updateConfigurationMapping, updateReservation, updateSlice
 
Methods inherited from class orca.util.db.LdapBase
checkBase, configure, deleteContainer, exists, getBaseDN, getBindDN, getConnection, getDatabaseData, getLogger, getPassword, getProperties, getServer, reset, returnConnection, save, save, search, searchBase, searchOne, searchSub, setBaseDN, setBindDN, setBindPassword, setLogger, setMaxPhysicalConnections, setMaxSharesPerPhysicalConnection, setResetState, setServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface orca.shirako.api.IDatabase
getLogger, setLogger, setResetState
 
Methods inherited from interface orca.shirako.api.ISerialize
reset, save, save
 

Field Detail

DefaultClientsLdapMapUrl

public static final java.lang.String DefaultClientsLdapMapUrl
The default schema mapping

See Also:
Constant Field Values

Clients

public static java.lang.String Clients

Client

public static java.lang.String Client

clientsDN

protected java.lang.String clientsDN
DN for storing client records

Constructor Detail

LdapClientDatabase

public LdapClientDatabase()
Create a new instance using the default schema mapping


LdapClientDatabase

public LdapClientDatabase(java.lang.String mapFile)
Create a new instance using the specified schema mapping file

Parameters:
mapFile - schema mapping file
Method Detail

initDNs

protected void initDNs()

Overrides:
initDNs in class LdapDatabase

createHierarchy

protected void createHierarchy(com.novell.ldap.LDAPConnection connection,
                               java.lang.String topPrefix)
                        throws java.lang.Exception

Overrides:
createHierarchy in class LdapDatabase
Throws:
java.lang.Exception

addClient

public void addClient(Client client)
               throws java.lang.Exception
Adds a new database record representing this client

Specified by:
addClient in interface ClientDatabase
Throws:
java.lang.Exception

updateClient

public void updateClient(Client client)
                  throws java.lang.Exception
Updates the database record for the specified client

Specified by:
updateClient in interface ClientDatabase
Throws:
java.lang.Exception

removeClient

public void removeClient(java.lang.String name)
                  throws java.lang.Exception
Removes the specified client record

Specified by:
removeClient in interface ClientDatabase
Throws:
java.lang.Exception

getClient

public java.util.Vector<java.util.Properties> getClient(java.lang.String name)
                                                 throws java.lang.Exception
Retrieves the specified client record

Specified by:
getClient in interface ClientDatabase
Returns:
Throws:
java.lang.Exception

getClients

public java.util.Vector<java.util.Properties> getClients()
                                                  throws java.lang.Exception
Retrieves all client records

Specified by:
getClients in interface ClientDatabase
Returns:
Throws:
java.lang.Exception

getClientDN

protected java.lang.String getClientDN(java.lang.String name)
Returns the DN for the specified client

Parameters:
name - client name
Returns:

getClientPrefix

protected java.lang.String getClientPrefix(java.lang.String name)
Returns the DN prefix for the specified client

Parameters:
name -
Returns:


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.