[jboss-user] [JBoss Portal] - Re: javax.portlet.PortletPreferences;
julien@jboss.com
do-not-reply at jboss.com
Sun Jan 28 14:24:17 EST 2007
It is indeed persisted in the database, where it depends from the versions of portal. Since 2.4 it is persisted in :
CREATE TABLE `JBP_PORTLET_STATE` (
| `PK` bigint(20) NOT NULL auto_increment,
| `PORTLET_ID` varchar(255) NOT NULL,
| `REGISTRATION_ID` bigint(20) default NULL,
| `REGISTRATION_TIME` datetime default NULL,
| `TERMINATION_TIME` datetime default NULL,
| `PARENT_PK` bigint(20) default NULL,
| PRIMARY KEY (`PK`)
| )
CREATE TABLE `JBP_PORTLET_STATE_ENTRY` (
| `PK` bigint(20) NOT NULL auto_increment,
| `NAME` varchar(255) default NULL,
| `TYPE` int(11) NOT NULL,
| `READ_ONLY` bit(1) NOT NULL,
| `ENTRY_KEY` bigint(20) default NULL,
| PRIMARY KEY (`PK`)
| )
CREATE TABLE `JBP_PORTLET_STATE_ENTRY_VALUE` (
| `PK` bigint(20) NOT NULL,
| `jbp_value` varchar(255) default NULL,
| `IDX` int(11) NOT NULL,
| PRIMARY KEY (`PK`,`IDX`)
| )
Usually the state of a portlet preference set is held in one entry of JBP_PORTLET_STATE using the PK value to identify it.
The PK usually is then modified a bit by the portlet container, it is prefixed by an "_" in order to make the distinction between portlet IDs and customizations which points to a portlet ID.
Then this PK is stored in the InstanceContainer thing we have. Usually it is assocated with a customization context.
For a shared portlet instance, the shared customizations PKs are stored in the InstanceDefinition with the table :
| CREATE TABLE `JBP_INSTANCE` (
| `PK` bigint(20) NOT NULL auto_increment,
| `ID` varchar(255) NOT NULL,
| `PORTLET_REF` varchar(255) default NULL,
| `MODIFIABLE` bit(1) NOT NULL,
| `SER_STATE` longblob,
| PRIMARY KEY (`PK`),
| UNIQUE KEY `ID` (`ID`)
| )
Then when a portlet is further customized for a shared instance, the PK is stored in the table :
CREATE TABLE `JBP_INSTANCE_PER_USER` (
| `PK` bigint(20) NOT NULL auto_increment,
| `INSTANCE_PK` bigint(20) default NULL,
| `SER_STATE` longblob,
| `USER_ID` varchar(170) NOT NULL,
| `PORTLET_REF` varchar(170) NOT NULL,
| PRIMARY KEY (`PK`),
| UNIQUE KEY `USER_ID` (`USER_ID`,`PORTLET_REF`)
| )
In that case, the customization key is the user ID
For dashboard pages, the customization key is window ID (if I recall correctly) providing the capability to customize portlet several times in the same page.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007517#4007517
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007517
More information about the jboss-user
mailing list