1 /*
2 * Copyright (c) 2002-2022, City of Paris
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * 1. Redistributions of source code must retain the above copyright notice
10 * and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the above copyright notice
13 * and the following disclaimer in the documentation and/or other materials
14 * provided with the distribution.
15 *
16 * 3. Neither the name of 'Mairie de Paris' nor 'Lutece' nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 *
32 * License 1.0
33 */
34 package fr.paris.lutece.plugins.automaticroleprovider.service;
35
36
37 // TODO: Auto-generated Javadoc
38 /**
39 * The Class AutomaticRoleConfiguration.
40 */
41 public class AutomaticRoleConfiguration {
42
43
44
45
46 /** The str lutece user attribute key. */
47 private String _strLuteceUserAttributeKey;
48
49 /** The str lutece user attribute value. */
50 private String _strLuteceUserAttributeValue;
51
52 /** The str role. */
53 private String _strRole;
54
55 /** The configuration predicate. */
56 private ConfigurationPredicate _configurationPredicate;
57
58 /** The b automatic. */
59 private Boolean _bAutomatic;
60
61
62
63
64
65
66
67 /**
68 * Instantiates a new automatic role configuration.
69 *
70 * @param strLuteceUserAttributeKey the str lutece user attribute key
71 * @param strLuteceUserAttributeValue the str lutece user attribute value
72 * @param strRole the str role
73 * @param configurationPredicate the configuration predicate
74 * @param bAutomatic the b automatic
75 */
76 public AutomaticRoleConfiguration(String strLuteceUserAttributeKey, String strLuteceUserAttributeValue,
77 String strRole,ConfigurationPredicate configurationPredicate,Boolean bAutomatic) {
78
79 this._strLuteceUserAttributeKey = strLuteceUserAttributeKey;
80 this._strLuteceUserAttributeValue = strLuteceUserAttributeValue;
81 this._strRole = strRole;
82 this._configurationPredicate=configurationPredicate;
83 this._bAutomatic=bAutomatic;
84 }
85
86
87
88 /**
89 * Instantiates a new automatic role configuration.
90 *
91 * @param strLuteceUserAttributeKey the str lutece user attribute key
92 * @param strLuteceUserAttributeValue the str lutece user attribute value
93 * @param strRole the str role
94 * @param configurationPredicate the configuration predicate
95 * @param bAutomatic the b automatic
96 */
97 public AutomaticRoleConfiguration(String strLuteceUserAttributeKey, String strLuteceUserAttributeValue,
98 String strRole,ConfigurationPredicate configurationPredicate) {
99
100 this(strLuteceUserAttributeKey,strLuteceUserAttributeValue,
101 strRole, configurationPredicate,false);
102 }
103
104
105 /**
106 * Instantiates a new automatic role configuration.
107
108 * @param strRole the str role
109 * @param configurationPredicate the configuration predicate
110 * @param bAutomatic the b automatic
111 */
112 public AutomaticRoleConfiguration(String strRole,ConfigurationPredicate configurationPredicate,Boolean bAutomatic) {
113
114 this(null, null,
115 strRole,configurationPredicate,bAutomatic);
116
117 }
118
119
120
121 /**
122 * Gets the lutece user attribute key.
123 *
124 * @return the lutece user attribute key
125 */
126 public String getLuteceUserAttributeKey() {
127 return _strLuteceUserAttributeKey;
128 }
129
130 /**
131 * Sets the lutece user attribute key.
132 *
133 * @param _strLuteceUserAttributeKey the new lutece user attribute key
134 */
135 public void setLuteceUserAttributeKey(String _strLuteceUserAttributeKey) {
136 this._strLuteceUserAttributeKey = _strLuteceUserAttributeKey;
137 }
138
139 /**
140 * Gets the lutece user attribute value.
141 *
142 * @return the lutece user attribute value
143 */
144 public String getLuteceUserAttributeValue() {
145 return _strLuteceUserAttributeValue;
146 }
147
148 /**
149 * Sets the lutece user attribute value.
150 *
151 * @param _strLuteceUserAttributeValue the new lutece user attribute value
152 */
153 public void setLuteceUserAttributeValue(String _strLuteceUserAttributeValue) {
154 this._strLuteceUserAttributeValue = _strLuteceUserAttributeValue;
155 }
156
157 /**
158 * Gets the role.
159 *
160 * @return the role
161 */
162 public String getRole() {
163 return _strRole;
164 }
165
166 /**
167 * Sets the role.
168 *
169 * @param _strRole the new role
170 */
171 public void setRole(String _strRole) {
172 this._strRole = _strRole;
173 }
174
175
176
177 /**
178 * Gets the configuration predicate.
179 *
180 * @return ConfigurationPredicate
181 */
182 public ConfigurationPredicate getConfigurationPredicate() {
183 return _configurationPredicate;
184 }
185
186
187
188 /**
189 * Checks if is automatic.
190 *
191 * @return true, if is automatic
192 */
193 public Boolean isAutomatic() {
194 return _bAutomatic;
195 }
196
197
198
199
200
201
202
203 }