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

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.portal.profile.impl.AbstractProfileManager
          extended by org.apache.cocoon.portal.profile.impl.StaticProfileManager
All Implemented Interfaces:
Component, Configurable, LogEnabled, Serviceable, ThreadSafe, ProfileManager

public class StaticProfileManager
extends AbstractProfileManager
implements Configurable

Version:
CVS $Id: StaticProfileManager.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler, Volker Schmitt, Jürgen Seitz

Nested Class Summary
protected static class StaticProfileManager.StaticPortalUser
           
 
Field Summary
protected  org.apache.commons.collections.map.StaticBucketMap copletDataManagers
           
protected  org.apache.commons.collections.map.StaticBucketMap copletInstanceDataManagers
           
protected static String LAYOUTKEY_PREFIX
           
protected  PortalUser portalUser
           
protected  String profilesPath
           
 
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
StaticProfileManager()
           
 
Method Summary
 void configure(Configuration configuration)
           
 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
 Layout getPortalLayout(String layoutKey, String layoutID)
          Get the portal layout defined by the layout key.
 PortalUser getUser()
          Get current user information
 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.
 void storeProfile(Layout rootLayout, String layoutKey)
          Store the provided profile under the layoutKey.
 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
login, logout, saveUserCopletInstanceDatas, saveUserLayout, 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

profilesPath

protected String profilesPath

copletInstanceDataManagers

protected org.apache.commons.collections.map.StaticBucketMap copletInstanceDataManagers

copletDataManagers

protected org.apache.commons.collections.map.StaticBucketMap copletDataManagers

LAYOUTKEY_PREFIX

protected static final String LAYOUTKEY_PREFIX

portalUser

protected PortalUser portalUser
Constructor Detail

StaticProfileManager

public StaticProfileManager()
Method Detail

getPortalLayout

public Layout getPortalLayout(String layoutKey,
                              String layoutID)
Description copied from interface: ProfileManager
Get the portal layout defined by the layout key. This usually addresses the layout profile. With the optional subKey it's possible to retrieve a specific layout object in the profile defined by the layout key.

Specified by:
getPortalLayout in interface ProfileManager
Parameters:
layoutKey - A key describing the layout or null for the default
layoutID - The id of a layout object or null for the root object
Returns:
The layout
See Also:
ProfileManager.getPortalLayout(String, String)

getCopletInstanceData

public CopletInstanceData getCopletInstanceData(String copletID)
Specified by:
getCopletInstanceData in interface ProfileManager

getCopletData

public CopletData getCopletData(String copletDataId)
Description copied from interface: ProfileManager
Return the coplet data object

Specified by:
getCopletData in interface ProfileManager

getCopletInstanceData

public List getCopletInstanceData(CopletData data)
Specified by:
getCopletInstanceData in interface ProfileManager

register

public void register(CopletInstanceData coplet)
Description copied from interface: ProfileManager
New coplet instance datas have to be registered using this method.

Specified by:
register in interface ProfileManager
Overrides:
register in class AbstractProfileManager

unregister

public void unregister(CopletInstanceData coplet)
Description copied from interface: ProfileManager
Removed coplet instance datas have to be unregistered using this method.

Specified by:
unregister in interface ProfileManager
Overrides:
unregister in class AbstractProfileManager

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
Overrides:
register in class AbstractProfileManager

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
Overrides:
unregister in class AbstractProfileManager

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException

getCopletDatas

public Collection getCopletDatas()
Description copied from interface: ProfileManager
Get all coplets

Specified by:
getCopletDatas in interface ProfileManager

getCopletInstanceDatas

public Collection getCopletInstanceDatas()
Description copied from interface: ProfileManager
Get all instances

Specified by:
getCopletInstanceDatas in interface ProfileManager

storeProfile

public void storeProfile(Layout rootLayout,
                         String layoutKey)
Description copied from interface: ProfileManager
Store the provided profile under the layoutKey. This method can be used to overwrite a profile with another one.

Specified by:
storeProfile in interface ProfileManager

getUser

public PortalUser getUser()
Description copied from interface: ProfileManager
Get current user information

Specified by:
getUser in interface ProfileManager


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.