01: /*
02: * CoadunationClient: The client libraries for Coadunation. (RMI/CORBA)
03: * Copyright (C) 2006 Rift IT Contracting
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18: *
19: * Credential.java
20: *
21: * The base of the credential object hierachy tree.
22: */
23:
24: package com.rift.coad.lib.interceptor.credentials;
25:
26: // java packages
27: import java.io.Serializable;
28:
29: /**
30: * The base of the credential object hierachy tree.
31: *
32: * @author Brett Chaldecott
33: */
34: public class Credential implements Serializable {
35:
36: // private member variables
37: private String username = null;
38:
39: /**
40: * Creates a new instance of Credential
41: */
42: public Credential() {
43: }
44:
45: /**
46: * Creates a new instance of Credential
47: *
48: * @param username The username for authentication purposes.
49: */
50: public Credential(String username) {
51: this .username = username;
52: }
53:
54: /**
55: * This method returns the username of object.
56: *
57: * @return The string containing the username of this credential.
58: */
59: public String getUsername() {
60: return username;
61: }
62:
63: /**
64: * This method sets the username for these credentials.
65: *
66: * @param username The name of the user.
67: */
68: public void setUsername(String username) {
69: this.username = username;
70: }
71: }
|