orca.manage.extensions.standard.container.db
Class MySqlContainerManagerObjectDatabase

java.lang.Object
  extended by orca.manage.extensions.standard.container.db.MySqlWrapper
      extended by orca.manage.extensions.standard.container.db.MySqlContainerManagerObjectDatabase
All Implemented Interfaces:
IManagerObjectDatabase, IInitialize
Direct Known Subclasses:
MySqlCodContainerManagerObjectDatabase

public class MySqlContainerManagerObjectDatabase
extends MySqlWrapper
implements IManagerObjectDatabase

An implementation of CodManagementDatabase and PackageDatabase for MySql


Field Summary
static java.lang.String ContainerManagerObjectMapURL
          Default mapping file to use.
 
Fields inherited from class orca.manage.extensions.standard.container.db.MySqlWrapper
db, logger, mapFile, mapper
 
Constructor Summary
MySqlContainerManagerObjectDatabase(MySqlBase db)
          Create a new instance using the default mapping file
MySqlContainerManagerObjectDatabase(MySqlBase db, java.lang.String mapURL)
          Create a new instance using the specified mapping file
 
Method Summary
 void addConfiguration(java.lang.String actorName, java.lang.String key, java.util.Properties p)
          Adds a new configuration record
 void addSlice(java.lang.String actorName, Slice slice)
          Creates a new slice record
 java.util.Vector<java.util.Properties> getClientSlices(java.lang.String name)
          Retrieves all client slices for the specified actor
 java.util.Vector<java.util.Properties> getConfiguration(java.lang.String actorName, java.lang.String key)
          Retrieves the specified configuration record
 java.util.Vector<java.util.Properties> getConfigurations(java.lang.String actorName)
          Retrieves all XML configuration files for the specified actor
 java.util.Vector<java.util.Properties> getInventorySlices(java.lang.String name)
          Retrieves all inventory slices for the specified actor
 java.util.Vector<java.util.Properties> getReservations(java.lang.String actorName, SliceID sliceID)
          Retrieves all reservations for the specified actor in the specified slice
 java.util.Vector<java.util.Properties> getSlice(java.lang.String actorName, SliceID sliceID)
          Retrieves the specified slice
 java.util.Vector<java.util.Properties> getSlices(java.lang.String ActorName)
          Retrieves all slices for the specified actor
 void removeConfiguration(java.lang.String actorName, java.lang.String key)
          Removes the specified configuration record
 void removeReservation(java.lang.String actorName, ReservationID rid)
          Removes the specified reservation record
 void removeSlice(java.lang.String actorName, SliceID slice)
          Removes the specified slice
 void updateReservation(java.lang.String actorName, ResourceReservation reservation)
          Updates the specified reservation record
 void updateSlice(java.lang.String actorName, Slice slice)
          Updates the specified slice record
 
Methods inherited from class orca.manage.extensions.standard.container.db.MySqlWrapper
createSearchResultsTyped, getConnection, initialize, returnConnection
 
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.IInitialize
initialize
 

Field Detail

ContainerManagerObjectMapURL

public static java.lang.String ContainerManagerObjectMapURL
Default mapping file to use.

Constructor Detail

MySqlContainerManagerObjectDatabase

public MySqlContainerManagerObjectDatabase(MySqlBase db)
Create a new instance using the default mapping file


MySqlContainerManagerObjectDatabase

public MySqlContainerManagerObjectDatabase(MySqlBase db,
                                           java.lang.String mapURL)
Create a new instance using the specified mapping file

Method Detail

getConfigurations

public java.util.Vector<java.util.Properties> getConfigurations(java.lang.String actorName)
                                                         throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Retrieves all XML configuration files for the specified actor

Specified by:
getConfigurations in interface IManagerObjectDatabase
Parameters:
actorName - actor name
Throws:
java.lang.Exception

getConfiguration

public java.util.Vector<java.util.Properties> getConfiguration(java.lang.String actorName,
                                                               java.lang.String key)
                                                        throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Retrieves the specified configuration record

Specified by:
getConfiguration in interface IManagerObjectDatabase
Parameters:
actorName - actor name
key - configuration file key
Returns:
Throws:
java.lang.Exception

addConfiguration

public void addConfiguration(java.lang.String actorName,
                             java.lang.String key,
                             java.util.Properties p)
                      throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Adds a new configuration record

Specified by:
addConfiguration in interface IManagerObjectDatabase
Parameters:
actorName - actor name
key - configuration file key
p - serialized configuration
Throws:
java.lang.Exception

removeConfiguration

public void removeConfiguration(java.lang.String actorName,
                                java.lang.String key)
                         throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Removes the specified configuration record

Specified by:
removeConfiguration in interface IManagerObjectDatabase
Parameters:
actorName - actor name
key - configuration key
Throws:
java.lang.Exception

getSlices

public java.util.Vector<java.util.Properties> getSlices(java.lang.String ActorName)
                                                 throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Retrieves all slices for the specified actor

Specified by:
getSlices in interface IManagerObjectDatabase
Returns:
Throws:
java.lang.Exception

getInventorySlices

public java.util.Vector<java.util.Properties> getInventorySlices(java.lang.String name)
                                                          throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Retrieves all inventory slices for the specified actor

Specified by:
getInventorySlices in interface IManagerObjectDatabase
Parameters:
name - actor name
Returns:
Throws:
java.lang.Exception

getClientSlices

public java.util.Vector<java.util.Properties> getClientSlices(java.lang.String name)
                                                       throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Retrieves all client slices for the specified actor

Specified by:
getClientSlices in interface IManagerObjectDatabase
Parameters:
name - actor name
Returns:
Throws:
java.lang.Exception

getSlice

public java.util.Vector<java.util.Properties> getSlice(java.lang.String actorName,
                                                       SliceID sliceID)
                                                throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Retrieves the specified slice

Specified by:
getSlice in interface IManagerObjectDatabase
Parameters:
actorName - actor name
sliceID - slice identifier
Returns:
Throws:
java.lang.Exception

addSlice

public void addSlice(java.lang.String actorName,
                     Slice slice)
              throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Creates a new slice record

Specified by:
addSlice in interface IManagerObjectDatabase
Parameters:
actorName - actor name
slice - slice
Throws:
java.lang.Exception

updateSlice

public void updateSlice(java.lang.String actorName,
                        Slice slice)
                 throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Updates the specified slice record

Specified by:
updateSlice in interface IManagerObjectDatabase
Parameters:
actorName - actor name
slice - slice
Throws:
java.lang.Exception

removeSlice

public void removeSlice(java.lang.String actorName,
                        SliceID slice)
                 throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Removes the specified slice

Specified by:
removeSlice in interface IManagerObjectDatabase
slice - slice identifier
Throws:
java.lang.Exception

getReservations

public java.util.Vector<java.util.Properties> getReservations(java.lang.String actorName,
                                                              SliceID sliceID)
                                                       throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Retrieves all reservations for the specified actor in the specified slice

Specified by:
getReservations in interface IManagerObjectDatabase
Parameters:
actorName - actor name
sliceID - slice name
Throws:
java.lang.Exception

removeReservation

public void removeReservation(java.lang.String actorName,
                              ReservationID rid)
                       throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Removes the specified reservation record

Specified by:
removeReservation in interface IManagerObjectDatabase
Parameters:
actorName - actor name
rid - reservation id
Throws:
java.lang.Exception

updateReservation

public void updateReservation(java.lang.String actorName,
                              ResourceReservation reservation)
                       throws java.lang.Exception
Description copied from interface: IManagerObjectDatabase
Updates the specified reservation record

Specified by:
updateReservation in interface IManagerObjectDatabase
Parameters:
actorName - actor name
reservation - reservation
Throws:
java.lang.Exception


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