Search in sources :

Example 1 with PagingLuceneResultSet

use of org.alfresco.repo.search.impl.lucene.PagingLuceneResultSet in project records-management by Alfresco.

the class RMAfterInvocationProvider method decide.

private QueryEngineResults decide(Authentication authentication, Object object, ConfigAttributeDefinition config, QueryEngineResults returnedObject) {
    Map<Set<String>, ResultSet> map = returnedObject.getResults();
    Map<Set<String>, ResultSet> answer = new HashMap<Set<String>, ResultSet>(map.size(), 1.0f);
    for (Map.Entry<Set<String>, ResultSet> entry : map.entrySet()) {
        ResultSet raw = entry.getValue();
        ResultSet permed;
        if (PagingLuceneResultSet.class.isAssignableFrom(raw.getClass())) {
            permed = decide(authentication, object, config, (PagingLuceneResultSet) raw);
        } else {
            permed = decide(authentication, object, config, raw);
        }
        answer.put(entry.getKey(), permed);
    }
    return new QueryEngineResults(answer);
}
Also used : QueryEngineResults(org.alfresco.repo.search.impl.querymodel.QueryEngineResults) PagingLuceneResultSet(org.alfresco.repo.search.impl.lucene.PagingLuceneResultSet) ResultSet(org.alfresco.service.cmr.search.ResultSet) Set(java.util.Set) FilteringResultSet(org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSet) BitSet(java.util.BitSet) HashMap(java.util.HashMap) PagingLuceneResultSet(org.alfresco.repo.search.impl.lucene.PagingLuceneResultSet) ResultSet(org.alfresco.service.cmr.search.ResultSet) FilteringResultSet(org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSet) PagingLuceneResultSet(org.alfresco.repo.search.impl.lucene.PagingLuceneResultSet) HashMap(java.util.HashMap) Map(java.util.Map)

Example 2 with PagingLuceneResultSet

use of org.alfresco.repo.search.impl.lucene.PagingLuceneResultSet in project records-management by Alfresco.

the class RMAfterInvocationProvider method decide.

private ResultSet decide(Authentication authentication, Object object, ConfigAttributeDefinition config, PagingLuceneResultSet returnedObject) {
    ResultSet raw = returnedObject.getWrapped();
    ResultSet filteredForPermissions = decide(authentication, object, config, raw);
    return new PagingLuceneResultSet(filteredForPermissions, returnedObject.getResultSetMetaData().getSearchParameters(), nodeService);
}
Also used : PagingLuceneResultSet(org.alfresco.repo.search.impl.lucene.PagingLuceneResultSet) ResultSet(org.alfresco.service.cmr.search.ResultSet) FilteringResultSet(org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSet) PagingLuceneResultSet(org.alfresco.repo.search.impl.lucene.PagingLuceneResultSet)

Aggregations

PagingLuceneResultSet (org.alfresco.repo.search.impl.lucene.PagingLuceneResultSet)2 FilteringResultSet (org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSet)2 ResultSet (org.alfresco.service.cmr.search.ResultSet)2 BitSet (java.util.BitSet)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Set (java.util.Set)1 QueryEngineResults (org.alfresco.repo.search.impl.querymodel.QueryEngineResults)1