public class SecurePermissionStorage extends Object implements PermissionStorage, PrivilegedExceptionAction<String[]>
Constructor and Description |
---|
SecurePermissionStorage(PermissionStorage storage) |
Modifier and Type | Method and Description |
---|---|
String[] |
getConditionalPermissionInfos()
Returns the persistent array of encoded ConditionalPermissionInfo strings
|
String[] |
getLocations()
Returns the locations that have permission data assigned to them,
that is, locations for which permission data
exists in persistent storage.
|
String[] |
getPermissionData(String loc)
Gets the permission data assigned to the specified
location.
|
String[] |
run() |
void |
saveConditionalPermissionInfos(String[] updatedInfos)
Persists the array of encoded ConditionalPermissionInfo strings
|
void |
setPermissionData(String location,
String[] data)
Assigns the specified permission data to the specified
location.
|
public SecurePermissionStorage(PermissionStorage storage)
public String[] run() throws IOException
run
in interface PrivilegedExceptionAction<String[]>
IOException
public String[] getPermissionData(String loc) throws IOException
PermissionStorage
getPermissionData
in interface PermissionStorage
loc
- The location whose permission data is to
be returned.
The location can be null for the default permission data.IOException
- If a failure occurs accessing persistent storage.public String[] getLocations() throws IOException
PermissionStorage
getLocations
in interface PermissionStorage
IOException
- If a failure occurs accessing persistent storage.public void setPermissionData(String location, String[] data) throws IOException
PermissionStorage
setPermissionData
in interface PermissionStorage
location
- The location that will be assigned the
permissions.
The location can be null for the default permission data.data
- The permission data to be assigned, or null
if the specified location is to be removed from persistent storaqe.IOException
- If a failure occurs modifying persistent storage.public void saveConditionalPermissionInfos(String[] updatedInfos) throws IOException
PermissionStorage
saveConditionalPermissionInfos
in interface PermissionStorage
updatedInfos
- an array of encoded ConditionalPermissionInfo stringsIOException
- If a failure occurs modifying persistent storage.public String[] getConditionalPermissionInfos() throws IOException
PermissionStorage
getConditionalPermissionInfos
in interface PermissionStorage
IOException
- If a failure occurs accessing persistent storage.Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.