summaryrefslogtreecommitdiffstats
path: root/keystone-client/src
diff options
context:
space:
mode:
Diffstat (limited to 'keystone-client/src')
-rw-r--r--keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainUserRolesResource.java20
-rw-r--r--keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainsResource.java22
-rw-r--r--keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/EndpointsResource.java6
-rw-r--r--keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GenericResource.java68
-rw-r--r--keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupUsersResource.java6
-rw-r--r--keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupsResource.java14
6 files changed, 68 insertions, 68 deletions
diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainUserRolesResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainUserRolesResource.java
index af0f7e1..44ffb2d 100644
--- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainUserRolesResource.java
+++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainUserRolesResource.java
@@ -25,16 +25,16 @@ import com.woorea.openstack.keystone.model.Roles;
public class DomainUserRolesResource extends GenericResource<Role, Roles> {
- public DomainUserRolesResource(OpenStackClient client, String path) {
- super(client, path, Role.class, Roles.class);
- }
+ public DomainUserRolesResource(OpenStackClient client, String path) {
+ super(client, path, Role.class, Roles.class);
+ }
- public OpenStackRequest<Void> add(String roleId) {
- return new OpenStackRequest<>(CLIENT, HttpMethod.PUT, new StringBuilder(path).append("/").append(roleId).toString(), Entity.json(""), Void.class);
- }
-
- public OpenStackRequest<Void> remove(String roleId) {
- return new OpenStackRequest<>(CLIENT, HttpMethod.DELETE, new StringBuilder(path).append("/").append(roleId).toString(), null, Void.class);
- }
+ public OpenStackRequest<Void> add(String roleId) {
+ return new OpenStackRequest<>(CLIENT, HttpMethod.PUT, new StringBuilder(path).append("/").append(roleId).toString(), Entity.json(""), Void.class);
+ }
+
+ public OpenStackRequest<Void> remove(String roleId) {
+ return new OpenStackRequest<>(CLIENT, HttpMethod.DELETE, new StringBuilder(path).append("/").append(roleId).toString(), null, Void.class);
+ }
}
diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainsResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainsResource.java
index 9aa01f3..c04aba0 100644
--- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainsResource.java
+++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/DomainsResource.java
@@ -22,16 +22,16 @@ import com.woorea.openstack.keystone.v3.model.Domains;
public class DomainsResource extends GenericResource<Domain, Domains> {
- public DomainsResource(OpenStackClient client) {
- super(client, "/domains", Domain.class, Domains.class);
- }
-
- public DomainUserRolesResource userRoles(String domainId, String userId) {
- return new DomainUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(domainId).append("/users/").append(userId).append("/roles").toString());
- }
-
- public DomainUserRolesResource groupRoles(String domainId, String groupId) {
- return new DomainUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(domainId).append("/groups/").append(groupId).append("/roles").toString());
- }
+ public DomainsResource(OpenStackClient client) {
+ super(client, "/domains", Domain.class, Domains.class);
+ }
+
+ public DomainUserRolesResource userRoles(String domainId, String userId) {
+ return new DomainUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(domainId).append("/users/").append(userId).append("/roles").toString());
+ }
+
+ public DomainUserRolesResource groupRoles(String domainId, String groupId) {
+ return new DomainUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(domainId).append("/groups/").append(groupId).append("/roles").toString());
+ }
}
diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/EndpointsResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/EndpointsResource.java
index 7a7b1bf..4d4d147 100644
--- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/EndpointsResource.java
+++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/EndpointsResource.java
@@ -22,8 +22,8 @@ import com.woorea.openstack.keystone.v3.model.Endpoints;
public class EndpointsResource extends GenericResource<Endpoint, Endpoints> {
- public EndpointsResource(OpenStackClient client) {
- super(client, "/endpoints", Endpoint.class, Endpoints.class);
- }
+ public EndpointsResource(OpenStackClient client) {
+ super(client, "/endpoints", Endpoint.class, Endpoints.class);
+ }
}
diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GenericResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GenericResource.java
index 30c915c..c27ab8b 100644
--- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GenericResource.java
+++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GenericResource.java
@@ -23,38 +23,38 @@ import com.woorea.openstack.base.client.OpenStackRequest;
public class GenericResource<One, Many> {
- protected final OpenStackClient CLIENT;
-
- protected CharSequence path;
-
- protected Class<One> oneClass;
- protected Class<Many> manyClass;
-
- public GenericResource(OpenStackClient client, CharSequence path, Class<One> oneClass, Class<Many> manyClass) {
- CLIENT = client;
- this.path = path;
- this.oneClass = oneClass;
- this.manyClass = manyClass;
- }
-
- public OpenStackRequest<Many> list() {
- return new OpenStackRequest<>(CLIENT, HttpMethod.GET, path, null, manyClass);
- }
-
- public OpenStackRequest<One> create(One one) {
- return new OpenStackRequest<>(CLIENT, HttpMethod.POST, path, Entity.json(one), oneClass);
- }
-
- public OpenStackRequest<One> show(String id) {
- return new OpenStackRequest<>(CLIENT, HttpMethod.GET, new StringBuilder(path).append("/").append(id).toString(), null, oneClass);
- }
-
- public OpenStackRequest<One> update(String id, One one) {
- return new OpenStackRequest<>(CLIENT, HttpMethod.PATCH, new StringBuilder(path).append("/").append(id).toString(), Entity.json(one), oneClass);
- }
-
- public OpenStackRequest<One> delete(String id) {
- return new OpenStackRequest<>(CLIENT, HttpMethod.DELETE, new StringBuilder(path).append("/").append(id).toString(), null, oneClass);
- }
-
+ protected final OpenStackClient CLIENT;
+
+ protected CharSequence path;
+
+ protected Class<One> oneClass;
+ protected Class<Many> manyClass;
+
+ public GenericResource(OpenStackClient client, CharSequence path, Class<One> oneClass, Class<Many> manyClass) {
+ CLIENT = client;
+ this.path = path;
+ this.oneClass = oneClass;
+ this.manyClass = manyClass;
+ }
+
+ public OpenStackRequest<Many> list() {
+ return new OpenStackRequest<>(CLIENT, HttpMethod.GET, path, null, manyClass);
+ }
+
+ public OpenStackRequest<One> create(One one) {
+ return new OpenStackRequest<>(CLIENT, HttpMethod.POST, path, Entity.json(one), oneClass);
+ }
+
+ public OpenStackRequest<One> show(String id) {
+ return new OpenStackRequest<>(CLIENT, HttpMethod.GET, new StringBuilder(path).append("/").append(id).toString(), null, oneClass);
+ }
+
+ public OpenStackRequest<One> update(String id, One one) {
+ return new OpenStackRequest<>(CLIENT, HttpMethod.PATCH, new StringBuilder(path).append("/").append(id).toString(), Entity.json(one), oneClass);
+ }
+
+ public OpenStackRequest<One> delete(String id) {
+ return new OpenStackRequest<>(CLIENT, HttpMethod.DELETE, new StringBuilder(path).append("/").append(id).toString(), null, oneClass);
+ }
+
}
diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupUsersResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupUsersResource.java
index 45da3a6..efcf7d0 100644
--- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupUsersResource.java
+++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupUsersResource.java
@@ -23,8 +23,8 @@ import com.woorea.openstack.keystone.v3.model.Users;
public class GroupUsersResource extends GenericResource<User, Users> {
- public GroupUsersResource(OpenStackClient client, String path) {
- super(client, path, User.class, Users.class);
- }
+ public GroupUsersResource(OpenStackClient client, String path) {
+ super(client, path, User.class, Users.class);
+ }
}
diff --git a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupsResource.java b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupsResource.java
index 7c35825..c3b760f 100644
--- a/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupsResource.java
+++ b/keystone-client/src/main/java/com/woorea/openstack/keystone/v3/api/GroupsResource.java
@@ -22,12 +22,12 @@ import com.woorea.openstack.keystone.v3.model.Groups;
public class GroupsResource extends GenericResource<Group, Groups> {
- public GroupsResource(OpenStackClient client) {
- super(client, "/groups", Group.class, Groups.class);
- }
-
- public DomainUserRolesResource userRoles(String domainId, String userId) {
- return new DomainUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(domainId).append("/users/").append(userId).append("/roles").toString());
- }
+ public GroupsResource(OpenStackClient client) {
+ super(client, "/groups", Group.class, Groups.class);
+ }
+
+ public DomainUserRolesResource userRoles(String domainId, String userId) {
+ return new DomainUserRolesResource(CLIENT, new StringBuilder(path).append("/").append(domainId).append("/users/").append(userId).append("/roles").toString());
+ }
}