public interface SubjectReference
SubjectReferences should be used when a subject needs to be represented, but the backing Subject is not needed.
SubjectReferences are unique to a given PermissionService, and will not resolve to the correct service if the provider changes.
Note that implementations of this interface should be capable of resolving the reference to a real subject.
Instances can be obtained using
PermissionService.newSubjectReference(String, String)
,
SubjectCollection.newSubjectReference(String)
or
Subject.asSubjectReference()
.
Modifier and Type | Method and Description |
---|---|
String |
getCollectionIdentifier()
Gets the identifier of the collection containing the subject
being referenced.
|
String |
getSubjectIdentifier()
Gets the identifier of the subject.
|
CompletableFuture<Subject> |
resolve()
Resolves and returns the Subject being referenced.
|
String getCollectionIdentifier()
String getSubjectIdentifier()
CompletableFuture<Subject> resolve()
The returned future will complete exceptionally if the subject collection with the given identifier cannot be loaded.