Class PermissionFileStore<V extends Permission>
- java.lang.Object
-
- edu.uiuc.ncsa.security.storage.IndexedStreamStore<V>
-
- edu.uiuc.ncsa.security.storage.FileStore<V>
-
- org.oa4mp.server.api.permissions.admin.PermissionFileStore<V>
-
- All Implemented Interfaces:
PermissionsStore<V>
,edu.uiuc.ncsa.security.core.Store<V>
,Map<edu.uiuc.ncsa.security.core.Identifier,V>
public class PermissionFileStore<V extends Permission> extends edu.uiuc.ncsa.security.storage.FileStore<V> implements PermissionsStore<V>
Created by Jeff Gaynor
on 10/11/16 at 1:57 PM
-
-
Constructor Summary
Constructors Constructor Description PermissionFileStore(File directory, edu.uiuc.ncsa.security.core.IdentifiableProvider<V> idp, edu.uiuc.ncsa.security.storage.data.MapConverter<V> cp, boolean removeEmptyFiles)
PermissionFileStore(File storeDirectory, File indexDirectory, edu.uiuc.ncsa.security.core.IdentifiableProvider<V> identifiableProvider, edu.uiuc.ncsa.security.storage.data.MapConverter<V> converter, boolean removeEmptyFiles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PermissionList
get(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Retrieve a permission from the admin and client identifier.List<edu.uiuc.ncsa.security.core.Identifier>
getAdmins(edu.uiuc.ncsa.security.core.Identifier clientID)
A list of all admin ids for a given client.int
getClientCount(edu.uiuc.ncsa.security.core.Identifier adminID)
List<edu.uiuc.ncsa.security.core.Identifier>
getClients(edu.uiuc.ncsa.security.core.Identifier adminID)
A list of all identifiers that a given admin can manage.Permission
getErsatzChain(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID, edu.uiuc.ncsa.security.core.Identifier ersatzID)
Get the specific permission with the chain starting with clientID and ending with ersatzID.PermissionList
getErsatzChains(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Returns the chain of ersatz clients for a given admin and provisioning client.List<V>
getMostRecent(int n, List<String> attributes)
PermissionList
getProvisioners(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier ersatzID)
boolean
hasEntry(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Returns whether or not there is an entry for this pair of identifiers.-
Methods inherited from class edu.uiuc.ncsa.security.storage.FileStore
checkPermissions, clear, containsKey, containsValue, create, createIndexEntry, delete, doSetup, entrySet, get, getAll, getIndexEntry, getItemFile, getItemFile, getMapConverter, getXMLConverter, keySet, loadByIdentifier, loadFile, loadFromIndex, putAll, realRemove, realSave, register, remove, remove, removeIndexEntry, save, search, search, search, size, size, toString, update, values
-
Methods inherited from class edu.uiuc.ncsa.security.storage.IndexedStreamStore
createIndexEntry, getCreatedItems, hashString, isEmpty, loadStream, put, put
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Methods inherited from interface edu.uiuc.ncsa.myproxy.oa4mp.server.admin.permissions.PermissionsStore
getMapConverter
-
-
-
-
Method Detail
-
getMostRecent
public List<V> getMostRecent(int n, List<String> attributes)
- Specified by:
getMostRecent
in interfaceedu.uiuc.ncsa.security.core.Store<V extends Permission>
-
getAdmins
public List<edu.uiuc.ncsa.security.core.Identifier> getAdmins(edu.uiuc.ncsa.security.core.Identifier clientID)
Description copied from interface:PermissionsStore
A list of all admin ids for a given client.- Specified by:
getAdmins
in interfacePermissionsStore<V extends Permission>
- Returns:
-
getClients
public List<edu.uiuc.ncsa.security.core.Identifier> getClients(edu.uiuc.ncsa.security.core.Identifier adminID)
Description copied from interface:PermissionsStore
A list of all identifiers that a given admin can manage.- Specified by:
getClients
in interfacePermissionsStore<V extends Permission>
- Returns:
-
getClientCount
public int getClientCount(edu.uiuc.ncsa.security.core.Identifier adminID)
- Specified by:
getClientCount
in interfacePermissionsStore<V extends Permission>
-
get
public PermissionList get(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Description copied from interface:PermissionsStore
Retrieve a permission from the admin and client identifier.- Specified by:
get
in interfacePermissionsStore<V extends Permission>
- Returns:
-
getErsatzChains
public PermissionList getErsatzChains(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Description copied from interface:PermissionsStore
Returns the chain of ersatz clients for a given admin and provisioning client. Access the list usingPermission.getErsatzChain()
.- Specified by:
getErsatzChains
in interfacePermissionsStore<V extends Permission>
- Returns:
-
getProvisioners
public PermissionList getProvisioners(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier ersatzID)
- Specified by:
getProvisioners
in interfacePermissionsStore<V extends Permission>
-
hasEntry
public boolean hasEntry(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID)
Description copied from interface:PermissionsStore
Returns whether or not there is an entry for this pair of identifiers. There is at most one permission for any such pair- Specified by:
hasEntry
in interfacePermissionsStore<V extends Permission>
- Returns:
-
getErsatzChain
public Permission getErsatzChain(edu.uiuc.ncsa.security.core.Identifier adminID, edu.uiuc.ncsa.security.core.Identifier clientID, edu.uiuc.ncsa.security.core.Identifier ersatzID)
Description copied from interface:PermissionsStore
Get the specific permission with the chain starting with clientID and ending with ersatzID.- Specified by:
getErsatzChain
in interfacePermissionsStore<V extends Permission>
- Returns:
-
-