public class RunMode extends Traceable implements Comparable<RunMode>
Constructor and Description |
---|
RunMode(String[] names)
Create a new run mode
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(RunMode o2) |
ArtifactGroup |
getArtifactGroup(int startLevel)
Find the artifact group.
|
List<ArtifactGroup> |
getArtifactGroups()
Get all artifact groups
|
Configuration |
getConfiguration(String pid)
Search a configuration with a pid
|
Configuration |
getConfiguration(String pid,
String factoryPid)
Search a configuration with pid and factory pid
|
ItemList<Configuration> |
getConfigurations()
Get all configurations
|
String[] |
getNames()
Return the run mode names.
|
ArtifactGroup |
getOrCreateArtifactGroup(int startLevel)
Get or create an artifact group
|
Configuration |
getOrCreateConfiguration(String pid,
String factoryPid)
Get or create the configuration
|
KeyValueMap<String> |
getSettings()
Get the settings
|
static String[] |
getSortedRunModesArray(String[] names)
Get an alphabetical sorted array of the run mode names.
|
boolean |
isActive(Set<String> activeRunModes)
Check if this run mode is active wrt the given set of active run modes.
|
boolean |
isRunMode(String mode)
Check if this run mode is tied to a single specific run mode name.
|
boolean |
isSpecial()
Check whether this run mode is a special one
|
String |
toString() |
getLocation, setLocation
public RunMode(String[] names)
names
- The run mode namespublic static String[] getSortedRunModesArray(String[] names)
names
- The run mode namespublic String[] getNames()
null
.public boolean isActive(Set<String> activeRunModes)
activeRunModes
- The set of active run modes.true
if the run mode is active.public boolean isSpecial()
true
if it is specialpublic boolean isRunMode(String mode)
mode
- The name of the run modetrue
if this run mode is tied to exactly the single one.public ArtifactGroup getArtifactGroup(int startLevel)
startLevel
- the start levelnull
.public ArtifactGroup getOrCreateArtifactGroup(int startLevel)
startLevel
- The start levelpublic Configuration getConfiguration(String pid)
pid
- The configuration pidnull
public Configuration getConfiguration(String pid, String factoryPid)
pid
- The pidfactoryPid
- The optional factory pidnull
.public Configuration getOrCreateConfiguration(String pid, String factoryPid)
pid
- The pidfactoryPid
- The optional factory pidpublic List<ArtifactGroup> getArtifactGroups()
public ItemList<Configuration> getConfigurations()
public KeyValueMap<String> getSettings()
public int compareTo(RunMode o2)
compareTo
in interface Comparable<RunMode>
Comparable.compareTo(java.lang.Object)
Copyright © 2017 The Apache Software Foundation. All rights reserved.