@Override public void set(File file, String view, String attribute, Object value, boolean create) { if (attribute.equals("acl")) { checkNotCreate(view, attribute, create); file.setAttribute("acl", "acl", toAcl(checkType(view, attribute, value, List.class))); } }
@Override public ImmutableMap<String, ?> defaultValues(Map<String, ?> userProvidedDefaults) { Object userProvidedAcl = userProvidedDefaults.get("acl:acl"); ImmutableList<AclEntry> acl = DEFAULT_ACL; if (userProvidedAcl != null) { acl = toAcl(checkType("acl", "acl", userProvidedAcl, List.class)); } return ImmutableMap.of("acl:acl", acl); }
@Override public ImmutableMap<String, ?> defaultValues(Map<String, ?> userProvidedDefaults) { Object userProvidedAcl = userProvidedDefaults.get("acl:acl"); ImmutableList<AclEntry> acl = DEFAULT_ACL; if (userProvidedAcl != null) { acl = toAcl(checkType("acl", "acl", userProvidedAcl, List.class)); } return ImmutableMap.of("acl:acl", acl); }
@Override public void set(File file, String view, String attribute, Object value, boolean create) { if (attribute.equals("acl")) { checkNotCreate(view, attribute, create); file.setAttribute("acl", "acl", toAcl(checkType(view, attribute, value, List.class))); } }