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 org.apache.avalon.framework.logger.AbstractLogEnabled;
020: import org.apache.avalon.framework.service.ServiceException;
021: import org.apache.avalon.framework.service.ServiceManager;
022: import org.apache.avalon.framework.service.Serviceable;
023: import org.apache.avalon.framework.thread.ThreadSafe;
024: import org.apache.cocoon.portal.coplet.CopletInstanceData;
025: import org.apache.cocoon.portal.layout.Layout;
026: import org.apache.cocoon.portal.profile.ProfileManager;
027:
028: /**
029: * Base class for all profile managers
030: *
031: * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
032: *
033: * @version CVS $Id: AbstractProfileManager.java 433543 2006-08-22 06:22:54Z crossley $
034: */
035: public abstract class AbstractProfileManager extends AbstractLogEnabled
036: implements Serviceable, ProfileManager, ThreadSafe {
037:
038: protected ServiceManager manager;
039:
040: /* (non-Javadoc)
041: * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
042: */
043: public void service(ServiceManager manager) throws ServiceException {
044: this .manager = manager;
045: }
046:
047: /* (non-Javadoc)
048: * @see org.apache.cocoon.portal.profile.ProfileManager#register(org.apache.cocoon.portal.coplet.CopletInstanceData)
049: */
050: public void register(CopletInstanceData coplet) {
051: // overwrite in subclass
052: }
053:
054: /* (non-Javadoc)
055: * @see org.apache.cocoon.portal.profile.ProfileManager#register(org.apache.cocoon.portal.layout.Layout)
056: */
057: public void register(Layout layout) {
058: // overwrite in subclass
059: }
060:
061: /* (non-Javadoc)
062: * @see org.apache.cocoon.portal.profile.ProfileManager#saveUserProfiles(String)
063: */
064: public void saveUserProfiles(String layoutKey) {
065: this .saveUserCopletInstanceDatas(layoutKey);
066: this .saveUserLayout(layoutKey);
067: }
068:
069: /* (non-Javadoc)
070: * @see org.apache.cocoon.portal.profile.ProfileManager#saveUserCopletInstanceDatas(java.lang.String)
071: */
072: public void saveUserCopletInstanceDatas(String layoutKey) {
073: // override in subclass
074: }
075:
076: /* (non-Javadoc)
077: * @see org.apache.cocoon.portal.profile.ProfileManager#saveUserLayout(String)
078: */
079: public void saveUserLayout(String layoutKey) {
080: // override in subclass
081: }
082:
083: /* (non-Javadoc)
084: * @see org.apache.cocoon.portal.profile.ProfileManager#unregister(org.apache.cocoon.portal.coplet.CopletInstanceData)
085: */
086: public void unregister(CopletInstanceData coplet) {
087: // overwrite in subclass
088: }
089:
090: /* (non-Javadoc)
091: * @see org.apache.cocoon.portal.profile.ProfileManager#unregister(org.apache.cocoon.portal.layout.Layout)
092: */
093: public void unregister(Layout layout) {
094: // overwrite in subclass
095: }
096:
097: /* (non-Javadoc)
098: * @see org.apache.cocoon.portal.profile.ProfileManager#login()
099: */
100: public void login() {
101: // overwrite in subclass
102: }
103:
104: /* (non-Javadoc)
105: * @see org.apache.cocoon.portal.profile.ProfileManager#logout()
106: */
107: public void logout() {
108: // overwrite in subclass
109: }
110:
111: }
|