You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Frank Villarreal <f_...@tetco.com> on 2005/04/08 15:53:01 UTC

J2M2 Profiling Rules

Hello all,

I'm trying to set-up a profiling rule in J2-M2 that does the following:

1) routes guest (anonymous) users to a specific subsite based on their host
header (the IP/url of their requested site).

once logged in ...

2) routes them to a page based on their role / mediatype


I've tried the "role-group" profiling rule and it works great for simple
role-based page selection.  However, when I try to combine that with
"_mediatype" selection ... doesn't work.  Or at least I don't know how to
make it work.

I also noticed the "j1" rule which supports mediatype page selection.
However, that rule contains a criterion named "group.user.role" which when
set to "role" appears to have no effect ... the page selector still attempts
to default to "user" based page selection.  Am I missing something or is
this by design?  If so, is there a way around it?

- Frank


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


Re: J2M2 Profiling Rules

Posted by Randy Watler <wa...@wispertel.net>.
A few clarifications:


>> 2) group.user.role
>>
> profile one of user, role, or group, (user is almost always defined 
> and normally is chosen). 

-- group or role are selected from request parameters by the same name, 
otherwise user is selected.

>
>
>> 3) path.session
>>
> appends the request path to the profiling path 

-- or in the case of the '/' path, as session attribute with the 
specifed name is used.

>
>
>> 4) request.session
>>
> appends the request path or request parameter path 

-- a request parameter or session attribute with the specified name is 
used if specified.

For all of the gritty details, see the rules sources in 
components/profiler/src/java/o/a/j/profiler/rules/impl.

Randy



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


Re: J2M2 Profiling Rules

Posted by Randy Watler <wa...@wispertel.net>.
Frank,

Understood. Should work. The Filter approach might be better since 
getting the HTTP Host request attribute, mapping it to a request 
parameter, and using 'request.session' is probably simple enough 
depending on what you have already implemented with your site. Depends 
if you are comfortable extending J2 or not!

Randy

Frank Villarreal wrote:

>Thanks Randy.
>
>On my own, I tweaked the "RoleFallbackProfilingRule" and got it to work in
>conjunction with a media-type.  Regarding the host headers ... I think
>you're right ... it would be super cool if there were a profiling criterion
>that keyed off of the request's server name.  This would allow for
>multiple-public "subsites" based on the requestor's incoming url.  I guess
>I'll try to implement something along these lines and tie the rule
>specifically to the "guest" user.  That would get my desired effect I
>believe.
>
>Thanks again.
>
>- Frank
>
>  
>
>>-----Original Message-----
>>From: Randy Watler [mailto:watler@wispertel.net]
>>Sent: Friday, April 08, 2005 10:48 AM
>>To: Jetspeed Users List
>>Subject: Re: J2M2 Profiling Rules
>>
>>
>>Frank,
>>
>>I am not looking at the J2 source at the moment, so the comments below
>>may be a slight bit off... they are close in any case :)
>>
>>Frank Villarreal wrote:
>>
>>    
>>
>>>Here's another question(s):
>>>
>>>what do the following rule criterion request types signify?
>>>
>>>1) navigation
>>>
>>>      
>>>
>>generalized profile type used to navigate to a specified path while
>>profiling, typically used to profile on multiple attributes at once,
>>(i.e. role and group)
>>
>>    
>>
>>>2) group.user.role
>>>
>>>      
>>>
>>profile one of user, role, or group, (user is almost always defined and
>>normally is chosen).
>>
>>    
>>
>>>3) path.session
>>>
>>>      
>>>
>>appends the request path to the profiling path
>>
>>    
>>
>>>4) request.session
>>>
>>>      
>>>
>>appends the request path or request parameter path
>>
>>    
>>
>>>Thanks,
>>>
>>>Frank
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>-----Original Message-----
>>>>From: Frank Villarreal [mailto:f_villarreal@tetco.com]
>>>>Sent: Friday, April 08, 2005 08:53 AM
>>>>To: Jetspeed Users List
>>>>Subject: J2M2 Profiling Rules
>>>>
>>>>
>>>>Hello all,
>>>>
>>>>I'm trying to set-up a profiling rule in J2-M2 that does the following:
>>>>
>>>>1) routes guest (anonymous) users to a specific subsite based on
>>>>their host
>>>>header (the IP/url of their requested site).
>>>>
>>>>        
>>>>
>>I am not sure how to best accomplish this. You may have to write a new
>>rule to pull request attributes. There may be an easier way to do this
>>outside of the Profiler... something like a filter that converts the
>>request attribute to a request parameter that you can use with the
>>existing profiler rules.
>>
>>    
>>
>>>>once logged in ...
>>>>
>>>>2) routes them to a page based on their role / mediatype
>>>>
>>>>        
>>>>
>>Role and media type is a simple combination of the role fallback and j1
>>rules... try your hand at defining a new profiler rule by extending the
>>role-fallback rule by adding the media type rule at the end.
>>
>>    
>>
>>>>I've tried the "role-group" profiling rule and it works great for simple
>>>>role-based page selection.  However, when I try to combine that with
>>>>"_mediatype" selection ... doesn't work.  Or at least I don't
>>>>        
>>>>
>>know how to
>>    
>>
>>>>make it work.
>>>>
>>>>        
>>>>
>>Send along your attempt. It is probably just a simple tweek to what you
>>have that will get it to work.
>>
>>    
>>
>>>>I also noticed the "j1" rule which supports mediatype page selection.
>>>>However, that rule contains a criterion named "group.user.role"
>>>>        
>>>>
>>which when
>>    
>>
>>>>set to "role" appears to have no effect ... the page selector
>>>>still attempts
>>>>to default to "user" based page selection.  Am I missing something or is
>>>>this by design?  If so, is there a way around it?
>>>>
>>>>        
>>>>
>>As stated above, the user always defined.... thus group.user.role always
>>defaults to the user setting. I am not sure this rule is named the best.
>>
>>    
>>
>>>>- Frank
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>>      
>>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>
>
>  
>

RE: J2M2 Profiling Rules

Posted by Frank Villarreal <f_...@tetco.com>.
Thanks Randy.

On my own, I tweaked the "RoleFallbackProfilingRule" and got it to work in
conjunction with a media-type.  Regarding the host headers ... I think
you're right ... it would be super cool if there were a profiling criterion
that keyed off of the request's server name.  This would allow for
multiple-public "subsites" based on the requestor's incoming url.  I guess
I'll try to implement something along these lines and tie the rule
specifically to the "guest" user.  That would get my desired effect I
believe.

Thanks again.

- Frank

> -----Original Message-----
> From: Randy Watler [mailto:watler@wispertel.net]
> Sent: Friday, April 08, 2005 10:48 AM
> To: Jetspeed Users List
> Subject: Re: J2M2 Profiling Rules
>
>
> Frank,
>
> I am not looking at the J2 source at the moment, so the comments below
> may be a slight bit off... they are close in any case :)
>
> Frank Villarreal wrote:
>
> >Here's another question(s):
> >
> >what do the following rule criterion request types signify?
> >
> >1) navigation
> >
> generalized profile type used to navigate to a specified path while
> profiling, typically used to profile on multiple attributes at once,
> (i.e. role and group)
>
> >2) group.user.role
> >
> profile one of user, role, or group, (user is almost always defined and
> normally is chosen).
>
> >3) path.session
> >
> appends the request path to the profiling path
>
> >4) request.session
> >
> appends the request path or request parameter path
>
> >
> >Thanks,
> >
> >Frank
> >
> >
> >
> >
> >
> >
> >
> >>-----Original Message-----
> >>From: Frank Villarreal [mailto:f_villarreal@tetco.com]
> >>Sent: Friday, April 08, 2005 08:53 AM
> >>To: Jetspeed Users List
> >>Subject: J2M2 Profiling Rules
> >>
> >>
> >>Hello all,
> >>
> >>I'm trying to set-up a profiling rule in J2-M2 that does the following:
> >>
> >>1) routes guest (anonymous) users to a specific subsite based on
> >>their host
> >>header (the IP/url of their requested site).
> >>
> I am not sure how to best accomplish this. You may have to write a new
> rule to pull request attributes. There may be an easier way to do this
> outside of the Profiler... something like a filter that converts the
> request attribute to a request parameter that you can use with the
> existing profiler rules.
>
> >>
> >>once logged in ...
> >>
> >>2) routes them to a page based on their role / mediatype
> >>
> Role and media type is a simple combination of the role fallback and j1
> rules... try your hand at defining a new profiler rule by extending the
> role-fallback rule by adding the media type rule at the end.
>
> >>
> >>
> >>I've tried the "role-group" profiling rule and it works great for simple
> >>role-based page selection.  However, when I try to combine that with
> >>"_mediatype" selection ... doesn't work.  Or at least I don't
> know how to
> >>make it work.
> >>
> Send along your attempt. It is probably just a simple tweek to what you
> have that will get it to work.
>
> >>
> >>I also noticed the "j1" rule which supports mediatype page selection.
> >>However, that rule contains a criterion named "group.user.role"
> which when
> >>set to "role" appears to have no effect ... the page selector
> >>still attempts
> >>to default to "user" based page selection.  Am I missing something or is
> >>this by design?  If so, is there a way around it?
> >>
> As stated above, the user always defined.... thus group.user.role always
> defaults to the user setting. I am not sure this rule is named the best.
>
> >>
> >>- Frank
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
>


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


Re: J2M2 Profiling Rules

Posted by Randy Watler <wa...@wispertel.net>.
Frank,

I am not looking at the J2 source at the moment, so the comments below 
may be a slight bit off... they are close in any case :)

Frank Villarreal wrote:

>Here's another question(s):
>
>what do the following rule criterion request types signify?
>
>1) navigation
>
generalized profile type used to navigate to a specified path while 
profiling, typically used to profile on multiple attributes at once, 
(i.e. role and group)

>2) group.user.role
>
profile one of user, role, or group, (user is almost always defined and 
normally is chosen).

>3) path.session
>
appends the request path to the profiling path

>4) request.session
>
appends the request path or request parameter path

>
>Thanks,
>
>Frank
>
>
>
>
>
>  
>
>>-----Original Message-----
>>From: Frank Villarreal [mailto:f_villarreal@tetco.com]
>>Sent: Friday, April 08, 2005 08:53 AM
>>To: Jetspeed Users List
>>Subject: J2M2 Profiling Rules
>>
>>
>>Hello all,
>>
>>I'm trying to set-up a profiling rule in J2-M2 that does the following:
>>
>>1) routes guest (anonymous) users to a specific subsite based on
>>their host
>>header (the IP/url of their requested site).
>>
I am not sure how to best accomplish this. You may have to write a new 
rule to pull request attributes. There may be an easier way to do this 
outside of the Profiler... something like a filter that converts the 
request attribute to a request parameter that you can use with the 
existing profiler rules.

>>
>>once logged in ...
>>
>>2) routes them to a page based on their role / mediatype
>>
Role and media type is a simple combination of the role fallback and j1 
rules... try your hand at defining a new profiler rule by extending the 
role-fallback rule by adding the media type rule at the end.

>>
>>
>>I've tried the "role-group" profiling rule and it works great for simple
>>role-based page selection.  However, when I try to combine that with
>>"_mediatype" selection ... doesn't work.  Or at least I don't know how to
>>make it work.
>>
Send along your attempt. It is probably just a simple tweek to what you 
have that will get it to work.

>>
>>I also noticed the "j1" rule which supports mediatype page selection.
>>However, that rule contains a criterion named "group.user.role" which when
>>set to "role" appears to have no effect ... the page selector
>>still attempts
>>to default to "user" based page selection.  Am I missing something or is
>>this by design?  If so, is there a way around it?
>>
As stated above, the user always defined.... thus group.user.role always 
defaults to the user setting. I am not sure this rule is named the best.

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

RE: J2M2 Profiling Rules

Posted by Frank Villarreal <f_...@tetco.com>.
Here's another question(s):

what do the following rule criterion request types signify?

1) navigation
2) group.user.role
3) path.session
4) request.session

Thanks,

Frank





> -----Original Message-----
> From: Frank Villarreal [mailto:f_villarreal@tetco.com]
> Sent: Friday, April 08, 2005 08:53 AM
> To: Jetspeed Users List
> Subject: J2M2 Profiling Rules
>
>
> Hello all,
>
> I'm trying to set-up a profiling rule in J2-M2 that does the following:
>
> 1) routes guest (anonymous) users to a specific subsite based on
> their host
> header (the IP/url of their requested site).
>
> once logged in ...
>
> 2) routes them to a page based on their role / mediatype
>
>
> I've tried the "role-group" profiling rule and it works great for simple
> role-based page selection.  However, when I try to combine that with
> "_mediatype" selection ... doesn't work.  Or at least I don't know how to
> make it work.
>
> I also noticed the "j1" rule which supports mediatype page selection.
> However, that rule contains a criterion named "group.user.role" which when
> set to "role" appears to have no effect ... the page selector
> still attempts
> to default to "user" based page selection.  Am I missing something or is
> this by design?  If so, is there a way around it?
>
> - Frank
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>


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