public class DataStore extends Object
Modifier and Type | Field and Description |
---|---|
static String |
POLICY_STORE |
static String |
REFERRAL_APPLS |
static String |
REFERRAL_REALMS |
static String |
REFERRAL_STORE |
Modifier and Type | Method and Description |
---|---|
String |
add(Subject adminSubject,
String realm,
Privilege p)
Adds a privilege.
|
String |
addReferral(Subject adminSubject,
String realm,
ReferralPrivilege referral)
Adds a referral.
|
static DataStore |
getInstance() |
static int |
getNumberOfPolicies() |
static int |
getNumberOfPolicies(String realm) |
static int |
getNumberOfReferrals() |
static int |
getNumberOfReferrals(String realm) |
IPrivilege |
getPrivilege(String realm,
String privilegeIdentifier)
Retrieves an individual privilege from the data store.
|
static String |
getPrivilegeDistinguishedName(String name,
String realm,
String indexName)
Returns distingished name of a privilege.
|
static String |
getSearchBaseDN(String realm,
String indexName)
Returns the base search DN.
|
boolean |
hasPrivilgesWithApplication(Subject adminSubject,
String realm,
String applName) |
void |
remove(Subject adminSubject,
String realm,
String name)
Removes privilege.
|
void |
removeReferral(Subject adminSubject,
String realm,
String name)
Removes referral privilege.
|
Set<IPrivilege> |
search(Subject adminSubject,
String realm,
BufferedIterator iterator,
ResourceSearchIndexes indexes,
Set<String> subjectIndexes,
boolean bSubTree,
Set<String> excludeDNs)
Returns a set of privilege that satifies the resource and subject
indexes.
|
Set<String> |
search(Subject adminSubject,
String realm,
String filter,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Returns a set of privilege names that satifies a search filter.
|
Set<ReferralPrivilege> |
searchReferral(SSOToken adminToken,
String realm,
BufferedIterator iterator,
ResourceSearchIndexes indexes,
boolean bSubTree,
Set<String> excludeDNs)
Returns a set of referral privilege that satifies the resource and
subject indexes.
|
Set<String> |
searchReferral(Subject adminSubject,
String realm,
String filter,
int numOfEntries,
boolean sortResults,
boolean ascendingOrder)
Returns a set of referral privilege names that satifies a search filter.
|
Set<ReferralPrivilege> |
searchReferrals(SSOToken adminToken,
String realm,
String filter) |
public static final String POLICY_STORE
public static final String REFERRAL_STORE
public static final String REFERRAL_REALMS
public static final String REFERRAL_APPLS
public static DataStore getInstance()
public static String getPrivilegeDistinguishedName(String name, String realm, String indexName)
name
- Privilege name.realm
- Realm name.indexName
- Index name.public static String getSearchBaseDN(String realm, String indexName)
realm
- Realm name.indexName
- Index name.public static int getNumberOfPolicies()
public static int getNumberOfReferrals()
public static int getNumberOfPolicies(String realm)
public static int getNumberOfReferrals(String realm)
public String add(Subject adminSubject, String realm, Privilege p) throws EntitlementException
adminSubject
- Admin Subject who has the rights to write to
datastore.realm
- Realm name.p
- Privilege object.EntitlementException
- if privilege
cannot be added.public String addReferral(Subject adminSubject, String realm, ReferralPrivilege referral) throws EntitlementException
adminSubject
- Admin Subject who has the rights to write to
datastore.realm
- Realm name.referral
- Referral Privilege object.EntitlementException
- if privilege cannot be added.public void remove(Subject adminSubject, String realm, String name) throws EntitlementException
adminSubject
- Admin Subject who has the rights to write to
datastore.realm
- Realm name.name
- Privilege name.EntitlementException
- if privilege
cannot be removed.public void removeReferral(Subject adminSubject, String realm, String name) throws EntitlementException
adminSubject
- Admin Subject who has the rights to write to
datastore.realm
- Realm name.name
- Referral privilege name.EntitlementException
- if privilege cannot be removed.public Set<String> search(Subject adminSubject, String realm, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws EntitlementException
adminSubject
- Subject who has the rights to read datastore.realm
- Realm namefilter
- Search filter.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> searchReferral(Subject adminSubject, String realm, String filter, int numOfEntries, boolean sortResults, boolean ascendingOrder) throws EntitlementException
adminSubject
- Subject who has the rights to read datastore.realm
- Realm namefilter
- Search filter.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 boolean hasPrivilgesWithApplication(Subject adminSubject, String realm, String applName) throws EntitlementException
EntitlementException
public Set<IPrivilege> search(Subject adminSubject, String realm, BufferedIterator iterator, ResourceSearchIndexes indexes, Set<String> subjectIndexes, boolean bSubTree, Set<String> excludeDNs) throws EntitlementException
adminSubject
- Subject who has the rights to read datastore.realm
- Realm nameiterator
- Buffered iterator to have the result fed to it.indexes
- Resource search indexes.subjectIndexes
- Subject search indexes.bSubTree
- true
to do sub tree searchexcludeDNs
- Set of DN to be excluded from the search results.EntitlementException
public IPrivilege getPrivilege(String realm, String privilegeIdentifier) throws EntitlementException
realm
- Realm in which the privilege exists.privilegeIdentifier
- The identifier of the privilege to retrieve.EntitlementException
- if there were issues retrieving the privilege from the data store.public Set<ReferralPrivilege> searchReferral(SSOToken adminToken, String realm, BufferedIterator iterator, ResourceSearchIndexes indexes, boolean bSubTree, Set<String> excludeDNs) throws EntitlementException
adminToken
- Subject who has the rights to read datastore.realm
- Realm nameiterator
- Buffered iterator to have the result fed to it.indexes
- Resource search indexes.bSubTree
- true
to do sub tree searchexcludeDNs
- Set of DN to be excluded from the search results.EntitlementException
public Set<ReferralPrivilege> searchReferrals(SSOToken adminToken, String realm, String filter) throws EntitlementException
EntitlementException
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.