org.lsst.ccs.config.remote
Interface ConfigurationService

All Superinterfaces:
Remote
All Known Implementing Classes:
ConfigurationServerModule, ConfigurationServiceImpl, RMIConfigurationServer

public interface ConfigurationService
extends Remote

Abstract services definition for Configuration Service. This is using the semantics of RMI (such as Remote or RemoteException) but can be used in other contexts.

Author:
bamade

Method Summary
 void createPreparedConfiguration(String subsystemName, String configName, String tag, String user)
          generates in the database a special entry with a merge of description and configuration
 ProfileResult deprecateConfigProfile(String name, String tag)
          Deprecates a valid Configuration Profile.
 DescriptionResult deprecateSubsystemDescription(String subsystemName, String tag)
          Deprecates a registered subsystem.
 ConfigProfile getActiveConfigProfile(String name, String tag)
          gets an active ConfigProfile with anme and tag
 SubsystemDescription getActiveSubsystemDescription(String name, String tag)
          fetch the active Description with name and tag
 String getActiveValueAt(String subsystemName, String parameterPath, long date)
          gets the value of a parameter for a subsystem which was active at a moment in time.
 ConfigProfile getConfigRunningAt(String subsystemName, long date)
          Returns the Configuration which was running for a given subsystem at a moment in time
 ConfigProfile getConfigValidAt(String configName, String configTag, long date)
          Gets a ConfigProfile which was (or is) valid at a precise moment.
 MachineConfiguration getMachineConfiguration(String macAddress)
          get the machine configuration for a specific machine
 ConfigProfile getNext(ConfigProfile current)
          Gets a (deprecated or "alive") ConfigProfile with same name and tag as the argument
 ConfigProfile getPrevious(ConfigProfile current)
          gets a (deprecated) ConfigProfile with same name and tag as the argument.
 SubsystemDescription getPrevious(SubsystemDescription current)
          Gets the (deprecated) SubsystemDescription with same characteritics as the argument
 String getValueValidAt(String configName, String configTag, String parameterPath, long date)
          Gets the value of a Parameter which was valid at a moment in time.
 ParameterConfiguration modifyParmConf(ParameterConfiguration engineeringModeParm)
          Registers a modification to a ParameterConfiguration operated through ConfigProfile.temporaryChangeConfigurationValue
 ProfileResult registerConfigProfile(ConfigProfile newProfile)
          Registers a new ConfigProfile in the configuration service.
 ProfileResult registerConfiguration(String subsystemName, String configurationName, String tag, String user, int level, Properties props)
          typical remote service: a local properties structure is base for creating a new ConfigProfile
 void registerMachineConfiguration(MachineConfiguration machineConfiguration)
          registers in the database a machineConfiguration entry
 DescriptionResult registerSubsystemDescription(SubsystemDescription newDescription)
          Registers in the configuration service a new subsystem description (created through Factories code.
 List<?> simpleHQLRequest(String hqlSelectString)
          can send a simple HQL request to the underlying Database.
 

Method Detail

registerSubsystemDescription

DescriptionResult registerSubsystemDescription(SubsystemDescription newDescription)
                                               throws RemoteException
Registers in the configuration service a new subsystem description (created through Factories code.

Parameters:
newDescription - do not use this object any more after the call
Returns:
a data structure containing a reference to an immutable registered subsystem (use getResult()) a possible deprecated subsystem which has been replaced by the newDescription and a list of possible deprecated ConfigProfile that were referencing the obsolete subsystem
Throws:
RemoteException

deprecateSubsystemDescription

DescriptionResult deprecateSubsystemDescription(String subsystemName,
                                                String tag)
                                                throws RemoteException
Deprecates a registered subsystem.

Parameters:
subsystemName -
tag -
Returns:
a data structure with the deprecated subsystem (or null if not found) and a list of ConfigProfile that may have been deprecated
Throws:
RemoteException

getActiveSubsystemDescription

SubsystemDescription getActiveSubsystemDescription(String name,
                                                   String tag)
                                                   throws RemoteException
fetch the active Description with name and tag

Parameters:
name -
tag -
Returns:
Throws:
RemoteException

registerConfigProfile

ProfileResult registerConfigProfile(ConfigProfile newProfile)
                                    throws RemoteException
Registers a new ConfigProfile in the configuration service. The object must have been created with Factories using a registered valid SubsystemDescription

Parameters:
newProfile - do not use this object any more after the call
Returns:
a data structure containing an immutable registered Objecta (use getResult()) and possibly a deprecated profile it replaces.
Throws:
RemoteException

registerConfiguration

ProfileResult registerConfiguration(String subsystemName,
                                    String configurationName,
                                    String tag,
                                    String user,
                                    int level,
                                    Properties props)
                                    throws RemoteException
typical remote service: a local properties structure is base for creating a new ConfigProfile

Parameters:
subsystemName -
configurationName -
tag -
user -
level -
props -
Returns:
Throws:
RemoteException

deprecateConfigProfile

ProfileResult deprecateConfigProfile(String name,
                                     String tag)
                                     throws RemoteException
Deprecates a valid Configuration Profile.

Parameters:
name - configuration name
tag -
Returns:
a data structure containing the deprecated object (or null if not found)
Throws:
RemoteException

getActiveConfigProfile

ConfigProfile getActiveConfigProfile(String name,
                                     String tag)
                                     throws RemoteException
gets an active ConfigProfile with anme and tag

Parameters:
name -
tag -
Returns:
null if no such configuration
Throws:
RemoteException

modifyParmConf

ParameterConfiguration modifyParmConf(ParameterConfiguration engineeringModeParm)
                                      throws RemoteException
Registers a modification to a ParameterConfiguration operated through ConfigProfile.temporaryChangeConfigurationValue

Parameters:
engineeringModeParm - a ParameterConfiguration object which is registered in a registered ConfigProfile object in engineering mode (see Factories.copyProfile and register the resulting profile before calling this method)
Returns:
its argument (can be reused for other calls of temporaryChange)
Throws:
RemoteException

getConfigValidAt

ConfigProfile getConfigValidAt(String configName,
                               String configTag,
                               long date)
                               throws RemoteException
Gets a ConfigProfile which was (or is) valid at a precise moment.

NOTE: this method will not work on "dummy local services"

Parameters:
configName -
configTag -
date -
Returns:
null if not found
Throws:
RemoteException

getValueValidAt

String getValueValidAt(String configName,
                       String configTag,
                       String parameterPath,
                       long date)
                       throws RemoteException
Gets the value of a Parameter which was valid at a moment in time.

NOTE: this method will not work on "dummy local services"

there is no need for a susbsystem name since at a moment in time there is only one subsystem known to a combintaiton of config name and tag.

Parameters:
configName -
configTag -
parameterPath -
date -
Returns:
Throws:
RemoteException

getConfigRunningAt

ConfigProfile getConfigRunningAt(String subsystemName,
                                 long date)
                                 throws RemoteException
Returns the Configuration which was running for a given subsystem at a moment in time

NOTE: this method will not work on "dummy local services"

Parameters:
subsystemName -
date -
Returns:
Throws:
RemoteException

getActiveValueAt

String getActiveValueAt(String subsystemName,
                        String parameterPath,
                        long date)
                        throws RemoteException
gets the value of a parameter for a subsystem which was active at a moment in time.

NOTE: this method will not work on "dummy local services"

Parameters:
subsystemName -
parameterPath -
date -
Returns:
Throws:
RemoteException

getPrevious

ConfigProfile getPrevious(ConfigProfile current)
                          throws RemoteException
gets a (deprecated) ConfigProfile with same name and tag as the argument.

Parameters:
current -
Returns:
Throws:
RemoteException

getNext

ConfigProfile getNext(ConfigProfile current)
                      throws RemoteException
Gets a (deprecated or "alive") ConfigProfile with same name and tag as the argument

Parameters:
current -
Returns:
Throws:
RemoteException

getPrevious

SubsystemDescription getPrevious(SubsystemDescription current)
                                 throws RemoteException
Gets the (deprecated) SubsystemDescription with same characteritics as the argument

Parameters:
current -
Returns:
Throws:
RemoteException

createPreparedConfiguration

void createPreparedConfiguration(String subsystemName,
                                 String configName,
                                 String tag,
                                 String user)
                                 throws RemoteException
generates in the database a special entry with a merge of description and configuration

Parameters:
subsystemName -
configName -
tag -
user -
Throws:
RemoteException

registerMachineConfiguration

void registerMachineConfiguration(MachineConfiguration machineConfiguration)
                                  throws RemoteException
registers in the database a machineConfiguration entry

Parameters:
machineConfiguration -
Throws:
RemoteException

getMachineConfiguration

MachineConfiguration getMachineConfiguration(String macAddress)
                                             throws RemoteException
get the machine configuration for a specific machine

Parameters:
macAddress -
Returns:
Throws:
RemoteException

simpleHQLRequest

List<?> simpleHQLRequest(String hqlSelectString)
                         throws RemoteException
can send a simple HQL request to the underlying Database. It is assumed that the request is only a "read" (a SELECT equivalent) -though this is not checked-

NOTE: this method will not work on "dummy local services"

Parameters:
hqlSelectString -
Returns:
Throws:
RemoteException


Copyright © 2013 LSST. All Rights Reserved.