@MappedSuperclass public abstract class SubsystemDescription extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
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.
|
protected Serializable |
descriptionData
Big object! see DescriptionType enum ...
|
| Modifier | Constructor and Description |
|---|---|
protected |
SubsystemDescription(String subsystemName,
String tag,
String user,
String version,
Serializable descriptionData,
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
|
boolean |
equals(Object o)
compares only the name and tag of subsystems not their content!
|
ParameterDescription |
fetch(PathObject path)
Looks for a parameter description that matches the given path
|
ParameterDescription |
fetch(String pathString)
Looks for a parameter description that matches the given path string
|
void |
generateConfigProperties(Map<String,PrintWriter> printWriters,
int levelMax)
Deprecated.
subsystem description should not have to handle properties
|
Collection<ParameterBase> |
getBaseParameters()
get the base parameters using the default filter.
|
Collection<ParameterBase> |
getBaseParameters(ParameterFilter filter)
gets the base parameters from a description
|
abstract Set<String> |
getCategorySet() |
DataFlavour |
getDataFlavour() |
List<DeploymentDescriptor> |
getDeployDescriptors()
The list of deployment descriptors is modifiable only for objects
not yet registered in database.
|
Serializable |
getDescriptionData() |
long |
getEndTimestamp() |
abstract long |
getId()
the technical id: zero if the object is not yet registered in database
|
abstract Map<String,? extends ParameterDescription> |
getParamDescriptionSet()
Detailed description of parameters that can be changed
|
Collection<ParameterDescription> |
getPossibleDescriptions(int maxLevel) |
Collection<ParameterDescription> |
getPossibleDescriptions(int maxLevel,
ParameterFilter filter)
Looks 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() |
DescriptiveNode |
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(DescriptiveNode node,
ParameterFilter filter,
int maxLevel) |
static Collection<ParameterBase> |
parametersFromNode(DescriptiveNode 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,
DescriptiveNode topNode,
ParameterFilter filter)
"tree-walker" to populate ParameterBase collection
|
static void |
populateParameterDescriptionsFromTop(Collection<ParameterDescription> list,
DescriptiveNode 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 descriptionData
protected DataFlavour dataFlavour
public static final ParameterFilter DEFAULT_TREE_PARAMETER_FILTER
protected SubsystemDescription(String subsystemName, String tag, String user, String version, Serializable descriptionData, DataFlavour dataFlavour)
subsystemName - should not be null or emptytag - may be null or emptyuser - user that "owns" the descriptionversion - the versiondescriptionData - see DataFlavour documentationdataFlavour - which type of Configuration dataprotected SubsystemDescription(SubsystemDescription other)
other - public abstract long getId()
public abstract Map<String,? 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 getDescriptionData()
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 ParameterDescription fetch(String pathString)
pathString - 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 DescriptiveNode getTopComponentNode()
public void generateConfigProperties(Map<String,PrintWriter> printWriters, int levelMax)
printWriters - levelMax - public Collection<ParameterBase> getBaseParameters(ParameterFilter filter)
filter - drops unwanted parameter basesBaseParameter that match the given filterpublic Collection<ParameterBase> getBaseParameters()
BaseParameter that match the default filterpublic static Collection<ParameterBase> parametersFromNode(DescriptiveNode node, ParameterFilter filter)
node - filter - ParameterBase built out of the descriptive
nodepublic static void populateParameterBasesFromTop(Collection<ParameterBase> list, DescriptiveNode topNode, ParameterFilter filter)
list - topNode - filter - public Collection<ParameterDescription> getPossibleDescriptions(int maxLevel, ParameterFilter filter)
maxLevel - filter - ParameterDescription built out of the descriptive nodepublic Collection<ParameterDescription> getPossibleDescriptions(int maxLevel)
public static void populateParameterDescriptionsFromTop(Collection<ParameterDescription> list, DescriptiveNode topNode, ParameterFilter filter, int maxLevel)
public static Collection<ParameterDescription> parameterDescriptionsFromNode(DescriptiveNode node, ParameterFilter filter, int maxLevel)
Copyright © 2015 LSST. All rights reserved.