@ParametersAreNonnullByDefault public abstract class AclFileAttributesProvider extends FileAttributesProvider implements AclFileAttributeView
"acl"
file attribute view
By default, the list of provided ACLs is empty.
AclFileAttributeView
Modifier | Constructor and Description |
---|---|
protected |
AclFileAttributesProvider() |
Modifier and Type | Method and Description |
---|---|
List<AclEntry> |
getAcl() |
Map<String,Object> |
getAllAttributes()
Get all attributes for this view
|
Object |
getAttributeByName(String name)
Get an attribute value by name
|
void |
setAcl(List<AclEntry> acl) |
void |
setAttributeByName(String name,
Object value)
Set one attribute by name
|
void |
setOwner(UserPrincipal owner) |
name
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
name
getOwner
protected AclFileAttributesProvider() throws IOException
IOException
public List<AclEntry> getAcl() throws IOException
getAcl
in interface AclFileAttributeView
IOException
public void setOwner(UserPrincipal owner) throws IOException
setOwner
in interface FileOwnerAttributeView
IOException
public void setAcl(List<AclEntry> acl) throws IOException
setAcl
in interface AclFileAttributeView
IOException
public final void setAttributeByName(String name, Object value) throws IOException
FileAttributesProvider
setAttributeByName
in class FileAttributesProvider
name
- the name of the attributevalue
- the value of the attributeIOException
- I/O error when trying to set the attributeReadOnlyAttributeException
- the attribute is read only@Nullable public final Object getAttributeByName(String name) throws IOException
FileAttributesProvider
getAttributeByName
in class FileAttributesProvider
name
- the name of the attributeIOException
- I/O error when trying to set the attribute@Nonnull public final Map<String,Object> getAllAttributes() throws IOException
FileAttributesProvider
The returned map will have the attribute names as keys and their
values as values. The returned map must be immutable (use
Collections.unmodifiableMap(Map)
for instance).
The order of keys in the returned map is not guaranteed.
getAllAttributes
in class FileAttributesProvider
IOException
- failure to read one or more attributes