You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Atul Dambalkar <ad...@cisco.com> on 2001/07/12 01:15:50 UTC

RE: Consolidated changes to Profile/ProfileLocator/PsmlManager interfaces

At 03:29 PM 7/11/01 -0700, you wrote:

> > -----Original Message-----
> > From: Atul Dambalkar [mailto:adambalk@cisco.com]
> > Sent: Wednesday, July 11, 2001 11:44 AM
> > To: jetspeed-dev@jakarta.apache.org
> > Subject: Consolidated changes to Profile/ProfileLocator/PsmlManager
> > interfaces
> >
> >
> > Hi David/Raphael,
> >
> > I am just trying to consolidate the interface changes we
> > discussed...(and
> > also suggesting..)
> >
> > Already discussed:
> > 1. Remove method
> > public Iterator list( ProfileLocator locator ); in PsmlManagerService
> > and put a new method
> > get/setUser() in ProfileLocator
> > Likewise the default implementation for BaseProfileLocator
> > would also change.
>
>Yes I made these changes, but have not checked in. I will start working on
>this again tonight after work.
>Also changed getRole and getGroup to objects.

Great!


>Im not sure why the PsmlManagerService doesn't have a query() method.
>I think it would be useful to fill out a ProfileLocator, pass it to a
>ProfilerLocator.query() method,
>which then returns a collection of documents. How else were you considering
>doing queries?

Huh, gave a thought to it once...but then that thing went to background

>If you wanted to find all the resources that are HTML and German
>
>         ProfileLocator locator = new BaseProfileLocator();
>         locator.setLanguage("de");
>         locator.setMediaType("html");
>
>So even though the same object is passed, how it is interpreted by the
>PSMLManagerService is different.
>It looks at each setter method as criteria to a query.
>Where the setters are null, it knows not to use the criteria.

Perfect..something like method "List query( ProfileLocator) " in 
PsmlManagerService.


> >
> > 2. Rename method
> > public PSMLDocument fallback( List locators ); in
> > PsmlManagerService to
> > public PSMLDocument getDocument( List locators );
> >
>done.

Cool.

> >
> >
> > New suggestion:
> > 1. I think method
> > public boolean saveDocument(String fileOrUrl, PSMLDocument doc); in
> > interface PsmlManagerService needs to be deprecated. as there
> > is a method
> > which takes Locator object as a parameter.
>done

Great.

> >
> > 2. PsmlManagerService interface needs method to remove a
> > PSMLDocument.
> > something like,
> > public void removeDocument( ProfileLocator locator);
> > This method will be invoked by the ProfilerService within method
> > public void removeProfile( ProfileLocator locator )
> > to remove a profile.
>
>yes i agree. hope to have these interfaces on maybe some impl. by tonight
>im still leaving the deprecated methods there until i can replace and test
>with the new ones

okay.

Also, David, one more code related suggestion..I was looking at the 
CastoPsmlManagerService..where you are using HashMap with WeakReference, 
java.util.WeakHashMap does exact same thing with Keys, so may be you can 
also use that. I am using it in DatabasePsmlManagerService code. Following 
some similar pattern like you in the cache refresher.

Thanks, David.

-Atul


>- david
>
> >
> > What do you think?
> >
> > -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


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