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
|
# Metadata Extraction
|
||||||
#
|
#
|
||||||
content.metadata.async.extract.6.enabled=false
|
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
|
||||||
http://www.springframework.org/schema/util/spring-util.xsd">
|
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 -->
|
<!-- Helper beans -->
|
||||||
|
|
||||||
<bean id="baseTransaction" abstract="true" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
<bean id="baseTransaction" abstract="true" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
||||||
@@ -346,6 +355,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</property>
|
</property>
|
||||||
<property name="nodeService" ref="NodeService" />
|
<property name="nodeService" ref="NodeService" />
|
||||||
|
<property name="recordsManagementSearchParameters" ref="recordsManagementSearchParameters" />
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="RecordsManagementSearchService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<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();
|
private static final List<QName> DEFAULT_INCLUDED_CONTAINER_TYPES = Collections.emptyList();
|
||||||
|
|
||||||
/** Max items */
|
/** Max items */
|
||||||
private int maxItems = 500;
|
private int maxItems;
|
||||||
|
|
||||||
private boolean includeRecords = true;
|
private boolean includeRecords = true;
|
||||||
private boolean includeUndeclaredRecords = false;
|
private boolean includeUndeclaredRecords = false;
|
||||||
|
@@ -93,6 +93,11 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
|||||||
/** List of report details */
|
/** List of report details */
|
||||||
private List<ReportDetails> reports = new ArrayList<>(13);
|
private List<ReportDetails> reports = new ArrayList<>(13);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Records Search Parameters
|
||||||
|
*/
|
||||||
|
private RecordsManagementSearchParameters recordsManagementSearchParameters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param fileFolderService file folder service
|
* @param fileFolderService file folder service
|
||||||
*/
|
*/
|
||||||
@@ -176,14 +181,13 @@ public class RecordsManagementSearchServiceImpl implements RecordsManagementSear
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RecordsManagementSearchParameters searchParameters = new RecordsManagementSearchParameters();
|
|
||||||
if (report.has("searchparams"))
|
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
|
// 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);
|
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)
|
* @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.setQuery(fullQuery.toString());
|
||||||
searchParameters.setLanguage(SearchService.LANGUAGE_FTS_ALFRESCO);
|
searchParameters.setLanguage(SearchService.LANGUAGE_FTS_ALFRESCO);
|
||||||
searchParameters.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
|
searchParameters.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
|
||||||
searchParameters.setMaxItems(rmSearchParameters.getMaxItems());
|
searchParameters.setMaxItems(recordsManagementSearchParameters.getMaxItems());
|
||||||
searchParameters.setNamespace(RecordsManagementModel.RM_URI);
|
searchParameters.setNamespace(RecordsManagementModel.RM_URI);
|
||||||
|
|
||||||
// set sort
|
// set sort
|
||||||
|
Reference in New Issue
Block a user