01: /*
02: * Copyright 2000-2001,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: /*
18:
19: */
20:
21: package org.apache.wsrp4j.consumer.driver;
22:
23: import oasis.names.tc.wsrp.v1.types.UserContext;
24:
25: import org.apache.wsrp4j.consumer.User;
26: import org.apache.wsrp4j.util.StateChangedServiceImpl;
27:
28: /**
29: * This class contains the userid and the UserContext together for
30: * Castor persistence support.
31: *
32: * @author <a href="mailto:Ralf.Altrichter@de.ibm.com">Ralf Altrichter</a>
33: */
34: public class UserImpl extends StateChangedServiceImpl implements User {
35:
36: // The users ID
37: private String _userID = null;
38:
39: // The UserContext for this user
40: private UserContext _userContext = null;
41:
42: /**
43: * Creates a user without a user id.
44: **/
45: public UserImpl() {
46: }
47:
48: /**
49: * Creates a user with the given user id.
50: **/
51: public UserImpl(String userID) {
52: _userID = userID;
53: }
54:
55: /**
56: * Returns the userID
57: *
58: * @return _userID
59: */
60: public String getUserID() {
61:
62: return _userID;
63:
64: }
65:
66: /**
67: * Sets the userID
68: *
69: * @param userID as String
70: */
71: public void setUserID(String userID) {
72:
73: _userID = userID;
74:
75: }
76:
77: /**
78: * Returns the UserContext for this userid
79: *
80: * @return _userContext
81: */
82: public UserContext getUserContext() {
83:
84: return _userContext;
85:
86: }
87:
88: /**
89: * Sets the UserContext for this userID
90: *
91: * @param userContext
92: */
93: public void setUserContext(UserContext userContext) {
94:
95: _userContext = userContext;
96:
97: }
98:
99: }
|