You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Jeff Blattman <Je...@Sun.COM> on 2006/08/23 05:51:04 UTC

code review: add title and alt link to APP get

1. feed title was hardcoding english text. changed to use the website 
name for the title

2. i had a requirement to be able to display the link to the weblog from 
the APP client. fill in the Atom feed link field.

thanks.

Index: RollerAtomHandler.java
===================================================================
--- RollerAtomHandler.java      (revision 429826)
+++ RollerAtomHandler.java      (working copy)
@@ -274,7 +274,13 @@
                         max + 1);          // maxEntries
                 Feed feed = new Feed();
                 feed.setId(absUrl + "/app/" +website.getHandle() + 
"/entries/" + start);
-                feed.setTitle("Entries for blog[" + handle + "]");
+                feed.setTitle(website.getName());
+                Link link = new Link();
+                link.setHref(absUrl + "/page/" + website.getHandle());
+                link.setRel("alternate");
+                link.setType("text/html");
+                feed.setAlternateLinks(Collections.singletonList(link));
+
                 List atomEntries = new ArrayList();
                 int count = 0;
                 for (Iterator iter = entries.iterator(); iter.hasNext() 
&& count < mMaxEntries; count++) {
@@ -335,6 +341,13 @@
             if (canView(website)) {
                 Feed feed = new Feed();
                 feed.setId(absUrl + "/app/" +website.getHandle() + 
"/entries/" + start);
+                feed.setTitle(website.getName());
+                Link link = new Link();
+                link.setHref(absUrl + "/page/" + website.getHandle());
+                link.setRel("alternate");
+                link.setType("text/html");
+                feed.setAlternateLinks(Collections.singletonList(link));
+
                 SortedSet sortedSet = new TreeSet(new Comparator() {
                     public int compare(Object o1, Object o2) {
                         File f1 = (File)o1;


Re: code review: add title and alt link to APP get

Posted by Allen Gilliland <al...@sun.com>.
yes.  the current active code is the 3.0 branch, we just haven't merged 
it into the trunk yet.

-- Allen


Jeff Blattman wrote:
> okay ... so, i assume then that i should merge the changes from the 
> trunk into the 3.0 branch (for the adminapi stuff), and just be working 
> from the 3.0 branch.
> 
> thanks.
> 
> Dave Johnson wrote:
>> On 8/31/06, Jeff Blattman <Je...@sun.com> wrote:
>>> this is my fault for not paying attention, but what again is the plan w/
>>> regard to roller 3.0 and trunk merge? will there be a roller 2.3.1? or
>>> just a 3.1 which is 3.0 merged to the trunk?
>>
>> Roller 2.3.1 is in RC now, it's just a small security fix release that
>> still lacks the votes for release.
>>
>> I was assuming we'd release Roller 3.0 from the roller_3.0 branch,
>> then we'd do something like the below to make 3.0 the trunki:
>>
>>   svn mv trunk branches/roller_2.4
>>   svn cp -r branches/roller_3.0 trunk
>>
>> - Dave

Re: code review: add title and alt link to APP get

Posted by Jeff Blattman <Je...@Sun.COM>.
okay ... so, i assume then that i should merge the changes from the 
trunk into the 3.0 branch (for the adminapi stuff), and just be working 
from the 3.0 branch.

thanks.

Dave Johnson wrote:
> On 8/31/06, Jeff Blattman <Je...@sun.com> wrote:
>> this is my fault for not paying attention, but what again is the plan w/
>> regard to roller 3.0 and trunk merge? will there be a roller 2.3.1? or
>> just a 3.1 which is 3.0 merged to the trunk?
>
> Roller 2.3.1 is in RC now, it's just a small security fix release that
> still lacks the votes for release.
>
> I was assuming we'd release Roller 3.0 from the roller_3.0 branch,
> then we'd do something like the below to make 3.0 the trunki:
>
>   svn mv trunk branches/roller_2.4
>   svn cp -r branches/roller_3.0 trunk
>
> - Dave

Re: code review: add title and alt link to APP get

Posted by Dave Johnson <sn...@gmail.com>.
On 8/31/06, Jeff Blattman <Je...@sun.com> wrote:
> this is my fault for not paying attention, but what again is the plan w/
> regard to roller 3.0 and trunk merge? will there be a roller 2.3.1? or
> just a 3.1 which is 3.0 merged to the trunk?

Roller 2.3.1 is in RC now, it's just a small security fix release that
still lacks the votes for release.

I was assuming we'd release Roller 3.0 from the roller_3.0 branch,
then we'd do something like the below to make 3.0 the trunki:

   svn mv trunk branches/roller_2.4
   svn cp -r branches/roller_3.0 trunk

- Dave

Re: code review: add title and alt link to APP get

Posted by Jeff Blattman <Je...@Sun.COM>.
this is my fault for not paying attention, but what again is the plan w/ 
regard to roller 3.0 and trunk merge? will there be a roller 2.3.1? or 
just a 3.1 which is 3.0 merged to the trunk?

i ask because i was hoping to have these fixes available where i can use 
then in conjunction w/ the latest adminapi stuff, which in on the trunk. 
should i commit this to the trunk? i don't want to make any eventual 
merge any more difficult than necessary.

Dave Johnson wrote:
> Thanks Jeff,
>
> I just added those changes (and some other APP fixes) to the Roller 
> 3.0 branch.
>
> - Dave
>
>
>
> On 8/22/06, Jeff Blattman <Je...@sun.com> wrote:
>> 1. feed title was hardcoding english text. changed to use the website
>> name for the title
>>
>> 2. i had a requirement to be able to display the link to the weblog from
>> the APP client. fill in the Atom feed link field.
>>
>> thanks.
>>
>> Index: RollerAtomHandler.java
>> ===================================================================
>> --- RollerAtomHandler.java      (revision 429826)
>> +++ RollerAtomHandler.java      (working copy)
>> @@ -274,7 +274,13 @@
>>                          max + 1);          // maxEntries
>>                  Feed feed = new Feed();
>>                  feed.setId(absUrl + "/app/" +website.getHandle() +
>> "/entries/" + start);
>> -                feed.setTitle("Entries for blog[" + handle + "]");
>> +                feed.setTitle(website.getName());
>> +                Link link = new Link();
>> +                link.setHref(absUrl + "/page/" + website.getHandle());
>> +                link.setRel("alternate");
>> +                link.setType("text/html");
>> +                
>> feed.setAlternateLinks(Collections.singletonList(link));
>> +
>>                  List atomEntries = new ArrayList();
>>                  int count = 0;
>>                  for (Iterator iter = entries.iterator(); iter.hasNext()
>> && count < mMaxEntries; count++) {
>> @@ -335,6 +341,13 @@
>>              if (canView(website)) {
>>                  Feed feed = new Feed();
>>                  feed.setId(absUrl + "/app/" +website.getHandle() +
>> "/entries/" + start);
>> +                feed.setTitle(website.getName());
>> +                Link link = new Link();
>> +                link.setHref(absUrl + "/page/" + website.getHandle());
>> +                link.setRel("alternate");
>> +                link.setType("text/html");
>> +                
>> feed.setAlternateLinks(Collections.singletonList(link));
>> +
>>                  SortedSet sortedSet = new TreeSet(new Comparator() {
>>                      public int compare(Object o1, Object o2) {
>>                          File f1 = (File)o1;
>>
>>

Re: code review: add title and alt link to APP get

Posted by Dave Johnson <sn...@gmail.com>.
Thanks Jeff,

I just added those changes (and some other APP fixes) to the Roller 3.0 branch.

- Dave



On 8/22/06, Jeff Blattman <Je...@sun.com> wrote:
> 1. feed title was hardcoding english text. changed to use the website
> name for the title
>
> 2. i had a requirement to be able to display the link to the weblog from
> the APP client. fill in the Atom feed link field.
>
> thanks.
>
> Index: RollerAtomHandler.java
> ===================================================================
> --- RollerAtomHandler.java      (revision 429826)
> +++ RollerAtomHandler.java      (working copy)
> @@ -274,7 +274,13 @@
>                          max + 1);          // maxEntries
>                  Feed feed = new Feed();
>                  feed.setId(absUrl + "/app/" +website.getHandle() +
> "/entries/" + start);
> -                feed.setTitle("Entries for blog[" + handle + "]");
> +                feed.setTitle(website.getName());
> +                Link link = new Link();
> +                link.setHref(absUrl + "/page/" + website.getHandle());
> +                link.setRel("alternate");
> +                link.setType("text/html");
> +                feed.setAlternateLinks(Collections.singletonList(link));
> +
>                  List atomEntries = new ArrayList();
>                  int count = 0;
>                  for (Iterator iter = entries.iterator(); iter.hasNext()
> && count < mMaxEntries; count++) {
> @@ -335,6 +341,13 @@
>              if (canView(website)) {
>                  Feed feed = new Feed();
>                  feed.setId(absUrl + "/app/" +website.getHandle() +
> "/entries/" + start);
> +                feed.setTitle(website.getName());
> +                Link link = new Link();
> +                link.setHref(absUrl + "/page/" + website.getHandle());
> +                link.setRel("alternate");
> +                link.setType("text/html");
> +                feed.setAlternateLinks(Collections.singletonList(link));
> +
>                  SortedSet sortedSet = new TreeSet(new Comparator() {
>                      public int compare(Object o1, Object o2) {
>                          File f1 = (File)o1;
>
>