public abstract class PrivilegeIndexStore extends Object
Modifier | Constructor and Description |
---|---|
protected |
PrivilegeIndexStore(Subject adminSubject,
String realm) |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(Set<IPrivilege> privileges)
Adds a set of privileges to the data store.
|
abstract void |
delete(Set<IPrivilege> privilege)
Deletes a set of privileges from data store.
|
abstract void |
delete(String privilegeName)
Deletes a privilege from data store.
|
abstract String |
delete(String privilegeName,
boolean notify)
Deletes a privilege from data store.
|
abstract void |
deleteReferral(String privilegeName)
Deletes a referralprivilege from data store.
|
abstract String |
deleteReferral(String privilegeName,
boolean notify)
Deletes a referralprivilege from data store.
|
abstract List<Privilege> |
findAllPolicies()
Finds all policies within the passed realm.
|
abstract List<Privilege> |
findAllPoliciesByApplication(String application)
Finds all policies within the passed realm and application.
|
abstract List<Privilege> |
findAllPoliciesByIdentityUid(String uid)
Finds all policies based on the identity uid, whether user or group uid.
|
protected Subject |
getAdminSubject() |
static PrivilegeIndexStore |
getInstance(Subject adminSubject,
String realm)
Returns an instance of the privilege index store.
|
abstract IPrivilege |
getPrivilege(String privilegeName)
The single requested privilege, found
within the context of this realm.
|
protected String |
getRealm() |
abstract Set<String> |
getReferredResources(String applicationTypeName)
Returns a set of resources that are referred to this realm.
|
abstract boolean |
hasPrivilgesWithApplication(String realm,
String applName) |
abstract Iterator<IPrivilege> |
search(String realm,
ResourceSearchIndexes indexes,
Set<String> subjectIndexes,
boolean bSubTree)
Returns an iterator of matching privilege objects.
|
abstract Set<String> |
searchPrivilegeNames(Set<SearchFilter> filters,
boolean boolAnd,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Returns a set of privilege names that matched a set of search criteria.
|
abstract Set<String> |
searchReferralPrivilegeNames(Set<SearchFilter> filters,
boolean boolAnd,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Returns a set of referral privilege names that matched a set of search
criteria.
|
protected Subject getAdminSubject()
protected String getRealm()
public static PrivilegeIndexStore getInstance(Subject adminSubject, String realm)
adminSubject
- Admin Subject who has the privilege to write to
index datastore.realm
- Realm Name.public abstract void add(Set<IPrivilege> privileges) throws EntitlementException
privileges
- Privileges to be added.EntitlementException
- if addition failed.public abstract void delete(Set<IPrivilege> privilege) throws EntitlementException
privilege
- Privileges to be deleted.EntitlementException
- if deletion
failed.public abstract void delete(String privilegeName) throws EntitlementException
privilegeName
- name of privilege to be deleted.EntitlementException
- if deletion
failed.public abstract void deleteReferral(String privilegeName) throws EntitlementException
privilegeName
- name of privilege to be deleted.EntitlementException
- if deletion
failed.public abstract String deleteReferral(String privilegeName, boolean notify) throws EntitlementException
privilegeName
- name of privilege to be deleted.notify
- true
to notify changes.EntitlementException
- if deletion
failed.public abstract String delete(String privilegeName, boolean notify) throws EntitlementException
privilegeName
- name of privilege to be deleted.notify
- true
to notify changes.EntitlementException
- if deletion
failed.public abstract Iterator<IPrivilege> search(String realm, ResourceSearchIndexes indexes, Set<String> subjectIndexes, boolean bSubTree) throws EntitlementException
realm
- Realm name.indexes
- Resource search indexes.subjectIndexes
- Subject search indexes.bSubTree
- true
for sub tree evaluation.EntitlementException
- if results
cannot be obtained.public abstract IPrivilege getPrivilege(String privilegeName)
privilegeName
- Name of the privilege to return.public abstract Set<String> searchPrivilegeNames(Set<SearchFilter> filters, boolean boolAnd, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws EntitlementException
filters
- Set of search filter (criteria).boolAnd
- true
to be inclusive.numOfEntries
- Number of maximum search entries.sortResults
- true
to have the result sorted.ascendingOrder
- true
to have the result sorted in
ascending order.EntitlementException
- if search failed.public abstract Set<String> searchReferralPrivilegeNames(Set<SearchFilter> filters, boolean boolAnd, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws EntitlementException
filters
- Set of search filter (criteria).boolAnd
- true
to be inclusive.numOfEntries
- Number of maximum search entries.sortResults
- true
to have the result sorted.ascendingOrder
- true
to have the result sorted in
ascending order.EntitlementException
- if search failed.public abstract Set<String> getReferredResources(String applicationTypeName) throws EntitlementException
applicationTypeName
- Application type name,EntitlementException
- if resources cannot be returned.public abstract boolean hasPrivilgesWithApplication(String realm, String applName) throws EntitlementException
EntitlementException
public abstract List<Privilege> findAllPolicies() throws EntitlementException
EntitlementException
- should some error occurpublic abstract List<Privilege> findAllPoliciesByApplication(String application) throws EntitlementException
application
- the applicationEntitlementException
- should some error occurpublic abstract List<Privilege> findAllPoliciesByIdentityUid(String uid) throws EntitlementException
uid
- identity uidEntitlementException
- should some query error occurCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.