@Test public void test() { assertNotNull("Configurer not wired", configurer); Map<String, String> list = configurer.getList(); assertNotNull("Configurer has null list", list); assertThat("Configurer has no data", list.entrySet(), not(empty())); ConfigurableAclService.Builder b = ConfigurableAclService.builder(); configurer.configure(b); Map<String, AclSource> acls = b.getAcls(); assertNotNull("No acl for container type", acls.get(AclUtils.toId(SecuredType.CONTAINER.typeId()))); AclSource syscont = acls.get(AclUtils.toId(SecuredType.CONTAINER.id("syscont"))); assertNotNull("No acl for syscont container", syscont); assertEquals(new TenantPrincipalSid("user", "root"), syscont.getOwner()); List<AceSource> entries = syscont.getEntries(); assertThat(entries, hasSize(2)); AceSource ace = entries.get(1); assertEquals(false, ace.isGranting()); assertEquals(PermissionData.from(Action.DELETE), ace.getPermission()); assertEquals(new TenantGrantedAuthoritySid("ROLE_USER", "root"), ace.getSid()); }
@Override public void configure(ConfigurableAclService.Builder builder) { if(list != null) { for(Map.Entry<String, String> e: list.entrySet()) { String value = e.getValue(); String id = e.getKey(); AclSource.Builder asb = parse(id, value); builder.putAcl(asb.build()); } } }
PropertyAclServiceConfigurer implements AclServiceConfigurer { @Override public void configure(ConfigurableAclService.Builder builder) { if(list != null) { for(Map.Entry<String, String> e: list.entrySet()) { String value = e.getValue(); String id = e.getKey(); AclSource.Builder asb = parse(id, value); builder.putAcl(asb.build()); } } } }
PropertyAclServiceConfigurer implements AclServiceConfigurer { @Override public void configure(ConfigurableAclService.Builder builder) { if(list != null) { for(Map.Entry<String, String> e: list.entrySet()) { String value = e.getValue(); String id = e.getKey(); AclSource.Builder asb = parse(id, value); builder.putAcl(asb.build()); } } }  }
PropertyAclServiceConfigurer implements AclServiceConfigurer { @Override public void configure(ConfigurableAclService.Builder builder) { if(list != null) { for(Map.Entry<String, String> e: list.entrySet()) { String value = e.getValue(); String id = e.getKey(); AclSource.Builder asb = parse(id, value); builder.putAcl(asb.build()); } } }  @Override void configure(ConfigurableAclService.Builder builder); }
PropertyAclServiceConfigurer implements AclServiceConfigurer { @Override public void configure(ConfigurableAclService.Builder builder) { if(list != null) { for(Map.Entry<String, String> e: list.entrySet()) { String value = e.getValue(); String id = e.getKey(); AclSource.Builder asb = parse(id, value); builder.putAcl(asb.build()); } } }  @Override void configure(ConfigurableAclService.Builder builder);  }