01: /* Copyright 2001 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal;
07:
08: import javax.servlet.http.HttpServletRequest;
09: import javax.servlet.http.HttpSessionBindingEvent;
10:
11: import org.jasig.portal.layout.IUserLayoutManager;
12: import org.jasig.portal.security.IPerson;
13:
14: /**
15: * Interface to user preferences management class.
16: * @author Peter Kharchenko {@link <a href="mailto:pkharchenko@interactivebusiness.com">pkharchenko@interactivebusiness.com</a>}
17: * @version $Revision: 36690 $
18: */
19: public interface IUserPreferencesManager {
20:
21: /* This function processes request parameters related to
22: * setting Structure/Theme stylesheet parameters and attributes.
23: * (uP_sparam, uP_tparam, uP_sfattr, uP_scattr uP_tcattr)
24: * It also processes layout root requests (uP_root)
25: * @param req current <code>HttpServletRequest</code>
26: */
27: public void processUserPreferencesParameters(HttpServletRequest req);
28:
29: /**
30: * Returns current person object
31: * @return current <code>IPerson</code>
32: */
33: public IPerson getPerson();
34:
35: /**
36: * Returns {@link IUserLayoutManager} object for performing layout-related operations.
37: *
38: * @return an <code>IUserLayoutManager</code> value
39: */
40: public IUserLayoutManager getUserLayoutManager();
41:
42: /**
43: * Returns a global channel Id given a channel instance Id
44: * @param channelInstanceId instance id of a channel
45: * @return channel global id
46: */
47: // public String getChannelPublishId (String channelInstanceId);
48: /**
49: * Determine if the user agent associated with this session has been successfuly mapped to a profile
50: * @return <code>true</code> if no mapping was found
51: */
52: public boolean isUserAgentUnmapped();
53:
54: /*
55: * Resets both user layout and user preferences.
56: * Note that if any of the two are "null", old values will be used.
57: */
58: public void setNewUserLayoutAndUserPreferences(
59: IUserLayoutManager newLayout, UserPreferences newPreferences)
60: throws PortalException;
61:
62: /**
63: * Returns a copy of the user preferences
64: * @return a copy of the <code>UserPreferences</code> object
65: */
66: public UserPreferences getUserPreferencesCopy();
67:
68: /**
69: * Returns current profile.
70: * @return current <code>UserProfile</code>
71: */
72: public UserProfile getCurrentProfile();
73:
74: /**
75: * Returns current theme stylesheet description
76: * @return current <code>ThemeStylesheetDescription</code>
77: */
78: public ThemeStylesheetDescription getThemeStylesheetDescription()
79: throws Exception;
80:
81: /**
82: * Returns current structure stylesheet description
83: * @return current <code>StructureStylesheetDescription</code>
84: */
85: public StructureStylesheetDescription getStructureStylesheetDescription()
86: throws Exception;
87:
88: /**
89: * Returns current user preferences.
90: * @return current <code>UserPreferences</code>
91: */
92: public UserPreferences getUserPreferences();
93:
94: public void finishedSession(HttpSessionBindingEvent bindingEvent);
95: }
|