meta: getAll responses -> CommonGetAllResponse
This commit is contained in:
parent
1adc00a11e
commit
f97db6009f
16 changed files with 93 additions and 78 deletions
|
|
@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import ru.clearing.classes.statics.data.account.Account;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.account.AccountBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/accounting/accounts")
|
||||
|
|
@ -26,12 +27,12 @@ public class AccountController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all accounts.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = AccountBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public AccountBackendGetAll getAll() {
|
||||
Collection<Account> all = stateLoader.getAll(IMDGDistributedNames.Map_Account, Account.class);
|
||||
AccountBackendGetAll response = new AccountBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_Account, Account.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import ru.spcex.clearing.backendapi.controller.request.cud.account.BankAccountUp
|
|||
import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.account.BankAccountBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.account.BankAccountBackendGetById;
|
||||
import ru.spcex.clearing.backendapi.service.IOperator;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
|
|
@ -23,6 +23,7 @@ import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
|||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
|
|
@ -84,12 +85,12 @@ public class BankAccountController extends AbstractQueueController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all bank accounts.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = BankAccountBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public BankAccountBackendGetAll getAll() {
|
||||
Collection<BankAccount> all = stateLoader.getAll(IMDGDistributedNames.Map_BankAccount, BankAccount.class);
|
||||
BankAccountBackendGetAll response = new BankAccountBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_BankAccount, BankAccount.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,13 +14,14 @@ import ru.clearing.classes.statics.data.company.Company;
|
|||
import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
|
||||
import ru.spcex.clearing.backendapi.controller.request.cud.common.CommonDeleteAction;
|
||||
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.company.CompanyBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IOperator;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@Controller
|
||||
|
|
@ -46,12 +47,12 @@ public class DeleteCompanyController extends AbstractQueueController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all Company's.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CompanyBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public CompanyBackendGetAll getAll() {
|
||||
Collection<Company> all = stateLoader.getAll(IMDGDistributedNames.Map_Company, Company.class);
|
||||
CompanyBackendGetAll response = new CompanyBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_Company, Company.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,13 +15,14 @@ import ru.spcex.clearing.backendapi.controller.request.cud.company.ClearingMembe
|
|||
import ru.spcex.clearing.backendapi.controller.request.cud.company.ClearingMemberCategoryUpdateAction;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.company.ClearingMemberCategoryBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IOperator;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@Controller
|
||||
|
|
@ -70,12 +71,12 @@ public class EditClearingMemberCategoryController extends AbstractQueueControlle
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all ClearingMemberCategories.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = ClearingMemberCategoryBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ClearingMemberCategoryBackendGetAll getAll() {
|
||||
Collection<ClearingMemberCategory> all = stateLoader.getAll(IMDGDistributedNames.Map_ClearingMemberCategory, ClearingMemberCategory.class);
|
||||
ClearingMemberCategoryBackendGetAll response = new ClearingMemberCategoryBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_ClearingMemberCategory, ClearingMemberCategory.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,13 +13,14 @@ import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
|
|||
import ru.spcex.clearing.backendapi.controller.request.cud.company.CompanySymbolUpdateAction;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.company.CompanySymbolsBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IOperator;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@Controller
|
||||
|
|
@ -48,12 +49,12 @@ public class EditCompanySymbolController extends AbstractQueueController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all CompanySymbols")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CompanySymbolsBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public CompanySymbolsBackendGetAll getAll() {
|
||||
Collection<CompanySymbols> all = stateLoader.getAll(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class);
|
||||
CompanySymbolsBackendGetAll response = new CompanySymbolsBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,13 +13,14 @@ import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
|
|||
import ru.spcex.clearing.backendapi.controller.request.cud.company.ContactUpdateAction;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.company.ContactBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IOperator;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@Controller
|
||||
|
|
@ -47,12 +48,12 @@ public class EditContactController extends AbstractQueueController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all Contacts.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = ContactBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ContactBackendGetAll getAll() {
|
||||
Collection<Contact> all = stateLoader.getAll(IMDGDistributedNames.Map_Contact, Contact.class);
|
||||
ContactBackendGetAll response = new ContactBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_Contact, Contact.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import ru.clearing.classes.statics.data.profile.ProfileDocument;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.company.ProfileDocumentBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/profile-documents")
|
||||
|
|
@ -26,12 +27,12 @@ public class ProfileDocumentController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all ProfileDocuments.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = ProfileDocumentBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public ProfileDocumentBackendGetAll getAll() {
|
||||
Collection<ProfileDocument> all = stateLoader.getAll(IMDGDistributedNames.Map_ProfileDocument, ProfileDocument.class);
|
||||
ProfileDocumentBackendGetAll response = new ProfileDocumentBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_ProfileDocument, ProfileDocument.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import ru.clearing.classes.statics.data.scheduler.SchedulerAllToday;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.SchedulerAllTodayBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/schedule/schedulers-all-today")
|
||||
|
|
@ -26,12 +27,12 @@ public class SchedulerAllTodayController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all SchedulerAllToday objects.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = SchedulerAllTodayBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public SchedulerAllTodayBackendGetAll getAll() {
|
||||
Collection<SchedulerAllToday> all = stateLoader.getAll(IMDGDistributedNames.Map_SchedulerAllToday, SchedulerAllToday.class);
|
||||
var response = new SchedulerAllTodayBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_SchedulerAllToday, SchedulerAllToday.class);
|
||||
var response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import ru.clearing.classes.statics.data.scheduler.Scheduler;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.SchedulerBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/schedule/schedulers")
|
||||
|
|
@ -29,9 +31,9 @@ public class SchedulerController {
|
|||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = SchedulerBackendGetAll.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public SchedulerBackendGetAll getAll() {
|
||||
Collection<Scheduler> all = stateLoader.getAll(IMDGDistributedNames.Map_Scheduler, Scheduler.class);
|
||||
var response = new SchedulerBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_Scheduler, Scheduler.class);
|
||||
var response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
|
|||
import ru.spcex.clearing.backendapi.controller.request.cud.schedule.TaskRunnerNew;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.TaskRunnerBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.errors.NotFound404Exception;
|
||||
import ru.spcex.clearing.backendapi.security.KeycloakUtils;
|
||||
import ru.spcex.clearing.backendapi.service.IOperator;
|
||||
|
|
@ -47,12 +47,12 @@ public class TaskRunnerController extends AbstractQueueController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all TaskRunners.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = TaskRunnerBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public TaskRunnerBackendGetAll getAll() {
|
||||
Collection<TaskRunner> all = stateLoader.getAll(IMDGDistributedNames.Map_TaskRunner, TaskRunner.class);
|
||||
var response = new TaskRunnerBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_TaskRunner, TaskRunner.class);
|
||||
var response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import ru.clearing.classes.statics.data.scheduler.Timetable;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.TimetableBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/schedule/timetables")
|
||||
|
|
@ -26,12 +27,12 @@ public class TimeTableController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all Timetables.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = TimetableBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public TimetableBackendGetAll getAll() {
|
||||
Collection<Timetable> all = stateLoader.getAll(IMDGDistributedNames.Map_Timetable, Timetable.class);
|
||||
var response = new TimetableBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_Timetable, Timetable.class);
|
||||
var response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import ru.clearing.classes.statics.data.scheduler.TradingCalendar;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.schedule.TradingCalendarBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/schedule/trading-calendars")
|
||||
|
|
@ -26,12 +27,12 @@ public class TradingCalendarController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all trading calendars.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = TradingCalendarBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public TradingCalendarBackendGetAll getAll() {
|
||||
Collection<TradingCalendar> all = stateLoader.getAll(IMDGDistributedNames.Map_TradingCalendar, TradingCalendar.class);
|
||||
var response = new TradingCalendarBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_TradingCalendar, TradingCalendar.class);
|
||||
var response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import ru.clearing.classes.statics.data.user.User;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.user.UserBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/users")
|
||||
|
|
@ -26,12 +27,12 @@ public class UserController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all users.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = UserBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public UserBackendGetAll getAll() {
|
||||
Collection<User> all = stateLoader.getAll(IMDGDistributedNames.Map_User, User.class);
|
||||
var response = new UserBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_User, User.class);
|
||||
var response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import ru.clearing.classes.statics.data.user.UserRoleSession;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.user.UserRoleSessionBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/user-role-sessions")
|
||||
|
|
@ -26,12 +27,12 @@ public class UserRoleSessionController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all user role sessions.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = UserRoleSessionBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public UserRoleSessionBackendGetAll getAll() {
|
||||
Collection<UserRoleSession> all = stateLoader.getAll(IMDGDistributedNames.Map_UserRoleSession, UserRoleSession.class);
|
||||
var response = new UserRoleSessionBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_UserRoleSession, UserRoleSession.class);
|
||||
var response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,13 +15,14 @@ import ru.spcex.clearing.backendapi.controller.request.cud.utilities.KeyRateNewA
|
|||
import ru.spcex.clearing.backendapi.controller.request.cud.utilities.KeyRateUpdateAction;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.utilities.KeyRateBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.service.IOperator;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.clearing.platform.messaging.domain.Consts;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
@Controller
|
||||
|
|
@ -70,12 +71,12 @@ public class CudKeyRateController extends AbstractQueueController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all KeyRate's.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = KeyRateBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public KeyRateBackendGetAll getAll() {
|
||||
Collection<KeyRate> all = stateLoader.getAll(IMDGDistributedNames.Map_KeyRate, KeyRate.class);
|
||||
KeyRateBackendGetAll response = new KeyRateBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_KeyRate, KeyRate.class);
|
||||
CommonGetAllResponse response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import ru.spcex.clearing.backendapi.controller.queue.AbstractQueueController;
|
|||
import ru.spcex.clearing.backendapi.controller.request.cud.utilities.UserSettingsUpdateAction;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.cud.CudResponse;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.user.UserSettingsBackendGetAll;
|
||||
import ru.spcex.clearing.backendapi.controller.response.entity.CommonGetAllResponse;
|
||||
import ru.spcex.clearing.backendapi.security.KeycloakUtils;
|
||||
import ru.spcex.clearing.backendapi.service.IOperator;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
|
|
@ -46,12 +46,12 @@ public class UserSettingsController extends AbstractQueueController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all user settings.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = UserSettingsBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public UserSettingsBackendGetAll getAll() {
|
||||
Collection<UserSettings> all = stateLoader.getAll(IMDGDistributedNames.Map_UserSettings, UserSettings.class);
|
||||
var response = new UserSettingsBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_UserSettings, UserSettings.class);
|
||||
var response = new CommonGetAllResponse();
|
||||
response.fromEntity(all);
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue