]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/SimpleArgeoUser.java
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org
.argeo
.security
;
19 import java
.io
.Serializable
;
20 import java
.util
.ArrayList
;
21 import java
.util
.List
;
23 public class SimpleArgeoUser
implements ArgeoUser
, Serializable
{
24 private static final long serialVersionUID
= 1L;
26 private String username
;
27 private String password
;
28 private List
<UserNature
> userNatures
= new ArrayList
<UserNature
>();
29 private List
<String
> roles
= new ArrayList
<String
>();
31 public SimpleArgeoUser() {
35 public SimpleArgeoUser(ArgeoUser argeoUser
) {
36 username
= argeoUser
.getUsername();
37 password
= argeoUser
.getPassword();
38 userNatures
= new ArrayList
<UserNature
>(argeoUser
.getUserNatures());
39 roles
= new ArrayList
<String
>(argeoUser
.getRoles());
42 public List
<UserNature
> getUserNatures() {
46 public void updateUserNatures(List
<UserNature
> userNaturesData
) {
47 UserNature
.updateUserNaturesWithCheck(userNatures
, userNaturesData
);
50 public List
<String
> getRoles() {
54 public String
getUsername() {
58 public void setUsername(String username
) {
59 this.username
= username
;
62 public void setUserNatures(List
<UserNature
> userNatures
) {
63 this.userNatures
= userNatures
;
66 public void setRoles(List
<String
> roles
) {
70 public String
getPassword() {
74 public void setPassword(String password
) {
75 this.password
= password
;