@Test public void testIsJwalaAuthorizationEnabled() throws Exception { Response response = cut.isJwalaAuthorizationEnabled(); ApplicationResponse applicationResponse = (ApplicationResponse) response.getEntity(); Object content = applicationResponse.getApplicationResponseContent(); assertEquals(content, AdminServiceRestImpl.JSON_RESPONSE_TRUE); System.setProperty("jwala.authorization", "false"); }
@Override public Response isJwalaAuthorizationEnabled() { String auth = ApplicationProperties.get(JWALA_AUTHORIZATION, "true"); if("false".equals(auth)) return ResponseBuilder.ok(JSON_RESPONSE_FALSE); else return ResponseBuilder.ok(JSON_RESPONSE_TRUE); }
AdminServiceRestImpl implements AdminServiceRest { @Override public Response isJwalaAuthorizationEnabled() { String auth = ApplicationProperties.get(JWALA_AUTHORIZATION, "true"); if("false".equals(auth)) return ResponseBuilder.ok(JSON_RESPONSE_FALSE); else return ResponseBuilder.ok(JSON_RESPONSE_TRUE); } }
AdminServiceRestImpl implements AdminServiceRest { @Override public Response isJwalaAuthorizationEnabled() { String auth = ApplicationProperties.get(JWALA_AUTHORIZATION, "true"); if("false".equals(auth)) return ResponseBuilder.ok(JSON_RESPONSE_FALSE); else return ResponseBuilder.ok(JSON_RESPONSE_TRUE); } AdminServiceRestImpl(FilesConfiguration theFilesConfiguration, ResourceService resourceService); }
AdminServiceRestImpl implements AdminServiceRest { @Override public Response isJwalaAuthorizationEnabled() { String auth = ApplicationProperties.get(JWALA_AUTHORIZATION, "true"); if("false".equals(auth)) return ResponseBuilder.ok(JSON_RESPONSE_FALSE); else return ResponseBuilder.ok(JSON_RESPONSE_TRUE); } AdminServiceRestImpl(FilesConfiguration theFilesConfiguration, ResourceService resourceService); @Override Response reload(); @Override Response view(); @Override Response encrypt(String cleartext); @Override Response manifest(ServletContext context); @Override Response isJwalaAuthorizationEnabled(); @Override Response getAuthorizationDetails(); }
AdminServiceRestImpl implements AdminServiceRest { @Override public Response isJwalaAuthorizationEnabled() { String auth = ApplicationProperties.get(JWALA_AUTHORIZATION, "true"); if("false".equals(auth)) return ResponseBuilder.ok(JSON_RESPONSE_FALSE); else return ResponseBuilder.ok(JSON_RESPONSE_TRUE); } AdminServiceRestImpl(FilesConfiguration theFilesConfiguration, ResourceService resourceService); @Override Response reload(); @Override Response view(); @Override Response encrypt(String cleartext); @Override Response manifest(ServletContext context); @Override Response isJwalaAuthorizationEnabled(); @Override Response getAuthorizationDetails(); static final String JSON_RESPONSE_TRUE; static final String JSON_RESPONSE_FALSE; }