@Test public void cacheAuthorizedAction() throws Exception { Item item = Mockito.mock(Item.class); when(item.getID()).thenReturn(UUID.randomUUID()); readOnlyCache.cacheAuthorizedAction(item, Constants.READ, ePerson, true); readOnlyCache.cacheAuthorizedAction(item, Constants.WRITE, ePerson, false); assertTrue(readOnlyCache.getCachedAuthorizationResult(item, Constants.READ, ePerson)); assertFalse(readOnlyCache.getCachedAuthorizationResult(item, Constants.WRITE, ePerson)); assertNull(readOnlyCache.getCachedAuthorizationResult(item, Constants.ADMIN, ePerson)); assertNull(readOnlyCache.getCachedAuthorizationResult(item, Constants.READ, null)); assertNull(readOnlyCache.getCachedAuthorizationResult(null, Constants.READ, ePerson)); }
public void cacheAuthorizedAction(DSpaceObject dspaceObject, int action, EPerson eperson, Boolean result) { authorizedActionsCache.put(buildAuthorizedActionKey(dspaceObject, action, eperson), result); }
ContextReadOnlyCache { public void cacheAuthorizedAction(DSpaceObject dspaceObject, int action, EPerson eperson, Boolean result) { authorizedActionsCache.put(buildAuthorizedActionKey(dspaceObject, action, eperson), result); } }
ContextReadOnlyCache { public void cacheAuthorizedAction(DSpaceObject dspaceObject, int action, EPerson eperson, Boolean result) { authorizedActionsCache.put(buildAuthorizedActionKey(dspaceObject, action, eperson), result); }  }
ContextReadOnlyCache { public void cacheAuthorizedAction(DSpaceObject dspaceObject, int action, EPerson eperson, Boolean result) { authorizedActionsCache.put(buildAuthorizedActionKey(dspaceObject, action, eperson), result); }  Boolean getCachedAuthorizationResult(DSpaceObject dspaceObject, int action, EPerson eperson); void cacheAuthorizedAction(DSpaceObject dspaceObject, int action, EPerson eperson, Boolean result); Boolean getCachedGroupMembership(Group group, EPerson eperson); void cacheGroupMembership(Group group, EPerson eperson, Boolean isMember); void cacheAllMemberGroupsSet(EPerson ePerson, Set<Group> groups); Set<Group> getCachedAllMemberGroupsSet(EPerson ePerson); void clear(); }
ContextReadOnlyCache { public void cacheAuthorizedAction(DSpaceObject dspaceObject, int action, EPerson eperson, Boolean result) { authorizedActionsCache.put(buildAuthorizedActionKey(dspaceObject, action, eperson), result); }  Boolean getCachedAuthorizationResult(DSpaceObject dspaceObject, int action, EPerson eperson); void cacheAuthorizedAction(DSpaceObject dspaceObject, int action, EPerson eperson, Boolean result); Boolean getCachedGroupMembership(Group group, EPerson eperson); void cacheGroupMembership(Group group, EPerson eperson, Boolean isMember); void cacheAllMemberGroupsSet(EPerson ePerson, Set<Group> groups); Set<Group> getCachedAllMemberGroupsSet(EPerson ePerson); void clear();  }