org.apache.cocoon.portal.profile
Interface ProfileManager

All Known Implementing Classes:
AbstractProfileManager

public interface ProfileManager

The profile manager. Via this component you can get the profile (or parts of it) of the current 'user'.

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

Field Summary
static String ROLE
           
 
Method Summary
 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.
 Profile getProfile(String profileName)
          Get the profile for the given profile key.
 PortalUser getUser()
          Get current user information
 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.
 

Field Detail

ROLE

public static final String ROLE
Method Detail

getPortalLayout

public Layout getPortalLayout(String layoutKey,
                              String layoutID)
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.

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

getCopletInstanceData

public CopletInstanceData getCopletInstanceData(String copletID)

getCopletInstanceData

public List getCopletInstanceData(CopletData data)

getCopletData

public CopletData getCopletData(String copletDataId)
Return the coplet data object


register

public void register(Layout layout)
New layouts have to be registered using this method.


unregister

public void unregister(Layout layout)
New layouts have to be unregistered using this method.


saveUserProfiles

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

Parameters:
layoutKey -

saveUserLayout

public void saveUserLayout(String layoutKey)
Save the layout

Parameters:
layoutKey -

saveUserCopletInstanceDatas

public void saveUserCopletInstanceDatas(String layoutKey)
Save the coplet instance data

Parameters:
layoutKey -

getCopletInstanceDatas

public Collection getCopletInstanceDatas()
Get all instances


getCopletDatas

public Collection getCopletDatas()
Get all coplets


getUser

public PortalUser getUser()
Get current user information


getProfile

public Profile getProfile(String profileName)
                   throws ProfileException
Get the profile for the given profile key.

Returns:
The profile or null if the profile could not be found.
Throws:
ProfileException - if an error occurs.


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