Debian Codegraph @

src/main/org/h2/security/auth/UserToRolesMapperConfig.java

raw
1 /*
2 * Copyright 2004-2023 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (https://h2database.com/html/license.html).
4 * Initial Developer: Alessandro Ventura
5 */
6 package org.h2.security.auth;
7
8 import java.util.ArrayList;
9 import java.util.List;
10
11 /**
12 * Configuration for class that maps users to their roles.
13 *
14 * @see org.h2.api.UserToRolesMapper
15 */
16 public class UserToRolesMapperConfig implements HasConfigProperties {
17
18 private String className;
19 private List<PropertyConfig> properties;
20
21 /**
22 * @return Mapper class name.
23 */
24 public String getClassName() {
25 return className;
26 }
27
28 /**
29 * @param className mapper class name.
30 */
31 public void setClassName(String className) {
32 this.className = className;
33 }
34
35 /**
36 * @return Mapper properties.
37 */
38 @Override
39 public List<PropertyConfig> getProperties() {
40 if (properties == null) {
41 properties = new ArrayList<>();
42 }
43 return properties;
44 }
45
46 }