diff artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUser.java @ 409:4748949c4f19

Extend user class implementations to handle account information artifacts/trunk@5245 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Thu, 23 Aug 2012 13:42:41 +0000
parents 0ca9b1073ccf
children
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUser.java	Thu Aug 23 13:39:30 2012 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultUser.java	Thu Aug 23 13:42:41 2012 +0000
@@ -25,6 +25,9 @@
     /** The name of the user.*/
     protected String name;
 
+    /** The account name of the user.*/
+    protected String account;
+
     /** The role of the user.*/
     protected Document role;
 
@@ -44,12 +47,15 @@
      *
      * @param identifier The uuid of the user.
      * @param name The name of the user.
+     * @param account The account name of the user.
      * @param role The role of the user.
      */
-    public DefaultUser(String identifier, String name, Document role) {
+    public DefaultUser(String identifier, String name, String account,
+                       Document role) {
         this.identifier = identifier;
         this.name       = name;
         this.role       = role;
+        this.account    = account;
     }
 
 
@@ -58,6 +64,7 @@
      *
      * @return the identifier of this user.
      */
+    @Override
     public String identifier() {
         return identifier;
     }
@@ -68,6 +75,7 @@
      *
      * @return the name of the user.
      */
+    @Override
     public String getName() {
         return name;
     }
@@ -78,6 +86,7 @@
      *
      * @param name The name for this user.
      */
+    @Override
     public void setName(String name) {
         this.name = name;
     }
@@ -88,6 +97,7 @@
      *
      * @param identifier The new identifier.
      */
+    @Override
     public void setIdentifier(String identifier) {
         this.identifier = identifier;
     }
@@ -98,6 +108,7 @@
      *
      * @param role The new role of the user.
      */
+    @Override
     public void setRole(Document role) {
         this.role = role;
     }
@@ -108,8 +119,19 @@
      *
      * @return the role of the user.
      */
+    @Override
     public Document getRole() {
         return role;
     }
+
+    /**
+     * Returns the account of the user.
+     *
+     * @return the account name of the user.
+     */
+    @Override
+    public String getAccount() {
+        return account;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org