gov.bnl.gums
Class GUMS

java.lang.Object
  extended by gov.bnl.gums.GUMS

public class GUMS
extends Object

Facade for the whole business logic available in GUMS. Using GUMS means instanciating an object of this class, and use it to reach the rest of the functionalities.

Author:
Gabriele Carcassi, Jay Packard

Field Summary
protected  ConfigurationStore confStore
           
protected  DBConfigurationStore dbConfStore
           
static QuietLog gumsAdminEmailLog
           
static String gumsAdminLogName
           
protected  Configuration lastConf
           
static String siteAdminLogName
           
 
Constructor Summary
GUMS()
          Creates and initilializes a new instance of GUMS
GUMS(ConfigurationStore confStore)
          Creates and initilializes a new instance of GUMS with a specified configuration store
 
Method Summary
 void deleteBackupConfiguration(String dateStr)
          Delete a backup configuration by date
 Collection getBackupNames()
          Get a list of dates for which a backup gums.config exists
 Configuration getConfiguration()
          Retrieves the configuration being used by GUMS.
 CoreLogic getCoreLogic()
          Retrieve the ResourceManager to perform actions on the business logic.
static String getVersion()
           
 boolean isUserBanned(GridUser user)
           
 void mergeConfiguration(Configuration configuration, String persistenceFactory, String hostToGroupMapping)
           
 void restoreConfiguration(String name)
          Restore a configuration from a certain date
 void setConfiguration(Configuration conf, boolean backup, String name)
          Changes the configuration used by GUMS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

siteAdminLogName

public static final String siteAdminLogName
See Also:
Constant Field Values

gumsAdminLogName

public static final String gumsAdminLogName
See Also:
Constant Field Values

gumsAdminEmailLog

public static QuietLog gumsAdminEmailLog

confStore

protected ConfigurationStore confStore

dbConfStore

protected DBConfigurationStore dbConfStore

lastConf

protected Configuration lastConf
Constructor Detail

GUMS

public GUMS()
Creates and initilializes a new instance of GUMS


GUMS

public GUMS(ConfigurationStore confStore)
Creates and initilializes a new instance of GUMS with a specified configuration store

Parameters:
confStore -
Method Detail

deleteBackupConfiguration

public void deleteBackupConfiguration(String dateStr)
Delete a backup configuration by date

Parameters:
dateStr -

getBackupNames

public Collection getBackupNames()
                          throws Exception
Get a list of dates for which a backup gums.config exists

Returns:
Collection of date strings
Throws:
Exception

getConfiguration

public Configuration getConfiguration()
                               throws Exception
Retrieves the configuration being used by GUMS. The configuration might change from one call to the other. Therefore, the business logic needs to cache the value returned for the duration of a whole call, and not further.

Returns:
current configuration or null.
Throws:
Exception

getCoreLogic

public CoreLogic getCoreLogic()
Retrieve the ResourceManager to perform actions on the business logic.

Returns:
the resource manager.

getVersion

public static String getVersion()

isUserBanned

public boolean isUserBanned(GridUser user)
                     throws Exception
Throws:
Exception

mergeConfiguration

public void mergeConfiguration(Configuration configuration,
                               String persistenceFactory,
                               String hostToGroupMapping)
                        throws Exception
Throws:
Exception

restoreConfiguration

public void restoreConfiguration(String name)
                          throws Exception
Restore a configuration from a certain date

Parameters:
dateStr -
Throws:
Exception

setConfiguration

public void setConfiguration(Configuration conf,
                             boolean backup,
                             String name)
                      throws Exception
Changes the configuration used by GUMS.

Parameters:
conf - the new configuration
Throws:
Exception


Copyright © 2004-2009. All Rights Reserved.