uPortal 2.4.1
API Documentation

org.jasig.portal.layout
Class AggregatedUserLayoutStore

java.lang.Object
  extended byorg.jasig.portal.RDBMUserLayoutStore
      extended byorg.jasig.portal.layout.AggregatedUserLayoutStore
All Implemented Interfaces:
IAggregatedUserLayoutStore, IUserLayoutStore

public class AggregatedUserLayoutStore
extends RDBMUserLayoutStore
implements IAggregatedUserLayoutStore

AggregatedUserLayoutStore implementation using the relational database with SQL 92.

Company: Instructional Media & Magic

Version:
$Revision: 1.88.2.2 $
Author:
Michael Ivanov

Constructor Summary
AggregatedUserLayoutStore()
           
 
Method Summary
 ALNode addUserLayoutNode(IPerson person, UserProfile profile, ALNode node)
          Add the new user layout node.
 void deleteFragment(IPerson person, java.lang.String fragmentId)
          Deletes the layout fragment
 boolean deleteUserLayoutNode(IPerson person, UserProfile profile, ALNode node)
          Delete the new user layout node.
 void fillChannelDescription(IALChannelDescription channelDesc)
           
 IAggregatedLayout getAggregatedLayout(IPerson person, UserProfile profile)
          Returns the user layout internal representation.
 ILayoutFragment getFragment(IPerson person, java.lang.String fragmentId)
          Returns the layout fragment as a user layout
 java.util.Map getFragments(IPerson person)
          Gets the fragment IDs/fragment descriptions for a given user
 java.util.Set getIncorrectPushedFragmentNodes(IPerson person, UserProfile profile)
          Returns the list of pushed fragment node IDs that must be removed from the user layout.
 java.lang.String getNextFragmentId()
          Returns the next fragment ID.
 java.lang.String getNextNodeId(IPerson person)
           
 int[] getPriorityRange(java.lang.String groupKey)
          Returns the priority range defined for the given user group
 java.util.Collection getPublishGroups(IPerson person, java.lang.String fragmentId)
          Returns the user group keys which the fragment is published to
 StructureStylesheetUserPreferences getStructureStylesheetUserPreferences(IPerson person, int profileId, int stylesheetId)
          Obtain structure stylesheet user preferences
 java.util.Collection getSubscribableFragments(IPerson person)
          Returns the list of Ids of the fragments that the user can subscribe to
 ThemeStylesheetUserPreferences getThemeStylesheetUserPreferences(IPerson person, int profileId, int stylesheetId)
          Obtain theme stylesheet user preferences
 ALNode getUserLayoutNode(IPerson person, UserProfile profile, java.lang.String nodeId)
          Gets the user layout node.
 void setAggregatedLayout(IPerson person, UserProfile profile, IAggregatedLayout layoutImpl)
          Persists user layout document.
 void setFragment(IPerson person, ILayoutFragment fragment)
          Sets the fragment
 void setPublishGroups(IGroupMember[] groups, IPerson person, java.lang.String fragmentId)
          Persists the user groups which the fragment is published to
 void setStructureStylesheetUserPreferences(IPerson person, int profileId, StructureStylesheetUserPreferences ssup)
          Save structure stylesheet user pferences
 void setThemeStylesheetUserPreferences(IPerson person, int profileId, ThemeStylesheetUserPreferences tsup)
          Save theme stylesheet user preferences
 boolean updateUserLayoutNode(IPerson person, UserProfile profile, ALNode node)
          Update the new user layout node.
 
Methods inherited from class org.jasig.portal.RDBMUserLayoutStore
addStructureStylesheetDescription, addStructureStylesheetDescription, addSystemProfile, addThemeStylesheetDescription, addThemeStylesheetDescription, addUserProfile, deleteSystemProfile, deleteUserProfile, dumpDoc, generateNewChannelSubscribeId, generateNewFolderId, getMimeTypeList, getStructureStylesheetDescription, getStructureStylesheetId, getStructureStylesheetList, getStructureStylesheetList, getSystemProfile, getSystemProfileById, getSystemProfileList, getThemeStylesheetDescription, getThemeStylesheetId, getThemeStylesheetList, getThemeStylesheetList, getUserLayout, getUserPreferences, getUserPreferences, getUserProfile, getUserProfileById, getUserProfileList, putUserPreferences, removeStructureStylesheetDescription, removeThemeStylesheetDescription, setSystemBrowserMapping, setUserBrowserMapping, setUserLayout, updateStructureStylesheetDescription, updateStructureStylesheetDescription, updateSystemProfile, updateThemeStylesheetDescription, updateThemeStylesheetDescription, updateUserProfile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jasig.portal.IUserLayoutStore
addStructureStylesheetDescription, addSystemProfile, addThemeStylesheetDescription, addUserProfile, deleteSystemProfile, deleteUserProfile, generateNewChannelSubscribeId, generateNewFolderId, getMimeTypeList, getStructureStylesheetDescription, getStructureStylesheetList, getStructureStylesheetList, getSystemProfile, getSystemProfileById, getSystemProfileList, getThemeStylesheetDescription, getThemeStylesheetList, getThemeStylesheetList, getUserLayout, getUserPreferences, getUserProfile, getUserProfileById, getUserProfileList, putUserPreferences, removeStructureStylesheetDescription, removeThemeStylesheetDescription, setSystemBrowserMapping, setUserBrowserMapping, setUserLayout, updateStructureStylesheetDescription, updateSystemProfile, updateThemeStylesheetDescription, updateUserProfile
 

Constructor Detail

AggregatedUserLayoutStore

public AggregatedUserLayoutStore()
                          throws java.lang.Exception
Method Detail

setStructureStylesheetUserPreferences

public void setStructureStylesheetUserPreferences(IPerson person,
                                                  int profileId,
                                                  StructureStylesheetUserPreferences ssup)
                                           throws java.lang.Exception
Description copied from interface: IUserLayoutStore
Save structure stylesheet user pferences

Specified by:
setStructureStylesheetUserPreferences in interface IUserLayoutStore
Overrides:
setStructureStylesheetUserPreferences in class RDBMUserLayoutStore
Throws:
java.lang.Exception

setThemeStylesheetUserPreferences

public void setThemeStylesheetUserPreferences(IPerson person,
                                              int profileId,
                                              ThemeStylesheetUserPreferences tsup)
                                       throws java.lang.Exception
Description copied from interface: IUserLayoutStore
Save theme stylesheet user preferences

Specified by:
setThemeStylesheetUserPreferences in interface IUserLayoutStore
Overrides:
setThemeStylesheetUserPreferences in class RDBMUserLayoutStore
Throws:
java.lang.Exception

addUserLayoutNode

public ALNode addUserLayoutNode(IPerson person,
                                UserProfile profile,
                                ALNode node)
                         throws PortalException
Add the new user layout node.

Specified by:
addUserLayoutNode in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
profile - a user profile for which the layout is being stored
node - a ALNode object specifying the node
Returns:
a ALNode object specifying the node with the generated node ID
Throws:
PortalException - if an error occurs

updateUserLayoutNode

public boolean updateUserLayoutNode(IPerson person,
                                    UserProfile profile,
                                    ALNode node)
                             throws PortalException
Update the new user layout node.

Specified by:
updateUserLayoutNode in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
profile - a user profile for which the layout is being stored
node - a ALNode object specifying the node
Returns:
a boolean result of this operation
Throws:
PortalException - if an error occurs

deleteUserLayoutNode

public boolean deleteUserLayoutNode(IPerson person,
                                    UserProfile profile,
                                    ALNode node)
                             throws PortalException
Delete the new user layout node.

Specified by:
deleteUserLayoutNode in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
profile - a user profile for which the layout is being stored
node - a ALNode node ID specifying the node
Returns:
a boolean result of this operation
Throws:
PortalException - if an error occurs

getUserLayoutNode

public ALNode getUserLayoutNode(IPerson person,
                                UserProfile profile,
                                java.lang.String nodeId)
                         throws PortalException
Gets the user layout node.

Specified by:
getUserLayoutNode in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
profile - a user profile for which the layout is being stored
nodeId - a String node ID specifying the node
Returns:
a ALNode object
Throws:
PortalException - if an error occurs

setAggregatedLayout

public void setAggregatedLayout(IPerson person,
                                UserProfile profile,
                                IAggregatedLayout layoutImpl)
                         throws PortalException
Description copied from interface: IAggregatedUserLayoutStore
Persists user layout document.

Specified by:
setAggregatedLayout in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
profile - a user profile for which the layout is being stored
layoutImpl - a IAggregatedLayout containing an aggregated user layout
Throws:
PortalException - if an error occurs

getFragments

public java.util.Map getFragments(IPerson person)
                           throws PortalException
Gets the fragment IDs/fragment descriptions for a given user

Specified by:
getFragments in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
Returns:
a Map object containing the IDs of the fragments the user owns
Throws:
PortalException - if an error occurs

setFragment

public void setFragment(IPerson person,
                        ILayoutFragment fragment)
                 throws PortalException
Sets the fragment

Specified by:
setFragment in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
fragment - a ILayoutFragment containing a fragment
Throws:
PortalException - if an error occurs

deleteFragment

public void deleteFragment(IPerson person,
                           java.lang.String fragmentId)
                    throws PortalException
Deletes the layout fragment

Specified by:
deleteFragment in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
fragmentId - a fragment ID
Throws:
PortalException - if an error occurs

getAggregatedLayout

public IAggregatedLayout getAggregatedLayout(IPerson person,
                                             UserProfile profile)
                                      throws PortalException
Returns the user layout internal representation.

Specified by:
getAggregatedLayout in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
profile - a user profile for which the layout is being stored
Returns:
a IAggregatedLayout object containing the internal representation of the user layout
Throws:
PortalException - if an error occurs

getFragment

public ILayoutFragment getFragment(IPerson person,
                                   java.lang.String fragmentId)
                            throws PortalException
Returns the layout fragment as a user layout

Specified by:
getFragment in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
fragmentId - a fragment ID
Returns:
a IAggregatedLayout object containing the internal representation of the user layout
Throws:
PortalException - if an error occurs

fillChannelDescription

public void fillChannelDescription(IALChannelDescription channelDesc)
                            throws PortalException
Throws:
PortalException

getNextFragmentId

public java.lang.String getNextFragmentId()
                                   throws PortalException
Returns the next fragment ID.

Specified by:
getNextFragmentId in interface IAggregatedUserLayoutStore
Returns:
a String next fragment ID
Throws:
PortalException - if an error occurs

getThemeStylesheetUserPreferences

public ThemeStylesheetUserPreferences getThemeStylesheetUserPreferences(IPerson person,
                                                                        int profileId,
                                                                        int stylesheetId)
                                                                 throws java.lang.Exception
Description copied from interface: IUserLayoutStore
Obtain theme stylesheet user preferences

Specified by:
getThemeStylesheetUserPreferences in interface IUserLayoutStore
Overrides:
getThemeStylesheetUserPreferences in class RDBMUserLayoutStore
Throws:
java.lang.Exception

getStructureStylesheetUserPreferences

public StructureStylesheetUserPreferences getStructureStylesheetUserPreferences(IPerson person,
                                                                                int profileId,
                                                                                int stylesheetId)
                                                                         throws java.lang.Exception
Description copied from interface: IUserLayoutStore
Obtain structure stylesheet user preferences

Specified by:
getStructureStylesheetUserPreferences in interface IUserLayoutStore
Overrides:
getStructureStylesheetUserPreferences in class RDBMUserLayoutStore
Throws:
java.lang.Exception

getIncorrectPushedFragmentNodes

public java.util.Set getIncorrectPushedFragmentNodes(IPerson person,
                                                     UserProfile profile)
                                              throws PortalException
Returns the list of pushed fragment node IDs that must be removed from the user layout.

Parameters:
person - an IPerson object specifying the user
profile - a user profile for which the layout is being stored
Returns:
a Set list containing the fragment node IDs to be deleted from the user layout
Throws:
PortalException - if an error occurs

getSubscribableFragments

public java.util.Collection getSubscribableFragments(IPerson person)
                                              throws PortalException
Returns the list of Ids of the fragments that the user can subscribe to

Specified by:
getSubscribableFragments in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
Returns:
Collection a set of the fragment IDs
Throws:
PortalException - if an error occurs

getPublishGroups

public java.util.Collection getPublishGroups(IPerson person,
                                             java.lang.String fragmentId)
                                      throws PortalException
Returns the user group keys which the fragment is published to

Specified by:
getPublishGroups in interface IAggregatedUserLayoutStore
Parameters:
person - an IPerson object specifying the user
fragmentId - a String value
Returns:
a Collection object containing the group keys
Throws:
PortalException - if an error occurs

setPublishGroups

public void setPublishGroups(IGroupMember[] groups,
                             IPerson person,
                             java.lang.String fragmentId)
                      throws PortalException
Persists the user groups which the fragment is published to

Specified by:
setPublishGroups in interface IAggregatedUserLayoutStore
Parameters:
groups - an array of IGroupMember objects
person - an IPerson object specifying the user
fragmentId - a String value
Throws:
PortalException - if an error occurs

getPriorityRange

public int[] getPriorityRange(java.lang.String groupKey)
                       throws PortalException
Returns the priority range defined for the given user group

Specified by:
getPriorityRange in interface IAggregatedUserLayoutStore
Parameters:
groupKey - a String group key
Returns:
a int array containing the min and max priority values
Throws:
PortalException - if an error occurs

getNextNodeId

public java.lang.String getNextNodeId(IPerson person)
                               throws PortalException
Throws:
PortalException

uPortal 2.4.1
API Documentation