component-build-plugin / com.intershop.gradle.component.build.utils.tree / Node

Node

class Node

An implementation for a tree data to configure the target configuration.

Parameters

name - name of the tree node

Constructors

<init>

Node(name: String, environment: String, classifier: String)

An implementation for a tree data to configure the target configuration.

Properties

children

var children: MutableSet<Node>

Set of child objects of this tree node.

classifier

val classifier: String

environment

val environment: String

name

val name: String

name of the tree node

parent

var parent: Node?

The parent node of this node.

target

var target: Boolean

If this value is true the node is a configured target item.

Functions

addChild

fun addChild(node: Node): Node

Add a child node to the current node, if the node does not exists in the list.

addPath

fun addPath(environment: String, classifier: String, vararg pathEntry: String): Node

Add target path elements to the current node.

addTarget

fun addTarget(environment: String, classifier: String, vararg pathEntry: String): Triple<Node, AddStatus, String>

Add path for target with environment and classifier.

fun addTarget(environment: Set<String>, classifier: String, vararg pathEntry: String): Triple<Node, AddStatus, String>

Add path for target with an environment set and classifier.

fun addTarget(environment: Set<String>, classifier: Set<String>, vararg pathEntry: String): Triple<Node, AddStatus, String>

Add path for target with an environment set and classifier set.

getChild

fun getChild(childname: String): Node?

Returns the tree node with the given child name or null, if the child name is not available.

getPath

fun getPath(): String

Returns the path of a this node.

isChild

fun isChild(childname: String): Boolean

Verify if the name a child of the current node.

toString

fun toString(): String

Returns the name of the node.