abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Koch <tho...@koch.ro>
Subject Proposal: WrappedEntryObject interface
Date Sun, 22 Jan 2012 12:29:23 GMT

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 

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

Best regards,

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

View raw message