roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Scott <jame...@vt.edu>
Subject Re: Atom PP Categories
Date Thu, 13 Mar 2014 20:13:21 GMT
Issue resolved.

Today I spent several hours learning the difference between "
http://localhost:8080/roller/blog" and "http://localhost:8080/roller/blog/"
.

It's always the last thing you expect, for some reason.


On Thu, Mar 13, 2014 at 11:05 AM, James Scott <jamesas@vt.edu> wrote:

> Continuing category confusion:
>
> This chunk of xml is what propono is sending to roller -
>
> <entry xmlns="http://www.w3.org/2005/Atom">
>     <title>Titular</title>
>     <category term="cat" scheme="http://localhost:8080/roller/blog" />
>     <content>foo</content>
>     <summary>bar</summary>
> </entry>
>
> - and I'm still getting it redirected to General. Removing the scheme
> information causes it to add a tag 'cat' as expected, so this suggests to
> me that one of two things is happening:
>
> 1.
> *cat.getScheme().equals(RollerAtomService.getWeblogCategoryScheme(rollerEntry.getWebsite*
> *()))* is returning false, which means that either getWeblogCategory
> scheme is returning something other than what I expect ("
> http://localhost:8080/roller/blog"), or cat.getScheme is returning
> something other than what I expect, or both.
> 2. *roller.getWeblogEntryManager().getWeblogCategoryByName(rollerEntry.getWebsite(),
> catString)* is returning null.
>
> I'm trying to distinguish between these possibilities; is there anything I
> can do to resolve this problem short of building Roller myself and stepping
> through the code?
>
>
>
> On Thu, Mar 13, 2014 at 10:26 AM, Jody Allen <
> Jody.Allen@albertahealthservices.ca> wrote:
>
>> Take me off this mailing list. I have nothing to do with your department.
>>
>> Jody Allen - CPO 13798
>> Protective Services Team Lead
>> D-Team - SAFPC
>> jody.allen@albertahealthservices.ca
>> Dispatch 403-944-6899
>> Direct 403-944-6818
>> Alberta Health Services
>> This message, and any documents attached hereto, is intended only for the
>> addressee and may contain privileged or confidential information.  Any
>> unauthorized disclosure is strictly prohibited.  If you have received this
>> message in error, please notify us immediately so that we may correct our
>> internal records.  Please then delete the original message.  Thank you.
>> ________________________________________
>> From: James Scott [jamesas@vt.edu]
>> Sent: March 12, 2014 07:48
>> To: user@roller.apache.org
>> Subject: Re: Atom PP Categories
>>
>> I'd like to be able to get the categories and associated schemas directly,
>> but, well -
>>
>>
>> https://github.com/apache/roller/blob/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/RollerAtomHandler.java#L217
>>
>>     public Categories getCategories(AtomRequest arg0) throws
>> AtomException {
>>         throw new UnsupportedOperationException("Not supported yet.");
>>     }
>>
>>
>> Better luck next version, I guess. Either way, it shouldn't matter much -
>> I
>> know what the schemes and categories are, so I can put them in an enum or
>> something. I'm still working through what my problem is - my code looks
>> like -
>>
>>             //Add the product type as a category.
>>             List<Category> categories = new ArrayList<Category>();
>>             Category productCategory = new Category();
>>             productCategory.setScheme("http://localhost:8080/roller/" +
>> systemType);
>>             productCategory.setTerm(productType);
>>             categories.add(productCategory);
>>             newEntry.setCategories(categories);
>>
>>             // POST entry to collection on server
>>             collection.addEntry(newEntry);
>>
>> - where systemType is the name of the blog, and productType is the
>> category
>> (and, yes, I created an appropriate category on the blog first). This
>> appears to have no effect; everything published goes into the default
>> category. I think I'm failing somewhere in copyToRollerEntry - either it
>> thinks my list of categories is null/empty, or that the scheme is
>> null/empty, or it thinks that the scheme doesn't match the weblog category
>> scheme, or thinks the term is null, or that it doesn't match a valid
>> category.
>>
>> This *might* more properly be a rome-propomo question, but I don't think
>> the problem is on that end. If it's any relevance, I'm running Roller
>> 5.0.3
>> on Glassfish 3.1.2, with a Derby DB, and Java 7.
>>
>>
>> On Wed, Mar 12, 2014 at 9:23 AM, Dave <snoopdave@gmail.com> wrote:
>>
>> > Yes, that is correct. Atom Categories that have that scheme are
>> considered
>> > to be "real" categories, i.e. those defined by the blog "foo". Atom
>> > Categories with no scheme are considered to be tags.
>> >
>> > - Dave
>> >
>> >
>> >
>> > On Wed, Mar 12, 2014 at 8:49 AM, James Scott <jamesas@vt.edu> wrote:
>> >
>> > > Okay, that should help considerably. My main stumbling block is what
>> this
>> > > bit of code does, exactly:
>> > >
>> > > RollerAtomService.getWeblogCategoryScheme(rollerEntry.getWebsite())
>> > >
>> > > For example, if I have a blog named (& titled) 'foo' , and am testing
>> > this
>> > > locally, will it return something like "
>> http://localhost:8080/roller/foo
>> > "
>> > > ?
>> > >
>> > >
>> > > On Wed, Mar 12, 2014 at 7:55 AM, Dave <snoopdave@gmail.com> wrote:
>> > >
>> > > > You should be able to set categories publish time and other things
>> via
>> > > APP.
>> > > >
>> > > > Here's the code that processes incoming Atom entries:
>> > > >
>> > > >
>> > >
>> >
>> https://github.com/apache/roller/blob/trunk/app/src/main/java/org/apache/roller/weblogger/webservices/atomprotocol/EntryCollection.java#L393
>> > > >
>> > > > - Dave
>> > > >
>> > > >
>> > > >
>> > > > On Wed, Mar 12, 2014 at 7:05 AM, James Scott <jamesas@vt.edu>
>> wrote:
>> > > >
>> > > > > No - I'm not publishing a blog via the entry edit page, but rather
>> > via
>> > > > Atom
>> > > > > Publishing Protocol. I'm using rome-propono to publish each
>> entry. It
>> > > is
>> > > > a
>> > > > > requirement of the project that no human hands be needed for
each
>> > > entry -
>> > > > > the individual entries are going to be generated automatically
by
>> > > another
>> > > > > project.
>> > > > >
>> > > > > I'd also really like to be able to customize the links, publish
>> > dates,
>> > > > etc,
>> > > > > but it's not essential and as far as I can tell it can't be done.
>> > > > >
>> > > > >
>> > > > > On Tue, Mar 11, 2014 at 11:12 PM, Glen Mazza <
>> glen.mazza@gmail.com>
>> > > > wrote:
>> > > > >
>> > > > > > When you publish a blog entry, you get to choose its category
on
>> > the
>> > > > > entry
>> > > > > > edit page -- isn't that all you need?
>> > > > > >
>> > > > > > It seems to work for me:
>> > > > > > https://web-gmazza.rhcloud.com/blog/feed/entries/atom?cat=Javafor
>> > > the
>> > > > > > article at http://web-gmazza.rhcloud.com/blog/.
>> > > > > >
>> > > > > > HTH,
>> > > > > > Glen
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > On 03/11/2014 03:22 PM, James Scott wrote:
>> > > > > >
>> > > > > >> Hi, I'm trying to use Roller as a sort of publishing
service
>> for
>> > > other
>> > > > > >> applications, with blog posts published via Atom Publishing
>> > > Protocol.
>> > > > It
>> > > > > >> seems that Roller can't or doesn't handle category information
>> > > > > correctly;
>> > > > > >> I
>> > > > > >> see a place to reset the default category for posts
published
>> via
>> > > APP,
>> > > > > but
>> > > > > >> no way to set the category automatically based on the
post.
>> > > > > >>
>> > > > > >> Is this something that can be done in Roller?
>> > > > > >>
>> > > > > >>
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>> This message and any attached documents are only for the use of the
>> intended recipient(s), are confidential and may contain privileged
>> information. Any unauthorized review, use, retransmission, or other
>> disclosure is strictly prohibited. If you have received this message in
>> error, please notify the sender immediately, and then delete the original
>> message. Thank you.
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message