I have many features in Tree format and want to control the using configuration.
Assume below tree, each node is one feature
A --- root
A1 & A2 --- are child of A
A1a, A1b and A1c --- are child of A1
A2a, A2b and A2c --- are child of A2
If I turn off A, then all the features should be turned off.
If I turn off A2, then only A2 and its child(till the leaf) should be turned off.
If I turn off A1a, then only A1a feature should be turned off.
If I turned on A2a and turned off A2, then A2 is given higher preference and A2 and its child(till leaf) should be turned off.
Similarly I want to control all the features using configuration.
Is there any a way to control these configuration tree in JAVA?
My Implementation: