Skip to content

Commit

Permalink
Added some thoughts about refactoring. I'll implement them when i've …
Browse files Browse the repository at this point in the history
…got 5 minutes free. Or more.
  • Loading branch information
marc committed Mar 24, 2009
1 parent 05d54a7 commit c765ae9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/org/loststone/toodledo/request/Request.java
Expand Up @@ -16,7 +16,11 @@ public abstract class Request {
protected String url = null;

//public abstract void buildRequest();

// TODO create a new method that gets back the response, which is a class that inherits
// from the abstract class response.

// TODO this is _wrong_ just execute the method and store the result as a string
public Response exec() {
HttpClient client = new HttpClient();
HttpMethod method = new GetMethod(this.url);
Expand Down
5 changes: 5 additions & 0 deletions src/org/loststone/toodledo/response/Response.java
Expand Up @@ -11,10 +11,13 @@ public abstract class Response {
protected String response;
protected boolean succeed = false;

// TODO implement a better base, all that is done in the inherited class
// can go here.
public Response(String response) {
this.response = response;
}

// TODO delete this.
public abstract int getResponseResult();

public boolean succeeded() {
Expand All @@ -25,6 +28,8 @@ public boolean succeeded() {
* This method returns the value if it's a simple value or the xml for further parsing.
* @return
* @throws ToodledoApiException
* TODO create getResponseContentAsXml with string
* TODO create getParsedResponse in every class.
*/
public abstract String getResponseContent() throws ToodledoApiException;

Expand Down

0 comments on commit c765ae9

Please sign in to comment.