public class PoliciesResource extends GenericResource<Policy, Policies> {
- public PoliciesResource(OpenStackClient client) {
- super(client, "/policies", Policy.class, Policies.class);
- }
+ public PoliciesResource(OpenStackClient client) {
+ super(client, "/policies", Policy.class, Policies.class);
+ }
}
public class ProjectGroupRolesResource extends GenericResource<Role, Roles> {
- public ProjectGroupRolesResource(OpenStackClient client, String path) {
- super(client, path, Role.class, Roles.class);
- }
-
- @Override
- public OpenStackRequest<Role> create(Role one) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public OpenStackRequest<Role> show(String id) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public OpenStackRequest<Role> update(String id, Role one) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public OpenStackRequest<Role> delete(String id) {
- throw new UnsupportedOperationException();
- }
+ public ProjectGroupRolesResource(OpenStackClient client, String path) {
+ super(client, path, Role.class, Roles.class);
+ }
+
+ @Override
+ public OpenStackRequest<Role> create(Role one) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public OpenStackRequest<Role> show(String id) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public OpenStackRequest<Role> update(String id, Role one) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public OpenStackRequest<Role> delete(String id) {
+ throw new UnsupportedOperationException();
+ }
}
import com.woorea.openstack.base.client.OpenStackRequest;
public class ProjectRolesResource {
-
- private final OpenStackClient CLIENT;
-
- private final String PATH;
+
+ private final OpenStackClient CLIENT;
+
+ private final String PATH;
- public ProjectRolesResource(OpenStackClient client, String path) {
- this.CLIENT = client;
- this.PATH = path;
- }
-
- 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 ProjectRolesResource(OpenStackClient client, String path) {
+ this.CLIENT = client;
+ this.PATH = path;
+ }
+
+ 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 class ProjectUserRolesResource extends GenericResource<Role, Roles> {
- public ProjectUserRolesResource(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 ProjectUserRolesResource(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);
+ }
}