@Test public void testGetEffectivePolicies() throws Exception { JackrabbitAccessControlManager delegate = mock(JackrabbitAccessControlManager.class); final Set<Principal> principals = Collections.singleton(EveryonePrincipal.getInstance()); AccessControlPolicy[] policies = new AccessControlPolicy[0]; when(delegate.getEffectivePolicies(principals)).thenReturn(policies); JackrabbitAccessControlManagerFacade facade = getFacade(delegate); assertSame("should return same array", policies, facade.getEffectivePolicies(principals)); }
@Override public AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals) throws RepositoryException { return delegate.getEffectivePolicies(principals); }
JackrabbitAccessControlManagerFacade extends AccessControlManagerFacade<JackrabbitAccessControlManager> implements JackrabbitAccessControlManager { @Override public AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals) throws RepositoryException { return delegate.getEffectivePolicies(principals); } }
JackrabbitAccessControlManagerFacade extends AccessControlManagerFacade<JackrabbitAccessControlManager> implements JackrabbitAccessControlManager { @Override public AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals) throws RepositoryException { return delegate.getEffectivePolicies(principals); } @SuppressWarnings("WeakerAccess")  JackrabbitAccessControlManagerFacade(final @NotNull JackrabbitAccessControlManager delegate); }
JackrabbitAccessControlManagerFacade extends AccessControlManagerFacade<JackrabbitAccessControlManager> implements JackrabbitAccessControlManager { @Override public AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals) throws RepositoryException { return delegate.getEffectivePolicies(principals); } @SuppressWarnings("WeakerAccess")  JackrabbitAccessControlManagerFacade(final @NotNull JackrabbitAccessControlManager delegate); @Override JackrabbitAccessControlPolicy[] getApplicablePolicies(Principal principal); @Override JackrabbitAccessControlPolicy[] getPolicies(Principal principal); @Override AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals); @Override boolean hasPrivileges(String absPath, Set<Principal> principals, Privilege[] privileges); @Override Privilege[] getPrivileges(String absPath, Set<Principal> principals); }
JackrabbitAccessControlManagerFacade extends AccessControlManagerFacade<JackrabbitAccessControlManager> implements JackrabbitAccessControlManager { @Override public AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals) throws RepositoryException { return delegate.getEffectivePolicies(principals); } @SuppressWarnings("WeakerAccess")  JackrabbitAccessControlManagerFacade(final @NotNull JackrabbitAccessControlManager delegate); @Override JackrabbitAccessControlPolicy[] getApplicablePolicies(Principal principal); @Override JackrabbitAccessControlPolicy[] getPolicies(Principal principal); @Override AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals); @Override boolean hasPrivileges(String absPath, Set<Principal> principals, Privilege[] privileges); @Override Privilege[] getPrivileges(String absPath, Set<Principal> principals);  }