use of com.sun.identity.entitlement.IPrivilege in project OpenAM by OpenRock.
the class DataStore method search.
/**
* Returns a set of privilege that satifies the resource and subject
* indexes.
*
* @param adminSubject Subject who has the rights to read datastore.
* @param realm Realm name
* @param iterator Buffered iterator to have the result fed to it.
* @param indexes Resource search indexes.
* @param subjectIndexes Subject search indexes.
* @param bSubTree <code>true</code> to do sub tree search
* @param excludeDNs Set of DN to be excluded from the search results.
* @return a set of privilege that satifies the resource and subject
* indexes.
*/
public Set<IPrivilege> search(Subject adminSubject, String realm, BufferedIterator iterator, ResourceSearchIndexes indexes, Set<String> subjectIndexes, boolean bSubTree, Set<String> excludeDNs) throws EntitlementException {
SSOToken token = getSSOToken(adminSubject);
Set<IPrivilege> results = searchPrivileges(realm, iterator, indexes, subjectIndexes, bSubTree, excludeDNs);
// Get referrals only if count is greater than 0
int countInt = getNumberOfReferrals(realm);
if (countInt > 0) {
results.addAll(searchReferral(token, realm, iterator, indexes, bSubTree, excludeDNs));
}
return results;
}
Aggregations