1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.common.lib.policy;
20
21 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
22 import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
23 import java.util.ArrayList;
24 import java.util.List;
25 import org.apache.syncope.common.lib.Schema;
26 import org.apache.syncope.common.lib.types.AnyTypeKind;
27 import org.apache.syncope.common.lib.types.SchemaType;
28
29 public class DefaultAccountRuleConf extends AbstractAccountRuleConf implements AccountRuleConf {
30
31 private static final long serialVersionUID = 3259256974414758406L;
32
33
34
35
36 private int maxLength;
37
38
39
40
41 private int minLength;
42
43
44
45
46 private String pattern;
47
48
49
50
51 private boolean allUpperCase;
52
53
54
55
56 private boolean allLowerCase;
57
58
59
60
61 private final List<String> wordsNotPermitted = new ArrayList<>();
62
63
64
65
66 @Schema(anyTypeKind = AnyTypeKind.USER,
67 type = { SchemaType.PLAIN, SchemaType.DERIVED, SchemaType.VIRTUAL })
68 private final List<String> schemasNotPermitted = new ArrayList<>();
69
70
71
72
73 private final List<String> prefixesNotPermitted = new ArrayList<>();
74
75
76
77
78 private final List<String> suffixesNotPermitted = new ArrayList<>();
79
80 public boolean isAllLowerCase() {
81 return allLowerCase;
82 }
83
84 public void setAllLowerCase(final boolean allLowerCase) {
85 this.allLowerCase = allLowerCase;
86 }
87
88 public boolean isAllUpperCase() {
89 return allUpperCase;
90 }
91
92 public void setAllUpperCase(final boolean allUpperCase) {
93 this.allUpperCase = allUpperCase;
94 }
95
96 public int getMaxLength() {
97 return maxLength;
98 }
99
100 public void setMaxLength(final int maxLength) {
101 this.maxLength = maxLength;
102 }
103
104 public int getMinLength() {
105 return minLength;
106 }
107
108 public void setMinLength(final int minLength) {
109 this.minLength = minLength;
110 }
111
112 public String getPattern() {
113 return pattern;
114 }
115
116 public void setPattern(final String pattern) {
117 this.pattern = pattern;
118 }
119
120 @JacksonXmlElementWrapper(localName = "wordsNotPermitted")
121 @JacksonXmlProperty(localName = "word")
122 public List<String> getWordsNotPermitted() {
123 return wordsNotPermitted;
124 }
125
126 @JacksonXmlElementWrapper(localName = "prefixesNotPermitted")
127 @JacksonXmlProperty(localName = "prefix")
128 public List<String> getPrefixesNotPermitted() {
129 return prefixesNotPermitted;
130 }
131
132 @JacksonXmlElementWrapper(localName = "schemasNotPermitted")
133 @JacksonXmlProperty(localName = "schema")
134 public List<String> getSchemasNotPermitted() {
135 return schemasNotPermitted;
136 }
137
138 @JacksonXmlElementWrapper(localName = "suffixesNotPermitted")
139 @JacksonXmlProperty(localName = "suffix")
140 public List<String> getSuffixesNotPermitted() {
141 return suffixesNotPermitted;
142 }
143 }