|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.repository.basic.AbstractSubjectRepository
org.openpermis.repository.basic.StreamSubjectRepository
public class StreamSubjectRepository
Abstract subject repository that reads attribute certificates from streams.
The stream subject repository manages its own subject map and provides all the necessary methods for concrete implementations.
Implementation classes are expected to populate the subject repository using either
addAttributeCertificate(InputStream)
or
addAttributeCertificate(AttributeCertificate)
.
Field Summary | |
---|---|
private Map<URI,InternalSubject> |
subjectMap
The internal map caching the information loaded from the attribute certificate files. |
Constructor Summary | |
---|---|
StreamSubjectRepository(CertificateVerifier certificateVerifier)
Creates an abstract subject repository and uses the specified certificate verifier to validate the attribute certificates. |
Method Summary | |
---|---|
protected void |
addAttributeCertificate(AttributeCertificate ac)
Adds an attribute certificate to the subject repository. |
protected void |
addAttributeCertificate(InputStream is)
Adds an attribute certificate to the subject repository. |
Subject |
retrieveSubject(URI identity)
Returns a subject whose identity matches the one specified. |
Methods inherited from class org.openpermis.repository.basic.AbstractSubjectRepository |
---|
updateSubjectMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Map<URI,InternalSubject> subjectMap
Constructor Detail |
---|
public StreamSubjectRepository(CertificateVerifier certificateVerifier)
certificateVerifier
- the certificate verifier user to verify the the attribute
certificates, must not be null
.Method Detail |
---|
protected void addAttributeCertificate(InputStream is) throws IOException, NoSuchAlgorithmException, NoSuchProviderException
The input stream passed in is not closed.
is
- the input stream containing the DER encoded attribute certificate,
must not be null
.AttributeCertificate.AttributeCertificate(InputStream)
,
AbstractSubjectRepository.updateSubjectMap(Map, AttributeCertificate)
,
addAttributeCertificate(AttributeCertificate)
IOException
- if there is a read or decoding error.
NoSuchProviderException
- passed on.
NoSuchAlgorithmException
- passed on.protected void addAttributeCertificate(AttributeCertificate ac) throws NoSuchAlgorithmException, NoSuchProviderException
ac
- the attribute certificate to add, must not be null
.AbstractSubjectRepository.updateSubjectMap(Map, AttributeCertificate)
NoSuchProviderException
- passed on.
NoSuchAlgorithmException
- passed on.public Subject retrieveSubject(URI identity) throws SubjectRepositoryException
SubjectRepository
identity
- a URI
that identifies a subject.
Subject
associating a person with her assigned roles. The returned
subject is never null
, but will have no assigned roles for unknown identities.
SubjectRepositoryException
- when the repository fails to retrieve the roles
for the specified identity.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.3.0 (Build 14)
2009/05/08 09:06:22
Copyright (c) 2002-2007 Ergon Informatik AG