|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.layout.simple.RDBMUserLayoutStore
public abstract class RDBMUserLayoutStore
SQL implementation for the 2.x relational database model. Prior to uPortal 2.5, this class existed in the org.jasig.portal package. It was moved to its present package to express that it is part of the Simple Layout Manager implementation.
| Field Summary | |
|---|---|
protected static String |
channelPrefix
|
protected IChannelRegistryStore |
channelRegistryStore
|
protected ICounterStore |
counterStore
|
protected static int |
DEBUG
|
protected static String |
folderPrefix
|
protected static boolean |
localeAware
|
protected org.apache.commons.logging.Log |
log
|
protected IPersonManager |
personManager
|
| Constructor Summary | |
|---|---|
RDBMUserLayoutStore()
|
|
| Method Summary | |
|---|---|
Integer |
addStructureStylesheetDescription(String stylesheetDescriptionURI,
String stylesheetURI)
Add a structure stylesheet description |
Integer |
addStructureStylesheetDescription(StructureStylesheetDescription ssd)
Registers a NEW structure stylesheet with the database. |
UserProfile |
addSystemProfile(UserProfile profile)
add a new system profile to the database. |
Integer |
addThemeStylesheetDescription(String stylesheetDescriptionURI,
String stylesheetURI)
Add theme stylesheet description |
Integer |
addThemeStylesheetDescription(ThemeStylesheetDescription tsd)
Registers a NEW theme stylesheet with the database. |
UserProfile |
addUserProfile(IPerson person,
UserProfile profile)
Add a user profile |
protected static boolean |
channelApproved(Date approvedDate)
Checks if a channel has been approved |
protected void |
createLayout(HashMap layoutStructure,
Document doc,
Element root,
int structId)
Create a layout |
void |
deleteSystemProfile(int profileId)
remove system profile from the database |
void |
deleteUserProfile(IPerson person,
int profileId)
remove user profile from the database |
static void |
dumpDoc(Node node,
String indent)
Dump a document tree structure on stdout |
String |
generateNewChannelSubscribeId(IPerson person)
Return the next available channel structure id for a user |
String |
generateNewFolderId(IPerson person)
Return the next available folder structure id for a user |
protected int |
getLayoutID(int userId,
int profileId)
Returns the current layout ID for the user and profile. |
Hashtable |
getMimeTypeList()
CoreStyleSheet |
protected String |
getNextStructId(IPerson person,
String prefix)
Return the next available structure id for a user |
protected String |
getStructId(int structId,
int chanId)
Return the Structure ID tag |
protected abstract Element |
getStructure(Document doc,
LayoutStructure ls)
|
StructureStylesheetDescription |
getStructureStylesheetDescription(int stylesheetId)
Obtain structure stylesheet description object for a given structure stylesheet id. |
Integer |
getStructureStylesheetId(String ssName)
Obtain ID for known structure stylesheet name |
Hashtable |
getStructureStylesheetList()
Obtain a list of strcture stylesheet descriptions registered on the system |
Hashtable |
getStructureStylesheetList(String mimeType)
Obtain a list of structure stylesheet descriptions that have stylesheets for a given mime type. |
abstract StructureStylesheetUserPreferences |
getStructureStylesheetUserPreferences(IPerson person,
int profileId,
int stylesheetId)
Obtain structure stylesheet user preferences |
UserProfile |
getSystemProfile(String userAgent)
retreive a system profile associated with a given browser |
UserProfile |
getSystemProfileByFname(String profileFname)
|
UserProfile |
getSystemProfileById(int profileId)
Obtain a system profile |
Hashtable |
getSystemProfileList()
obtain a list of system profiles |
ThemeStylesheetDescription |
getThemeStylesheetDescription(int stylesheetId)
Obtain theme stylesheet description object for a given theme stylesheet id. |
Integer |
getThemeStylesheetId(String tsName)
Obtain ID for known theme stylesheet name |
Hashtable |
getThemeStylesheetList()
Obtain a list of theme stylesheet descriptions registered on the system |
Hashtable |
getThemeStylesheetList(int structureStylesheetId)
Obtain a list of theme stylesheet descriptions for a given structure stylesheet |
abstract ThemeStylesheetUserPreferences |
getThemeStylesheetUserPreferences(IPerson person,
int profileId,
int stylesheetId)
Obtain theme stylesheet user preferences |
Document |
getUserLayout(IPerson person,
UserProfile profile)
Retrieve a user layout document. |
UserPreferences |
getUserPreferences(IPerson person,
String profileFname)
|
UserPreferences |
getUserPreferences(IPerson person,
UserProfile profile)
Retreive the entire UserPreferences object |
UserProfile |
getUserProfile(IPerson person,
String userAgent)
Obtain user profile associated with a particular browser |
UserProfile |
getUserProfileByFname(IPerson person,
String profileFname)
Obtains a user profile by profile functional name. |
UserProfile |
getUserProfileById(IPerson person,
int profileId)
Obtains a user profile by profile id. |
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 |
protected abstract int |
saveStructure(Node node,
PreparedStatement structStmt,
PreparedStatement parmStmt)
|
abstract void |
setStructureStylesheetUserPreferences(IPerson person,
int profileId,
StructureStylesheetUserPreferences ssup)
Save structure stylesheet user pferences |
void |
setSystemBrowserMapping(String userAgent,
int profileId)
establish system profile browser mapping |
abstract void |
setThemeStylesheetUserPreferences(IPerson person,
int profileId,
ThemeStylesheetUserPreferences tsup)
Save theme stylesheet user preferences |
void |
setUserBrowserMapping(IPerson person,
String userAgent,
int profileId)
establish a browser - user profile mapping |
void |
setUserLayout(IPerson person,
UserProfile profile,
Document layoutXML,
boolean channelsAdded)
Save the user layout. |
boolean |
updateStructureStylesheetDescription(String stylesheetDescriptionURI,
String stylesheetURI,
int stylesheetId)
Update the structure stylesheet description |
void |
updateStructureStylesheetDescription(StructureStylesheetDescription ssd)
Updates an existing structure stylesheet description with a new one. |
void |
updateSystemProfile(UserProfile profile)
update system profile |
boolean |
updateThemeStylesheetDescription(String stylesheetDescriptionURI,
String stylesheetURI,
int stylesheetId)
Update the theme stylesheet description. |
void |
updateThemeStylesheetDescription(ThemeStylesheetDescription tsd)
Updates an existing structure stylesheet description with a new one. |
void |
updateUserProfile(IPerson person,
UserProfile profile)
update user profile |
protected static boolean |
xmlBool(String value)
convert true/false into Y/N for database |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jasig.portal.layout.IUserLayoutStore |
|---|
exportLayout, importLayout |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log log
protected static int DEBUG
protected static final String channelPrefix
protected static final String folderPrefix
protected final IChannelRegistryStore channelRegistryStore
protected final ICounterStore counterStore
protected final IPersonManager personManager
protected static final boolean localeAware
| Constructor Detail |
|---|
public RDBMUserLayoutStore()
throws Exception
Exception| Method Detail |
|---|
public Integer addStructureStylesheetDescription(StructureStylesheetDescription ssd)
throws Exception
ssd - the Stylesheet description object
Integer id for the registered Stylesheet description object
Exception
public Integer addThemeStylesheetDescription(ThemeStylesheetDescription tsd)
throws Exception
tsd - Stylesheet description object
Integer id of the registered Theme Stylesheet if successful;
null otherwise.
Exception
public boolean updateThemeStylesheetDescription(String stylesheetDescriptionURI,
String stylesheetURI,
int stylesheetId)
updateThemeStylesheetDescription in interface IUserLayoutStorestylesheetDescriptionURI - stylesheetURI - stylesheetId -
public boolean updateStructureStylesheetDescription(String stylesheetDescriptionURI,
String stylesheetURI,
int stylesheetId)
updateStructureStylesheetDescription in interface IUserLayoutStorestylesheetDescriptionURI - stylesheetURI - stylesheetId -
public Integer addStructureStylesheetDescription(String stylesheetDescriptionURI,
String stylesheetURI)
addStructureStylesheetDescription in interface IUserLayoutStorestylesheetDescriptionURI - stylesheetURI -
Integer id of the registered Structure Stylesheet description object if successful;
null otherwise.
public Integer addThemeStylesheetDescription(String stylesheetDescriptionURI,
String stylesheetURI)
addThemeStylesheetDescription in interface IUserLayoutStorestylesheetDescriptionURI - stylesheetURI -
Integer id of the registered Theme Stylesheet if successful;
null otherwise.
public UserProfile addUserProfile(IPerson person,
UserProfile profile)
throws Exception
addUserProfile in interface IUserLayoutStoreperson - profile -
Exceptionprotected static boolean channelApproved(Date approvedDate)
approvedDate -
protected final void createLayout(HashMap layoutStructure,
Document doc,
Element root,
int structId)
throws SQLException,
Exception
layoutStructure - doc - root - structId -
SQLException
Exceptionprotected static final boolean xmlBool(String value)
value - to check
public void deleteUserProfile(IPerson person,
int profileId)
throws Exception
IUserLayoutStore
deleteUserProfile in interface IUserLayoutStoreperson - UserprofileId - profile id
Exception
public static final void dumpDoc(Node node,
String indent)
node - indent -
public Hashtable getMimeTypeList()
throws Exception
getMimeTypeList in interface IUserLayoutStoreException
public String generateNewChannelSubscribeId(IPerson person)
throws Exception
generateNewChannelSubscribeId in interface IUserLayoutStoreperson -
Exception - if an error occurs
public String generateNewFolderId(IPerson person)
throws Exception
generateNewFolderId in interface IUserLayoutStoreperson -
String that is the next free structure ID
Exception
protected String getNextStructId(IPerson person,
String prefix)
throws Exception
person - prefix -
Exception
protected String getStructId(int structId,
int chanId)
structId - chanId -
public StructureStylesheetDescription getStructureStylesheetDescription(int stylesheetId)
throws Exception
getStructureStylesheetDescription in interface IUserLayoutStorestylesheetId - the id of the structure stylesheet
Exception
public Integer getStructureStylesheetId(String ssName)
throws Exception
ssName - name of the structure stylesheet
Exception
public Hashtable getStructureStylesheetList(String mimeType)
throws Exception
getStructureStylesheetList in interface IUserLayoutStoremimeType -
Exception
public Hashtable getStructureStylesheetList()
throws Exception
getStructureStylesheetList in interface IUserLayoutStoreHashtable mapping stylesheet id (Integer objects) to StructureStylesheetDescription objects
Exception
public abstract StructureStylesheetUserPreferences getStructureStylesheetUserPreferences(IPerson person,
int profileId,
int stylesheetId)
throws Exception
IUserLayoutStore
getStructureStylesheetUserPreferences in interface IUserLayoutStoreperson - UserprofileId - profile idstylesheetId - structure stylesheet id
Exception
public ThemeStylesheetDescription getThemeStylesheetDescription(int stylesheetId)
throws Exception
getThemeStylesheetDescription in interface IUserLayoutStorestylesheetId - the id of the theme stylesheet
Exception
public Integer getThemeStylesheetId(String tsName)
throws Exception
tsName - name of the theme stylesheet
Exception
public Hashtable getThemeStylesheetList(int structureStylesheetId)
throws Exception
getThemeStylesheetList in interface IUserLayoutStorestructureStylesheetId -
Exception
public Hashtable getThemeStylesheetList()
throws Exception
getThemeStylesheetList in interface IUserLayoutStoreHashtable mapping stylesheet id (Integer objects) to ThemeStylesheetDescription objects
Exception
public abstract ThemeStylesheetUserPreferences getThemeStylesheetUserPreferences(IPerson person,
int profileId,
int stylesheetId)
throws Exception
IUserLayoutStore
getThemeStylesheetUserPreferences in interface IUserLayoutStoreperson - UserprofileId - profile idstylesheetId - theme stylesheet id
Exception
public Document getUserLayout(IPerson person,
UserProfile profile)
throws Exception
IUserLayoutStore
getUserLayout in interface IUserLayoutStoreperson - an IPerson object specifying the userprofile - a user profile
Document containing user layout (conforms to userLayout.dtd)
Exception - if an error occurs
public UserProfile getUserProfileById(IPerson person,
int profileId)
throws Exception
IUserLayoutStore
getUserProfileById in interface IUserLayoutStoreperson - an IPerson object representing the userprofileId - profile id
Exception
public UserProfile getUserProfileByFname(IPerson person,
String profileFname)
throws Exception
IUserLayoutStore
getUserProfileByFname in interface IUserLayoutStoreperson - an IPerson object representing the userprofileFname - profile functional name
Exception
public Hashtable getUserProfileList(IPerson person)
throws Exception
IUserLayoutStore
getUserProfileList in interface IUserLayoutStoreperson - User
Hashtable mapping user profile ids (Integer objects) to the UserProfile objects
Exception
public void removeStructureStylesheetDescription(int stylesheetId)
throws Exception
IUserLayoutStore
removeStructureStylesheetDescription in interface IUserLayoutStorestylesheetId - id of the stylesheet
Exception
public void removeThemeStylesheetDescription(int stylesheetId)
throws Exception
IUserLayoutStore
removeThemeStylesheetDescription in interface IUserLayoutStorestylesheetId - id of the stylesheet
Exception
protected abstract Element getStructure(Document doc,
LayoutStructure ls)
throws Exception
Exception
protected abstract int saveStructure(Node node,
PreparedStatement structStmt,
PreparedStatement parmStmt)
throws Exception
Exception
public abstract void setStructureStylesheetUserPreferences(IPerson person,
int profileId,
StructureStylesheetUserPreferences ssup)
throws Exception
IUserLayoutStore
setStructureStylesheetUserPreferences in interface IUserLayoutStoreperson - UserprofileId - profile idssup - structure stylesheet user preferences
Exception
public abstract void setThemeStylesheetUserPreferences(IPerson person,
int profileId,
ThemeStylesheetUserPreferences tsup)
throws Exception
IUserLayoutStore
setThemeStylesheetUserPreferences in interface IUserLayoutStoreperson - UserprofileId - profile idtsup - structure stylesheet user preferneces
Exception
public void setUserBrowserMapping(IPerson person,
String userAgent,
int profileId)
throws Exception
IUserLayoutStore
setUserBrowserMapping in interface IUserLayoutStoreperson - UseruserAgent - User-Agent header stringprofileId - profile id to which given user agent will be mapped
Exception
public void setUserLayout(IPerson person,
UserProfile profile,
Document layoutXML,
boolean channelsAdded)
throws Exception
setUserLayout in interface IUserLayoutStoreperson - profile - layoutXML - channelsAdded - a boolean flag specifying if new channels have been added to the current user layout (for performance optimization purposes)
Exception
public void updateStructureStylesheetDescription(StructureStylesheetDescription ssd)
throws Exception
ssd - new stylesheet description
Exception
public void updateThemeStylesheetDescription(ThemeStylesheetDescription tsd)
throws Exception
tsd - new theme stylesheet description
Exception
public void updateUserProfile(IPerson person,
UserProfile profile)
throws Exception
IUserLayoutStore
updateUserProfile in interface IUserLayoutStoreperson - Userprofile - profile update
Exception
public void setSystemBrowserMapping(String userAgent,
int profileId)
throws Exception
IUserLayoutStore
setSystemBrowserMapping in interface IUserLayoutStoreuserAgent - User-Agent header stringprofileId - profile id of a profile to which given
user-agent will be mapped
Exception
public UserProfile getUserProfile(IPerson person,
String userAgent)
throws Exception
IUserLayoutStore
getUserProfile in interface IUserLayoutStoreperson - UseruserAgent - User-Agent header string
null if no user profiles are associated with the given user agent.
Exception
public UserProfile getSystemProfile(String userAgent)
throws Exception
IUserLayoutStore
getSystemProfile in interface IUserLayoutStoreuserAgent - User-Agent header string
Exception
public UserProfile getSystemProfileById(int profileId)
throws Exception
IUserLayoutStore
getSystemProfileById in interface IUserLayoutStoreprofileId - system profile id
Exception
public UserProfile getSystemProfileByFname(String profileFname)
throws Exception
getSystemProfileByFname in interface IUserLayoutStoreException
public Hashtable getSystemProfileList()
throws Exception
IUserLayoutStore
getSystemProfileList in interface IUserLayoutStoreHashtable mapping system profile ids (Integer objects) to the UserProfile objects
Exception
public void updateSystemProfile(UserProfile profile)
throws Exception
IUserLayoutStore
updateSystemProfile in interface IUserLayoutStoreprofile - profile object
Exception
public UserProfile addSystemProfile(UserProfile profile)
throws Exception
IUserLayoutStore
addSystemProfile in interface IUserLayoutStoreprofile - profile object (profile id within will be overwritten)
Exception
public void deleteSystemProfile(int profileId)
throws Exception
IUserLayoutStore
deleteSystemProfile in interface IUserLayoutStoreprofileId - profile id
Exception
public UserPreferences getUserPreferences(IPerson person,
String profileFname)
throws Exception
Exception
public UserPreferences getUserPreferences(IPerson person,
UserProfile profile)
throws Exception
IUserLayoutStore
getUserPreferences in interface IUserLayoutStoreperson - Userprofile - profile
Exception
public void putUserPreferences(IPerson person,
UserPreferences up)
throws Exception
IUserLayoutStore
putUserPreferences in interface IUserLayoutStoreperson - Userup - user preferences object
Exception
protected int getLayoutID(int userId,
int profileId)
throws SQLException
userId - The userId for the profileprofileId - The profileId for the profile
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||