KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > profile > impl > UserInfo


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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 package org.apache.cocoon.portal.profile.impl;
17
18 import java.io.Serializable JavaDoc;
19 import java.util.Map JavaDoc;
20
21 import org.apache.cocoon.portal.profile.PortalUser;
22
23 /**
24  * Information about the current user.
25  * This data object is used for loading the profile. It decouples the
26  * portal from the used authentication method.
27  *
28  * @author <a HREF="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
29  * @version CVS $Id: MapProfileLS.java 30941 2004-07-29 19:56:58Z vgritsenko $
30  */

31 public abstract class UserInfo implements PortalUser, Serializable JavaDoc {
32
33     protected String JavaDoc userName;
34
35     protected String JavaDoc group;
36
37     protected String JavaDoc portalName;
38
39     protected String JavaDoc layoutKey;
40
41     protected Map JavaDoc configurations;
42
43     public UserInfo(String JavaDoc portalName, String JavaDoc layoutKey) {
44         this.portalName = portalName;
45         this.layoutKey = layoutKey;
46     }
47
48     /**
49      * @return Returns the group.
50      */

51     public String JavaDoc getGroup() {
52         return group;
53     }
54
55     /**
56      * @param group The group to set.
57      */

58     public void setGroup(String JavaDoc group) {
59         this.group = group;
60     }
61
62     /**
63      * @return Returns the userName.
64      */

65     public String JavaDoc getUserName() {
66         return userName;
67     }
68
69     /**
70      * @param userName The userName to set.
71      */

72     public void setUserName(String JavaDoc userName) {
73         this.userName = userName;
74     }
75
76     /**
77      * @return Returns the configurations.
78      */

79     public Map JavaDoc getConfigurations() {
80         return configurations;
81     }
82
83     /**
84      * @param configurations The configurations to set.
85      */

86     public void setConfigurations(Map JavaDoc configurations) {
87         this.configurations = configurations;
88     }
89
90     /**
91      * @return Returns the layoutKey.
92      */

93     public String JavaDoc getLayoutKey() {
94         return layoutKey;
95     }
96
97     /**
98      * @return Returns the portalName.
99      */

100     public String JavaDoc getPortalName() {
101         return portalName;
102     }
103
104     /* (non-Javadoc)
105      * @see org.apache.cocoon.portal.profile.PortalUser#isUserInRole(java.lang.String)
106      */

107     public abstract boolean isUserInRole(String JavaDoc role);
108 }
109
Popular Tags