Skip to content

Commit

Permalink
Using DTOs in service and removing old value objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisoelkers committed Mar 26, 2015
1 parent 2086bfc commit 8c51385
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 101 deletions.
Expand Up @@ -16,10 +16,10 @@
*/ */
package org.graylog2.restclient.models; package org.graylog2.restclient.models;


import org.graylog2.rest.models.system.sessions.requests.SessionCreateRequest;
import org.graylog2.rest.models.system.sessions.responses.SessionResponse;
import org.graylog2.restclient.lib.APIException; import org.graylog2.restclient.lib.APIException;
import org.graylog2.restclient.lib.ApiClient; import org.graylog2.restclient.lib.ApiClient;
import org.graylog2.restclient.models.api.requests.SessionCreateRequest;
import org.graylog2.restclient.models.api.responses.SessionCreateResponse;
import org.graylog2.restroutes.generated.routes; import org.graylog2.restroutes.generated.routes;


import javax.inject.Inject; import javax.inject.Inject;
Expand All @@ -40,10 +40,10 @@ public SessionService(ApiClient apiClient) {
this.apiClient = apiClient; this.apiClient = apiClient;
} }


public SessionCreateResponse create(String username, String password, String remoteAddress) throws APIException, IOException { public SessionResponse create(String username, String password, String remoteAddress) throws APIException, IOException {
return apiClient.path(routes.SessionsResource().newSession(), SessionCreateResponse.class) return apiClient.path(routes.SessionsResource().newSession(), SessionResponse.class)
.unauthenticated() .unauthenticated()
.body(new SessionCreateRequest(username, password, remoteAddress)) .body(SessionCreateRequest.create(username, password, remoteAddress))
.execute(); .execute();
} }


Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 8c51385

Please sign in to comment.