org.jasig.portal.channels.DLMUserPreferences
Class CUserPreferences

java.lang.Object
  extended by org.jasig.portal.channels.DLMUserPreferences.CUserPreferences
All Implemented Interfaces:
IChannel, IPrivileged, IPrivilegedChannel

public class CUserPreferences
extends java.lang.Object
implements IPrivilegedChannel

Manages User Layout, user preferences and profiles

Version:
$Revision: 1.4 $
Author:
Peter Kharchenko, peterk@interactivebusiness.com, Ken Weiner, kweiner@interactivebusiness.com

Field Summary
(package private)  UserProfile editedProfile
           
private  boolean initialized
           
(package private)  IPrivilegedChannel internalState
           
private static org.apache.commons.logging.Log log
           
static int MANAGE_PREFERENCES
           
static int MANAGE_PROFILES
           
(package private)  IPrivilegedChannel managePreferences
           
(package private)  IPrivilegedChannel manageProfiles
           
(package private)  ChannelRuntimeData runtimeData
           
(package private)  StylesheetSet set
           
private static java.lang.String sslLocation
           
(package private)  ChannelStaticData staticData
           
protected  IUserLayoutStore ulsdb
           
private  UserPreferences up
           
(package private)  IUserPreferencesManager upm
           
 
Constructor Summary
CUserPreferences()
           
 
Method Summary
protected  UserPreferences getCurrentUserPreferences()
           
protected  UserProfile getEditedUserProfile()
           
protected  ChannelRuntimeData getRuntimeData()
           
 ChannelRuntimeProperties getRuntimeProperties()
          Returns channel runtime properties
protected  StylesheetSet getStylesheetSet()
           
protected  IUserLayoutManager getUserLayoutManager()
           
protected  UserPreferences getUserPreferencesFromStore(UserProfile profile)
           
protected  IUserPreferencesManager getUserPreferencesManager()
           
private  void instantiateManagePreferencesState(UserProfile profile)
          Instantiates appropriate managePreferences object.
 void receiveEvent(PortalEvent ev)
          Processes layout-level events coming from the portal
 void renderXML(org.xml.sax.ContentHandler out)
          Output channel content to the portal
 void setPortalControlStructures(PortalControlStructures pcs)
          Passes portal control structure to the channel.
 void setRuntimeData(ChannelRuntimeData rd)
          CUserPreferences listens for an HttpRequestParameter "userPreferencesAction" and based on its value changes state between profile management and layout/stylesheet preferences.
 void setStaticData(ChannelStaticData sd)
          Receive static channel data from the portal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

upm

IUserPreferencesManager upm

runtimeData

ChannelRuntimeData runtimeData

staticData

ChannelStaticData staticData

set

StylesheetSet set

sslLocation

private static final java.lang.String sslLocation
See Also:
Constant Field Values

up

private UserPreferences up

MANAGE_PREFERENCES

public static final int MANAGE_PREFERENCES
See Also:
Constant Field Values

MANAGE_PROFILES

public static final int MANAGE_PROFILES
See Also:
Constant Field Values

internalState

IPrivilegedChannel internalState

managePreferences

IPrivilegedChannel managePreferences

manageProfiles

IPrivilegedChannel manageProfiles

ulsdb

protected IUserLayoutStore ulsdb

initialized

private boolean initialized

editedProfile

UserProfile editedProfile
Constructor Detail

CUserPreferences

public CUserPreferences()
                 throws PortalException
Throws:
PortalException
Method Detail

getUserPreferencesManager

protected IUserPreferencesManager getUserPreferencesManager()

getUserLayoutManager

protected IUserLayoutManager getUserLayoutManager()

getCurrentUserPreferences

protected UserPreferences getCurrentUserPreferences()

getRuntimeData

protected ChannelRuntimeData getRuntimeData()

getStylesheetSet

protected StylesheetSet getStylesheetSet()

setPortalControlStructures

public void setPortalControlStructures(PortalControlStructures pcs)
                                throws PortalException
Description copied from interface: IPrivileged
Passes portal control structure to the channel.

Specified by:
setPortalControlStructures in interface IPrivileged
Throws:
PortalException
See Also:
PortalControlStructures

instantiateManagePreferencesState

private void instantiateManagePreferencesState(UserProfile profile)
Instantiates appropriate managePreferences object.

Parameters:
profile - profile for which preferences are to be edited

getRuntimeProperties

public ChannelRuntimeProperties getRuntimeProperties()
Returns channel runtime properties

Specified by:
getRuntimeProperties in interface IChannel
Returns:
handle to runtime properties
See Also:
ChannelRuntimeProperties

receiveEvent

public void receiveEvent(PortalEvent ev)
Processes layout-level events coming from the portal

Specified by:
receiveEvent in interface IChannel
Parameters:
ev - a portal layout event
See Also:
PortalEvent

setStaticData

public void setStaticData(ChannelStaticData sd)
                   throws PortalException
Receive static channel data from the portal

Specified by:
setStaticData in interface IChannel
Parameters:
sd - static channel data
Throws:
PortalException
See Also:
ChannelStaticData

setRuntimeData

public void setRuntimeData(ChannelRuntimeData rd)
                    throws PortalException
CUserPreferences listens for an HttpRequestParameter "userPreferencesAction" and based on its value changes state between profile management and layout/stylesheet preferences.

Specified by:
setRuntimeData in interface IChannel
Parameters:
rd - handle to channel runtime data
Throws:
PortalException
See Also:
ChannelRuntimeData

renderXML

public void renderXML(org.xml.sax.ContentHandler out)
               throws PortalException
Output channel content to the portal

Specified by:
renderXML in interface IChannel
Parameters:
out - a sax document handler
Throws:
PortalException

getUserPreferencesFromStore

protected UserPreferences getUserPreferencesFromStore(UserProfile profile)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

getEditedUserProfile

protected UserProfile getEditedUserProfile()