[xwiki-dev] [API] New Api.getContext() method?

Vincent Massol vincent at massol.net
Fri Feb 2 14:15:31 CET 2007


On Feb 2, 2007, at 1:54 PM, jeremi joslin wrote:

> Hi,
> The context is local to the current request, so i don't think it's  
> possible.

Here's the current Api class:

public class Api
{
     protected XWikiContext context;

     public Api(XWikiContext context)
     {
         this.context = context;
     }
...

All I'm suggesting is:

public class Api
{
     private XWikiContext context;

     public Api(XWikiContext context)
     {
         this.context = context;
     }

     public XWikiContext getContext()
     {
         return this.context;
     }

Nothing to do with the fact that it's local to the current request I  
think.

Thanks
-Vincent

>
> jeremi
>
> On 2/2/07, Vincent Massol <vincent at massol.net> wrote:
>> Hi,
>>
>> I'd like to propose adding a new Api.getContext() method. Plugins are
>> currently using this.context to get access to it. I'd like to add
>> this method and make the context instance variable private.
>>
>> This is pretty minor and I don't see any negative point of doing it
>> as it's already there, just not explicit.
>>
>> Let me know.
>>
>> Thanks
>> -Vincent
>>
>>
>>
>>
>>
>>
>> _____________________________________________________________________ 
>> ______
>> Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail  
>> et son interface révolutionnaire.
>> http://fr.mail.yahoo.com
>>
>>
>>
>> --
>> You receive this message as a subscriber of the xwiki- 
>> dev at objectweb.org mailing list.
>> To unsubscribe: mailto:xwiki-dev-unsubscribe at objectweb.org
>> For general help: mailto:sympa at objectweb.org?subject=help
>> ObjectWeb mailing lists service home page: http:// 
>> www.objectweb.org/wws
>>
>>
>
>
> -- 
> jeremi
>
> --
> You receive this message as a subscriber of the xwiki- 
> dev at objectweb.org mailing list.
> To unsubscribe: mailto:xwiki-dev-unsubscribe at objectweb.org
> For general help: mailto:sympa at objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/ 
> wws






___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com




More information about the devs mailing list