@Test public void createAuthorizationLetsCreatesANewAuthorizationForTheUserVreAndRole() throws Exception { instance.createAuthorization(VRE_ID, userWithPid(USER_PID), UserRoles.USER_ROLE); verify(authorizationAccess).getOrCreateAuthorization(VRE_ID, USER_PID, UserRoles.USER_ROLE); }
@Override public void createAuthorization(String vreId, User user, String vreRole) throws AuthorizationCreationException { try { authorizationAccess.getOrCreateAuthorization(vreId, user.getPersistentId(), vreRole); } catch (AuthorizationUnavailableException e) { throw new AuthorizationCreationException(e); } }
JsonBasedAuthorizer implements VreAuthorizationCrud { @Override public void createAuthorization(String vreId, User user, String vreRole) throws AuthorizationCreationException { try { authorizationAccess.getOrCreateAuthorization(vreId, user.getPersistentId(), vreRole); } catch (AuthorizationUnavailableException e) { throw new AuthorizationCreationException(e); } } }
JsonBasedAuthorizer implements VreAuthorizationCrud { @Override public void createAuthorization(String vreId, User user, String vreRole) throws AuthorizationCreationException { try { authorizationAccess.getOrCreateAuthorization(vreId, user.getPersistentId(), vreRole); } catch (AuthorizationUnavailableException e) { throw new AuthorizationCreationException(e); } } JsonBasedAuthorizer(VreAuthorizationAccess authorizationAccess); }
JsonBasedAuthorizer implements VreAuthorizationCrud { @Override public void createAuthorization(String vreId, User user, String vreRole) throws AuthorizationCreationException { try { authorizationAccess.getOrCreateAuthorization(vreId, user.getPersistentId(), vreRole); } catch (AuthorizationUnavailableException e) { throw new AuthorizationCreationException(e); } } JsonBasedAuthorizer(VreAuthorizationAccess authorizationAccess); @Override Optional<VreAuthorization> getAuthorization(String vreId, User user); @Override void createAuthorization(String vreId, User user, String vreRole); @Override void deleteVreAuthorizations(String vreId); }
JsonBasedAuthorizer implements VreAuthorizationCrud { @Override public void createAuthorization(String vreId, User user, String vreRole) throws AuthorizationCreationException { try { authorizationAccess.getOrCreateAuthorization(vreId, user.getPersistentId(), vreRole); } catch (AuthorizationUnavailableException e) { throw new AuthorizationCreationException(e); } } JsonBasedAuthorizer(VreAuthorizationAccess authorizationAccess); @Override Optional<VreAuthorization> getAuthorization(String vreId, User user); @Override void createAuthorization(String vreId, User user, String vreRole); @Override void deleteVreAuthorizations(String vreId);  }