Had a look at the code and had a chat with Azeez, I think the name is 
correct, for example in the case of Sequences, SequenceInfo has to 
implement Pageable, meaning that sequences can be paged.

+1 for Pageable.

Thanks,
Ruwan

Ruwan Linton wrote:
> I got a delivery failure notification, hence sending again.
>
> Runalbe, is an item that does the work. Serializable means that it can 
> be serialized, does Pageable also implies that the implementation 
> class is an item that can be paged. From my point of view, Sequence or 
> AxisService should implement Pageable, if it is a component which 
> supports pagination for sequences or services, then it has to be 
> Paginator or some better name.
>
> Thanks,
> Ruwan
>
>
> Afkham Azeez wrote:
>> *able does not imply a marker interface. e.g., Runnable. I think you 
>> were thinking about Serializable when you made that statement, but 
>> *able is not such a convention for naming marker interfaces. It is a 
>> simple interface with simple methods hence there is no need for a 
>> default impl. See some of the implements in service-mgt & webapp-mgt.
>>
>> Azeez
>>
>> On Thu, May 6, 2010 at 11:07 AM, Ruwan Linton <ru...@wso2.com 
>> <mailto:ru...@wso2.com>> wrote:
>>
>>     Sumedha Rubasinghe wrote:
>>     > Pageable kind of gives a wrong idea.. isn't it?
>>     > How about 'Paginator' ?
>>     +1, Pageable is more likely a markable interface, and for example
>>     services, sequences should be pageable, but that is not what we
>>     want to
>>     achieve with this interface write.
>>
>>     Paginator looks OK.
>>
>>     BTW: is there any default implementation or at least an abstract 
>> class
>>     implementing the first 2 methods in a standard manner? If not we
>>     should
>>     be able to come up with a one.
>>
>>     Thanks,
>>     Ruwan
>>     > /sumedha
>>     >
>>     > On Thu, May 6, 2010 at 10:12 AM, Afkham Azeez <az...@wso2.com
>>     <mailto:az...@wso2.com>
>>     > <mailto:az...@wso2.com <mailto:az...@wso2.com>>> wrote:
>>     >
>>     >     Hi folks,
>>     >     I have introduced a method into org.wso2.carbon.utils.Utils;
>>     >
>>     >     /**
>>     >          * A reusable generic method for doing item paging
>>     >          *
>>     >          * @param pageNumber The page required. Page number
>>     starts with 0.
>>     >          * @param sourceList The original list of items
>>     >          * @param pageable          The type of Pageable item
>>     >          * @return Returned page
>>     >          */
>>     >         public static <C> List<C> doPaging(int pageNumber, List<C>
>>     >     sourceList, Pageable pageable) ;
>>     >
>>     >     This will set & return a page (a sub-list) of items of the
>>     >     sourceList. You need to pass in a class implementing
>>     >     org.wso2.carbon.utils.Pageable. This interface is as follows:
>>     >
>>     >     public interface Pageable {
>>     >
>>     >         /**
>>     >          * Get the total number of pages
>>     >          *
>>     >          * @return  the total number of pages
>>     >          */
>>     >         public int getNumberOfPages();
>>     >
>>     >         /**
>>     >          * Set the total number of pages
>>     >          *
>>     >          * @param numberOfPages The total number of pages
>>     >          */
>>     >         public void setNumberOfPages(int numberOfPages);
>>     >
>>     >         /**
>>     >          * Set the paged items
>>     >          *
>>     >          * @param t The collection
>>     >          * @param <T> The type of objects in the collection
>>     >          */
>>     >         public <T extends Object> void set(List<T> t);
>>     >     }
>>     >
>>     >     Please make sure that you reuse this code to do item paging.
>>     This
>>     >     is generally done at the BE.
>>     >
>>     >     --
>>     >     Afkham Azeez
>>     >     Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.;
>>     >     http://wso2.com, Lean . Enterprise . Middleware
>>     >     Member; Apache Software Foundation; http://www.apache.org/
>>     >     email: az...@wso2.com <mailto:az...@wso2.com>
>>     <mailto:az...@wso2.com <mailto:az...@wso2.com>> cell: +94 77 3320919
>>     >     blog: http://blog.afkham.org
>>     >     twitter: http://twitter.com/afkham_azeez
>>     >     linked-in: http://lk.linkedin.com/in/afkhamazeez
>>     >
>>     >     _______________________________________________
>>     >     Carbon-dev mailing list
>>     >     Carbon-dev@wso2.org <mailto:Carbon-dev@wso2.org>
>>     <mailto:Carbon-dev@wso2.org <mailto:Carbon-dev@wso2.org>>
>>     >     https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>     >
>>     >
>>     >
>>     
>> ------------------------------------------------------------------------
>>     >
>>     > _______________________________________________
>>     > Carbon-dev mailing list
>>     > Carbon-dev@wso2.org <mailto:Carbon-dev@wso2.org>
>>     > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>     >
>>
>>
>>     --
>>     Ruwan Linton
>>     Software Architect & Product Manager, WSO2 ESB; http://wso2.org/esb
>>     WSO2 Inc.; http://wso2.com
>>
>>     Lean . Enterprise . Middleware
>>
>>     phone: +1 408 754 7388 ext 51789
>>     email: ru...@wso2.com <mailto:ru...@wso2.com>; cell: +94 77 341 3097
>>     blog: http://blog.ruwan.org
>>     linkedin: http://www.linkedin.com/in/ruwanlinton
>>     tweet: http://twitter.com/ruwanlinton
>>
>>
>>     _______________________________________________
>>     Carbon-dev mailing list
>>     Carbon-dev@wso2.org <mailto:Carbon-dev@wso2.org>
>>     https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>
>>
>>
>>
>> -- 
>> Afkham Azeez
>> Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.; 
>> http://wso2.com, Lean . Enterprise . Middleware
>> Member; Apache Software Foundation; http://www.apache.org/
>> email: az...@wso2.com <mailto:az...@wso2.com> cell: +94 77 3320919
>> blog: http://blog.afkham.org
>> twitter: http://twitter.com/afkham_azeez
>> linked-in: http://lk.linkedin.com/in/afkhamazeez
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Carbon-dev mailing list
>> Carbon-dev@wso2.org
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>>   
>
>


-- 
Ruwan Linton
Software Architect & Product Manager, WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.com

Lean . Enterprise . Middleware

phone: +1 408 754 7388 ext 51789
email: ru...@wso2.com; cell: +94 77 341 3097
blog: http://blog.ruwan.org
linkedin: http://www.linkedin.com/in/ruwanlinton
tweet: http://twitter.com/ruwanlinton


_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to