portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anil Shinde <ashi...@cisco.com>
Subject RE: Putting .psml/markup info into database
Date Tue, 10 Jul 2001 22:17:30 GMT
Hi David/Raphael,

Let me first introduce myself, I am Anil Shinde, working with Atul on the 
"PSML info .... database" effort.
Me, atul and narendra (one more team member) discussed today morning about 
the schema for storing PSML info.
We are looking at a feedback on the schema, before we proceed with the code 
development.
We have already thought about the code logic to some extent, developing 
that shouldnt take a long.
Also we thought about creating this tables along with other turbine tables, 
so that everything will reside in the same database.

Here is the final sql script that was written to generate the required table,

------------------------------------------------
-- JETSPEED_USER_PROFILE
------------------------------------------------
drop table JETSPEED_USER_PROFILE cascade constraints;

CREATE TABLE JETSPEED_USER_PROFILE
(
         USER_ID INT NOT NULL,
         MEDIA_TYPE VARCHAR2(99),
         LANGUAGE VARCHAR2(99),
         COUNTRY  VARCHAR2(99),
         PAGE VARCHAR2(99),
         PROFILE LONG RAW
);

ALTER TABLE JETSPEED_USER_PROFILE
         ADD CONSTRAINT JETSPEED_USER_PROFILE_PK
PRIMARY KEY (USER_ID,MEDIA_TYPE,LANGUAGE,COUNTRY,PAGE);

------------------------------------------------
-- JETSPEED_GROUP_PROFILE
------------------------------------------------
drop table JETSPEED_GROUP_PROFILE cascade constraints;

CREATE TABLE JETSPEED_GROUP_PROFILE
(
         GROUP_ID INT NOT NULL,
         MEDIA_TYPE VARCHAR2(99),
         LANGUAGE VARCHAR2(99),
         COUNTRY  VARCHAR2(99),
         PAGE VARCHAR2(99),
         PROFILE LONG RAW
);

ALTER TABLE JETSPEED_GROUP_PROFILE
         ADD CONSTRAINT JETSPEED_GROUP_PROFILE_PK
PRIMARY KEY (GROUP_ID,MEDIA_TYPE,LANGUAGE,COUNTRY,PAGE);

------------------------------------------------
-- JETSPEED_ROLE_PROFILE
------------------------------------------------
drop table JETSPEED_ROLE_PROFILE cascade constraints;

CREATE TABLE JETSPEED_ROLE_PROFILE
(
         ROLE_ID INT NOT NULL,
         MEDIA_TYPE VARCHAR2(99),
         LANGUAGE VARCHAR2(99),
         COUNTRY  VARCHAR2(99),
         PAGE VARCHAR2(99),
         PROFILE LONG RAW
);

ALTER TABLE JETSPEED_ROLE_PROFILE
         ADD CONSTRAINT JETSPEED_ROLE_PROFILE_PK
PRIMARY KEY (ROLE_ID,MEDIA_TYPE,LANGUAGE,COUNTRY,PAGE);




At 12:41 PM 7/10/01 -0700, Atul Dambalkar wrote:
>Hi David,
>
> > -----Original Message-----
> > From: David Sean Taylor [mailto:david@bluesunrise.com]
> > Sent: Tuesday, July 10, 2001 9:44 AM
> > To: jetspeed-dev@jakarta.apache.org
> > Subject: RE: Putting .psml/markup info into database
> >
> >
> > Hi Atul,
> >
> > Again my apologies for the delayed responses, on top of travelling my
> > network card failed yesterday. Today it seems to be working,
> > at least for a
>
>No problems, David.
>
> > little while. Anyway, I will be back in the office tonight
> > and back online.
> >
> > See comments below
> >
> > David
> >
> > > -----Original Message-----
> > > From: Atul Dambalkar [mailto:Atul.Dambalkar@xoriant.com]
> > > Sent: Monday, July 09, 2001 8:15 PM
> > > To: 'jetspeed-dev@jakarta.apache.org'
> > > Subject: RE: Putting .psml/markup info into database
> > >
> > >
> > >
> > > Hi David,
> > >
> > > While driving back home, I was thinking about the newly added
> > > interfaces in
> > > Profile(Service) and PsmlManager(Service). I came up to
> > this. I thought I
> > > should write an email, right away, so as to avoid any cofusion
> > > with my last
> > > email (about GenericPsmlManagerService).
> > > Here is what I think:
> > > "FallBack Algo" is actually a functionality of
> > Profiler(Service) and it is
> > > not the job of the PsmlManager to handle that.
> > PsmlManager(Service) should
> >
> > Yes, it is the algorithm of the Profiler. So what about renaming the
> > PsmlManager.fallback interface to:
> >
> >     public PSMLDocument getDocument( List locators );
> >
>
>Yes, I am fine if it is "getDocument" the name fallback in PsmlManager was
>confusing..
>
> > Yet we will still have:
> >
> >     public PSMLDocument getDocument( ProfileLocator locator );
>
>Yes, of-course, we need this.
>
> >
> >
> > here are two real basic impl. of the Profiler's fallback
> > algorithm. I could
> > imagine it eventually being state driven...
>
>Makes sense being state driven...
>
> >
> >     private PSMLDocument fallback( Profile profile, RunData rundata )
> >     {
> >         PSMLDocument doc = PSMLManager.getDocument( profile );
> >         if (null != doc)
> >             return doc;
> >
> >         // remove country
> >         if (null != profile.getCountry())
> >         {
> >             profile.setCountry(null);
> >             doc = PSMLManager.getDocument( profile );
> >             if (null != doc)
> >                 return doc;
> >         }
> >
> >         // remove language
> >         if (null != profile.getLanguage())
> >         {
> >             profile.setLanguage(null);
> >             doc = PSMLManager.getDocument( profile );
> >             if (null != doc)
> >                 return doc;
> >         }
> >
> >         // fallback mediaType
> >         if (null != profile.getMediaType())
> >         {
> >             profile.setMediaType(null);
> >             doc = PSMLManager.getDocument( profile );
> >             if (null != doc)
> >                 return doc;
> >         }
> >
> >         if (null != profile.getGroup())
> >         {
> >             profile.setGroup(null);
> >             doc = PSMLManager.getDocument( profile );
> >             if (null != doc)
> >                 return doc;
> >         }
> >         else if (null != profile.getRole())
> >         {
> >             profile.setRole(null);
> >             doc = PSMLManager.getDocument( profile );
> >             if (null != doc)
> >                 return doc;
> >         }
> >         else if (null != profile.getUser())
> >         {
> >             profile.setUser(null);
> >             doc = PSMLManager.getDocument( profile );
> >             if (null != doc)
> >                 return doc;
> >         }
> >
> >         return doc;
> >
> >     }
> >
> >
> >     private PSMLDocument fallback( Profile profile, RunData rundata )
> >     {
> >         List locators = new List();
> >         ProfileLocator locator = profile.clone();
> >
> >         list.add( locator.clone() );
> >
> >         // remove country
> >         if (null != profile.getCountry())
> >         {
> >             locator.setCountry(null);
> >             list.add( locator.clone() );
> >         }
> >
> >         // remove language
> >         if (null != profile.getLanguage())
> >         {
> >             locator.setLanguage(null);
> >             list.add( locator.clone() );
> >         }
> >
> >         // fallback mediaType
> >         if (null != profile.getMediaType())
> >         {
> >             locator.setMediaType(null);
> >             list.add( locator.clone() );
> >         }
> >
> >         if (null != profile.getGroup())
> >         {
> >             locator.setGroup(null);
> >             list.add( locator.clone() );
> >         }
> >         else if (null != profile.getRole())
> >         {
> >             locator.setRole(null);
> >             list.add( locator.clone() );
> >         }
> >         else if (null != profile.getUser())
> >         {
> >             locator.setUser(null);
> >             list.add( locator.clone() );
> >         }
> >
> >         return PSMLManager.fallback( list );
> >     }
>
>Only thing would be, the method that is creating the "Ordered List of
>Locators", should put the Locator Object for "default" markup in the end...
>Of-course you must have already thought about that.
>
> >
> > > just manage the PSMLs. So I think PsmlManager(Service)
> > should not have
> > > following two methods:
> > > 1. public Iterator list( ProfileLocator locator )
> > > 2. public PSMLDocument fallback( List locators );
> > > Those methods need to be moved to Profiler(Service.
> > > The "fallback" method in Profiler(Service) then should invoke
> > > PSMLDocument getDocument(ProfileLocator) method to get the
> > > appropriate PSML
> > > document. I couldn't figure out what structural pattern
> > this would fall
> > > under. So basically, the GenericPsmlManagerService which I
> > outlined in my
> > > last email is definitely not needed, and above two methods
> > should go in
> > > Profiler(Service) and its implementation in JetspeedProfilerService.
> > >
> > > What are your views on this?
> > >
> >
> > Yes, I will drop the list interface from the PsmlManager service.
> > And the fallback was renamed to getDocument( List locator )
> >
>
>Great! Thanks.
>
>We are coming up with the DB Schema for putting
>user/role/group/media/language/country/page along with a BLOB. Will let you
>know, once it is done.
>
>-Atul
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message