public class OpenSSOIndexStore extends PrivilegeIndexStore
Modifier and Type | Class and Description |
---|---|
class |
OpenSSOIndexStore.SearchTask |
Constructor and Description |
---|
OpenSSOIndexStore(Subject adminSubject,
String realm)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Set<IPrivilege> privileges)
Adds a set of privileges to the data store.
|
void |
delete(Set<IPrivilege> privileges)
Deletes a privilege from data store.
|
void |
delete(String privilegeName)
Deletes a set of privileges from data store.
|
String |
delete(String privilegeName,
boolean notify)
Deletes a privilege from data store.
|
void |
deleteReferral(String privilegeName)
Deletes a referral privilege from data store.
|
String |
deleteReferral(String privilegeName,
boolean notify)
Deletes a referralprivilege from data store.
|
List<Privilege> |
findAllPolicies()
Finds all policies within the passed realm.
|
List<Privilege> |
findAllPoliciesByApplication(String application)
Finds all policies within the passed realm and application.
|
List<Privilege> |
findAllPoliciesByIdentityUid(String uid)
Finds all policies based on the identity uid, whether user or group uid.
|
static int |
getNumCachedPolicies() |
static int |
getNumCachedPolicies(String realm) |
static int |
getNumCachedReferrals() |
static int |
getNumCachedReferrals(String realm) |
IPrivilege |
getPrivilege(String privilegeName)
Retrieve an individual privilege from the data store.
|
Set<String> |
getReferredResources(String applicationTypeName)
Returns a set of resources that are referred to this realm.
|
boolean |
hasPrivilgesWithApplication(String realm,
String applName) |
static boolean |
isOrgAliasMappingResourceEnabled(SSOToken adminToken) |
Iterator<IPrivilege> |
search(String realm,
ResourceSearchIndexes indexes,
Set<String> subjectIndexes,
boolean bSubTree)
Returns an iterator of matching privilege objects.
|
Iterator<IPrivilege> |
search(String realm,
ResourceSearchIndexes indexes,
Set<String> subjectIndexes,
boolean bSubTree,
boolean bReferral)
Search for policies.
|
Set<String> |
searchPrivilegeNames(Set<SearchFilter> filters,
boolean boolAnd,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Returns a set of privilege names that satifies a search filter.
|
Set<String> |
searchReferralPrivilegeNames(Set<SearchFilter> filters,
boolean boolAnd,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Returns a set of referral privilege names that satifies a search filter.
|
Set<String> |
searchReferralPrivilegeNames(Set<SearchFilter> filters,
Subject adminSubject,
String currentRealm,
boolean boolAnd,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Returns a set of referral privilege names that matched a set of search
criteria.
|
getAdminSubject, getInstance, getRealm
public void add(Set<IPrivilege> privileges) throws EntitlementException
add
in class PrivilegeIndexStore
privileges
- Privileges to be added.EntitlementException
- if addition
failed.public void delete(String privilegeName) throws EntitlementException
delete
in class PrivilegeIndexStore
privilegeName
- Name of privilege to be deleted.EntitlementException
- if deletion
failed.public void deleteReferral(String privilegeName) throws EntitlementException
deleteReferral
in class PrivilegeIndexStore
privilegeName
- Name of referral to be deleted.EntitlementException
- if deletion
failed.public void delete(Set<IPrivilege> privileges) throws EntitlementException
delete
in class PrivilegeIndexStore
privileges
- Privileges to be deleted.EntitlementException
- if deletion
failed.public String delete(String privilegeName, boolean notify) throws EntitlementException
PrivilegeIndexStore
delete
in class PrivilegeIndexStore
privilegeName
- name of privilege to be deleted.notify
- true
to notify changes.EntitlementException
- if deletion
failed.public String deleteReferral(String privilegeName, boolean notify) throws EntitlementException
PrivilegeIndexStore
deleteReferral
in class PrivilegeIndexStore
privilegeName
- name of privilege to be deleted.notify
- true
to notify changes.EntitlementException
- if deletion
failed.public Iterator<IPrivilege> search(String realm, ResourceSearchIndexes indexes, Set<String> subjectIndexes, boolean bSubTree) throws EntitlementException
search
in class PrivilegeIndexStore
realm
- Realm Name.indexes
- Resource search indexes.subjectIndexes
- Subject search indexes.bSubTree
- true
for sub tree evaluation.EntitlementException
- if results
cannot be obtained.public Iterator<IPrivilege> search(String realm, ResourceSearchIndexes indexes, Set<String> subjectIndexes, boolean bSubTree, boolean bReferral) throws EntitlementException
realm
- The realm of which the policy resides.indexes
- Policy indexes.subjectIndexes
- Subject indexes.bSubTree
- Whether in subtree mode.bReferral
- Whether there is a policy referral.EntitlementException
- Should an error occur searching for policies.public IPrivilege getPrivilege(String privilegeName)
getPrivilege
in class PrivilegeIndexStore
privilegeName
- Name of the privilege to return.public Set<String> searchPrivilegeNames(Set<SearchFilter> filters, boolean boolAnd, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws EntitlementException
searchPrivilegeNames
in class PrivilegeIndexStore
filters
- Search filters.boolAnd
- true
to have filters as exclusive.numOfEntries
- Number of max entries.sortResults
- true
to have result sorted.ascendingOrder
- true
to have result sorted in
ascending order.EntitlementException
- if search failed.public Set<String> searchReferralPrivilegeNames(Set<SearchFilter> filters, boolean boolAnd, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws EntitlementException
searchReferralPrivilegeNames
in class PrivilegeIndexStore
filters
- Search filters.boolAnd
- true
to have filters as exclusive.numOfEntries
- Number of max entries.sortResults
- true
to have result sorted.ascendingOrder
- true
to have result sorted in
ascending order.EntitlementException
- if search failed.public Set<String> searchReferralPrivilegeNames(Set<SearchFilter> filters, Subject adminSubject, String currentRealm, 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 Set<String> getReferredResources(String applicationTypeName) throws EntitlementException
getReferredResources
in class PrivilegeIndexStore
applicationTypeName
- Application type name,EntitlementException
- if resources cannot be returned.public List<Privilege> findAllPolicies() throws EntitlementException
PrivilegeIndexStore
findAllPolicies
in class PrivilegeIndexStore
EntitlementException
- should some error occurpublic List<Privilege> findAllPoliciesByApplication(String application) throws EntitlementException
PrivilegeIndexStore
findAllPoliciesByApplication
in class PrivilegeIndexStore
application
- the applicationEntitlementException
- should some error occurpublic List<Privilege> findAllPoliciesByIdentityUid(String uid) throws EntitlementException
PrivilegeIndexStore
findAllPoliciesByIdentityUid
in class PrivilegeIndexStore
uid
- identity uidEntitlementException
- should some query error occurpublic static boolean isOrgAliasMappingResourceEnabled(SSOToken adminToken)
public static int getNumCachedPolicies(String realm)
public static int getNumCachedReferrals(String realm)
public static int getNumCachedPolicies()
public static int getNumCachedReferrals()
public boolean hasPrivilgesWithApplication(String realm, String applName) throws EntitlementException
hasPrivilgesWithApplication
in class PrivilegeIndexStore
EntitlementException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.