|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.portal.profile.impl.AbstractProfileManager
org.apache.cocoon.portal.profile.impl.GroupBasedProfileManager
public class GroupBasedProfileManager
This profile manager uses a group based approach: The coplet-base-data and the coplet-data are global, these are shared between all users. If the user has is own set of coplet-instance-datas/layouts these are loaded. If the user has not an own set, the group set is loaded - therefore each user has belong to exactly one group. In the case that the user does not belong to a group, a global profile is loaded. This profile manager does not check for changes of the profile, which means for example once a global profile is loaded, it is used until Cocoon is restarted. (This will be changed later on) THIS IS A WORK IN PROGRESS - IT'S NOT FINISHED/WORKING YET
| Nested Class Summary | |
|---|---|
protected static class |
GroupBasedProfileManager.ProfileInfo
|
| Field Summary | |
|---|---|
static String |
CATEGORY_GLOBAL
|
static String |
CATEGORY_GROUP
|
static String |
CATEGORY_USER
|
protected Context |
context
The component context |
protected GroupBasedProfileManager.ProfileInfo |
copletBaseDatas
|
protected GroupBasedProfileManager.ProfileInfo |
copletDatas
|
protected static String |
KEY_PREFIX
|
protected UserInfoProvider |
provider
The userinfo provider - the connection to the authentication mechanism |
protected String |
userInfoProviderClassName
The class name of the userinfo provider |
| Fields inherited from class org.apache.cocoon.portal.profile.impl.AbstractProfileManager |
|---|
manager |
| Fields inherited from interface org.apache.cocoon.portal.profile.ProfileManager |
|---|
ROLE |
| Constructor Summary | |
|---|---|
GroupBasedProfileManager()
|
|
| Method Summary | |
|---|---|
protected Map |
buildKey(String category,
String profileType,
UserInfo info,
boolean load)
|
void |
contextualize(Context context)
|
void |
dispose()
|
CopletData |
getCopletData(String copletDataId)
Return the coplet data object |
Collection |
getCopletDatas()
Get all coplets |
List |
getCopletInstanceData(CopletData data)
|
CopletInstanceData |
getCopletInstanceData(String copletID)
|
Collection |
getCopletInstanceDatas()
Get all instances |
protected boolean |
getCopletInstanceDatas(ProfileLS loader,
UserProfile profile,
UserInfo info,
PortalService service,
String category)
|
protected Map |
getGlobalBaseDatas(ProfileLS loader,
UserInfo info,
PortalService service)
|
protected Map |
getGlobalDatas(ProfileLS loader,
UserInfo info,
PortalService service,
UserProfile profile)
|
protected boolean |
getLayout(ProfileLS loader,
UserProfile profile,
UserInfo info,
PortalService service,
String category)
|
Layout |
getPortalLayout(String layoutKey,
String layoutId)
Get the portal layout defined by the layout key. |
PortalUser |
getUser()
Get current user information |
protected UserProfile |
getUserProfile(String layoutKey)
|
void |
initialize()
|
protected UserProfile |
loadProfile(String layoutKey,
PortalService service)
Load the profile |
void |
login()
This method is invoked when the user logs into the portal. |
void |
logout()
This method is invoked when the user logs out of the portal |
void |
parameterize(Parameters params)
|
protected void |
prepareObject(Object object,
PortalService service)
Prepares the object by using the specified factory. |
void |
register(CopletInstanceData coplet)
New coplet instance datas have to be registered using this method. |
void |
register(Layout layout)
New layouts have to be registered using this method. |
protected void |
removeUserProfiles()
|
void |
saveUserCopletInstanceDatas(String layoutKey)
Save the coplet instance data |
void |
saveUserLayout(String layoutKey)
Save the layout |
void |
storeProfile(Layout rootLayout,
String layoutKey)
Store the provided profile under the layoutKey. |
protected void |
storeUserProfile(String layoutKey,
PortalService service,
UserProfile profile)
|
void |
unregister(CopletInstanceData coplet)
Removed coplet instance datas have to be unregistered using this method. |
void |
unregister(Layout layout)
New layouts have to be unregistered using this method. |
| Methods inherited from class org.apache.cocoon.portal.profile.impl.AbstractProfileManager |
|---|
saveUserProfiles, service |
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CATEGORY_GLOBAL
public static final String CATEGORY_GROUP
public static final String CATEGORY_USER
protected static final String KEY_PREFIX
protected GroupBasedProfileManager.ProfileInfo copletBaseDatas
protected GroupBasedProfileManager.ProfileInfo copletDatas
protected UserInfoProvider provider
protected String userInfoProviderClassName
protected Context context
| Constructor Detail |
|---|
public GroupBasedProfileManager()
| Method Detail |
|---|
public void contextualize(Context context)
throws ContextException
contextualize in interface ContextualizableContextException
public void parameterize(Parameters params)
throws ParameterException
parameterize in interface ParameterizableParameterException
public void initialize()
throws Exception
initialize in interface InitializableExceptionpublic void dispose()
dispose in interface Disposableprotected UserProfile getUserProfile(String layoutKey)
protected void removeUserProfiles()
protected void storeUserProfile(String layoutKey,
PortalService service,
UserProfile profile)
protected void prepareObject(Object object,
PortalService service)
throws ProcessingException
ProcessingExceptionpublic void login()
ProfileManager
login in interface ProfileManagerlogin in class AbstractProfileManagerpublic void logout()
ProfileManager
logout in interface ProfileManagerlogout in class AbstractProfileManagerpublic CopletInstanceData getCopletInstanceData(String copletID)
getCopletInstanceData in interface ProfileManagerpublic CopletData getCopletData(String copletDataId)
ProfileManager
getCopletData in interface ProfileManagerpublic List getCopletInstanceData(CopletData data)
getCopletInstanceData in interface ProfileManagerpublic void register(CopletInstanceData coplet)
ProfileManager
register in interface ProfileManagerregister in class AbstractProfileManagerpublic void unregister(CopletInstanceData coplet)
ProfileManager
unregister in interface ProfileManagerunregister in class AbstractProfileManagerpublic void register(Layout layout)
ProfileManager
register in interface ProfileManagerregister in class AbstractProfileManagerpublic void unregister(Layout layout)
ProfileManager
unregister in interface ProfileManagerunregister in class AbstractProfileManager
public Layout getPortalLayout(String layoutKey,
String layoutId)
ProfileManager
getPortalLayout in interface ProfileManagerlayoutKey - A key describing the layout or null for the defaultlayoutId - The id of a layout object or null for the root object
public Collection getCopletDatas()
ProfileManager
getCopletDatas in interface ProfileManagerpublic Collection getCopletInstanceDatas()
ProfileManager
getCopletInstanceDatas in interface ProfileManager
protected UserProfile loadProfile(String layoutKey,
PortalService service)
throws Exception
Exception
protected Map getGlobalBaseDatas(ProfileLS loader,
UserInfo info,
PortalService service)
throws Exception
Exception
protected Map getGlobalDatas(ProfileLS loader,
UserInfo info,
PortalService service,
UserProfile profile)
throws Exception
Exception
protected boolean getCopletInstanceDatas(ProfileLS loader,
UserProfile profile,
UserInfo info,
PortalService service,
String category)
throws Exception
Exception
protected boolean getLayout(ProfileLS loader,
UserProfile profile,
UserInfo info,
PortalService service,
String category)
throws Exception
Exception
protected Map buildKey(String category,
String profileType,
UserInfo info,
boolean load)
public void storeProfile(Layout rootLayout,
String layoutKey)
ProfileManager
storeProfile in interface ProfileManagerpublic PortalUser getUser()
ProfileManager
getUser in interface ProfileManagerpublic void saveUserCopletInstanceDatas(String layoutKey)
ProfileManager
saveUserCopletInstanceDatas in interface ProfileManagersaveUserCopletInstanceDatas in class AbstractProfileManagerProfileManager.saveUserCopletInstanceDatas(java.lang.String)public void saveUserLayout(String layoutKey)
ProfileManager
saveUserLayout in interface ProfileManagersaveUserLayout in class AbstractProfileManagerProfileManager.saveUserLayout(java.lang.String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||