On 10/07/2010 19:50, Simone Tripodi wrote: > Hola, > few things about that class: > - I noticed that there's no need to maintain the data in the Set > sorted, since when calculating the base string have to be merged; > > - I'd maintain the data structures as more anonym as possible, > Iterable should be enough;
Hmm. Yes, maybe you're right. I think maybe the requestURL should be a String too - I'm trying to handle all of the IOExceptions in the HttpConnector. > - AFAIK there's no need to store the request somewhere; what about > switching to a final class? I'm not sure. IMO that's only an advantage if we want to allow the user to create a request object, otherwise the implementation class sh/could be internal only. Having said that, there might be a case for doing this, there are more complex requirements in the server component, so let's leave it open for now, until we've had a chance to work on that. p > Thanks in advance, have a nice weekend, > Simo > > http://people.apache.org/~simonetripodi/ > http://www.99soft.org/ > > > > On Sat, Jul 10, 2010 at 2:09 PM, <[email protected]> wrote: >> Author: pidster >> Date: Sat Jul 10 12:09:34 2010 >> New Revision: 962827 >> >> URL: http://svn.apache.org/viewvc?rev=962827&view=rev >> Log: >> Add accessor methods for parameters; code will be duplicated in various >> places otherwise >> >> Modified: >> >> incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java >> >> Modified: >> incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java >> URL: >> http://svn.apache.org/viewvc/incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java?rev=962827&r1=962826&r2=962827&view=diff >> ============================================================================== >> --- >> incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java >> (original) >> +++ >> incubator/amber/trunk/spec-api/src/main/java/org/apache/amber/OAuthRequest.java >> Sat Jul 10 12:09:34 2010 >> @@ -18,6 +18,7 @@ package org.apache.amber; >> >> import java.net.URL; >> import java.util.Collection; >> +import java.util.SortedSet; >> >> /** >> * A convenient object representing the properties of an OAuth request to a >> @@ -35,6 +36,9 @@ public interface OAuthRequest { >> >> void setHTTPMethod(HTTPMethod httpMethod); >> >> + /** >> + * @param parameter >> + */ >> void addOAuthMessageParameter(OAuthMessageParameter parameter); >> >> /** >> @@ -42,15 +46,30 @@ public interface OAuthRequest { >> * >> * @return the OAuth parameters will be included in the OAuth message. >> */ >> - Collection<OAuthMessageParameter> getOAuthMessageParameters(); >> + SortedSet<OAuthMessageParameter> getOAuthMessageParameters(); >> >> + /** >> + * @param parameter >> + */ >> void addOAuthRequestParameter(OAuthRequestParameter parameter); >> >> + /** >> + * @param signatureMethod >> + * @return >> + */ >> + String getOAuthMessageParameter(OAuthParameter parameter); >> + >> /** >> * Returns the aux parameters client will included in the request. >> * >> * @return the aux parameters client will included in the request. >> */ >> - Collection<OAuthRequestParameter> getOAuthRequestParameters(); >> + SortedSet<OAuthRequestParameter> getOAuthRequestParameters(); >> + >> + /** >> + * @param signatureMethod >> + * @return >> + */ >> + String getOAuthRequestParameter(String name); >> >> } >> >> >>
signature.asc
Description: OpenPGP digital signature
