Search in sources :

Example 1 with QueryEngineResults

use of org.alfresco.repo.search.impl.querymodel.QueryEngineResults 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)

Aggregations

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