mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge pull request #1418 from Alfresco/feature/APPS-908_RecordSearchResultLimit
Feature/apps 908 record search result limit
This commit is contained in:
@@ -132,3 +132,6 @@ rm.enableAutoVersionOnRecordCreation=false
|
||||
# Metadata Extraction
|
||||
#
|
||||
content.metadata.async.extract.6.enabled=false
|
||||
|
||||
# Max number of entries returned in Record search view
|
||||
rm.recordSearch.maxItems=500
|
||||
|
@@ -14,6 +14,15 @@
|
||||
http://www.springframework.org/schema/util
|
||||
http://www.springframework.org/schema/util/spring-util.xsd">
|
||||
|
||||
<!-- Records Management Search Parameters-->
|
||||
|
||||
<bean id="recordsManagementSearchParameters"
|
||||
class="org.alfresco.module.org_alfresco_module_rm.search.RecordsManagementSearchParameters">
|
||||
<property name="maxItems">
|
||||
<value>${rm.recordSearch.maxItems}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Helper beans -->
|
||||
|
||||
<bean id="baseTransaction" abstract="true" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||
@@ -346,6 +355,7 @@
|
||||
</value>
|
||||
</property>
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<property name="recordsManagementSearchParameters" ref="recordsManagementSearchParameters" />
|
||||
</bean>
|
||||
|
||||
<bean id="RecordsManagementSearchService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
|
@@ -87,7 +87,7 @@ public class RecordsManagementSearchParameters
|
||||
private static final List<QName> DEFAULT_INCLUDED_CONTAINER_TYPES = Collections.emptyList();
|
||||
|
||||
/** Max items */
|
||||
private int maxItems = 500;
|
||||
private int maxItems;
|
||||
|
||||
private boolean includeRecords = true;
|
||||
private boolean includeUndeclaredRecords = false;
|
||||
|
@@ -93,6 +93,11 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
||||
/** List of report details */
|
||||
private List<ReportDetails> reports = new ArrayList<>(13);
|
||||
|
||||
/**
|
||||
* Records Search Parameters
|
||||
*/
|
||||
private RecordsManagementSearchParameters recordsManagementSearchParameters;
|
||||
|
||||
/**
|
||||
* @param fileFolderService file folder service
|
||||
*/
|
||||
@@ -176,14 +181,13 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
||||
}
|
||||
}
|
||||
|
||||
RecordsManagementSearchParameters searchParameters = new RecordsManagementSearchParameters();
|
||||
if (report.has("searchparams"))
|
||||
{
|
||||
searchParameters = RecordsManagementSearchParameters.createFromJSON(report.getJSONObject("searchparams"), namespaceService);
|
||||
recordsManagementSearchParameters = RecordsManagementSearchParameters.createFromJSON(report.getJSONObject("searchparams"), namespaceService);
|
||||
}
|
||||
|
||||
// Create the report details and add to list
|
||||
ReportDetails reportDetails = new ReportDetails(name, description, query, searchParameters);
|
||||
ReportDetails reportDetails = new ReportDetails(name, description, query, recordsManagementSearchParameters);
|
||||
reports.add(reportDetails);
|
||||
}
|
||||
}
|
||||
@@ -193,6 +197,16 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set RecordsManagementSearchParameters service
|
||||
*
|
||||
* @param recordsManagementSearchParameters
|
||||
*/
|
||||
public void setRecordsManagementSearchParameters(RecordsManagementSearchParameters recordsManagementSearchParameters)
|
||||
{
|
||||
this.recordsManagementSearchParameters = recordsManagementSearchParameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.alfresco.module.org_alfresco_module_rm.search.RecordsManagementSearchService#search(java.lang.String, java.lang.String, org.alfresco.module.org_alfresco_module_rm.search.RecordsManagementSearchParameters)
|
||||
*/
|
||||
@@ -213,7 +227,7 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
||||
searchParameters.setQuery(fullQuery.toString());
|
||||
searchParameters.setLanguage(SearchService.LANGUAGE_FTS_ALFRESCO);
|
||||
searchParameters.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
|
||||
searchParameters.setMaxItems(rmSearchParameters.getMaxItems());
|
||||
searchParameters.setMaxItems(recordsManagementSearchParameters.getMaxItems());
|
||||
searchParameters.setNamespace(RecordsManagementModel.RM_URI);
|
||||
|
||||
// set sort
|
||||
|
Reference in New Issue
Block a user