Found an even better name
This commit is contained in:
@@ -508,13 +508,13 @@ public class SoftwareManagement {
|
||||
* @param orderByDistributionId
|
||||
* the ID of distribution set to be ordered on top
|
||||
* @param searchText
|
||||
* to be filtered as "like" on {@link SoftwareModule#getName()}
|
||||
* filtered as "like" on {@link SoftwareModule#getName()}
|
||||
* @param type
|
||||
* to be filtered as "like" on {@link SoftwareModule#getType()}
|
||||
* filtered as "equal" on {@link SoftwareModule#getType()}
|
||||
* @return the page of found {@link SoftwareModule}
|
||||
*/
|
||||
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
|
||||
public Slice<CustomSoftwareModule> findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc(
|
||||
public Slice<CustomSoftwareModule> findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(
|
||||
@NotNull final Pageable pageable, @NotNull final Long orderByDistributionId, final String searchText,
|
||||
final SoftwareModuleType type) {
|
||||
|
||||
|
||||
@@ -638,14 +638,14 @@ public class SoftwareManagementTest extends AbstractIntegrationTestWithMongoDB {
|
||||
softwareManagement.deleteSoftwareModule(deleted);
|
||||
|
||||
// with filter on name, version and module type
|
||||
assertThat(softwareManagement.findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc(pageReq,
|
||||
assertThat(softwareManagement.findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(pageReq,
|
||||
set.getId(), "found", testType).getContent())
|
||||
.as("Found modules with given name, given module type and the assigned ones first")
|
||||
.containsExactly(new CustomSoftwareModule(one, true), new CustomSoftwareModule(two, true),
|
||||
new CustomSoftwareModule(unassigned, false));
|
||||
|
||||
// with filter on module type only
|
||||
assertThat(softwareManagement.findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc(pageReq,
|
||||
assertThat(softwareManagement.findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(pageReq,
|
||||
set.getId(), null, testType).getContent())
|
||||
.as("Found modules with given module type and the assigned ones first").containsExactly(
|
||||
new CustomSoftwareModule(differentName, true), new CustomSoftwareModule(one, true),
|
||||
@@ -653,7 +653,7 @@ public class SoftwareManagementTest extends AbstractIntegrationTestWithMongoDB {
|
||||
|
||||
// without any filter
|
||||
assertThat(softwareManagement
|
||||
.findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc(pageReq, set.getId(), null, null)
|
||||
.findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(pageReq, set.getId(), null, null)
|
||||
.getContent()).as("Found modules with the assigned ones first").containsExactly(
|
||||
new CustomSoftwareModule(differentName, true), new CustomSoftwareModule(one, true),
|
||||
new CustomSoftwareModule(two, true), new CustomSoftwareModule(four, true),
|
||||
|
||||
@@ -77,7 +77,7 @@ public class SwModuleBeanQuery extends AbstractBeanQuery<ProxyBaseSwModuleItem>
|
||||
final Slice<CustomSoftwareModule> swModuleBeans;
|
||||
final List<ProxyBaseSwModuleItem> proxyBeans = new ArrayList<>();
|
||||
|
||||
swModuleBeans = getSoftwareManagement().findSoftwareModuleOrderByDistributionModuleNameAscModuleVersionAsc(
|
||||
swModuleBeans = getSoftwareManagement().findSoftwareModuleOrderBySetAssignmentAndModuleNameAscModuleVersionAsc(
|
||||
new OffsetBasedPageRequest(startIndex, count), orderByDistId, searchText, type);
|
||||
|
||||
for (final CustomSoftwareModule swModule : swModuleBeans) {
|
||||
|
||||
Reference in New Issue
Block a user