Class PermissionMemoryStore<V extends Permission>

    • Constructor Detail

      • PermissionMemoryStore

        public PermissionMemoryStore​(edu.uiuc.ncsa.security.core.IdentifiableProvider<V> identifiableProvider)
    • 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:
      • 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:
      • 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:
      • addToClients

        protected void addToClients​(V p)
      • addToAdmins

        protected void addToAdmins​(V p)
      • clear

        public void clear()
        Specified by:
        clear in interface Map<edu.uiuc.ncsa.security.core.Identifier,​V extends Permission>
        Overrides:
        clear in class HashMap<edu.uiuc.ncsa.security.core.Identifier,​V extends Permission>
      • removeFromClients

        protected void removeFromClients​(V p)
      • removeFromAdmins

        protected void removeFromAdmins​(V p)
        Part of the contract for this store is that saving a permission with an updated ID (AC or client) should remove the old value, which means we have to clean out stale entries from the clientMpa and adminMap. The problem with a memory store is that the permission
        Parameters:
        p -
      • put

        public V put​(edu.uiuc.ncsa.security.core.Identifier key,
                     V value2)
        Specified by:
        put in interface Map<edu.uiuc.ncsa.security.core.Identifier,​V extends Permission>
        Overrides:
        put in class HashMap<edu.uiuc.ncsa.security.core.Identifier,​V extends Permission>
      • getXMLConverter

        public edu.uiuc.ncsa.security.core.XMLConverter<V> getXMLConverter()
        Specified by:
        getXMLConverter in interface edu.uiuc.ncsa.security.core.Store<V extends Permission>