cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <andre.juf...@oulu.fi>
Subject RE: [C3] Calling another from REST resource
Date Mon, 19 Aug 2013 08:58:17 GMT
Hi Thorsten,

I already thought that it would down to what you suggested. Seems to me that calling a pipeline
in the way you suggested is the most logical way, as the other block has everything in place
to receive requests for accounts, given the hash. I will give it a try.

Best,
André




------------------------------------------------------------------------------------------------------------------------------
Andre H. Juffer
Biocenter Oulu and Department of Biochemistry
University of Oulu, Finland
Phone: +358-294-481161
Email: andre.juffer@oulu.fi
WWW:
  www.biochem.oulu.fi/Biocomputing/
  www.oulu.fi/biocenter/biocomputing-and-bioinformatics
  www.oulu.fi/biocenter/groups/juffer

StrucBioCat, www.strucbiocat.oulu.fi
Triacle Biocomputing, www.triacle-bc.com

________________________________
From: Thorsten Scherler [scherler@gmail.com]
Sent: Monday, August 19, 2013 10:12 AM
To: users@cocoon.apache.org
Subject: Re: [C3] Calling another from REST resource

On 08/15/2013 04:34 PM, Andre Juffer wrote:
To clarify my question:

I need to identify persons when they access a resource. On the client side, a temporal hash
is stored. On the server side, I use that hash to connect with an account associated with
a person. The hash is not unique, it is assigned upon signing in, and lost after signing out.
When accessing the resource, say a VideoResource in block A,

@POST
Response doSomething(@PathParam("hash") String hash)
{
    Account account = .... // Use the hash here.

    this.facade_.doSomething(account, ....);

    return someResponse;
}

The account information is obtained from another block (B), which is accessed by various others
block for the same purpose. These blocks represent various services for which a person may
have an account.

Thus, the line with

Account account = .... // Use the hash here.

would access another block.

Can this easily be facilitated with cocoon3 at this stage?

thanks for your time,



The question is do you need to call/use a java class or do you want to call a pipeline?

To call another java class a simple import should do, when you have the dep to the other block
set.

In case of calling another pipeline should be working with http://cocoon.apache.org/subprojects/servlet-service/servlet-service-impl/architecture.html
servlet:
final URL url = new URL("servlet:blockB:/someUrl");

HTH

salu2


------------------------------------------------------------------------------------------------------------------------------
Andre H. Juffer
Biocenter Oulu and Department of Biochemistry
University of Oulu, Finland
Phone: +358-294-481161
Email: andre.juffer@oulu.fi<mailto:andre.juffer@oulu.fi>
WWW:
  www.biochem.oulu.fi/Biocomputing/<http://www.biochem.oulu.fi/Biocomputing/>
  www.oulu.fi/biocenter/biocomputing-and-bioinformatics<http://www.oulu.fi/biocenter/biocomputing-and-bioinformatics>
  www.oulu.fi/biocenter/groups/juffer<http://www.oulu.fi/biocenter/groups/juffer>

StrucBioCat, www.strucbiocat.oulu.fi<http://www.strucbiocat.oulu.fi>
Triacle Biocomputing, www.triacle-bc.com<http://www.triacle-bc.com>

________________________________
From: Andre Juffer [andre.juffer@oulu.fi<mailto:andre.juffer@oulu.fi>]
Sent: Wednesday, August 14, 2013 4:20 PM
To: users@cocoon.apache.org<mailto:users@cocoon.apache.org>
Subject: [C3] Calling another from REST resource

Is it actually possible to call an another block (say block A) from within a REST resource
that resides in block B?

Thanks,


------------------------------------------------------------------------------------------------------------------------------
Andre H. Juffer
Biocenter Oulu and Department of Biochemistry
University of Oulu, Finland
Phone: +358-294-481161
Email: andre.juffer@oulu.fi<mailto:andre.juffer@oulu.fi>
WWW:
  www.biochem.oulu.fi/Biocomputing/<http://www.biochem.oulu.fi/Biocomputing/>
  www.oulu.fi/biocenter/biocomputing-and-bioinformatics<http://www.oulu.fi/biocenter/biocomputing-and-bioinformatics>
  www.oulu.fi/biocenter/groups/juffer<http://www.oulu.fi/biocenter/groups/juffer>

StrucBioCat, www.strucbiocat.oulu.fi<http://www.strucbiocat.oulu.fi>
Triacle Biocomputing, www.triacle-bc.com<http://www.triacle-bc.com>




--
Thorsten Scherler <scherler.at.gmail.com>
codeBusters S.L. - web based systems
<consulting, training and solutions>

http://www.codebusters.es/


Mime
View raw message