You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Andreas Hartmann <an...@apache.org> on 2003/08/14 17:19:34 UTC

Request URI in FOM [was: Re: How to use input modules in flow]

Thank you for your relies to my previous message!


I have another question:

The FOM request does not contain a getRequestURI() method.
In the wiki I've read that URI handling is not supported
because this is not necessary. How should the request URI
be obtained?

Thanks!
Andreas



RE: Request URI in FOM [was: Re: How to use input modules in flow]

Posted by Reinhard Pötz <re...@gmx.net>.
From: news [mailto:news@sea.gmane.org]

> 
> Reinhard Pötz wrote:
> 
> [...]
> 
> > What about
> > 
> > 	resolveAccessController(Cocoon cocoon);
> > 
> > and in the component
> > 
> > 	public xxx resolveAccessController( Cocoon cocoon ) {
> > 		String uri = cocoon.getRequest().getRequestURI()
> >      }
> 
> 
> Thank you, I will try this.
> I guess you mean FOM_Cocoon instead of Cocoon?
> 
> BTW, is it a good approach regarding SoC to include 
> FlowScript support in custom components? Or would it be 
> better to implement a FOMAccessControllerResolver which calls 
> the actual AccessControllerResolver?

the second alternative sounds good. So your implementation can be easily
reused by other non FOM based applications.

Reinhard 


Re: Request URI in FOM [was: Re: How to use input modules in flow]

Posted by Andreas Hartmann <an...@apache.org>.
Reinhard Pötz wrote:

[...]

> What about
> 
> 	resolveAccessController(Cocoon cocoon);
> 
> and in the component
> 
> 	public xxx resolveAccessController( Cocoon cocoon ) {
> 		String uri = cocoon.getRequest().getRequestURI()
>      }


Thank you, I will try this.
I guess you mean FOM_Cocoon instead of Cocoon?

BTW, is it a good approach regarding SoC to include FlowScript
support in custom components? Or would it be better to
implement a FOMAccessControllerResolver which calls the
actual AccessControllerResolver?

Andreas



RE: Request URI in FOM [was: Re: How to use input modules in flow]

Posted by Reinhard Pötz <re...@gmx.net>.
On Behalf Of Andreas Hartmann

> Reinhard Pötz wrote:
> 
> >>The FOM request does not contain a getRequestURI() method.
> > 
> > Another question: What is your usecase?
> 
> It's about the administration of users, groups etc. in Lenya.
> 
> There is an Avalon component AccessControllerResolver which 
> resolves the access controller component that is responsible 
> to protect the current URL:
> 
>      resolveAccessController(String webappUrl)
> 
> We're using flowscript for the add/delete/modify user/group 
> forms. Usually, an access controller is assigned to a 
> publication, and a publication has an admin area where 
> users/groups etc. can be administrated. Therefore we want to 
> obtain the access controller based on the current URI.

What about

	resolveAccessController(Cocoon cocoon);

and in the component

	public xxx resolveAccessController( Cocoon cocoon ) {
		String uri = cocoon.getRequest().getRequestURI()
     }

Cheers,
Reinhard


Re: Request URI in FOM [was: Re: How to use input modules in flow]

Posted by Andreas Hartmann <an...@apache.org>.
Reinhard Pötz wrote:

>>The FOM request does not contain a getRequestURI() method.
> 
> Another question: What is your usecase?

It's about the administration of users, groups etc. in Lenya.

There is an Avalon component AccessControllerResolver which resolves
the access controller component that is responsible to protect
the current URL:

     resolveAccessController(String webappUrl)

We're using flowscript for the add/delete/modify user/group forms.
Usually, an access controller is assigned to a publication, and
a publication has an admin area where users/groups etc. can be
administrated. Therefore we want to obtain the access controller
based on the current URI.

Andreas



RE: Request URI in FOM [was: Re: How to use input modules in flow]

Posted by Reinhard Pötz <re...@gmx.net>.
From: news [mailto:news@sea.gmane.org] 

> The FOM request does not contain a getRequestURI() method.

Another question: What is your usecase?

Cheers,
Reinhard


Re: Request URI in FOM [was: Re: How to use input modules in flow]

Posted by Miles Elam <mi...@pcextremist.com>.
What makes it more special than getRequestMethod(), the hostname, or 
reading cookie data?  Those can be gathered in the sitemap and passed as 
parameters too can't they?

Not arguing, just trying to figure out the distinction.

- Miles Elam


>>The FOM request does not contain a getRequestURI() method.
>>In the wiki I've read that URI handling is not supported 
>>because this is not necessary. How should the request URI be obtained?
>>    
>>
>
>Your application should work without a certain uri ...
>
>If your need it you can work around it using an input module and pass
>its value to the flow using map:parameter.
>  
>



RE: Request URI in FOM [was: Re: How to use input modules in flow]

Posted by Reinhard Pötz <re...@gmx.net>.
From: news [mailto:news@sea.gmane.org]

> Thank you for your relies to my previous message!
> 
> 
> I have another question:
> 
> The FOM request does not contain a getRequestURI() method.
> In the wiki I've read that URI handling is not supported 
> because this is not necessary. How should the request URI be obtained?

Your application should work without a certain uri ...

If your need it you can work around it using an input module and pass
its value to the flow using map:parameter.

HTH
Reinhard