Class PermissionFileStore<V extends Permission>

  • 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

    • Field Summary

      • Fields inherited from class edu.uiuc.ncsa.security.storage.FileStore

        indexDirectory, storageDirectory
      • Fields inherited from class edu.uiuc.ncsa.security.storage.IndexedStreamStore

        converter, identifiableProvider, initializer
      • Fields inherited from interface edu.uiuc.ncsa.security.core.Store

        VERSION_TAG
    • 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 interface edu.uiuc.ncsa.security.core.Store

        create, getAll, getXMLConverter, register, remove, save, search, search, search, size, update
    • Constructor Detail

      • PermissionFileStore

        public PermissionFileStore​(File directory,
                                   edu.uiuc.ncsa.security.core.IdentifiableProvider<V> idp,
                                   edu.uiuc.ncsa.security.storage.data.MapConverter<V> cp,
                                   boolean removeEmptyFiles)
      • PermissionFileStore

        public 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 Detail

      • getMostRecent

        public List<V> getMostRecent​(int n,
                                     List<String> attributes)
        Specified by:
        getMostRecent in interface edu.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 interface PermissionsStore<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 interface PermissionsStore<V extends Permission>
        Returns:
      • 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 interface PermissionsStore<V extends Permission>
        Returns:
      • 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 interface PermissionsStore<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 interface PermissionsStore<V extends Permission>
        Returns: