diff options
author | seshukm <seshu.kumar.m@huawei.com> | 2018-07-25 18:15:51 +0800 |
---|---|---|
committer | seshukm <seshu.kumar.m@huawei.com> | 2018-07-25 18:15:51 +0800 |
commit | efdf50410fd3d341c0bbb6550ac758549d2bf3f4 (patch) | |
tree | f2c981edd8025a7faa510711408310d88d1ca421 /keystone-client/src | |
parent | 04cb212b3a38879b0013a62bca9fb56337ef839e (diff) |
basic code issue cleanup
Issue-ID: SO-729
Change-Id: I9f6ba919cfc959836b2a69aa9ca9719d5b95a6d1
Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'keystone-client/src')
5 files changed, 68 insertions, 68 deletions
diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ProjectsResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ProjectsResource.java index b58f990..900ce20 100644 --- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ProjectsResource.java +++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ProjectsResource.java @@ -24,20 +24,20 @@ import com.woorea.openstack.keystone.v3.model.Projects; public class ProjectsResource extends GenericResource<Project, Projects> { - public ProjectsResource(OpenStackClient client) { - super(client, "/projects", Project.class, Projects.class); - } - - public OpenStackRequest<Users> users(String projectId) { - return CLIENT.get(new StringBuilder(path).append("/").append(projectId).append("/users/").toString(), Users.class); - } - - public ProjectUserRolesResource userRoles(String projectId, String userId) { - return new ProjectUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(projectId).append("/users/").append(userId).append("/roles").toString()); - } - - public ProjectUserRolesResource groupRoles(String projectId, String groupId) { - return new ProjectUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(projectId).append("/groups/").append(groupId).append("/roles").toString()); - } + public ProjectsResource(OpenStackClient client) { + super(client, "/projects", Project.class, Projects.class); + } + + public OpenStackRequest<Users> users(String projectId) { + return CLIENT.get(new StringBuilder(path).append("/").append(projectId).append("/users/").toString(), Users.class); + } + + public ProjectUserRolesResource userRoles(String projectId, String userId) { + return new ProjectUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(projectId).append("/users/").append(userId).append("/roles").toString()); + } + + public ProjectUserRolesResource groupRoles(String projectId, String groupId) { + return new ProjectUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(projectId).append("/groups/").append(groupId).append("/roles").toString()); + } } diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/RolesResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/RolesResource.java index addd004..ae8fc60 100644 --- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/RolesResource.java +++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/RolesResource.java @@ -24,12 +24,12 @@ import com.woorea.openstack.keystone.v3.model.Users; public class RolesResource extends GenericResource<Role, Roles> { - public RolesResource(OpenStackClient client) { - super(client, "/roles", Role.class, Roles.class); - } - - public OpenStackRequest<Users> users(String domainId, String userId) { - return CLIENT.get(new StringBuilder(path).append("/").append(domainId).append("/users/").append(userId).append("/roles").toString(), Users.class); - } + public RolesResource(OpenStackClient client) { + super(client, "/roles", Role.class, Roles.class); + } + + public OpenStackRequest<Users> users(String domainId, String userId) { + return CLIENT.get(new StringBuilder(path).append("/").append(domainId).append("/users/").append(userId).append("/roles").toString(), Users.class); + } } diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ServicesResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ServicesResource.java index 28603fa..c0e25e6 100644 --- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ServicesResource.java +++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/ServicesResource.java @@ -22,8 +22,8 @@ import com.woorea.openstack.keystone.model.Services; public class ServicesResource extends GenericResource<Service, Services> { - public ServicesResource(OpenStackClient client) { - super(client, "/services", Service.class, Services.class); - } + public ServicesResource(OpenStackClient client) { + super(client, "/services", Service.class, Services.class); + } } diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/TokensResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/TokensResource.java index b564d7d..9d176d7 100644 --- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/TokensResource.java +++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/TokensResource.java @@ -24,35 +24,35 @@ import com.woorea.openstack.keystone.v3.model.Authentication; import com.woorea.openstack.keystone.v3.model.Token; public class TokensResource { - - private final OpenStackClient CLIENT; - - public TokensResource(OpenStackClient client) { - CLIENT = client; - } - - public Authenticate authenticate(Authentication authentication) { - return new Authenticate(authentication); - } - - public OpenStackRequest<Token> show() { - return CLIENT.get("/auth/tokens", Token.class); - } + + private final OpenStackClient CLIENT; + + public TokensResource(OpenStackClient client) { + CLIENT = client; + } + + public Authenticate authenticate(Authentication authentication) { + return new Authenticate(authentication); + } + + public OpenStackRequest<Token> show() { + return CLIENT.get("/auth/tokens", Token.class); + } - public class Authenticate extends OpenStackRequest<Token> { - - private Authentication authentication; - - public Authenticate() { - - } - - public Authenticate(Authentication authentication) { - super(CLIENT, HttpMethod.POST, "/auth/tokens", Entity.json(authentication), Token.class); - this.authentication = authentication; - } + public class Authenticate extends OpenStackRequest<Token> { + + private Authentication authentication; + + public Authenticate() { + + } + + public Authenticate(Authentication authentication) { + super(CLIENT, HttpMethod.POST, "/auth/tokens", Entity.json(authentication), Token.class); + this.authentication = authentication; + } - } - + } + } diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/UsersResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/UsersResource.java index 73cdb46..0e1e609 100644 --- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/UsersResource.java +++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/UsersResource.java @@ -24,20 +24,20 @@ import com.woorea.openstack.keystone.v3.model.Users; public class UsersResource extends GenericResource<User, Users> { - public UsersResource(OpenStackClient client) { - super(client, "/users", User.class, Users.class); - } - - public OpenStackRequest<Services> groups(String userId) { - return CLIENT.get(new StringBuilder(path).append("/").append(userId).append("/groups").toString(), Services.class); - } - - public OpenStackRequest<Services> projects(String userId) { - return CLIENT.get(new StringBuilder(path).append("/").append(userId).append("/projects").toString(), Services.class); - } - - public OpenStackRequest<Services> roles(String userId) { - return CLIENT.get(new StringBuilder(path).append("/").append(userId).append("/roles").toString(), Services.class); - } + public UsersResource(OpenStackClient client) { + super(client, "/users", User.class, Users.class); + } + + public OpenStackRequest<Services> groups(String userId) { + return CLIENT.get(new StringBuilder(path).append("/").append(userId).append("/groups").toString(), Services.class); + } + + public OpenStackRequest<Services> projects(String userId) { + return CLIENT.get(new StringBuilder(path).append("/").append(userId).append("/projects").toString(), Services.class); + } + + public OpenStackRequest<Services> roles(String userId) { + return CLIENT.get(new StringBuilder(path).append("/").append(userId).append("/roles").toString(), Services.class); + } } |