David,

I just saw that message parsing is largely absent any test cases in 
fedora-client, so I just added one which hopefully gives you a more useful 
starting point:

https://github.com/mediashelf/fedora-client/blob/master/fedora-client-messaging/src/test/java/com/yourmediashelf/fedora/client/messaging/AtomApimMessageTest.java

My suggestion is to fork fedora-client, make your proposed changes and submit a 
pull request.

-Eddie

On Aug 29, 2012, at 10:39 PM, David Chandek-Stark 
<david.chandek.st...@duke.edu> wrote:

> I'd be glad to work on a test case, but let me first propose adding two 
> interfaces to the client code as shown here: https://gist.github.com/3513264. 
>  These are mostly copied from the server code, with the addition of 
> getReturnVal() (from the client class) and getMethodParameterValue() (as 
> discussed here).  The intention would be for the client AtomApimMessage class 
> to implement the new APIMMessage interface and to use its (private) 
> getCategoryTerm() method in implementing getMethodParameterValue().
> 
> Thanks for considering,
> David
> 
>> -----Original Message-----
>> From: Edwin Shin [mailto:ed...@fedora-commons.org]
>> Sent: Wednesday, August 29, 2012 4:51 AM
>> To: Support and info exchange list for Fedora users.
>> Subject: Re: [fcrepo-user] Messaging client AtomApimMessage
>> getCategoryTerm() method private?
>> 
>> I suppose the short answer is that via the client class (i.e. not parsing the
>> server response yourself), you can't.
>> 
>> If you can submit a pull request with a test case or two that at least shows
>> how you'd like the client class to work, that would be a great starting point
>> (unless it's literally just that you want getCategoryTerm not to be private).
>> 
>> 
>> On Aug 28, 2012, at 9:15 PM, David Chandek-Stark
>> <david.chandek.st...@duke.edu> wrote:
>> 
>>> Thanks for the clear answer.  Perhaps add a method to the server
>> APIMMessage interface for getting the value of the method parameter?  But
>> perhaps I should reframe my question: how is an APIM message consumer
>> based on fedora-client-messaging supposed to get value of a method
>> parameter?
>>> 
>>> Thanks,
>>> David
>>> 
>>> -----Original Message-----
>>> From: Edwin Shin [mailto:ed...@fedora-commons.org]
>>> Sent: Monday, August 27, 2012 10:33 PM
>>> To: Support and info exchange list for Fedora users.
>>> Subject: Re: [fcrepo-user] Messaging client AtomApimMessage
>> getCategoryTerm() method private?
>>> 
>>> For server, I believe the rationale was something along the lines of only
>> marking public the methods defined in the interface APIMMessage.
>>> 
>>> Although I see that getAuthor doesn't quite adhere to that.
>>> 
>>> Although a categoryTerm is pretty clearly an Atom-specific implementation
>> detail versus an author.
>>> 
>>> For fedora-client, the reason is pretty prosaic: the class is just directly
>> descended from the server version. I don't see why we shouldn't make the
>> method public there.
>>> 
>>> On Aug 28, 2012, at 2:56 AM, David Chandek-Stark
>> <david.chandek.st...@duke.edu> wrote:
>>> 
>>>> Why is the getCategoryTerm() method in the AtomApimMessage class
>> private?  The same question applies also to the server messaging class
>> AtomAPIMMessage.  In both cases, it only denies access to the convenience
>> of the method, not the message content itself.
>>>> 
>>>> Thanks,
>>>> David
>>>> 
>>>> ----------------------------------------
>>>> David Chandek-Stark
>>>> IT Analyst, Sr. - Perkins Library ITS, Discovery and Core Services
>>>> Tel. 919-660-5859
>>>> IM: d...@jabber.duke.edu


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to