uPortal 2.4.1
API Documentation

org.jasig.portal
Interface IUserLayoutStore

All Known Subinterfaces:
IAggregatedUserLayoutStore
All Known Implementing Classes:
AggregatedUserLayoutStore, OracleUserLayoutStore, RDBMUserLayoutStore

public interface IUserLayoutStore


Method Summary
 java.lang.Integer addStructureStylesheetDescription(java.lang.String stylesheetDescriptionURI, java.lang.String stylesheetURI)
          Registers new structure stylesheet with the portal database
 UserProfile addSystemProfile(UserProfile profile)
          add a new system profile to the database.
 java.lang.Integer addThemeStylesheetDescription(java.lang.String stylesheetDescriptionURI, java.lang.String stylesheetURI)
          Registers a new theme stylesheet with the portal databases
 UserProfile addUserProfile(IPerson person, UserProfile profile)
          Creates a new user profile in the database.
 void deleteSystemProfile(int profileId)
          remove system profile from the database
 void deleteUserProfile(IPerson person, int profileId)
          remove user profile from the database
 java.lang.String generateNewChannelSubscribeId(IPerson person)
          Generate an instance id for a channel being added to the user layout
 java.lang.String generateNewFolderId(IPerson person)
          Generate a folder id for a folder being added to the user layout
 java.util.Hashtable getMimeTypeList()
          Obtains a list of mime types available on the installation
 StructureStylesheetDescription getStructureStylesheetDescription(int stylesheetId)
          Obtains a complete description of the structure stylesheet
 java.util.Hashtable getStructureStylesheetList()
          Obtain a list of strcture stylesheet descriptions registered on the system
 java.util.Hashtable getStructureStylesheetList(java.lang.String mimeType)
          Obtain a list of all structure stylesheet registered in the portal that (given a proper theme stylesheet choice) can support a given mime type.
 StructureStylesheetUserPreferences getStructureStylesheetUserPreferences(IPerson person, int profileId, int stylesheetId)
          Obtain structure stylesheet user preferences
 UserProfile getSystemProfile(java.lang.String userAgent)
          retreive a system profile associated with a given browser
 UserProfile getSystemProfileById(int profileId)
          Obtain a system profile
 java.util.Hashtable getSystemProfileList()
          obtain a list of system profiles
 ThemeStylesheetDescription getThemeStylesheetDescription(int stylesheetId)
          Obtains a complete description of a theme stylesheet
 java.util.Hashtable getThemeStylesheetList()
          Obtain a list of theme stylesheet descriptions registered on the system
 java.util.Hashtable getThemeStylesheetList(int structureStylesheetId)
          Obtains a list of theme stylesheets available for a particular structure stylesheet.
 ThemeStylesheetUserPreferences getThemeStylesheetUserPreferences(IPerson person, int profileId, int stylesheetId)
          Obtain theme stylesheet user preferences
 org.w3c.dom.Document getUserLayout(IPerson Person, UserProfile profile)
          Retreive a user layout document.
 UserPreferences getUserPreferences(IPerson person, UserProfile profile)
          Retreive the entire UserPreferences object
 UserProfile getUserProfile(IPerson person, java.lang.String userAgent)
          Obtain user profile associated with a particular browser
 UserProfile getUserProfileById(IPerson person, int profileId)
          Obtains a user profile by profile id.
 java.util.Hashtable getUserProfileList(IPerson person)
          retreive a list of profiles associated with a user
 void putUserPreferences(IPerson person, UserPreferences up)
          save user preferences
 void removeStructureStylesheetDescription(int stylesheetId)
          removes stylesheet description
 void removeThemeStylesheetDescription(int stylesheetId)
          Removes theme stylesheet
 void setStructureStylesheetUserPreferences(IPerson person, int profileId, StructureStylesheetUserPreferences fsup)
          Save structure stylesheet user pferences
 void setSystemBrowserMapping(java.lang.String userAgent, int systemProfileId)
          establish system profile browser mapping
 void setThemeStylesheetUserPreferences(IPerson person, int profileId, ThemeStylesheetUserPreferences ssup)
          Save theme stylesheet user preferences
 void setUserBrowserMapping(IPerson person, java.lang.String userAgent, int profileId)
          establish a browser - user profile mapping
 void setUserLayout(IPerson Person, UserProfile profile, org.w3c.dom.Document layoutXML, boolean channelsAdded)
          Persist user layout document.
 boolean updateStructureStylesheetDescription(java.lang.String stylesheetDescriptionURI, java.lang.String stylesheetURI, int stylesheetId)
          Updates an existing structure stylesheet description.
 void updateSystemProfile(UserProfile profile)
          update system profile
 boolean updateThemeStylesheetDescription(java.lang.String stylesheetDescriptionURI, java.lang.String stylesheetURI, int stylesheetId)
          Updates an existing theme stylesheet description.
 void updateUserProfile(IPerson person, UserProfile profile)
          update user profile
 

Method Detail

getUserLayout

public org.w3c.dom.Document getUserLayout(IPerson Person,
                                          UserProfile profile)
                                   throws java.lang.Exception
Retreive a user layout document.

Parameters:
Person - an IPerson object specifying the user
profile - a user profile
Returns:
a Document containing user layout (conforms to userLayout.dtd)
Throws:
java.lang.Exception - if an error occurs

setUserLayout

public void setUserLayout(IPerson Person,
                          UserProfile profile,
                          org.w3c.dom.Document layoutXML,
                          boolean channelsAdded)
                   throws java.lang.Exception
Persist user layout document.

Parameters:
Person - an IPerson object specifying the user
profile - a user profile for which the layout is being stored
layoutXML - a Document containing user layout (conforming to userLayout.dtd)
channelsAdded - a boolean flag specifying if new channels have been added to the current user layout (for performance optimization purposes)
Throws:
java.lang.Exception - if an error occurs

getUserProfile

public UserProfile getUserProfile(IPerson person,
                                  java.lang.String userAgent)
                           throws java.lang.Exception
Obtain user profile associated with a particular browser

Parameters:
person - User
userAgent - User-Agent header string
Returns:
user profile or null if no user profiles are associated with the given user agent.
Throws:
java.lang.Exception

updateUserProfile

public void updateUserProfile(IPerson person,
                              UserProfile profile)
                       throws java.lang.Exception
update user profile

Parameters:
person - User
profile - profile update
Throws:
java.lang.Exception

deleteUserProfile

public void deleteUserProfile(IPerson person,
                              int profileId)
                       throws java.lang.Exception
remove user profile from the database

Parameters:
person - User
profileId - profile id
Throws:
java.lang.Exception

addUserProfile

public UserProfile addUserProfile(IPerson person,
                                  UserProfile profile)
                           throws java.lang.Exception
Creates a new user profile in the database. In the process, new profileId is assigned to the profile

Parameters:
person - User
profile - profile object (profile id in this object will be overwritten)
Returns:
profile object with the profile id set to the newly generated id
Throws:
java.lang.Exception

getUserProfileById

public UserProfile getUserProfileById(IPerson person,
                                      int profileId)
                               throws java.lang.Exception
Obtains a user profile by profile id.

Parameters:
person - an IPerson object representing the user
profileId - profile id
Throws:
java.lang.Exception

getUserProfileList

public java.util.Hashtable getUserProfileList(IPerson person)
                                       throws java.lang.Exception
retreive a list of profiles associated with a user

Parameters:
person - User
Returns:
a Hashtable mapping user profile ids (Integer objects) to the UserProfile objects
Throws:
java.lang.Exception

getSystemProfile

public UserProfile getSystemProfile(java.lang.String userAgent)
                             throws java.lang.Exception
retreive a system profile associated with a given browser

Parameters:
userAgent - User-Agent header string
Returns:
profile object
Throws:
java.lang.Exception

updateSystemProfile

public void updateSystemProfile(UserProfile profile)
                         throws java.lang.Exception
update system profile

Parameters:
profile - profile object
Throws:
java.lang.Exception

deleteSystemProfile

public void deleteSystemProfile(int profileId)
                         throws java.lang.Exception
remove system profile from the database

Parameters:
profileId - profile id
Throws:
java.lang.Exception

addSystemProfile

public UserProfile addSystemProfile(UserProfile profile)
                             throws java.lang.Exception
add a new system profile to the database. During this process, a new profile id will be assigned to the profile.

Parameters:
profile - profile object (profile id within will be overwritten)
Returns:
profile with an newly assigned id
Throws:
java.lang.Exception

getSystemProfileById

public UserProfile getSystemProfileById(int profileId)
                                 throws java.lang.Exception
Obtain a system profile

Parameters:
profileId - system profile id
Throws:
java.lang.Exception

getSystemProfileList

public java.util.Hashtable getSystemProfileList()
                                         throws java.lang.Exception
obtain a list of system profiles

Returns:
a Hashtable mapping system profile ids (Integer objects) to the UserProfile objects
Throws:
java.lang.Exception

setUserBrowserMapping

public void setUserBrowserMapping(IPerson person,
                                  java.lang.String userAgent,
                                  int profileId)
                           throws java.lang.Exception
establish a browser - user profile mapping

Parameters:
person - User
userAgent - User-Agent header string
profileId - profile id to which given user agent will be mapped
Throws:
java.lang.Exception

setSystemBrowserMapping

public void setSystemBrowserMapping(java.lang.String userAgent,
                                    int systemProfileId)
                             throws java.lang.Exception
establish system profile browser mapping

Parameters:
userAgent - User-Agent header string
systemProfileId - profile id of a profile to which given user-agent will be mapped
Throws:
java.lang.Exception

getUserPreferences

public UserPreferences getUserPreferences(IPerson person,
                                          UserProfile profile)
                                   throws java.lang.Exception
Retreive the entire UserPreferences object

Parameters:
person - User
profile - profile
Returns:
user preferences
Throws:
java.lang.Exception

putUserPreferences

public void putUserPreferences(IPerson person,
                               UserPreferences up)
                        throws java.lang.Exception
save user preferences

Parameters:
person - User
up - user preferences object
Throws:
java.lang.Exception

getStructureStylesheetUserPreferences

public StructureStylesheetUserPreferences getStructureStylesheetUserPreferences(IPerson person,
                                                                                int profileId,
                                                                                int stylesheetId)
                                                                         throws java.lang.Exception
Obtain structure stylesheet user preferences

Parameters:
person - User
profileId - profile id
stylesheetId - structure stylesheet id
Returns:
structure stylesheet user preferences. null is returned only if userId, profileId or stylesheet with an appropriate name do not exist. If all of the parameters are valid, but the user does not have any user preference settings associated with this stylesheet, return contains stylesheet preference object filled in with the defaults defined in stylesheet description.
Throws:
java.lang.Exception

getThemeStylesheetUserPreferences

public ThemeStylesheetUserPreferences getThemeStylesheetUserPreferences(IPerson person,
                                                                        int profileId,
                                                                        int stylesheetId)
                                                                 throws java.lang.Exception
Obtain theme stylesheet user preferences

Parameters:
person - User
profileId - profile id
stylesheetId - theme stylesheet id
Returns:
theme stylesheet user preferences. null is returned only if userId, profileId or stylesheet with an appropriate name do not exist. If all of the parameters are valid, but the user does not have any user preference settings associated with this stylesheet, return contains stylesheet preference object filled in with the defaults defined in stylesheet description.
Throws:
java.lang.Exception

setStructureStylesheetUserPreferences

public void setStructureStylesheetUserPreferences(IPerson person,
                                                  int profileId,
                                                  StructureStylesheetUserPreferences fsup)
                                           throws java.lang.Exception
Save structure stylesheet user pferences

Parameters:
person - User
profileId - profile id
fsup - structure stylesheet user preferences
Throws:
java.lang.Exception

setThemeStylesheetUserPreferences

public void setThemeStylesheetUserPreferences(IPerson person,
                                              int profileId,
                                              ThemeStylesheetUserPreferences ssup)
                                       throws java.lang.Exception
Save theme stylesheet user preferences

Parameters:
person - User
profileId - profile id
ssup - structure stylesheet user preferneces
Throws:
java.lang.Exception

generateNewChannelSubscribeId

public java.lang.String generateNewChannelSubscribeId(IPerson person)
                                               throws java.lang.Exception
Generate an instance id for a channel being added to the user layout

Parameters:
person - an IPerson value
Returns:
a String value
Throws:
java.lang.Exception - if an error occurs

generateNewFolderId

public java.lang.String generateNewFolderId(IPerson person)
                                     throws java.lang.Exception
Generate a folder id for a folder being added to the user layout

Parameters:
person - an IPerson value
Returns:
a String value
Throws:
java.lang.Exception - if an error occurs

getStructureStylesheetList

public java.util.Hashtable getStructureStylesheetList(java.lang.String mimeType)
                                               throws java.lang.Exception
Obtain a list of all structure stylesheet registered in the portal that (given a proper theme stylesheet choice) can support a given mime type. Even though structure stylesheets themselves do not carry any mime type specification, the choice of available theme stylesheets determines if a certain structure is available for a given mime type.

Parameters:
mimeType - mime type that should be supported
Returns:
a Hashtable mapping stylesheet id (Integer objects) to StructureStylesheetDescription objects
Throws:
java.lang.Exception

getThemeStylesheetList

public java.util.Hashtable getThemeStylesheetList(int structureStylesheetId)
                                           throws java.lang.Exception
Obtains a list of theme stylesheets available for a particular structure stylesheet.

Parameters:
structureStylesheetId - id of the structure stylehsset
Returns:
a Hashtable mapping stylesheet id (Integer objects) to ThemeStylesheetDescription objects
Throws:
java.lang.Exception

getStructureStylesheetList

public java.util.Hashtable getStructureStylesheetList()
                                               throws java.lang.Exception
Obtain a list of strcture stylesheet descriptions registered on the system

Returns:
a Hashtable mapping stylesheet id (Integer objects) to StructureStylesheetDescription objects
Throws:
java.lang.Exception

getThemeStylesheetList

public java.util.Hashtable getThemeStylesheetList()
                                           throws java.lang.Exception
Obtain a list of theme stylesheet descriptions registered on the system

Returns:
a Hashtable mapping stylesheet id (Integer objects) to ThemeStylesheetDescription objects
Throws:
java.lang.Exception

getMimeTypeList

public java.util.Hashtable getMimeTypeList()
                                    throws java.lang.Exception
Obtains a list of mime types available on the installation

Returns:
Returns a hasbtale mapping mime type strings to their word descriptions (simple String)
Throws:
java.lang.Exception

getStructureStylesheetDescription

public StructureStylesheetDescription getStructureStylesheetDescription(int stylesheetId)
                                                                 throws java.lang.Exception
Obtains a complete description of the structure stylesheet

Parameters:
stylesheetId - id of the structure stylesheet
Returns:
a description of the structure stylesheet
Throws:
java.lang.Exception

getThemeStylesheetDescription

public ThemeStylesheetDescription getThemeStylesheetDescription(int stylesheetId)
                                                         throws java.lang.Exception
Obtains a complete description of a theme stylesheet

Parameters:
stylesheetId - id of a theme stylesheet
Returns:
a description of a theme stylesheet
Throws:
java.lang.Exception

removeStructureStylesheetDescription

public void removeStructureStylesheetDescription(int stylesheetId)
                                          throws java.lang.Exception
removes stylesheet description

Parameters:
stylesheetId - id of the stylesheet
Throws:
java.lang.Exception

removeThemeStylesheetDescription

public void removeThemeStylesheetDescription(int stylesheetId)
                                      throws java.lang.Exception
Removes theme stylesheet

Parameters:
stylesheetId - id of the stylesheet
Throws:
java.lang.Exception

addStructureStylesheetDescription

public java.lang.Integer addStructureStylesheetDescription(java.lang.String stylesheetDescriptionURI,
                                                           java.lang.String stylesheetURI)
                                                    throws java.lang.Exception
Registers new structure stylesheet with the portal database

Parameters:
stylesheetDescriptionURI - Location of the stylesheet description XML file
stylesheetURI - Location of the actual stylesshet XML file
Returns:
id assigned to the stylesheet or null if the operation failed
Throws:
java.lang.Exception

updateStructureStylesheetDescription

public boolean updateStructureStylesheetDescription(java.lang.String stylesheetDescriptionURI,
                                                    java.lang.String stylesheetURI,
                                                    int stylesheetId)
Updates an existing structure stylesheet description.

Parameters:
stylesheetDescriptionURI - Location of the stylesheet description XML file
stylesheetURI - Location of the actual stylesshet XML file
stylesheetId - the id of the existing stylesheet description
Returns:
true if the update successful

updateThemeStylesheetDescription

public boolean updateThemeStylesheetDescription(java.lang.String stylesheetDescriptionURI,
                                                java.lang.String stylesheetURI,
                                                int stylesheetId)
                                         throws java.lang.Exception
Updates an existing theme stylesheet description.

Parameters:
stylesheetDescriptionURI - Location of the stylesheet description XML file
stylesheetURI - Location of the actual stylesshet XML file
stylesheetId - the id of the existing stylesheet description
Returns:
true if the update successful
Throws:
java.lang.Exception

addThemeStylesheetDescription

public java.lang.Integer addThemeStylesheetDescription(java.lang.String stylesheetDescriptionURI,
                                                       java.lang.String stylesheetURI)
                                                throws java.lang.Exception
Registers a new theme stylesheet with the portal databases

Parameters:
stylesheetDescriptionURI - Location of the stylesheet description XML file
stylesheetURI - Location of the actual stylesheet XML file
Returns:
id assigned to the stylesheet or null if the operation failed
Throws:
java.lang.Exception

uPortal 2.4.1
API Documentation