Repository navigation
Expand file tree
/
Copy pathPolicyOptions.java
More file actions
76 lines (65 loc) · 1.74 KB
/
Copy pathPolicyOptions.java
File metadata and controls
76 lines (65 loc) · 1.74 KB
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
66
67
68
69
70
71
72
73
74
75
76
package org.databunker.options;
/**
* Policy options class for policy creation and management
*/
public class PolicyOptions {
private final String policyname;
private final String policydesc;
private final Object policy; // Can be any type
private PolicyOptions(Builder builder) {
this.policyname = builder.policyname;
this.policydesc = builder.policydesc;
this.policy = builder.policy;
}
/**
* Policy name
* @return The policy name
*/
public String getPolicyname() {
return policyname;
}
/**
* Policy description
* @return The policy description
*/
public String getPolicydesc() {
return policydesc;
}
/**
* Policy object (can be any type)
* @return The policy object
*/
public Object getPolicy() {
return policy;
}
/**
* Builder class for PolicyOptions
*/
public static class Builder {
private String policyname;
private String policydesc;
private Object policy;
public Builder policyname(String policyname) {
this.policyname = policyname;
return this;
}
public Builder policydesc(String policydesc) {
this.policydesc = policydesc;
return this;
}
public Builder policy(Object policy) {
this.policy = policy;
return this;
}
public PolicyOptions build() {
return new PolicyOptions(this);
}
}
/**
* Creates a new builder for PolicyOptions
* @return A new builder instance
*/
public static Builder builder() {
return new Builder();
}
}