ingo@25: /* ingo@25: * Copyright (c) 2011 by Intevation GmbH ingo@25: * ingo@25: * This program is free software under the LGPL (>=v2.1) ingo@25: * Read the file LGPL.txt coming with the software for details ingo@25: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@25: */ teichmann@5835: package org.dive4elements.river.client.shared.model; ingo@25: ingo@25: ingo@25: /** ingo@25: * Trivial implementation of a user. Useful to be subclassed. ingo@25: * ingo@25: * @author Ingo Weinzierl ingo@25: */ ingo@25: public class DefaultUser ingo@25: implements User ingo@25: { ingo@25: /** The identifier of the user.*/ ingo@25: protected String identifier; ingo@25: ingo@25: /** The name of the user.*/ ingo@25: protected String name; ingo@25: ingo@25: ingo@25: /** ingo@25: * The default constructor. ingo@25: */ ingo@25: public DefaultUser() { ingo@25: } ingo@25: ingo@25: ingo@25: /** ingo@25: * A constructor that creates a new user. ingo@25: * ingo@25: * @param identifier The uuid of the user. ingo@25: * @param name The name of the user. ingo@25: */ ingo@25: public DefaultUser(String identifier, String name) { ingo@25: this.identifier = identifier; ingo@25: this.name = name; ingo@25: } ingo@25: ingo@25: ingo@25: /** ingo@25: * Returns the identifier of this user. ingo@25: * ingo@25: * @return the identifier of this user. ingo@25: */ ingo@25: public String identifier() { ingo@25: return identifier; ingo@25: } ingo@25: ingo@25: ingo@25: /** ingo@25: * Returns the name of the user. ingo@25: * ingo@25: * @return the name of the user. ingo@25: */ ingo@25: public String getName() { ingo@25: return name; ingo@25: } ingo@25: ingo@25: ingo@25: /** ingo@25: * Set the identifier of the user. ingo@25: * ingo@25: * @param identifier The new identifier. ingo@25: */ ingo@25: public void setIdentifier(String identifier) { ingo@25: this.identifier = identifier; ingo@25: } ingo@25: ingo@25: ingo@25: /** ingo@25: * Set the name of the user. ingo@25: * ingo@25: * @param name The name for this user. ingo@25: */ ingo@25: public void setName(String name) { ingo@25: this.name = name; ingo@25: } ingo@25: } ingo@25: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :