@Override public String getResourceSetPermissionTicketByConfigurationCode( String configurationCode, String clientDn) { final ResourceSetPermission permission = getResourceSetPermissionByConfigurationCode(configurationCode, clientDn); if (permission != null) { return permission.getTicket(); } return null; }
@Override public void addResourceSetPermission( ResourceSetPermission resourceSetPermission, String clientDn) { try { addBranchIfNeeded(clientDn); resourceSetPermission.setDn(getDn(clientDn, resourceSetPermission.getTicket())); ldapEntryManager.persist(resourceSetPermission); } catch (Exception e) { LOG.trace(e.getMessage(), e); } }
private Response prepareResourceSetPermissionTicketResponse( HttpServletRequest request, ResourceSetPermission resourceSetPermissions) { ResponseBuilder builder = Response.status(Response.Status.CREATED); builder.entity(new ResourceSetPermissionTicket(resourceSetPermissions.getTicket())); // Add location StringBuffer location = request.getRequestURL().append("/").append(resourceSetPermissions.getConfigurationCode()); builder.header("Location", location); return builder.build(); }