mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-06 13:39:34 -05:00
BusinessProcess: tell about state type
This commit is contained in:
parent
d2efd8f05c
commit
99e03ef44f
1 changed files with 17 additions and 0 deletions
|
|
@ -179,6 +179,16 @@ class BusinessProcess
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function usesSoftStates()
|
||||
{
|
||||
return $this->state_type === self::SOFT_STATE;
|
||||
}
|
||||
|
||||
public function usesHardStates()
|
||||
{
|
||||
$this->state_type === self::HARD_STATE;
|
||||
}
|
||||
|
||||
public function addRootNode($name)
|
||||
{
|
||||
$this->root_nodes[$name] = $this->getNode($name);
|
||||
|
|
@ -304,6 +314,13 @@ class BusinessProcess
|
|||
return $node;
|
||||
}
|
||||
|
||||
public function createImportedNode($config, $name)
|
||||
{
|
||||
$node = new ImportedNode($this, (object) array('name' => $name, 'configName' => $config));
|
||||
$this->nodes[$name] = $node;
|
||||
return $node;
|
||||
}
|
||||
|
||||
public function getNode($name)
|
||||
{
|
||||
if (array_key_exists($name, $this->nodes)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue