org.openpermis.repository.basic
Class AbstractSubjectRepository

java.lang.Object
  extended by org.openpermis.repository.basic.AbstractSubjectRepository
All Implemented Interfaces:
SubjectRepository
Direct Known Subclasses:
LdapSubjectRepository, StreamSubjectRepository

public abstract class AbstractSubjectRepository
extends Object
implements SubjectRepository

An abstract subject repository with all code used (or usable) by subclasses.

Since:
0.1.0

Constructor Summary
protected AbstractSubjectRepository(CertificateVerifier certificateVerifier)
          Creates an abstract subject repository and uses the specified certificate verifier to validate the attribute certificates.
 
Method Summary
protected  void updateSubjectMap(Map<URI,InternalSubject> subjectsByIdentity, AttributeCertificate certificate)
          Updates the specified subject-by-identity map by processing the specified attribute certificate and assigning roles to all affected subjects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openpermis.repository.SubjectRepository
retrieveSubject
 

Constructor Detail

AbstractSubjectRepository

protected AbstractSubjectRepository(CertificateVerifier certificateVerifier)
Creates an abstract subject repository and uses the specified certificate verifier to validate the attribute certificates.

Parameters:
certificateVerifier - The certificate verifier user to verify the the attribute certificates. Must not be null.
Since:
0.3.0
Method Detail

updateSubjectMap

protected void updateSubjectMap(Map<URI,InternalSubject> subjectsByIdentity,
                                AttributeCertificate certificate)
                         throws NoSuchAlgorithmException,
                                NoSuchProviderException
Updates the specified subject-by-identity map by processing the specified attribute certificate and assigning roles to all affected subjects. If a subject does not yet exist, it is created and stored in the map. This method does not synchronize anything. Thus, if a subclass intends to be thread-safe, it must itself lock the map accordingly.

Parameters:
subjectsByIdentity - A map storing subjects by their identities. Must not be null.
certificate - The attribute certificate to process. May be null.
Throws:
NoSuchAlgorithmException
NoSuchProviderException
Since:
0.1.0


PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:14:49
Copyright (c) 2002-2007 Ergon Informatik AG