You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by Thomas Koch <th...@koch.ro> on 2012/01/22 13:29:23 UTC

Proposal: WrappedEntryObject interface

Hi,

the AbstractEntityCollectionAdapter<T> has a couple of abstract methods to get 
informations from the entity. I find it more clear for the implementer, if 
those functions would be separated into an interface and all other methods 
would work on the wrapped entry object instead:

interface WrappedEntry<T> {
    String getId();
    String getName();
    String getTitle();
    DateTime getUpdated();
    boolean isMediaEntry();
    List<Person> getAuthors(RequestContext request);
    T getContent(RequestContext request);
}

The getEntry method of AbstractEntityCollectionAdapter would return 
WrappedEntry<?>.

The WrappedEntry interface would have a Single Responsibility and the 
AbstractEntityCollectionAdapter would have one responsibility less.

Best regards,

Thomas Koch, http://www.koch.ro

Re: Proposal: WrappedEntryObject interface

Posted by Thomas Koch <th...@koch.ro>.
Thomas Koch:
> Hi,
> 
> the AbstractEntityCollectionAdapter<T> has a couple of abstract methods to
> get informations from the entity. I find it more clear for the
> implementer, if those functions would be separated into an interface and
> all other methods would work on the wrapped entry object instead:

I've pushed the proposed patch here:

http://github.com/thkoch2001/abdera/commit/37d2a9bf21c4a0427d4ce1bce71303c31b9f9840

Thomas Koch, http://www.koch.ro