|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsst.ccs.config.Factories
public class Factories
A set of static methods to be used on Configuration service client's side : they are hiding some implementation details to the "outside" world. To be used in conjunction with ConfigurationFacade (but these codes may be called locally without referring to a server)
| Constructor Summary | |
|---|---|
Factories()
|
|
| Method Summary | |
|---|---|
static ConfigProfile |
copyProfile(ConfigProfile toBeCopied,
String newName,
String newTag,
String newUserName,
int newLevel,
boolean toEngineering)
to be used to create a copy of configuration with different name , tag, etc. |
static ConfigProfile |
createConfigProfile(SubsystemDescription subsystemDesc,
String name,
String tag,
String userName,
int level)
Creates a new ConfigProfile with ParameterConfiguration where values are just copied from the Description default value. |
static ParameterConfiguration |
createParameterConfiguration(ParameterDescription description)
factory method to create a ParameterConfiguration object |
static ParameterConfiguration |
createParameterConfiguration(ParameterDescription description,
String value)
factory method to create a ParameterConfiguration object |
static ParameterDescription |
createParameterDescription(ParameterBase parameterBase,
String description,
String simpleName,
String constraints,
int level)
factory method to create a new ParameterDescription. |
static ParameterDescription |
createParameterDescription(ParameterDescription other)
factory method to create a new ParameterDescription from another one. |
static ConfigProfile |
createRawConfigProfile(SubsystemDescription subsystemDesc,
String name,
String tag,
String userName,
int level)
Creates a new ConfigProfile that has no ParameterConfiguration (and so is not ready to be persisted). |
static SubsystemDescription |
createRawSubsystemDescription(String subsystemName,
String tag,
String user,
String version,
InputStream inputStream,
String charSetName)
creates a "raw" subsystem description by reading a groovy text from file. |
static SubsystemDescription |
createRawSubsystemDescription(String subsystemName,
String tag,
String user,
String version,
Serializable configurationData,
DataFlavour dataFlavour)
Creates a new SubsystemDescription without any ParameterDescription creation. |
static SubsystemDescription |
createSubsystemDescription(String subsystemName,
String tag,
String user,
String version,
Serializable configurationData,
DataFlavour dataFlavour,
ParameterFilter filter)
creates a new SubsystemDescription populated with "empty" ParameterDescriptions. |
static SubsystemDescription |
createSubsystemDescriptionCopy(SubsystemDescription desc)
creates a new SubsystemDescription from another. |
static ConfigProfile |
repair(ConfigProfile oldProfile,
SubsystemDescription newDescription,
ConfigurationMismatchListener mismatchListener)
tries to create a new ConfigProfile from an old one. |
static void |
tryCopyParameters(SubsystemDescription newDescription,
SubsystemDescription model,
DescriptionMismatchListener mismatchListener)
tries to copy ParameterDescription from a model to a new subsystem description. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Factories()
| Method Detail |
|---|
public static SubsystemDescription createRawSubsystemDescription(String subsystemName,
String tag,
String user,
String version,
Serializable configurationData,
DataFlavour dataFlavour)
subsystemName - tag - user - version - configurationData - dataFlavour -
public static SubsystemDescription createRawSubsystemDescription(String subsystemName,
String tag,
String user,
String version,
InputStream inputStream,
String charSetName)
subsystemName - tag - user - version - inputStream - charSetName -
public static SubsystemDescription createSubsystemDescription(String subsystemName,
String tag,
String user,
String version,
Serializable configurationData,
DataFlavour dataFlavour,
ParameterFilter filter)
TODO: this method will be modified to populate with parameterDescriptions that are not necessarily empty.
subsystemName - tag - user - version - configurationData - dataFlavour - filter -
public static SubsystemDescription createSubsystemDescriptionCopy(SubsystemDescription desc)
desc -
public static ParameterDescription createParameterDescription(ParameterBase parameterBase,
String description,
String simpleName,
String constraints,
int level)
parameterBase - description - simpleName - constraints - level -
public static ParameterDescription createParameterDescription(ParameterDescription other)
other -
public static void tryCopyParameters(SubsystemDescription newDescription,
SubsystemDescription model,
DescriptionMismatchListener mismatchListener)
newDescription - a subsystem description without any ParameterDescriptionmodel - mismatchListener - optional code that will be warned when inconsistencies occur
public static ConfigProfile createRawConfigProfile(SubsystemDescription subsystemDesc,
String name,
String tag,
String userName,
int level)
subsystemDesc - should be read from the databasename - tag - userName - level -
IllegalArgumentException - if subsystemdescription not in database
public static ConfigProfile createConfigProfile(SubsystemDescription subsystemDesc,
String name,
String tag,
String userName,
int level)
subsystemDesc - should be already in the databasename - tag - userName - level -
IllegalArgumentException - if subsystemdescription not in database
public static ConfigProfile copyProfile(ConfigProfile toBeCopied,
String newName,
String newTag,
String newUserName,
int newLevel,
boolean toEngineering)
toBeCopied - for the moment should be an "active" ConfigProfile (not a deprecated one)newName - newTag - newUserName - newLevel - toEngineering -
public static ParameterConfiguration createParameterConfiguration(ParameterDescription description,
String value)
description - value -
public static ParameterConfiguration createParameterConfiguration(ParameterDescription description)
description -
public static ConfigProfile repair(ConfigProfile oldProfile,
SubsystemDescription newDescription,
ConfigurationMismatchListener mismatchListener)
oldProfile - newDescription - an active subsystemDescription already registered in the databsemismatchListener -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||