Hi David,
> -----Original Message-----
> From: David Sean Taylor [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 10, 2001 9:44 AM
> To: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]]
> > Sent: Monday, July 09, 2001 8:15 PM
> > To: '[EMAIL PROTECTED]'
> > 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]