Skip to content

Commit 4822ebf

Browse files
committed
feat: rename UtmLogstashFilterResource to UtmFilterResource and update API endpoints
1 parent 2119df8 commit 4822ebf

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

backend/src/main/java/com/park/utmstack/web/rest/logstash_filter/UtmLogstashFilterResource.java renamed to backend/src/main/java/com/park/utmstack/web/rest/logstash_filter/UtmFilterResource.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
* REST controller for managing UtmLogstashFilter.
3333
*/
3434
@RestController
35-
@RequestMapping("/api")
36-
public class UtmLogstashFilterResource {
35+
@RequestMapping("/api/utm-filters")
36+
public class UtmFilterResource {
3737

38-
private final Logger log = LoggerFactory.getLogger(UtmLogstashFilterResource.class);
38+
private final Logger log = LoggerFactory.getLogger(UtmFilterResource.class);
3939

4040
private static final String CLASSNAME = "UtmLogstashFilterResource";
4141

@@ -45,9 +45,9 @@ public class UtmLogstashFilterResource {
4545
private final UtmLogstashPipelineService pipelineService;
4646
private final ApplicationEventService applicationEventService;
4747

48-
public UtmLogstashFilterResource(UtmLogstashFilterService utmLogstashFilterService,
49-
UtmLogstashFilterQueryService logstashFilterQueryService,
50-
UtmGroupLogstashPipelineFiltersService groupLogstashPipelineFiltersService, UtmLogstashPipelineService pipelineService, ApplicationEventService applicationEventService) {
48+
public UtmFilterResource(UtmLogstashFilterService utmLogstashFilterService,
49+
UtmLogstashFilterQueryService logstashFilterQueryService,
50+
UtmGroupLogstashPipelineFiltersService groupLogstashPipelineFiltersService, UtmLogstashPipelineService pipelineService, ApplicationEventService applicationEventService) {
5151
this.logstashFilterService = utmLogstashFilterService;
5252
this.logstashFilterQueryService = logstashFilterQueryService;
5353
this.groupLogstashPipelineFiltersService = groupLogstashPipelineFiltersService;
@@ -61,7 +61,7 @@ public UtmLogstashFilterResource(UtmLogstashFilterService utmLogstashFilterServi
6161
* @param logstashFilter the utmLogstashFilter to create
6262
* @return the ResponseEntity with status 201 (Created) and with body the new utmLogstashFilter, or with status 400 (Bad Request) if the utmLogstashFilter has already an ID
6363
*/
64-
@PostMapping("/logstash-filters")
64+
@PostMapping
6565
public ResponseEntity<UtmLogstashFilter> createLogstashFilter(@Valid @RequestBody UtmLogstashFilter logstashFilter,
6666
@RequestParam Long pipelineId) {
6767
final String ctx = CLASSNAME + ".createLogstashFilter";
@@ -104,7 +104,7 @@ public ResponseEntity<UtmLogstashFilter> createLogstashFilter(@Valid @RequestBod
104104
* or with status 400 (Bad Request) if the utmLogstashFilter is not valid,
105105
* or with status 500 (Internal Server Error) if the utmLogstashFilter couldn't be updated
106106
*/
107-
@PutMapping("/logstash-filters")
107+
@PutMapping
108108
public ResponseEntity<UtmLogstashFilter> updateLogstashFilter(@Valid @RequestBody UtmLogstashFilter logstashFilter) {
109109
final String ctx = CLASSNAME + ".updateLogstashFilter";
110110
try {
@@ -132,7 +132,7 @@ public ResponseEntity<UtmLogstashFilter> updateLogstashFilter(@Valid @RequestBod
132132
* @param pageable the pagination information
133133
* @return the ResponseEntity with status 200 (OK) and the list of utmLogstashFilters in body
134134
*/
135-
@GetMapping("/logstash-filters")
135+
@GetMapping
136136
public ResponseEntity<List<UtmLogstashFilter>> getAllLogstashFilters(UtmLogstashFilterCriteria criteria, Pageable pageable) {
137137
final String ctx = CLASSNAME + ".getAllLogstashFilters";
138138
try {
@@ -154,7 +154,7 @@ public ResponseEntity<List<UtmLogstashFilter>> getAllLogstashFilters(UtmLogstash
154154
* @param pipelineId the pipeline Id to search for
155155
* @return the ResponseEntity with status 200 (OK) and the list of {@link UtmLogstashFilter} in body
156156
*/
157-
@GetMapping("/logstash-filters/by-pipelineid")
157+
@GetMapping("/by-pipelineid")
158158
public ResponseEntity<List<UtmLogstashFilter>> filtersByPipelineId(@RequestParam Long pipelineId) {
159159
final String ctx = CLASSNAME + ".filtersByPipelineId";
160160
try {
@@ -175,7 +175,7 @@ public ResponseEntity<List<UtmLogstashFilter>> filtersByPipelineId(@RequestParam
175175
* @param id the id of the utmLogstashFilter to retrieve
176176
* @return the ResponseEntity with status 200 (OK) and with body the utmLogstashFilter, or with status 404 (Not Found)
177177
*/
178-
@GetMapping("/logstash-filters/{id}")
178+
@GetMapping("/{id}")
179179
public ResponseEntity<UtmLogstashFilter> getLogstashFilter(@PathVariable Long id) {
180180
final String ctx = CLASSNAME + ".getLogstashFilter";
181181
try {
@@ -196,7 +196,7 @@ public ResponseEntity<UtmLogstashFilter> getLogstashFilter(@PathVariable Long id
196196
* @param id the id of the utmLogstashFilter to delete
197197
* @return the ResponseEntity with status 200 (OK)
198198
*/
199-
@DeleteMapping("/logstash-filters/{id}")
199+
@DeleteMapping("/{id}")
200200
public ResponseEntity<Void> deleteLogstashFilter(@PathVariable Long id) {
201201
final String ctx = CLASSNAME + ".deleteLogstashFilter";
202202
try {

0 commit comments

Comments
 (0)