summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/inbounds
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-05-06 15:10:18 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-06 15:10:18 +0000
commit1e6f878cc92f42ca25f44319b70797bdcc8a4e1f (patch)
treeba70509807b00e402c89275a0d28d2a997f5aba1 /ms/blueprintsprocessor/modules/inbounds
parent158603523a43d4480b519f4ef27649cd98783410 (diff)
parentf486ab15c64375a2c97df979a718929420124cd6 (diff)
Merge "fix sort at package list"
Diffstat (limited to 'ms/blueprintsprocessor/modules/inbounds')
-rw-r--r--ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt12
1 files changed, 8 insertions, 4 deletions
diff --git a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt
index 1f01d1ce3..3973f3620 100644
--- a/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt
+++ b/ms/blueprintsprocessor/modules/inbounds/designer-api/src/main/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/designer/api/BlueprintModelController.kt
@@ -89,9 +89,11 @@ open class BlueprintModelController(private val bluePrintModelHandler: BluePrint
fun allBlueprintModel(
@RequestParam(defaultValue = "20") limit: Int,
@RequestParam(defaultValue = "0") offset: Int,
- @RequestParam(defaultValue = "DATE") sort: BlueprintSortByOption
+ @RequestParam(defaultValue = "DATE") sort: BlueprintSortByOption,
+ @RequestParam(defaultValue = "ASC") sortType: String
): Page<BlueprintModelSearch> {
- val pageRequest = PageRequest.of(offset, limit, Sort.Direction.ASC, sort.columnName)
+ val pageRequest = PageRequest.of(offset, limit,
+ Sort.Direction.fromString(sortType), sort.columnName)
return this.bluePrintModelHandler.allBlueprintModel(pageRequest)
}
@@ -110,9 +112,11 @@ open class BlueprintModelController(private val bluePrintModelHandler: BluePrint
@NotNull @PathVariable(value = "keyword") keyWord: String,
@RequestParam(defaultValue = "20") limit: Int,
@RequestParam(defaultValue = "0") offset: Int,
- @RequestParam(defaultValue = "DATE") sort: BlueprintSortByOption
+ @RequestParam(defaultValue = "DATE") sort: BlueprintSortByOption,
+ @RequestParam(defaultValue = "ASC") sortType: String
): Page<BlueprintModelSearch> {
- val pageRequest = PageRequest.of(offset, limit, Sort.Direction.ASC, sort.columnName)
+ val pageRequest = PageRequest.of(offset, limit,
+ Sort.Direction.fromString(sortType), sort.columnName)
return this.bluePrintModelHandler.searchBluePrintModelsByKeyWordPaged(keyWord, pageRequest)
}