|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.layout.simple.RDBMUserLayoutStore
org.jasig.portal.layout.alm.AggregatedUserLayoutStore
public class AggregatedUserLayoutStore
AggregatedUserLayoutStore implementation using the relational database with SQL 92.
Company: Instructional Media & Magic Prior to uPortal 2.5, this class existed in the package org.jasig.portal.layout. It was moved to its present package to reflect that it is part of Aggregated Layouts.
Field Summary | |
---|---|
protected static java.lang.String |
CHANNEL_ADD_SQL
|
protected static java.lang.String |
CHANNEL_PARAM_ADD_SQL
|
protected static java.lang.String |
CHANNEL_PARAM_UPDATE_SQL
|
protected static java.lang.String |
CHANNEL_UPDATE_SQL
|
protected static java.lang.String |
FRAGMENT_ADD_SQL
|
protected static java.lang.String |
FRAGMENT_RESTRICTION_ADD_SQL
|
protected static java.lang.String |
FRAGMENT_RESTRICTION_UPDATE_SQL
|
protected static java.lang.String |
FRAGMENT_UPDATE_SQL
|
private static java.lang.String |
fragmentJoinQuery
|
protected static java.lang.String |
LAYOUT_ADD_SQL
|
protected static java.lang.String |
LAYOUT_RESTRICTION_ADD_SQL
|
protected static java.lang.String |
LAYOUT_RESTRICTION_UPDATE_SQL
|
protected static java.lang.String |
LAYOUT_UPDATE_SQL
|
private static int |
LOST_FOLDER_ID
|
private static java.lang.String |
NODE_SEPARATOR
|
private static boolean |
useOuterJoins
|
Fields inherited from class org.jasig.portal.layout.simple.RDBMUserLayoutStore |
---|
channelPrefix, crs, csdb, DEBUG, folderPrefix, localeAware, log |
Constructor Summary | |
---|---|
AggregatedUserLayoutStore()
|
Method Summary | |
---|---|
private ALNode |
addUserLayoutNode(int userId,
int layoutId,
ALNode node,
java.sql.PreparedStatement psAddNode,
java.sql.PreparedStatement psAddRestriction,
java.sql.PreparedStatement psAddChannel,
java.sql.PreparedStatement psAddChannelParam,
java.sql.Statement stmt)
Add the new user layout node. |
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 |
protected ILayoutFragment |
getFragment(java.lang.String fragmentIdStr)
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 |
protected java.lang.String |
getStructId(int structId,
int chanId)
Return the Structure ID tag (Overloaded) |
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 |
private boolean |
updateUserLayoutNode(int userId,
int layoutId,
ALNode node,
java.sql.PreparedStatement psUpdateNode,
java.sql.PreparedStatement psUpdateRestriction,
java.sql.PreparedStatement psUpdateChannel,
java.sql.PreparedStatement psUpdateChannelParam)
Update the new user layout node. |
boolean |
updateUserLayoutNode(IPerson person,
UserProfile profile,
ALNode node)
Update the new user layout node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int LOST_FOLDER_ID
private static final java.lang.String NODE_SEPARATOR
protected static final java.lang.String FRAGMENT_UPDATE_SQL
protected static final java.lang.String LAYOUT_UPDATE_SQL
protected static final java.lang.String FRAGMENT_RESTRICTION_UPDATE_SQL
protected static final java.lang.String LAYOUT_RESTRICTION_UPDATE_SQL
protected static final java.lang.String CHANNEL_PARAM_UPDATE_SQL
protected static final java.lang.String CHANNEL_UPDATE_SQL
protected static final java.lang.String FRAGMENT_ADD_SQL
protected static final java.lang.String LAYOUT_ADD_SQL
protected static final java.lang.String FRAGMENT_RESTRICTION_ADD_SQL
protected static final java.lang.String LAYOUT_RESTRICTION_ADD_SQL
protected static final java.lang.String CHANNEL_PARAM_ADD_SQL
protected static final java.lang.String CHANNEL_ADD_SQL
private static java.lang.String fragmentJoinQuery
private static boolean useOuterJoins
Constructor Detail |
---|
public AggregatedUserLayoutStore() throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
protected java.lang.String getStructId(int structId, int chanId)
getStructId
in class RDBMUserLayoutStore
structId
- chanId
-
public void setStructureStylesheetUserPreferences(IPerson person, int profileId, StructureStylesheetUserPreferences ssup) throws java.lang.Exception
IUserLayoutStore
setStructureStylesheetUserPreferences
in interface IUserLayoutStore
setStructureStylesheetUserPreferences
in class RDBMUserLayoutStore
person
- UserprofileId
- profile idssup
- structure stylesheet user preferences
java.lang.Exception
public void setThemeStylesheetUserPreferences(IPerson person, int profileId, ThemeStylesheetUserPreferences tsup) throws java.lang.Exception
IUserLayoutStore
setThemeStylesheetUserPreferences
in interface IUserLayoutStore
setThemeStylesheetUserPreferences
in class RDBMUserLayoutStore
person
- UserprofileId
- profile idtsup
- structure stylesheet user preferneces
java.lang.Exception
public ALNode addUserLayoutNode(IPerson person, UserProfile profile, ALNode node) throws PortalException
addUserLayoutNode
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userprofile
- a user profile for which the layout is being storednode
- a ALNode
object specifying the node
ALNode
object specifying the node with the generated node ID
PortalException
- if an error occursprivate ALNode addUserLayoutNode(int userId, int layoutId, ALNode node, java.sql.PreparedStatement psAddNode, java.sql.PreparedStatement psAddRestriction, java.sql.PreparedStatement psAddChannel, java.sql.PreparedStatement psAddChannelParam, java.sql.Statement stmt) throws PortalException
userId
- the userlayoutId
- identities the layoutnode
- a ALNode
object specifying the node
ALNode
object specifying the node with the generated node ID
PortalException
- if an error occurspublic boolean updateUserLayoutNode(IPerson person, UserProfile profile, ALNode node) throws PortalException
updateUserLayoutNode
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userprofile
- a user profile for which the layout is being storednode
- a ALNode
object specifying the node
PortalException
- if an error occursprivate boolean updateUserLayoutNode(int userId, int layoutId, ALNode node, java.sql.PreparedStatement psUpdateNode, java.sql.PreparedStatement psUpdateRestriction, java.sql.PreparedStatement psUpdateChannel, java.sql.PreparedStatement psUpdateChannelParam) throws PortalException
userId
- the userlayoutId
- identities the layout is being storednode
- a ALNode
object specifying the node
PortalException
- if an error occurspublic boolean deleteUserLayoutNode(IPerson person, UserProfile profile, ALNode node) throws PortalException
deleteUserLayoutNode
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userprofile
- a user profile for which the layout is being storednode
- a ALNode
node ID specifying the node
PortalException
- if an error occurspublic ALNode getUserLayoutNode(IPerson person, UserProfile profile, java.lang.String nodeId) throws PortalException
getUserLayoutNode
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userprofile
- a user profile for which the layout is being storednodeId
- a String
node ID specifying the node
ALNode
object
PortalException
- if an error occurspublic void setAggregatedLayout(IPerson person, UserProfile profile, IAggregatedLayout layoutImpl) throws PortalException
IAggregatedUserLayoutStore
setAggregatedLayout
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userprofile
- a user profile for which the layout is being storedlayoutImpl
- a IAggregatedLayout
containing an aggregated user layout
PortalException
- if an error occurspublic java.util.Map getFragments(IPerson person) throws PortalException
getFragments
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the user
Map
object containing the IDs of the fragments the user owns
PortalException
- if an error occurspublic void setFragment(IPerson person, ILayoutFragment fragment) throws PortalException
setFragment
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userfragment
- a ILayoutFragment
containing a fragment
PortalException
- if an error occurspublic void deleteFragment(IPerson person, java.lang.String fragmentId) throws PortalException
deleteFragment
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userfragmentId
- a fragment ID
PortalException
- if an error occurspublic IAggregatedLayout getAggregatedLayout(IPerson person, UserProfile profile) throws PortalException
getAggregatedLayout
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userprofile
- a user profile for which the layout is being stored
IAggregatedLayout
object containing the internal representation of the user layout
PortalException
- if an error occurspublic ILayoutFragment getFragment(IPerson person, java.lang.String fragmentId) throws PortalException
getFragment
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userfragmentId
- a fragment ID
IAggregatedLayout
object containing the internal representation of the user layout
PortalException
- if an error occursprotected ILayoutFragment getFragment(java.lang.String fragmentIdStr) throws PortalException
fragmentIdStr
- a fragment ID
IAggregatedLayout
object containing the internal representation of the user layout
PortalException
- if an error occurspublic void fillChannelDescription(IALChannelDescription channelDesc) throws PortalException
PortalException
public java.lang.String getNextFragmentId() throws PortalException
getNextFragmentId
in interface IAggregatedUserLayoutStore
String
next fragment ID
PortalException
- if an error occurspublic ThemeStylesheetUserPreferences getThemeStylesheetUserPreferences(IPerson person, int profileId, int stylesheetId) throws java.lang.Exception
IUserLayoutStore
getThemeStylesheetUserPreferences
in interface IUserLayoutStore
getThemeStylesheetUserPreferences
in class RDBMUserLayoutStore
person
- UserprofileId
- profile idstylesheetId
- theme stylesheet id
java.lang.Exception
public StructureStylesheetUserPreferences getStructureStylesheetUserPreferences(IPerson person, int profileId, int stylesheetId) throws java.lang.Exception
IUserLayoutStore
getStructureStylesheetUserPreferences
in interface IUserLayoutStore
getStructureStylesheetUserPreferences
in class RDBMUserLayoutStore
person
- UserprofileId
- profile idstylesheetId
- structure stylesheet id
java.lang.Exception
public java.util.Set getIncorrectPushedFragmentNodes(IPerson person, UserProfile profile) throws PortalException
person
- an IPerson
object specifying the userprofile
- a user profile for which the layout is being stored
Set
list containing the fragment node IDs to be deleted from the user layout
PortalException
- if an error occurspublic java.util.Collection getSubscribableFragments(IPerson person) throws PortalException
getSubscribableFragments
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the user
Collection
a set of the fragment IDs
PortalException
- if an error occurspublic java.util.Collection getPublishGroups(IPerson person, java.lang.String fragmentId) throws PortalException
getPublishGroups
in interface IAggregatedUserLayoutStore
person
- an IPerson
object specifying the userfragmentId
- a String
value
Collection
object containing the group keys
PortalException
- if an error occurspublic void setPublishGroups(IGroupMember[] groups, IPerson person, java.lang.String fragmentId) throws PortalException
setPublishGroups
in interface IAggregatedUserLayoutStore
groups
- an array of IGroupMember
objectsperson
- an IPerson
object specifying the userfragmentId
- a String
value
PortalException
- if an error occurspublic int[] getPriorityRange(java.lang.String groupKey) throws PortalException
getPriorityRange
in interface IAggregatedUserLayoutStore
groupKey
- a String
group key
PortalException
- if an error occurspublic java.lang.String getNextNodeId(IPerson person) throws PortalException
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |