|
||||||||||
| 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.dlm.RDBMDistributedLayoutStore
public class RDBMDistributedLayoutStore
This class extends RDBMUserLayoutStore and implements instantiating and storing layouts that conform to the design of the distribute layout management system. These layouts consist of two types: layout fragments that are the layouts owned by a user specified in dlm.xml, and composite view layouts which represent regular users with zero or more UI elements incorporated from layout fragments. Only a user's personal layout fragment is
| Field Summary | |
|---|---|
static String |
RCS_ID
|
| Fields inherited from class org.jasig.portal.layout.simple.RDBMUserLayoutStore |
|---|
channelPrefix, channelRegistryStore, counterStore, DEBUG, folderPrefix, localeAware, log, personManager |
| Constructor Summary | |
|---|---|
RDBMDistributedLayoutStore()
|
|
| Method Summary | |
|---|---|
Integer |
addStructureStylesheetDescription(StructureStylesheetDescription ssd)
Registers a NEW structure stylesheet with the database. |
Integer |
addThemeStylesheetDescription(ThemeStylesheetDescription tsd)
Registers a NEW theme stylesheet with the database. |
void |
cleanFragments()
Cleans out the layout fragments. |
org.dom4j.Element |
exportLayout(IPerson person,
UserProfile profile)
Returns an Element representing the user's layout and
UserPreferences (but not portlet preferences) formatted for
export. |
Map<String,Document> |
getFragmentLayoutCopies()
Method for acquiring copies of fragment layouts to assist in debugging. |
double |
getFragmentPrecedence(int index)
Returns a double value indicating the precedence value declared for a fragment in the dlm.xml. |
String |
getNextStructDirectiveId(IPerson person)
Generates a new struct id for directive elements that dlm places in the PLF version of the layout tree. |
static Document |
getPLF(IPerson person)
|
String |
getProperty(String name)
Returns the specified property loaded from dlm.xml or null if not found. |
int |
getPropertyCount()
Returns the number of properties loaded from the dlm.xml file. |
protected Element |
getStructure(Document doc,
LayoutStructure ls)
|
StructureStylesheetDescription |
getStructureStylesheetDescription(int stylesheetId)
Obtain structure stylesheet description object for a given structure stylesheet id. |
StructureStylesheetUserPreferences |
getStructureStylesheetUserPreferences(IPerson person,
int profileId,
int stylesheetId)
Obtain structure stylesheet user preferences |
ThemeStylesheetDescription |
getThemeStylesheetDescription(int stylesheetId)
Obtain theme stylesheet description object for a given theme stylesheet id. |
ThemeStylesheetUserPreferences |
getThemeStylesheetUserPreferences(IPerson person,
int profileId,
int stylesheetId)
Obtain theme stylesheet user preferences |
Document |
getUserLayout(IPerson person,
UserProfile profile)
Returns the layout for a user decorated with any specified decorator. |
void |
importLayout(org.dom4j.Element layout)
Performs the reverse of exportLayout. |
boolean |
isFragmentOwner(IPerson person)
Determines if a user is a fragment owner. |
void |
removeStructureStylesheetDescription(int stylesheetId)
Removes a structure stylesheet description object for a given structure stylesheet id. |
void |
removeThemeStylesheetDescription(int stylesheetId)
Removes a theme stylesheet description object for a given theme stylesheet id. |
protected int |
saveStructure(Node node,
PreparedStatement structStmt,
PreparedStatement parmStmt)
|
void |
setLookupNoderefTask(org.danann.cernunnos.Task k)
|
void |
setLookupPathrefTask(org.danann.cernunnos.Task k)
|
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 |
void |
setUserLayout(IPerson person,
UserProfile profile,
Document layoutXML,
boolean channelsAdded)
This method overrides the same method in the super class to persist only layout information stored in the user's person layout fragment or PLF. |
void |
updateStructureStylesheetDescription(StructureStylesheetDescription ssd)
Updates an existing structure stylesheet description with a new one. |
void |
updateThemeStylesheetDescription(ThemeStylesheetDescription tsd)
Updates an existing structure stylesheet description with a new one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String RCS_ID
| Constructor Detail |
|---|
public RDBMDistributedLayoutStore()
throws Exception
Exception| Method Detail |
|---|
public void setLookupNoderefTask(org.danann.cernunnos.Task k)
public void setLookupPathrefTask(org.danann.cernunnos.Task k)
public Map<String,Document> getFragmentLayoutCopies()
throws Exception
Exception
public Integer addStructureStylesheetDescription(StructureStylesheetDescription ssd)
throws Exception
addStructureStylesheetDescription in class RDBMUserLayoutStoressd - Stylesheet description object
Exception
public Integer addThemeStylesheetDescription(ThemeStylesheetDescription tsd)
throws Exception
addThemeStylesheetDescription in class RDBMUserLayoutStoretsd - Stylesheet description object
Integer id of the registered Theme Stylesheet if successful;
null otherwise.
Exception
public StructureStylesheetDescription getStructureStylesheetDescription(int stylesheetId)
throws Exception
getStructureStylesheetDescription in interface IUserLayoutStoregetStructureStylesheetDescription in class RDBMUserLayoutStorestylesheetId - id of the structure stylesheet
Exception
public ThemeStylesheetDescription getThemeStylesheetDescription(int stylesheetId)
throws Exception
getThemeStylesheetDescription in interface IUserLayoutStoregetThemeStylesheetDescription in class RDBMUserLayoutStorestylesheetId - id of the theme stylesheet
Exception
public void removeStructureStylesheetDescription(int stylesheetId)
throws Exception
removeStructureStylesheetDescription in interface IUserLayoutStoreremoveStructureStylesheetDescription in class RDBMUserLayoutStorestylesheetId - id of the structure stylesheet
Exception
public void removeThemeStylesheetDescription(int stylesheetId)
throws Exception
removeThemeStylesheetDescription in interface IUserLayoutStoreremoveThemeStylesheetDescription in class RDBMUserLayoutStorestylesheetId - id of the theme stylesheet
Exception
public void updateStructureStylesheetDescription(StructureStylesheetDescription ssd)
throws Exception
updateStructureStylesheetDescription in class RDBMUserLayoutStoressd - new stylesheet description
Exception
public void updateThemeStylesheetDescription(ThemeStylesheetDescription tsd)
throws Exception
updateThemeStylesheetDescription in class RDBMUserLayoutStoretsd - new stylesheet description
Exceptionpublic void cleanFragments()
public double getFragmentPrecedence(int index)
public Document getUserLayout(IPerson person,
UserProfile profile)
throws Exception
getUserLayout in interface IUserLayoutStoregetUserLayout in class RDBMUserLayoutStoreperson - an IPerson object specifying the userprofile - a user profile
Document containing user layout (conforms to userLayout.dtd)
Exception - if an error occurs
public org.dom4j.Element exportLayout(IPerson person,
UserProfile profile)
IUserLayoutStoreElement representing the user's layout and
UserPreferences (but not portlet preferences) formatted for
export. This element must have an element name of <layout>.
Exported documents must not reference database identifiers and
should exclude unnecessary items like channel publishing
parameters, etc. Layout store implementations are may return
null for users that don't have layout or preferences
customizations.
person - An IPerson object specifying the userprofile - A valid profile for person
Document containing user layout and
UserPreferences datapublic void importLayout(org.dom4j.Element layout)
IUserLayoutStoreexportLayout. The specified element
must have an element name of <layout> and UserPreferences data.
layout - XML representing a user's layout and UserPreferences
public String getNextStructDirectiveId(IPerson person)
throws Exception
Exceptionpublic boolean isFragmentOwner(IPerson person)
person -
public void setUserLayout(IPerson person,
UserProfile profile,
Document layoutXML,
boolean channelsAdded)
throws Exception
setUserLayout in interface IUserLayoutStoresetUserLayout in class RDBMUserLayoutStoreperson - an IPerson object specifying the userprofile - a user profile for which the layout is being storedlayoutXML - 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)
Exception - if an error occurspublic int getPropertyCount()
public String getProperty(String name)
public StructureStylesheetUserPreferences getStructureStylesheetUserPreferences(IPerson person,
int profileId,
int stylesheetId)
throws Exception
IUserLayoutStore
getStructureStylesheetUserPreferences in interface IUserLayoutStoregetStructureStylesheetUserPreferences in class RDBMUserLayoutStoreperson - UserprofileId - profile idstylesheetId - structure stylesheet id
Exception
public ThemeStylesheetUserPreferences getThemeStylesheetUserPreferences(IPerson person,
int profileId,
int stylesheetId)
throws Exception
IUserLayoutStore
getThemeStylesheetUserPreferences in interface IUserLayoutStoregetThemeStylesheetUserPreferences in class RDBMUserLayoutStoreperson - UserprofileId - profile idstylesheetId - theme stylesheet id
Exception
protected Element getStructure(Document doc,
LayoutStructure ls)
throws Exception
getStructure in class RDBMUserLayoutStoreException
protected int saveStructure(Node node,
PreparedStatement structStmt,
PreparedStatement parmStmt)
throws Exception
saveStructure in class RDBMUserLayoutStoreException
public static Document getPLF(IPerson person)
throws PortalException
PortalException
public void setStructureStylesheetUserPreferences(IPerson person,
int profileId,
StructureStylesheetUserPreferences ssup)
throws Exception
IUserLayoutStore
setStructureStylesheetUserPreferences in interface IUserLayoutStoresetStructureStylesheetUserPreferences in class RDBMUserLayoutStoreperson - UserprofileId - profile idssup - structure stylesheet user preferences
Exception
public void setThemeStylesheetUserPreferences(IPerson person,
int profileId,
ThemeStylesheetUserPreferences tsup)
throws Exception
IUserLayoutStore
setThemeStylesheetUserPreferences in interface IUserLayoutStoresetThemeStylesheetUserPreferences in class RDBMUserLayoutStoreperson - UserprofileId - profile idtsup - structure stylesheet user preferneces
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||