@Test public void testEncrypt() { Response response = cut.encrypt(""); assertEquals(Response.Status.NO_CONTENT.getStatusCode(), response.getStatus()); response = cut.encrypt("encrypt me"); assertNotNull(response.getEntity()); }
@Override public Response encrypt(String cleartext) { if (cleartext == null || cleartext.trim().length() == 0) { return Response.status(Response.Status.NO_CONTENT).build(); } else { return ResponseBuilder.ok(resourceService.encryptUsingPlatformBean(cleartext)); } }
AdminServiceRestImpl implements AdminServiceRest { @Override public Response encrypt(String cleartext) { if (cleartext == null || cleartext.trim().length() == 0) { return Response.status(Response.Status.NO_CONTENT).build(); } else { return ResponseBuilder.ok(resourceService.encryptUsingPlatformBean(cleartext)); } } }
AdminServiceRestImpl implements AdminServiceRest { @Override public Response encrypt(String cleartext) { if (cleartext == null || cleartext.trim().length() == 0) { return Response.status(Response.Status.NO_CONTENT).build(); } else { return ResponseBuilder.ok(resourceService.encryptUsingPlatformBean(cleartext)); } } AdminServiceRestImpl(FilesConfiguration theFilesConfiguration, ResourceService resourceService); }
AdminServiceRestImpl implements AdminServiceRest { @Override public Response encrypt(String cleartext) { if (cleartext == null || cleartext.trim().length() == 0) { return Response.status(Response.Status.NO_CONTENT).build(); } else { return ResponseBuilder.ok(resourceService.encryptUsingPlatformBean(cleartext)); } } 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 encrypt(String cleartext) { if (cleartext == null || cleartext.trim().length() == 0) { return Response.status(Response.Status.NO_CONTENT).build(); } else { return ResponseBuilder.ok(resourceService.encryptUsingPlatformBean(cleartext)); } } 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; }