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

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

public class MySqlCodContainerManagerObjectDatabase
extends MySqlContainerManagerObjectDatabase
implements ICodManagerObjectDatabase

An implementation of CodManagementDatabase and PackageDatabase for MySql


Field Summary
static java.lang.String CodContainerManagerObjectMapURL
          Default mapping file to use.
static java.lang.String SiteName
          Site name attribute.
static java.lang.String TypeMachine
           
static java.lang.String TypeNode
           
 
Fields inherited from class orca.manage.extensions.standard.container.db.MySqlContainerManagerObjectDatabase
ContainerManagerObjectMapURL
 
Fields inherited from class orca.manage.extensions.standard.container.db.MySqlWrapper
db, logger, mapFile, mapper
 
Constructor Summary
MySqlCodContainerManagerObjectDatabase(MySqlBase db)
          Create a new instance using the default mapping file
 
Method Summary
 void addMachine(Machine machine)
          Creates a new machine record
 void addStorageServer(StorageServer s)
          Creates a new storage server record
 java.util.Vector<java.util.Properties> getMachine(java.lang.String name)
          Retrieves the specified machine record
 java.util.Vector<java.util.Properties> getMachines()
          Retrieves all machine records for this center
 java.util.Vector<MachineType> getMachineTypes()
           
 java.util.Vector<java.util.Properties> getSiteMachines(java.lang.String siteName)
          Retrieves all machines assigned to the specified site
 java.util.Vector<java.util.Properties> getStorageServer(java.lang.String name)
          Retrieves the specified storage server record
 java.util.Vector<java.util.Properties> getStorageServers()
          Retrieves all storage server records
 void removeMachine(java.lang.String name)
          Removes the specified machine record
 void transferMachine(java.lang.String machineName, java.lang.String siteName)
          Transfers the machine to the specified site
 void updateMachine(Machine machine)
          Updates the specified machine record
 
Methods inherited from class orca.manage.extensions.standard.container.db.MySqlContainerManagerObjectDatabase
addConfiguration, addSlice, getClientSlices, getConfiguration, getConfigurations, getInventorySlices, getReservations, getSlice, getSlices, removeConfiguration, removeReservation, removeSlice, updateReservation, updateSlice
 
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.manage.extensions.standard.container.db.IManagerObjectDatabase
addConfiguration, addSlice, getClientSlices, getConfiguration, getConfigurations, getInventorySlices, getReservations, getSlice, getSlices, removeConfiguration, removeReservation, removeSlice, updateReservation, updateSlice
 
Methods inherited from interface orca.shirako.api.IInitialize
initialize
 

Field Detail

TypeMachine

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

TypeNode

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

CodContainerManagerObjectMapURL

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


SiteName

public static java.lang.String SiteName
Site name attribute.

Constructor Detail

MySqlCodContainerManagerObjectDatabase

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

Method Detail

getStorageServers

public java.util.Vector<java.util.Properties> getStorageServers()
                                                         throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Retrieves all storage server records

Specified by:
getStorageServers in interface ICodManagerObjectDatabase
Returns:
Throws:
java.lang.Exception

getStorageServer

public java.util.Vector<java.util.Properties> getStorageServer(java.lang.String name)
                                                        throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Retrieves the specified storage server record

Specified by:
getStorageServer in interface ICodManagerObjectDatabase
Parameters:
name - Server name
Returns:
Throws:
java.lang.Exception

addStorageServer

public void addStorageServer(StorageServer s)
                      throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Creates a new storage server record

Specified by:
addStorageServer in interface ICodManagerObjectDatabase
Parameters:
s - storage server
Throws:
java.lang.Exception

getMachines

public java.util.Vector<java.util.Properties> getMachines()
                                                   throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Retrieves all machine records for this center

Specified by:
getMachines in interface ICodManagerObjectDatabase
Returns:
Throws:
java.lang.Exception

getMachine

public java.util.Vector<java.util.Properties> getMachine(java.lang.String name)
                                                  throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Retrieves the specified machine record

Specified by:
getMachine in interface ICodManagerObjectDatabase
Parameters:
name - machine name
Returns:
Throws:
java.lang.Exception

getSiteMachines

public java.util.Vector<java.util.Properties> getSiteMachines(java.lang.String siteName)
                                                       throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Retrieves all machines assigned to the specified site

Specified by:
getSiteMachines in interface ICodManagerObjectDatabase
Parameters:
siteName - site name
Returns:
Throws:
java.lang.Exception

addMachine

public void addMachine(Machine machine)
                throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Creates a new machine record

Specified by:
addMachine in interface ICodManagerObjectDatabase
Parameters:
machine - machine
Throws:
java.lang.Exception

updateMachine

public void updateMachine(Machine machine)
                   throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Updates the specified machine record

Specified by:
updateMachine in interface ICodManagerObjectDatabase
Throws:
java.lang.Exception

removeMachine

public void removeMachine(java.lang.String name)
                   throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Removes the specified machine record

Specified by:
removeMachine in interface ICodManagerObjectDatabase
Throws:
java.lang.Exception

transferMachine

public void transferMachine(java.lang.String machineName,
                            java.lang.String siteName)
                     throws java.lang.Exception
Description copied from interface: ICodManagerObjectDatabase
Transfers the machine to the specified site

Specified by:
transferMachine in interface ICodManagerObjectDatabase
Throws:
java.lang.Exception

getMachineTypes

public java.util.Vector<MachineType> getMachineTypes()
                                              throws java.lang.Exception
Throws:
java.lang.Exception


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