Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/shared/model/DefaultUser.java @ 9801:1d7a72a50183 3.2.x tip
Assume Compose V2, consistently
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 23 Nov 2023 10:14:13 +0100 |
parents | 733c32da04b8 |
children |
rev | line source |
---|---|
5861
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5860
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5860
diff
changeset
|
2 * Software engineering by Intevation GmbH |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5860
diff
changeset
|
3 * |
5993
ea9eef426962
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5861
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5861
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5860
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5993
ea9eef426962
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5861
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5861
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5860
diff
changeset
|
7 */ |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5860
diff
changeset
|
8 |
5835
821a02bbfb4e
Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5834
diff
changeset
|
9 package org.dive4elements.river.client.shared.model; |
25
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 /** |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 * Trivial implementation of a user. Useful to be subclassed. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 * |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 */ |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 public class DefaultUser |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 implements User |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 { |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 /** The identifier of the user.*/ |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 protected String identifier; |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 /** The name of the user.*/ |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 protected String name; |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 |
6188
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
25 /** The saml ticket used for single sign-on.*/ |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
26 protected String samlXML; |
25
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 /** |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 * The default constructor. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 */ |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 public DefaultUser() { |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 } |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 /** |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 * A constructor that creates a new user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 * |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 * @param identifier The uuid of the user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 * @param name The name of the user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 */ |
6188
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
41 public DefaultUser(String identifier, String name, String samlXML) { |
25
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 this.identifier = identifier; |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 this.name = name; |
6188
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
44 this.samlXML = samlXML; |
25
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 } |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 /** |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 * Returns the identifier of this user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 * |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 * @return the identifier of this user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 */ |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 public String identifier() { |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 return identifier; |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 } |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 /** |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 * Returns the name of the user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 * |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 * @return the name of the user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 */ |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 public String getName() { |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 return name; |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 } |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 /** |
6188
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
69 * Returns the SAML ticket for single sign-on. |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
70 * |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
71 * @return the SAML ticket as base64 encoded XML |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
72 */ |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
73 public String getSamlXMLBase64() { |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
74 return samlXML; |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
75 } |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
76 |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
77 |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
78 /** |
25
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 * Set the identifier of the user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 * |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 * @param identifier The new identifier. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 */ |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 public void setIdentifier(String identifier) { |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 this.identifier = identifier; |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 } |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 /** |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 * Set the name of the user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 * |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 * @param name The name for this user. |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 */ |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 public void setName(String name) { |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 this.name = name; |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 } |
6188
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
96 |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
97 /** |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
98 * Set the SAML Ticket for single sign-on. |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
99 * |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
100 * @param samlXML the SAML ticket as base64 encoded XML. |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
101 */ |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
102 public void setSamlXMLBase64(String samlXML) { |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
103 this.samlXML = samlXML; |
733c32da04b8
Extend the shared interface User with the SAML ticket
Bernhard Herzog <bh@intevation.de>
parents:
5993
diff
changeset
|
104 } |
25
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 } |
2da6be38d8b6
Added a User interface and a default implementation to handle users in this client.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |