-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathindex.html.haml
65 lines (47 loc) · 1.7 KB
/
index.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
layout: base
---
%h1
Togglz
%p
<img src="https://img.shields.io/maven-central/v/org.togglz/togglz-core.svg"/>
%h2
What is it about?
%p
Togglz is an implementation of the <a href="http://martinfowler.com/bliki/FeatureToggle.html">Feature Toggles</a> pattern for Java.
Feature Toggles are a very common agile development practices in the context of continuous deployment and delivery.
The basic idea is to associate a toggle with each new feature you are working on. This allows you to enable or disable these
features at application runtime, even for individual users.
Togglz is free and open source, licensed under the <a href="https://github.com/togglz/togglz/blob/master/LICENSE.txt"> Apache License</a>!
%p
Want to learn more? Have a look at an <a href="#example">usage example</a> or check the
<a href="quickstart.html">quickstart guide</a>.
%a(name="example")
%h2
Example
%p
Features are declared using a regular Java enum type:
%pre(class="prettyprint lang-java")
:escaped
public enum MyFeatures implements Feature {
@Label("First Feature")
FEATURE_ONE,
@Label("Second Feature")
FEATURE_TWO;
public boolean isActive() {
return FeatureContext.getFeatureManager().isActive(this);
}
}
%p
Checking whether a specific feature is enabled for the current user is very simple. Just call the <code>isActive()</code>
method on the feature.
%pre(class="prettyprint lang-java")
:escaped
public void someBusinessMethod() {
if( MyFeatures.FEATURE_ONE.isActive() ) {
// do new exciting stuff here
}
[...]
}
%p
You can find more details in the <a href="quickstart.html">quickstart guide</a>.