teichmann@5861: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5861: * Software engineering by Intevation GmbH teichmann@5861: * teichmann@5993: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5861: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5993: * documentation coming with Dive4Elements River for details. teichmann@5861: */ teichmann@5861: teichmann@5835: package org.dive4elements.river.client.shared.model; 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: bh@6188: /** The saml ticket used for single sign-on.*/ bh@6188: protected String samlXML; 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: */ bh@6188: public DefaultUser(String identifier, String name, String samlXML) { ingo@25: this.identifier = identifier; ingo@25: this.name = name; bh@6188: this.samlXML = samlXML; 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: /** bh@6188: * Returns the SAML ticket for single sign-on. bh@6188: * bh@6188: * @return the SAML ticket as base64 encoded XML bh@6188: */ bh@6188: public String getSamlXMLBase64() { bh@6188: return samlXML; bh@6188: } bh@6188: bh@6188: bh@6188: /** 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: } bh@6188: bh@6188: /** bh@6188: * Set the SAML Ticket for single sign-on. bh@6188: * bh@6188: * @param samlXML the SAML ticket as base64 encoded XML. bh@6188: */ bh@6188: public void setSamlXMLBase64(String samlXML) { bh@6188: this.samlXML = samlXML; bh@6188: } ingo@25: } ingo@25: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :