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 Norman Schoneich <sc...@ecooperate.de> on 2001/12/10 10:44:59 UTC

Profiler / Locator Question !

I want to load the psml file of a specific user. How ?

My first approach was to use the following function in Profiler /
JetspeedProfilerService,
but this function returns null !!!

I created a ProfileLocator and there I set the mimetype and the user.


/**
 *  get the Profile object using a profile locator
 *
 * @param rundata The rundata object for the current request.
 * @param locator The locator containing criteria describing the profile.
 * @return a new Profile object
 */

 public Profile getProfile(RunData data, ProfileLocator locator)
        throws ProfileException
    {
        PSMLDocument doc =  fallback( locator, data );
        return null;
    }



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Profiler / Locator Question !

Posted by David Sean Taylor <da...@bluesunrise.com>.
Yes, we discussed this last week, and I let it slip.

> I want to load the psml file of a specific user. How ?

You can currently do that with the Profiler.query( locator ) method:

// set the user

locator.setUser( user );
locator.setMediaType( "html" );
...
Iterator it = Profiler.query( locator );

So if you make the locator parameters specific enough, it will only find one
profile.

Anyway, you can go ahead and use the getProfile method, I just modified the
JetspeedProfilerService to:

    public Profile getProfile(RunData data, ProfileLocator locator)
        throws ProfileException
    {
        PSMLDocument doc =  fallback( locator, data );
        BaseProfile profile = new BaseProfile(locator);
        profile.setDocument(doc);
        return profile;
    }

Thanks for pointing that out (again) :)

David

> -----Original Message-----
> From: Norman Schoneich [mailto:schoeneich@ecooperate.de]
> Sent: Monday, December 10, 2001 1:45 AM
> To: Jetspeed Developers List
> Subject: Profiler / Locator Question !
>
>
> I want to load the psml file of a specific user. How ?
>
> My first approach was to use the following function in Profiler /
> JetspeedProfilerService,
> but this function returns null !!!
>
> I created a ProfileLocator and there I set the mimetype and the user.
>
>
> /**
>  *  get the Profile object using a profile locator
>  *
>  * @param rundata The rundata object for the current request.
>  * @param locator The locator containing criteria describing
> the profile.
>  * @return a new Profile object
>  */
>
>  public Profile getProfile(RunData data, ProfileLocator locator)
>         throws ProfileException
>     {
>         PSMLDocument doc =  fallback( locator, data );
>         return null;
>     }
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>