@Test public void testGetAndSetAccessControl() throws Exception { AccessSummary summary = client().resource("/v1/access").get(AccessSummary.class); assertTrue(summary.isLocationProvisioningAllowed()); ClientResponse response = client().resource( "/v1/access/locationProvisioningAllowed") .queryParam("allowed", "false") .post(ClientResponse.class); assertEquals(response.getStatus(), Response.Status.OK.getStatusCode()); AccessSummary summary2 = client().resource("/v1/access").get(AccessSummary.class); assertFalse(summary2.isLocationProvisioningAllowed()); ClientResponse response2 = client().resource( "/v1/access/locationProvisioningAllowed") .queryParam("allowed", "true") .post(ClientResponse.class); assertEquals(response2.getStatus(), Response.Status.OK.getStatusCode()); AccessSummary summary3 = client().resource("/v1/access").get(AccessSummary.class); assertTrue(summary3.isLocationProvisioningAllowed()); }
@Override public AccessSummary get() { AccessManager accessManager = ((ManagementContextInternal) mgmt()).getAccessManager(); return AccessTransformer.accessSummary(accessManager); }
AccessResource extends AbstractBrooklynRestResource implements AccessApi { @Override public AccessSummary get() { AccessManager accessManager = ((ManagementContextInternal) mgmt()).getAccessManager(); return AccessTransformer.accessSummary(accessManager); } }
AccessResource extends AbstractBrooklynRestResource implements AccessApi { @Override public AccessSummary get() { AccessManager accessManager = ((ManagementContextInternal) mgmt()).getAccessManager(); return AccessTransformer.accessSummary(accessManager); }  }
AccessResource extends AbstractBrooklynRestResource implements AccessApi { @Override public AccessSummary get() { AccessManager accessManager = ((ManagementContextInternal) mgmt()).getAccessManager(); return AccessTransformer.accessSummary(accessManager); }  @Override AccessSummary get(); @Override Response locationProvisioningAllowed(boolean allowed); }
AccessResource extends AbstractBrooklynRestResource implements AccessApi { @Override public AccessSummary get() { AccessManager accessManager = ((ManagementContextInternal) mgmt()).getAccessManager(); return AccessTransformer.accessSummary(accessManager); }  @Override AccessSummary get(); @Override Response locationProvisioningAllowed(boolean allowed);  }