KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright 1999-2002,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 org.apache.avalon.framework.logger.AbstractLogEnabled;
19 import org.apache.avalon.framework.service.ServiceException;
20 import org.apache.avalon.framework.service.ServiceManager;
21 import org.apache.avalon.framework.service.Serviceable;
22 import org.apache.avalon.framework.thread.ThreadSafe;
23 import org.apache.cocoon.portal.coplet.CopletInstanceData;
24 import org.apache.cocoon.portal.layout.Layout;
25 import org.apache.cocoon.portal.profile.ProfileManager;
26
27 /**
28  * Base class for all profile managers
29  *
30  * @author <a HREF="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
31  *
32  * @version CVS $Id: AbstractProfileManager.java 125616 2005-01-19 12:02:18Z cziegeler $
33  */

34 public abstract class AbstractProfileManager
35     extends AbstractLogEnabled
36     implements Serviceable, ProfileManager, ThreadSafe {
37
38     protected ServiceManager manager;
39
40     /* (non-Javadoc)
41      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
42      */

43     public void service(ServiceManager manager) throws ServiceException {
44         this.manager = manager;
45     }
46
47     /* (non-Javadoc)
48      * @see org.apache.cocoon.portal.profile.ProfileManager#register(org.apache.cocoon.portal.coplet.CopletInstanceData)
49      */

50     public void register(CopletInstanceData coplet) {
51         // overwrite in subclass
52
}
53
54     /* (non-Javadoc)
55      * @see org.apache.cocoon.portal.profile.ProfileManager#register(org.apache.cocoon.portal.layout.Layout)
56      */

57     public void register(Layout layout) {
58         // overwrite in subclass
59
}
60
61     /* (non-Javadoc)
62      * @see org.apache.cocoon.portal.profile.ProfileManager#saveUserProfiles(String)
63      */

64     public void saveUserProfiles(String JavaDoc layoutKey) {
65         this.saveUserCopletInstanceDatas(layoutKey);
66         this.saveUserLayout(layoutKey);
67     }
68
69     /* (non-Javadoc)
70      * @see org.apache.cocoon.portal.profile.ProfileManager#saveUserCopletInstanceDatas(java.lang.String)
71      */

72     public void saveUserCopletInstanceDatas(String JavaDoc layoutKey) {
73         // override in subclass
74
}
75
76     /* (non-Javadoc)
77     * @see org.apache.cocoon.portal.profile.ProfileManager#saveUserLayout(String)
78     */

79     public void saveUserLayout(String JavaDoc layoutKey) {
80         // override in subclass
81
}
82
83     /* (non-Javadoc)
84      * @see org.apache.cocoon.portal.profile.ProfileManager#unregister(org.apache.cocoon.portal.coplet.CopletInstanceData)
85      */

86     public void unregister(CopletInstanceData coplet) {
87         // overwrite in subclass
88
}
89
90     /* (non-Javadoc)
91      * @see org.apache.cocoon.portal.profile.ProfileManager#unregister(org.apache.cocoon.portal.layout.Layout)
92      */

93     public void unregister(Layout layout) {
94         // overwrite in subclass
95
}
96
97     /* (non-Javadoc)
98      * @see org.apache.cocoon.portal.profile.ProfileManager#login()
99      */

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 }
112
Popular Tags