You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by NCister <nc...@cointa.it> on 2020/11/22 22:17:54 UTC

Job scope

Hi all
We are developing JobConsumer logic (process method) using an inner 
class, in order to encapsulate and isolate variables (request scope).
Is it a best practice ?
Is there any other standard (Sling) solution?
Thanks a lot.
Nicola Cisternino.

RE: Job scope

Posted by Masoud Rozati <mr...@pro-vision.de>.
Hi Nicola,

If you want to hide your logic or variables to other bundles, put your internal classes in an "internal" or "impl" java package. 
If you want to hide the variables from other classes in your bundle too, declare them as private or package-private.

Regards,
Masoud

>-----Original Message-----
>From: NCister <nc...@cointa.it>
>Sent: Sunday, November 22, 2020 11:18 PM
>To: users@sling.apache.org
>Subject: Job scope
>
>Hi all
>We are developing JobConsumer logic (process method) using an inner
>class, in order to encapsulate and isolate variables (request scope).
>Is it a best practice ?
>Is there any other standard (Sling) solution?
>Thanks a lot.
>Nicola Cisternino.