@MappedSuperclass public abstract class SubsystemDescription extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Serializable |
configurationData
Big object! see DescriptionType enum ...
|
protected DataFlavour |
dataFlavour
TODO: only object_tree in future releases (other formats can be provided to constructors)
|
static ParameterFilter |
DEFAULT_TREE_PARAMETER_FILTER
Default filter for parameters: gets rid of all parameters that are references to other components
and considers that a parameter with name "name" is out.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SubsystemDescription(String subsystemName,
String tag,
String user,
String version,
Serializable configurationData,
DataFlavour dataFlavour)
used by subclasses
|
protected |
SubsystemDescription(SubsystemDescription other)
creates a copy of the SubsystemDescription that is not (yet) registered to the database.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDeploymentDescriptors(DeploymentDescriptor... descriptors)
adds a list of Deployment Descriptors
|
abstract void |
addParameterDescriptions(Collection<ParameterDescription> descriptions) |
abstract void |
addParameterDescriptions(ParameterDescription... descriptions)
adds a list of parameter descriptions
|
org.lsst.gruth.jutils.ComponentNode |
check()
checks if a real subsystem can be built from the configurationData: all objects in the
component node are built but the subsystem at the top is not started.
|
boolean |
equals(Object o)
compares only the name and tag of subsystems not their content!
|
ParameterDescription |
fetch(PathObject path)
Any ParameterDescription can be queried using any other PathObject
|
void |
generateConfigProperties(PrintWriter writer,
int levelMax)
writes to a property file properties that can be edited to generate a ConfigProfile
|
Map<String,ParameterDescription> |
generateDescriptionMap()
returns a Map that contains all ParameterDescription both by their pathName and their simpleName
|
Collection<ParameterBase> |
getBaseParameters()
get the base parameters using the default filter.
|
Collection<ParameterBase> |
getBaseParameters(ParameterFilter filter)
gets the base parameters from a description
|
Serializable |
getConfigurationData() |
DataFlavour |
getDataFlavour() |
List<DeploymentDescriptor> |
getDeployDescriptors()
The list of deployment descriptors is modifiable only for objects
not yet registered in database.
|
long |
getEndTimestamp() |
abstract long |
getId()
the technical id: zero if the object is not yet registered in database
|
org.lsst.gruth.jutils.ComponentNode |
getModifiedConfigurationData(Properties configProps)
to be used to create startup data object from a non-registered Configuration data (in a properties file).
|
abstract Set<? extends ParameterDescription> |
getParamDescriptionSet()
Detailed description of parameters that can be changed
|
Collection<ParameterDescription> |
getPossibleDescriptions(int maxLevel) |
Collection<ParameterDescription> |
getPossibleDescriptions(int maxLevel,
ParameterFilter filter)
Loks like the getBaseParameters but builds a collection of ParameterDescription.
|
long |
getPreviousDescriptionID()
get the id of the previous subsystemDescription with same Name and tag.
|
long |
getStartTimestamp() |
String |
getSubsystemName() |
String |
getTag() |
org.lsst.gruth.jutils.ComponentNode |
getTopComponentNode()
returns the base object structure that describes the subsystem description (as loaded from a text file).
|
String |
getUser() |
String |
getVersion() |
int |
hashCode() |
boolean |
isReadOnly()
tells if the modifying methods can be invoked on a newly created objects.
|
static Collection<ParameterDescription> |
parameterDescriptionsFromNode(org.lsst.gruth.jutils.ComponentNode node,
ParameterFilter filter,
int maxLevel) |
static Collection<ParameterBase> |
parametersFromNode(org.lsst.gruth.jutils.ComponentNode node,
ParameterFilter filter)
gets the ParameterBase objects that describes arguments passed to the constructor
linked to a node of the configuration tree.
|
static void |
populateParameterBasesFromTop(Collection<ParameterBase> list,
org.lsst.gruth.jutils.ComponentNode topNode,
ParameterFilter filter)
"tree-walker" to populate ParameterBase collection
|
static void |
populateParameterDescriptionsFromTop(Collection<ParameterDescription> list,
org.lsst.gruth.jutils.ComponentNode topNode,
ParameterFilter filter,
int maxLevel) |
void |
removeDeploymentDescriptors(DeploymentDescriptor... descriptors)
removes a list of Deployment Descriptors
|
abstract void |
removeParameterDescriptions(ParameterDescription... descriptions)
removes a list of parameter descriptions
|
String |
toString() |
protected Serializable configurationData
protected DataFlavour dataFlavour
public static final ParameterFilter DEFAULT_TREE_PARAMETER_FILTER
protected SubsystemDescription(String subsystemName, String tag, String user, String version, Serializable configurationData, DataFlavour dataFlavour)
subsystemName - should not be null or emptytag - may be null or emptyuser - user that "owns" the descriptionversion - the versionconfigurationData - see DataFlavour documentationdataFlavour - which type of Configuration dataprotected SubsystemDescription(SubsystemDescription other)
other - public abstract long getId()
public abstract Set<? extends ParameterDescription> getParamDescriptionSet()
public boolean isReadOnly()
public String getSubsystemName()
public String getTag()
public long getStartTimestamp()
public long getEndTimestamp()
public String getUser()
public String getVersion()
public Serializable getConfigurationData()
public DataFlavour getDataFlavour()
public long getPreviousDescriptionID()
public List<DeploymentDescriptor> getDeployDescriptors()
public void addDeploymentDescriptors(DeploymentDescriptor... descriptors)
descriptors - ImmutableStateException - if called on an object registered on the databasepublic void removeDeploymentDescriptors(DeploymentDescriptor... descriptors)
descriptors - ImmutableStateException - if called on an object registered on the databasepublic boolean equals(Object o)
public ParameterDescription fetch(PathObject path)
path - public abstract void addParameterDescriptions(ParameterDescription... descriptions)
descriptions - ImmutableStateException - if called on an immutable objectpublic abstract void addParameterDescriptions(Collection<ParameterDescription> descriptions)
public abstract void removeParameterDescriptions(ParameterDescription... descriptions)
descriptions - ImmutableStateException - if called on an immutable objectpublic org.lsst.gruth.jutils.ComponentNode getTopComponentNode()
public org.lsst.gruth.jutils.ComponentNode check()
throws Exception
Exception - if anything goes wrong (classes not found, improper build, etc.)public void generateConfigProperties(PrintWriter writer, int levelMax)
writer - levelMax - public org.lsst.gruth.jutils.ComponentNode getModifiedConfigurationData(Properties configProps) throws RuntimeException
configProps - IllegalStateException - if the set of ParameterDescription is not populated
Runtime Exception if illegal modification try (type or immutable object)RuntimeExceptionpublic Map<String,ParameterDescription> generateDescriptionMap()
public Collection<ParameterBase> getBaseParameters(ParameterFilter filter)
filter - drops unwanted parameter basespublic Collection<ParameterBase> getBaseParameters()
public static Collection<ParameterBase> parametersFromNode(org.lsst.gruth.jutils.ComponentNode node, ParameterFilter filter)
node - filter - public static void populateParameterBasesFromTop(Collection<ParameterBase> list, org.lsst.gruth.jutils.ComponentNode topNode, ParameterFilter filter)
list - topNode - filter - public Collection<ParameterDescription> getPossibleDescriptions(int maxLevel, ParameterFilter filter)
maxLevel - filter - public Collection<ParameterDescription> getPossibleDescriptions(int maxLevel)
public static void populateParameterDescriptionsFromTop(Collection<ParameterDescription> list, org.lsst.gruth.jutils.ComponentNode topNode, ParameterFilter filter, int maxLevel)
public static Collection<ParameterDescription> parameterDescriptionsFromNode(org.lsst.gruth.jutils.ComponentNode node, ParameterFilter filter, int maxLevel)
Copyright © 2014 LSST. All rights reserved.