org.apache.cocoon.portal.profile.impl
Class AbstractProfileManager

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.cocoon.portal.impl.AbstractComponent
          extended byorg.apache.cocoon.portal.profile.impl.AbstractProfileManager
All Implemented Interfaces:
Contextualizable, Disposable, Initializable, LogEnabled, Preloadable, ProfileManager, Receiver, Serviceable, ThreadSafe
Direct Known Subclasses:
GroupBasedProfileManager, StaticProfileManager

public abstract class AbstractProfileManager
extends AbstractComponent
implements ProfileManager, Receiver

Base class for all profile managers.

Version:
$Id: AbstractProfileManager.java 322495 2005-10-16 17:52:43Z cziegeler $

Field Summary
static String USER_ATTRIBUTE
          Attribute to store the current user.
 
Fields inherited from class org.apache.cocoon.portal.impl.AbstractComponent
context, manager, portalService
 
Fields inherited from interface org.apache.cocoon.portal.profile.ProfileManager
ROLE
 
Constructor Summary
AbstractProfileManager()
           
 
Method Summary
 Profile getProfile(String profileName)
          Get the profile for the given profile key.
 void inform(UserEvent event, PortalService service)
          Receives any user related event and invokes login, logout etc.
protected  void login(PortalUser user)
          This method is invoked when a user logs in.
protected  void logout(PortalUser user)
          This method is invoked when a user logs out.
 void register(Layout layout)
          New layouts have to be registered using this method.
 void saveUserCopletInstanceDatas(String layoutKey)
          Save the coplet instance data
 void saveUserLayout(String layoutKey)
          Save the layout
 void saveUserProfiles(String layoutKey)
          Save the profile.
 void unregister(Layout layout)
          New layouts have to be unregistered using this method.
 
Methods inherited from class org.apache.cocoon.portal.impl.AbstractComponent
contextualize, dispose, initialize, 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
 
Methods inherited from interface org.apache.cocoon.portal.profile.ProfileManager
getCopletData, getCopletDatas, getCopletInstanceData, getCopletInstanceData, getCopletInstanceDatas, getPortalLayout, getUser
 

Field Detail

USER_ATTRIBUTE

public static final String USER_ATTRIBUTE
Attribute to store the current user.

Constructor Detail

AbstractProfileManager

public AbstractProfileManager()
Method Detail

inform

public void inform(UserEvent event,
                   PortalService service)
Receives any user related event and invokes login, logout etc.

See Also:
Receiver

register

public void register(Layout layout)
Description copied from interface: ProfileManager
New layouts have to be registered using this method.

Specified by:
register in interface ProfileManager
See Also:
ProfileManager.register(org.apache.cocoon.portal.layout.Layout)

saveUserProfiles

public void saveUserProfiles(String layoutKey)
Description copied from interface: ProfileManager
Save the profile. Usually this just calls ProfileManager.saveUserCopletInstanceDatas(String) and ProfileManager.saveUserLayout(String), but implementations are free to implement this method in a different way.

Specified by:
saveUserProfiles in interface ProfileManager
Parameters:
layoutKey -
See Also:
ProfileManager.saveUserProfiles(String)

saveUserCopletInstanceDatas

public void saveUserCopletInstanceDatas(String layoutKey)
Description copied from interface: ProfileManager
Save the coplet instance data

Specified by:
saveUserCopletInstanceDatas in interface ProfileManager
Parameters:
layoutKey -
See Also:
ProfileManager.saveUserCopletInstanceDatas(java.lang.String)

saveUserLayout

public void saveUserLayout(String layoutKey)
Description copied from interface: ProfileManager
Save the layout

Specified by:
saveUserLayout in interface ProfileManager
Parameters:
layoutKey -
See Also:
ProfileManager.saveUserLayout(String)

unregister

public void unregister(Layout layout)
Description copied from interface: ProfileManager
New layouts have to be unregistered using this method.

Specified by:
unregister in interface ProfileManager
See Also:
ProfileManager.unregister(org.apache.cocoon.portal.layout.Layout)

login

protected void login(PortalUser user)
This method is invoked when a user logs in.


logout

protected void logout(PortalUser user)
This method is invoked when a user logs out.


getProfile

public Profile getProfile(String profileName)
Description copied from interface: ProfileManager
Get the profile for the given profile key.

Specified by:
getProfile in interface ProfileManager
Returns:
The profile or null if the profile could not be found.
See Also:
ProfileManager.getProfile(java.lang.String)


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.