001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package org.apache.cocoon.portal.profile.impl;
018:
019: import java.io.Serializable;
020: import java.util.Map;
021:
022: import org.apache.cocoon.portal.profile.PortalUser;
023:
024: /**
025: * Information about the current user.
026: * This data object is used for loading the profile. It decouples the
027: * portal from the used authentication method.
028: *
029: * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
030: * @version CVS $Id: MapProfileLS.java 30941 2004-07-29 19:56:58Z vgritsenko $
031: */
032: public abstract class UserInfo implements PortalUser, Serializable {
033:
034: protected String userName;
035:
036: protected String group;
037:
038: protected String portalName;
039:
040: protected String layoutKey;
041:
042: protected Map configurations;
043:
044: public UserInfo(String portalName, String layoutKey) {
045: this .portalName = portalName;
046: this .layoutKey = layoutKey;
047: }
048:
049: /**
050: * @return Returns the group.
051: */
052: public String getGroup() {
053: return group;
054: }
055:
056: /**
057: * @param group The group to set.
058: */
059: public void setGroup(String group) {
060: this .group = group;
061: }
062:
063: /**
064: * @return Returns the userName.
065: */
066: public String getUserName() {
067: return userName;
068: }
069:
070: /**
071: * @param userName The userName to set.
072: */
073: public void setUserName(String userName) {
074: this .userName = userName;
075: }
076:
077: /**
078: * @return Returns the configurations.
079: */
080: public Map getConfigurations() {
081: return configurations;
082: }
083:
084: /**
085: * @param configurations The configurations to set.
086: */
087: public void setConfigurations(Map configurations) {
088: this .configurations = configurations;
089: }
090:
091: /**
092: * @return Returns the layoutKey.
093: */
094: public String getLayoutKey() {
095: return layoutKey;
096: }
097:
098: /**
099: * @return Returns the portalName.
100: */
101: public String getPortalName() {
102: return portalName;
103: }
104:
105: /* (non-Javadoc)
106: * @see org.apache.cocoon.portal.profile.PortalUser#isUserInRole(java.lang.String)
107: */
108: public abstract boolean isUserInRole(String role);
109: }
|