Merge branch 'get-actions-meta' into dev
This commit is contained in:
commit
e6c818b05f
47 changed files with 1595 additions and 199 deletions
|
|
@ -82,6 +82,11 @@
|
|||
<artifactId>assertj-core</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.reflections</groupId>
|
||||
<artifactId>reflections</artifactId>
|
||||
<version>0.9.11</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,16 @@
|
|||
package ru.spcex.clearing.backendapi.config;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.MapperFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.Resource;
|
||||
import ru.spcex.clearing.backendapi.meta.MetaServer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
|
|
@ -18,4 +25,15 @@ public class MetaConfiguration {
|
|||
if (!meta.isReadable()) throw new IllegalStateException("cannot read meta.json from spring.config.location");
|
||||
return Files.readString(meta.getFile().toPath());
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Bean
|
||||
public MetaServer metaServer(@Qualifier("metaJson") String metaJson) throws JsonProcessingException {
|
||||
ObjectMapper jsonObjectMapper = new ObjectMapper();
|
||||
jsonObjectMapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
|
||||
jsonObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
MetaServer metaServer = jsonObjectMapper.readValue(metaJson, MetaServer.class);
|
||||
metaServer.initAndValidate();
|
||||
return metaServer;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,13 +15,14 @@ import ru.spcex.clearing.backendapi.controller.request.cud.securities.MoneyMarke
|
|||
import ru.spcex.clearing.backendapi.controller.request.cud.securities.MoneyMarketSecurityUpdateAction;
|
||||
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.securities.MoneyMarketSecurityBackendGetAll;
|
||||
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 CudMoneyMarketSecurityController extends AbstractQueueController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "get all money market securities.")
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = MoneyMarketSecurityBackendGetAll.class)})
|
||||
@ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = CommonGetAllResponse.class)})
|
||||
@RequestMapping(method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public MoneyMarketSecurityBackendGetAll getAll() {
|
||||
Collection<MoneyMarketSecurity> all = stateLoader.getAll(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.class);
|
||||
MoneyMarketSecurityBackendGetAll response = new MoneyMarketSecurityBackendGetAll();
|
||||
public CommonGetAllResponse getAll() {
|
||||
Collection<Map<String, Object>> all = stateLoader.getAllMetaTransform(IMDGDistributedNames.Map_MoneyMarketSecurity, MoneyMarketSecurity.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.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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
package ru.spcex.clearing.backendapi.controller.response.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel(description = "Ответ при получении массива объектов.")
|
||||
public class CommonGetAllResponse extends BasicSpcexResponse {
|
||||
|
||||
@JsonProperty
|
||||
@ApiModelProperty(value = "Полезная нагрузка")
|
||||
private GetAllCommonPayload payload = new GetAllCommonPayload();
|
||||
|
||||
private static class GetAllCommonPayload {
|
||||
private List<Map<String, Object>> items = new ArrayList<>();
|
||||
|
||||
public List<Map<String, Object>> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public void setItems(List<Map<String, Object>> items) {
|
||||
this.items = items;
|
||||
}
|
||||
}
|
||||
|
||||
public GetAllCommonPayload getPayload() {
|
||||
return payload;
|
||||
}
|
||||
|
||||
public void setPayload(GetAllCommonPayload payload) {
|
||||
this.payload = payload;
|
||||
}
|
||||
|
||||
public void fromEntity(Collection<Map<String, Object>> anyObjectFields) {
|
||||
var payload = this.getPayload();
|
||||
for (Map<String, Object> moneyMarketSecurity : anyObjectFields) {
|
||||
payload.getItems().add(moneyMarketSecurity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,12 +3,12 @@ package ru.spcex.clearing.backendapi.controller.response.entity.securities;
|
|||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.clearing.classes.statics.data.misc.MoneyMarketSecurity;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ApiModel(description = "Ответ при получении объектов MoneyMarketSecurity.")
|
||||
public class MoneyMarketSecurityBackendGetAll extends BasicSpcexResponse {
|
||||
|
|
@ -18,13 +18,13 @@ public class MoneyMarketSecurityBackendGetAll extends BasicSpcexResponse {
|
|||
private MoneyMarketSecurityBackendPayload payload = new MoneyMarketSecurityBackendPayload();
|
||||
|
||||
private static class MoneyMarketSecurityBackendPayload {
|
||||
private List<MoneyMarketSecurityBackendGetFields> items = new ArrayList<>();
|
||||
private List<Map<String, Object>> items = new ArrayList<>();
|
||||
|
||||
public List<MoneyMarketSecurityBackendGetFields> getItems() {
|
||||
public List<Map<String, Object>> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public void setItems(List<MoneyMarketSecurityBackendGetFields> items) {
|
||||
public void setItems(List<Map<String, Object>> items) {
|
||||
this.items = items;
|
||||
}
|
||||
}
|
||||
|
|
@ -37,22 +37,10 @@ public class MoneyMarketSecurityBackendGetAll extends BasicSpcexResponse {
|
|||
this.payload = payload;
|
||||
}
|
||||
|
||||
public void fromEntity(Collection<MoneyMarketSecurity> moneyMarketSecurities) {
|
||||
public void fromEntity(Collection<Map<String, Object>> moneyMarketSecurities) {
|
||||
var payload = this.getPayload();
|
||||
for (MoneyMarketSecurity moneyMarketSecurity : moneyMarketSecurities) {
|
||||
var singleItem = new MoneyMarketSecurityBackendGetFields();
|
||||
singleItem.setId(moneyMarketSecurity.getId());
|
||||
singleItem.setSecurityId(moneyMarketSecurity.getSecurityId());
|
||||
singleItem.setDescription(moneyMarketSecurity.getDescription());
|
||||
singleItem.setStartDate(moneyMarketSecurity.getStartDate());
|
||||
singleItem.setEndDate(moneyMarketSecurity.getEndDate());
|
||||
singleItem.setNominalValue(moneyMarketSecurity.getNominalValue());
|
||||
singleItem.setNominalCurrency(moneyMarketSecurity.getNominalCurrency());
|
||||
singleItem.setInstrumentType(moneyMarketSecurity.getInstrumentType());
|
||||
singleItem.setFullName(moneyMarketSecurity.getFullName());
|
||||
singleItem.setSecuritySymbol(moneyMarketSecurity.getSecuritySymbol());
|
||||
payload.getItems().add(singleItem);
|
||||
for (Map<String, Object> moneyMarketSecurity : moneyMarketSecurities) {
|
||||
payload.getItems().add(moneyMarketSecurity);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package ru.spcex.clearing.backendapi.controller.response.entity.securities;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import ru.clearing.classes.statics.data.misc.MoneyMarketSecurity;
|
||||
import ru.spcex.clearing.backendapi.controller.response.BasicSpcexResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
@ApiModel(description = "Ответ при получении объектов MoneyMarketSecurity.")
|
||||
public class MoneyMarketSecurityBackendGetAllOld extends BasicSpcexResponse {
|
||||
|
||||
@JsonProperty
|
||||
@ApiModelProperty(value = "Полезная нагрузка")
|
||||
private MoneyMarketSecurityBackendPayload payload = new MoneyMarketSecurityBackendPayload();
|
||||
|
||||
private static class MoneyMarketSecurityBackendPayload {
|
||||
private List<MoneyMarketSecurityBackendGetFields> items = new ArrayList<>();
|
||||
|
||||
public List<MoneyMarketSecurityBackendGetFields> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
public void setItems(List<MoneyMarketSecurityBackendGetFields> items) {
|
||||
this.items = items;
|
||||
}
|
||||
}
|
||||
|
||||
public MoneyMarketSecurityBackendPayload getPayload() {
|
||||
return payload;
|
||||
}
|
||||
|
||||
public void setPayload(MoneyMarketSecurityBackendPayload payload) {
|
||||
this.payload = payload;
|
||||
}
|
||||
|
||||
public void fromEntity(Collection<MoneyMarketSecurity> moneyMarketSecurities) {
|
||||
var payload = this.getPayload();
|
||||
for (MoneyMarketSecurity moneyMarketSecurity : moneyMarketSecurities) {
|
||||
var singleItem = new MoneyMarketSecurityBackendGetFields();
|
||||
singleItem.setId(moneyMarketSecurity.getId());
|
||||
singleItem.setSecurityId(moneyMarketSecurity.getSecurityId());
|
||||
singleItem.setDescription(moneyMarketSecurity.getDescription());
|
||||
singleItem.setStartDate(moneyMarketSecurity.getStartDate());
|
||||
singleItem.setEndDate(moneyMarketSecurity.getEndDate());
|
||||
singleItem.setNominalValue(moneyMarketSecurity.getNominalValue());
|
||||
singleItem.setNominalCurrency(moneyMarketSecurity.getNominalCurrency());
|
||||
singleItem.setInstrumentType(moneyMarketSecurity.getInstrumentType());
|
||||
singleItem.setFullName(moneyMarketSecurity.getFullName());
|
||||
singleItem.setSecuritySymbol(moneyMarketSecurity.getSecuritySymbol());
|
||||
payload.getItems().add(singleItem);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings({"DefaultAnnotationParam", "unused"})
|
||||
public class ActionElement {
|
||||
@JsonProperty(value = "class")
|
||||
private String clazz = null;
|
||||
|
||||
@JsonProperty(value = "name", required = true)
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty(value = "destination", required = false)
|
||||
private String destination = null;
|
||||
|
||||
@JsonProperty(value = "array", required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Boolean isArray = null;
|
||||
|
||||
// @JsonProperty(value = "fields", required = true)
|
||||
// private List<Map<String, ActionField>> fields = new LinkedList<>();
|
||||
@JsonProperty(value = "fields", required = true)
|
||||
private List<ActionField> fields = new LinkedList<>();
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public List<ActionField> getFields() {
|
||||
return fields;
|
||||
}
|
||||
|
||||
public String getDestination() {
|
||||
return destination;
|
||||
}
|
||||
|
||||
public String getClazz() {
|
||||
return clazz;
|
||||
}
|
||||
|
||||
public Boolean getArray() {
|
||||
return isArray;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAnyGetter;
|
||||
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ActionField {
|
||||
@JsonProperty(value = "code")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private String code;
|
||||
|
||||
@JsonProperty(value = "name")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private String name;
|
||||
|
||||
@JsonProperty(value = "shortname")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private String shortname;
|
||||
|
||||
@JsonProperty(value = "linkCode")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private String linkcode;
|
||||
|
||||
@JsonProperty(value = "link")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private String link;
|
||||
|
||||
@JsonProperty(value = "field")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private String field;
|
||||
|
||||
@JsonProperty(value = "length")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private Integer length;
|
||||
|
||||
@JsonProperty(value = "required")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private Boolean required;
|
||||
|
||||
@JsonProperty(value = "table")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private String table;
|
||||
|
||||
@JsonProperty(value = "type")
|
||||
@JsonDeserialize(using = MetaDataTypeDeserializer.class)
|
||||
@JsonSerialize(using = MetaDataTypeSerializer.class, include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private MetaDataTypes type;
|
||||
|
||||
@JsonProperty(value = "virtual")
|
||||
@JsonSerialize(include = JsonSerialize.Inclusion.NON_EMPTY)
|
||||
private Boolean virtual;
|
||||
|
||||
@JsonIgnore
|
||||
private Map<String, Object> additionalProperties = new HashMap<>();
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public Integer getLength() {
|
||||
return length;
|
||||
}
|
||||
|
||||
public Boolean isRequired() {
|
||||
return required;
|
||||
}
|
||||
|
||||
public MetaDataTypes getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getLink() {
|
||||
return link;
|
||||
}
|
||||
|
||||
public String getShortname() {
|
||||
return shortname;
|
||||
}
|
||||
|
||||
public String getLinkcode() {
|
||||
return linkcode;
|
||||
}
|
||||
|
||||
@JsonAnyGetter
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return this.additionalProperties;
|
||||
}
|
||||
|
||||
@JsonAnySetter
|
||||
public void setAdditionalProperty(String name, Object value) {
|
||||
this.additionalProperties.put(name, value);
|
||||
}
|
||||
|
||||
public Boolean isVirtual(){
|
||||
return virtual;
|
||||
}
|
||||
public Boolean getVirtual() {
|
||||
return virtual;
|
||||
}
|
||||
|
||||
public void setVirtual(Boolean virtual) {
|
||||
this.virtual = virtual;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class ClearingFieldExtracted extends FieldExtracted {
|
||||
static final Logger log = LoggerFactory.getLogger(ClearingFieldExtracted.class);
|
||||
|
||||
public ClearingFieldExtracted(ActionField field) {
|
||||
super(field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObjectRef(Object o) {
|
||||
throw new IllegalStateException("unsupported operation");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
|
||||
public class ClearingMetaServerValidationException extends RuntimeException {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
public ClearingMetaServerValidationException(String s) {
|
||||
super(s);
|
||||
}
|
||||
|
||||
public ClearingMetaServerValidationException(String s, Throwable throwable) {
|
||||
super(s, throwable);
|
||||
}
|
||||
|
||||
public ClearingMetaServerValidationException(Throwable throwable) {
|
||||
super(throwable);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ClearingObjectExtracted extends ObjectExtracted {
|
||||
public ClearingObjectExtracted(String clazz, List<ActionField> actionFields) {
|
||||
super(clazz, actionFields);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FieldExtracted getImplFieldExtracted(ActionField field) {
|
||||
return new ClearingFieldExtracted(field);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
|
||||
public abstract class FieldExtracted {
|
||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
private ActionField field;
|
||||
private String memberName;
|
||||
private Collection<String> getterNames;
|
||||
|
||||
public FieldExtracted(ActionField field) {
|
||||
this.field = field;
|
||||
this.memberName = field.getField() != null ? field.getField() : field.getCode();
|
||||
this.getterNames = gettersForField(this.memberName);
|
||||
}
|
||||
|
||||
public static Collection<String> gettersForField(String fieldName) {
|
||||
String[] fieldParts = fieldName.split("\\.");
|
||||
List<String> getters = new LinkedList<>();
|
||||
for (String partName : fieldParts) {
|
||||
getters.add(String.format("%s%s%s",
|
||||
RfHelper.GETTER_NAME_PREFIX,
|
||||
partName.substring(0, 1).toUpperCase(),
|
||||
partName.substring(1, partName.length())
|
||||
));
|
||||
}
|
||||
return getters;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%s (%s) (getters=%d)", field.getCode(), memberName, getterNames.size());
|
||||
}
|
||||
|
||||
public abstract Object getObjectRef(Object o);
|
||||
|
||||
public Object extractValue(Object from)
|
||||
throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
|
||||
Object result = from;
|
||||
for (String getterName : getGetterNames()) {
|
||||
if (RfHelper.BUSINESS_OBJECT_REF.equals(result.getClass().getSimpleName()) && !RfHelper.GETTER_NAME_ID.equals(getterName)) {
|
||||
Object resultNew = getObjectRef(result);
|
||||
if (resultNew == null) {
|
||||
log.warn("BusinessObject by referenceId does not exists!");
|
||||
break;
|
||||
}
|
||||
result = resultNew;
|
||||
}
|
||||
Method m = result.getClass().getMethod(getterName);
|
||||
result = m.invoke(result);
|
||||
if (result == null)
|
||||
break;
|
||||
}
|
||||
|
||||
//fixme somehow externalize custom serialization for type
|
||||
// тут нужно вернуть список id объектов а не список самих объектов для случая
|
||||
// - add(r, "addresseeId", o.getAddressee() == null ? null : o.getAddressee().stream().map(OtcObjectBase::getId).collect(Collectors.toSet()), fieldFilter);
|
||||
if (result instanceof Set && ((Set) result).size() > 0) {
|
||||
try {
|
||||
Set t = new HashSet();
|
||||
Class citem = (((Set) result).iterator().next()).getClass();
|
||||
for (Object item : (Set) result) {
|
||||
t.add(citem.getMethod(RfHelper.GETTER_NAME_ID).invoke(item));
|
||||
}
|
||||
result = t;
|
||||
} catch (Throwable ignored) {// вернем сами объекты
|
||||
}
|
||||
} else if (result instanceof LocalDate) {
|
||||
result = result.toString();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public ActionField getField() {
|
||||
return field;
|
||||
}
|
||||
|
||||
public void setField(ActionField field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
public void setMemberName(String memberName) {
|
||||
this.memberName = memberName;
|
||||
}
|
||||
|
||||
public void setGetterNames(Collection<String> getterNames) {
|
||||
this.getterNames = getterNames;
|
||||
}
|
||||
|
||||
public String getMemberName() {
|
||||
return memberName;
|
||||
}
|
||||
|
||||
public Collection<String> getGetterNames() {
|
||||
return getterNames;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
public class GetResponseFactory {
|
||||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final MetaServer meta;
|
||||
|
||||
@Autowired
|
||||
public GetResponseFactory(MetaServer meta) {
|
||||
this.meta = meta;
|
||||
}
|
||||
|
||||
public Collection<Map<String, Object>> responseFromObjectCollection(Collection<?> o) {
|
||||
return o.stream()
|
||||
.map(this::responseFromObject)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public Map<String, Object> responseFromObject(Object o) {
|
||||
ObjectExtracted objExtr = meta.getObjectsExtractedByClazz().get(o.getClass().getCanonicalName());
|
||||
if (objExtr == null) {
|
||||
throw new RuntimeException("cannot find object in meta for " + o.getClass().getCanonicalName());
|
||||
}
|
||||
Map<String, Object> r = new LinkedHashMap<>();
|
||||
FieldExtracted currentField = null;
|
||||
try {
|
||||
for (FieldExtracted field : objExtr.getFields()) {
|
||||
if (field.getField().isVirtual() != null && field.getField().isVirtual()) {
|
||||
continue;
|
||||
}
|
||||
currentField = field;
|
||||
// if (fieldsToAdd.contains(field.getField().getCode())) {
|
||||
try {
|
||||
add(r, field.getField().getCode(), field.extractValue(o));
|
||||
} catch (Throwable e) {
|
||||
log.warn(ExceptionUtils.getStackTrace(
|
||||
new RuntimeException(String.format("Can't extract value for field='%s' of %s(%s): %s -> %s\n%s",
|
||||
field.getField().getCode(),
|
||||
o.getClass().getSimpleName(), objExtr.getClassName(),
|
||||
e.getClass().getSimpleName(), e.getLocalizedMessage(),
|
||||
currentField.toString()
|
||||
)))
|
||||
);
|
||||
}
|
||||
// }
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(ExceptionUtils.getStackTrace(e));
|
||||
return null;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
private void add(Map<String, Object> response, String name, Object value) {
|
||||
Object data;
|
||||
if (value instanceof Date) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss+03:00");
|
||||
data = sdf.format(value);
|
||||
} else if (value instanceof Instant) {
|
||||
data = dateTimeFormatter.format((Instant) value);
|
||||
} else {
|
||||
data = value;
|
||||
}
|
||||
response.put(name, data);
|
||||
}
|
||||
|
||||
private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter
|
||||
.ofPattern("yyyy-MM-dd'T'HH:mm:ss+03:00")
|
||||
.withLocale(Locale.US)
|
||||
.withZone(ZoneId.of("Europe/Moscow"));
|
||||
|
||||
|
||||
// public Map<String, Object> newX(Object o, Collection<String> fieldFilter, String destination) {
|
||||
// ObjectExtracted targetClazz = getTargetClazz(o, destination);
|
||||
// if (targetClazz == null)
|
||||
// throw new FrontendException(String.format("Unknown response class: %s", o.getClass().getName()));
|
||||
// Collection<String> fieldsToAdd = getFilteredFields(targetClazz, fieldFilter);
|
||||
// Map<String, Object> r = new LinkedHashMap<>();
|
||||
// FieldExtracted currentField = null;
|
||||
// try {
|
||||
// for (FieldExtracted field : targetClazz.getFields()) {
|
||||
// if (field.getField().isVirtual() != null && field.getField().isVirtual()) {
|
||||
// continue;
|
||||
// }
|
||||
// currentField = field;
|
||||
// if (fieldsToAdd.contains(field.getField().getCode())) {
|
||||
// try {
|
||||
// add(r, field.getField().getCode(), field.extractValue(o));
|
||||
// } catch (Throwable e) {
|
||||
// log.warn(ExceptionUtils.getStackTrace(
|
||||
// new FrontendException(String.format("Can't extract value for field='%s' of %s(%s): %s -> %s\n%s",
|
||||
// field.getField().getCode(),
|
||||
// o.getClass().getSimpleName(), targetClazz.getClazz().getSimpleName(),
|
||||
// e.getClass().getSimpleName(), e.getLocalizedMessage(),
|
||||
// JsonHelper.writeAnyClassToLog(currentField)
|
||||
// )))
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } catch (FrontendException e) {
|
||||
// throw e;
|
||||
// } catch (Throwable e) {
|
||||
// throw new FrontendException(String.format("Can't get field of %s(%s): %s -> %s\n%s",
|
||||
// o.getClass().getSimpleName(), targetClazz.getClazz().getSimpleName(),
|
||||
// e.getClass().getSimpleName(), e.getLocalizedMessage(),
|
||||
// JsonHelper.writeAnyClassToLog(currentField)
|
||||
// ));
|
||||
// }
|
||||
// return r;
|
||||
// }
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class MetaBase {
|
||||
|
||||
@JsonProperty(required = true, defaultValue = "unknown")
|
||||
private String version = null;
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private Map<String, ObjectEnumElement> enums = new LinkedHashMap<>();
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private Map<String, ObjectElement> objects = new LinkedHashMap<>();
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private List<Map<String, String>> types = new LinkedList<>();
|
||||
|
||||
@JsonProperty
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Map<String, Object> views = new HashMap<>();
|
||||
|
||||
public Map<String, ObjectEnumElement> getEnums() {
|
||||
return enums;
|
||||
}
|
||||
|
||||
public Map<String, ObjectElement> getObjects() {
|
||||
return objects;
|
||||
}
|
||||
|
||||
public List<Map<String, String>> getTypes() {
|
||||
return types;
|
||||
}
|
||||
|
||||
public Map<String, Object> getViews() {
|
||||
return views;
|
||||
}
|
||||
|
||||
public void setViews(Map<String, Object> views) {
|
||||
this.views = views;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import ru.spcex.platform.utils.enumeration.IEnumId;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class MetaDataTypeDeserializer extends JsonDeserializer<MetaDataTypes> {
|
||||
@Override
|
||||
public MetaDataTypes deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
|
||||
if (p.getText() != null && p.getText().length() > 0) {
|
||||
if (!"0".equals(p.getText()) && !p.getText().matches("[1-9]+[0-9]*")) return null;
|
||||
Long metaDataType = new Long(p.getText());
|
||||
return IEnumId.getEnumById(MetaDataTypes.class, metaDataType);
|
||||
} else return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class MetaDataTypeSerializer extends JsonSerializer<MetaDataTypes> {
|
||||
@Override
|
||||
public void serialize(MetaDataTypes metaDataTypes, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
|
||||
jsonGenerator.writeNumber(metaDataTypes.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import ru.spcex.platform.utils.enumeration.IEnumId;
|
||||
|
||||
public enum MetaDataTypes implements IEnumId {
|
||||
Identity(1L),
|
||||
String(2L),
|
||||
Long(3L),
|
||||
DateTime(4L),
|
||||
Time(5L),
|
||||
Date(6L),
|
||||
Array(7L),
|
||||
Object(8L),
|
||||
Boolean(9L),
|
||||
Double(10L),
|
||||
UID(11L);
|
||||
|
||||
private final Long id;
|
||||
|
||||
MetaDataTypes(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public java.lang.Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public int getTypeSize() {
|
||||
switch (this) {
|
||||
case Long:
|
||||
return java.lang.String.valueOf(java.lang.Long.MAX_VALUE).length();
|
||||
case Identity:
|
||||
return java.lang.String.valueOf(java.lang.Long.MAX_VALUE).length();
|
||||
case DateTime:
|
||||
return 25;
|
||||
case Time:
|
||||
return 25;
|
||||
case Date:
|
||||
return 25;
|
||||
case Array:
|
||||
return java.lang.String.valueOf(java.lang.Long.MAX_VALUE).length() * 400;
|
||||
case Boolean:
|
||||
return java.lang.Boolean.TRUE.toString().length();
|
||||
case Double:
|
||||
return 18;
|
||||
case UID:
|
||||
return 36;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,199 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class MetaServer extends MetaBase {
|
||||
private final Logger log = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
private Collection<ObjectExtracted> objectsExtracted;
|
||||
private Map<String, ObjectExtracted> objectsExtractedByClazz;
|
||||
private Map<String, ObjectExtracted> objectsExtractedByDestination;
|
||||
private Map<String, ObjectExtracted> actionObjectsExtracted;
|
||||
private Map<String, ObjectElement> objectElementByDestination;
|
||||
|
||||
protected ObjectExtracted getImplInstanceObjectExtracted(String clazz, List<ActionField> actionFields) {
|
||||
return new ClearingObjectExtracted(clazz, actionFields);
|
||||
}
|
||||
|
||||
private int classNameMock = 1;
|
||||
@SuppressWarnings("Duplicates")
|
||||
public void initAndValidate() throws ClearingMetaServerValidationException, OtcMetaServerGetterNotFoundException {
|
||||
if (objectsExtracted == null) {
|
||||
objectsExtracted = new LinkedList<>();
|
||||
actionObjectsExtracted = new ConcurrentHashMap<>();
|
||||
objectsExtractedByClazz = new ConcurrentHashMap<>();
|
||||
objectsExtractedByDestination = new ConcurrentHashMap<>();
|
||||
objectElementByDestination = new ConcurrentHashMap<>();
|
||||
try {
|
||||
Map<String, ObjectElement> objects = getObjects();
|
||||
log.info("Meta objects:\n{}",
|
||||
objects.values()
|
||||
.stream()
|
||||
.map(ObjectElement::getName)
|
||||
.collect(Collectors.joining(";", "[", "]")));
|
||||
for (String key : objects.keySet()) {
|
||||
ObjectExtracted oe;
|
||||
ObjectElement objectElement = objects.get(key);
|
||||
if (objectElement.getSubscription() != null) {
|
||||
objectElementByDestination.put(objectElement.getSubscription().destination, objectElement);
|
||||
if (objectElement.getSubscriptionHistory() != null) {
|
||||
objectElementByDestination.put(objectElement.getSubscriptionHistory().destination, objectElement);
|
||||
}
|
||||
}
|
||||
try {
|
||||
oe = getImplInstanceObjectExtracted(objectElement.getClazz(), objectElement.getFields());
|
||||
} catch (Throwable e) {
|
||||
log.warn("META SERVER >>> Класс {} для {} не найден!", objects.get(key).getClazz(), key);
|
||||
continue;
|
||||
}
|
||||
objectsExtracted.add(oe);
|
||||
if (oe.getClassName() != null) {
|
||||
ObjectExtracted previous = objectsExtractedByClazz.put(oe.getClassName(), oe);
|
||||
if (previous != null) {
|
||||
log.warn("!!! meta contains duplicate classes {}", oe.getClassName());
|
||||
}
|
||||
} else
|
||||
objectsExtractedByClazz.put(String.valueOf(classNameMock++), oe);
|
||||
if (objectElement.getSubscription() != null && objectElement.getSubscription().destination != null) {
|
||||
objectsExtractedByDestination.put(objectElement.getSubscription().destination, oe);
|
||||
}
|
||||
for (ActionElement actionElement : objectElement.getActions()) {
|
||||
if (actionElement.getClazz() == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
oe = getImplInstanceObjectExtracted(actionElement.getClazz(), actionElement.getFields());
|
||||
if (actionElement.getArray() != null) {
|
||||
oe.setArray(actionElement.getArray());
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
log.warn("META SERVER >>> {}", e.getLocalizedMessage());
|
||||
continue;
|
||||
}
|
||||
actionObjectsExtracted.put(actionElement.getDestination(), oe);
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
throw new ClearingMetaServerValidationException(e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
for (ObjectExtracted o : this.objectsExtracted) {
|
||||
try {
|
||||
if (!RfHelper.isAbstract(o.getClazz())) {
|
||||
try {
|
||||
Object instance = newInstance(o.getClassName());
|
||||
// создается успешно.
|
||||
} catch (Throwable e) {
|
||||
log.warn("META SERVER >>> Не удается создать класс {} !", o.getClassName());
|
||||
}
|
||||
}
|
||||
validateGetterForObject(o);
|
||||
} catch (OtcMetaServerGetterNotFoundException e) {
|
||||
throw e;
|
||||
} catch (Throwable e) {
|
||||
throw new ClearingMetaServerValidationException(e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
//
|
||||
// for (ObjectExtracted o : this.actionObjectsExtracted.values()) {
|
||||
// try {
|
||||
// if (!RfHelper.isAbstract(o.getClazz())) {
|
||||
// try {
|
||||
// Object instance = newInstance(o.getClassName());
|
||||
// // создается успешно.
|
||||
// } catch (Throwable e) {
|
||||
// log.warn("META SERVER ACTION >>> Не удается создать класс {} !", o.getClassName());
|
||||
// }
|
||||
// }
|
||||
// validateGetterForObject(o);
|
||||
// } catch (OtcMetaServerGetterNotFoundException e) {
|
||||
// throw e;
|
||||
// } catch (Throwable e) {
|
||||
// throw new ClearingMetaServerValidationException(e.getLocalizedMessage());
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* проверим наличие геттеров к полям
|
||||
*
|
||||
* @param o
|
||||
* @throws ClassNotFoundException
|
||||
*/
|
||||
private void validateGetterForObject(ObjectExtracted o) throws ClassNotFoundException {
|
||||
for (FieldExtracted field : o.getFields()) {
|
||||
Class<?> c = o.getClazz();
|
||||
for (String getterName : field.getGetterNames()) {
|
||||
try {
|
||||
Method m = RfHelper.searchGetter(c, getterName);
|
||||
if (m == null) {
|
||||
for (Class<?> sub : RfHelper.getSubclasses(c)) {
|
||||
m = RfHelper.searchGetter(sub, getterName);
|
||||
if (m != null)
|
||||
break;
|
||||
}
|
||||
if (m == null) {
|
||||
throw new OtcMetaServerGetterNotFoundException(c, getterName);
|
||||
}
|
||||
}
|
||||
c = RfHelper.getMetodReturnClazz(m);
|
||||
} catch (OtcMetaServerGetterNotFoundException e) {
|
||||
log.warn("META SERVER >>> Геттер {}.{} не найден!", o.getClassName(), getterName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Object newInstance(String className, Object... args) throws Exception {
|
||||
Class<?> clazz = Class.forName(className);
|
||||
if (args == null || args.length == 0) {
|
||||
return clazz.newInstance();
|
||||
}
|
||||
|
||||
List<Class<?>> argTypes = new ArrayList<Class<?>>();
|
||||
for (Object object : args) {
|
||||
argTypes.add(object.getClass());
|
||||
}
|
||||
Constructor<?> explicitConstructor = clazz.getConstructor(argTypes.toArray(new Class[argTypes.size()]));
|
||||
return explicitConstructor.newInstance(args);
|
||||
}
|
||||
|
||||
public Collection<ObjectExtracted> getObjectsExtracted() {
|
||||
return objectsExtracted;
|
||||
}
|
||||
|
||||
public Map<String, ObjectExtracted> getActionObjectsExtracted() {
|
||||
return actionObjectsExtracted;
|
||||
}
|
||||
|
||||
public Map<String, ObjectExtracted> getObjectsExtractedByClazz() {
|
||||
return objectsExtractedByClazz;
|
||||
}
|
||||
|
||||
public Map<String, ObjectElement> getObjectElementByDestination() {
|
||||
return objectElementByDestination;
|
||||
}
|
||||
|
||||
public Map<String, ObjectExtracted> getObjectsExtractedByDestination() {
|
||||
return objectsExtractedByDestination;
|
||||
}
|
||||
|
||||
public Integer getPartSizeValueByDestination(String destination) {
|
||||
ObjectElement objectElementByDestination = getObjectElementByDestination().get(destination);
|
||||
Integer partSize = null;
|
||||
if (objectElementByDestination == null) {
|
||||
log.warn("Null objectElement for destination: {}", destination);
|
||||
} else {
|
||||
partSize = objectElementByDestination.getSubscription().getPartSize();
|
||||
}
|
||||
return partSize;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@SuppressWarnings({"DefaultAnnotationParam", "unused"})
|
||||
public class ObjectElement {
|
||||
@JsonProperty(required = true)
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty(value = "class", required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private String clazz = null;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private String table = null;
|
||||
|
||||
@JsonProperty(value = "fields", required = true)
|
||||
private List<ActionField> fields = new LinkedList<>();
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Map<String, Object> query = new LinkedHashMap<>();
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Subscription subscription;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Subscription subscriptionHistory;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<ActionElement> actions = new LinkedList<>();
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<Map<String, String>> values = new LinkedList<>();
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Map<String, Object> views = new HashMap<>();
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getClazz() {
|
||||
return clazz;
|
||||
}
|
||||
|
||||
public Map<String, Object> getQuery() {
|
||||
return query;
|
||||
}
|
||||
|
||||
public Subscription getSubscription() {
|
||||
return subscription;
|
||||
}
|
||||
|
||||
public List<ActionElement> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public List<Map<String, String>> getValues() {
|
||||
return values;
|
||||
}
|
||||
|
||||
public List<ActionField> getFields() {
|
||||
return fields;
|
||||
}
|
||||
|
||||
public Subscription getSubscriptionHistory() {
|
||||
return subscriptionHistory;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@SuppressWarnings({"DefaultAnnotationParam", "unused"})
|
||||
public class ObjectEnumElement {
|
||||
@JsonProperty(required = true)
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty(value = "class", required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private String clazz = null;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private String table = null;
|
||||
|
||||
@JsonProperty(value = "fields", required = true)
|
||||
private List<ActionField> fields = new LinkedList<>();
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Map<String, Object> query = new LinkedHashMap<>();
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<ActionElement> actions = new LinkedList<>();
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private List<Map<String, Object>> values = new LinkedList<>();
|
||||
|
||||
@JsonProperty(required = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Map<String, Object> views = new HashMap<>();
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getClazz() {
|
||||
return clazz;
|
||||
}
|
||||
|
||||
public Map<String, Object> getQuery() {
|
||||
return query;
|
||||
}
|
||||
|
||||
public List<ActionElement> getActions() {
|
||||
return actions;
|
||||
}
|
||||
|
||||
public List<Map<String, Object>> getValues() {
|
||||
return values;
|
||||
}
|
||||
|
||||
public List<ActionField> getFields() {
|
||||
return fields;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public abstract class ObjectExtracted {
|
||||
private String className;
|
||||
private Class<?> clazz;
|
||||
private List<FieldExtracted> fields = new LinkedList<>();
|
||||
private Map<String, FieldExtracted> fieldByCode = new ConcurrentHashMap<>();
|
||||
private boolean isArray = false;
|
||||
|
||||
|
||||
public ObjectExtracted(String clazz, List<ActionField> actionFields) {
|
||||
this.className = clazz;
|
||||
try {
|
||||
this.clazz = Class.forName(this.className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new ClearingMetaServerValidationException(String.format("Class not found [%s]", this.className));
|
||||
}
|
||||
for (ActionField field : actionFields) {
|
||||
if (field.getVirtual() != null && field.isVirtual()){
|
||||
continue;
|
||||
}
|
||||
FieldExtracted fe = getImplFieldExtracted(field);
|
||||
fields.add(fe);
|
||||
fieldByCode.put(field.getCode(), fe);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract FieldExtracted getImplFieldExtracted(ActionField field);
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%s (fields=%d)", className, fields.size());
|
||||
}
|
||||
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public Class<?> getClazz() {
|
||||
return clazz;
|
||||
}
|
||||
|
||||
public List<FieldExtracted> getFields() {
|
||||
return new ArrayList<>(fields);
|
||||
}
|
||||
|
||||
public Map<String, FieldExtracted> getFieldByCode() {
|
||||
return new HashMap<>(fieldByCode);
|
||||
}
|
||||
|
||||
public boolean isArray() {
|
||||
return isArray;
|
||||
}
|
||||
|
||||
public void setArray(boolean array) {
|
||||
isArray = array;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
|
||||
import ru.clearing.classes.ConstSerializable;
|
||||
|
||||
public class OtcMetaServerGetterNotFoundException extends RuntimeException {
|
||||
private static final long serialVersionUID = ConstSerializable.serialVersionUID;
|
||||
|
||||
public OtcMetaServerGetterNotFoundException(Class clazz, String getterName) {
|
||||
super(
|
||||
String.format(
|
||||
"Method %s() not found for class %s and subclasses!",
|
||||
getterName, clazz
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import org.reflections.Reflections;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.lang.reflect.ParameterizedType;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class RfHelper {
|
||||
|
||||
private static Map<String, Reflections> REFLECTION_CACHE = new HashMap<>();
|
||||
public static final String BUSINESS_OBJECT_REF = "BusinessObjectRef";
|
||||
public static final String OTC_CLASSES_PACKAGE = "com.moex.otc.classes";
|
||||
public static final String GETTER_NAME_PREFIX = "get";
|
||||
public static final String GETTER_NAME_ID = GETTER_NAME_PREFIX + "Id";
|
||||
|
||||
public static Method searchGetter(Class<?> methodOwner, String name) {
|
||||
for (Method m : methodOwner.getMethods()) {
|
||||
if (m.getName().equals(name)) {
|
||||
return m;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <T> Class<?>[] getSubclasses(Class<T> clazz) {
|
||||
return getSubclasses(clazz, OTC_CLASSES_PACKAGE);
|
||||
}
|
||||
|
||||
public static <T> Class<?>[] getSubclasses(Class<T> clazz, String packageName) {
|
||||
Reflections reflections = REFLECTION_CACHE.computeIfAbsent(packageName, k -> new Reflections(packageName));
|
||||
Set<Class<? extends T>> classes = reflections.getSubTypesOf(clazz);
|
||||
return classes.toArray(new Class<?>[]{});
|
||||
}
|
||||
|
||||
public static boolean isAbstract(Class<?> clazz) {
|
||||
return Modifier.isAbstract(clazz.getModifiers());
|
||||
}
|
||||
|
||||
public static Class getMetodReturnClazz(Method m) throws ClassNotFoundException {
|
||||
Type t = m.getAnnotatedReturnType().getType();
|
||||
if (t instanceof ParameterizedType) {
|
||||
Class<?> raw = Class.forName(((ParameterizedType) t).getRawType().getTypeName());
|
||||
if (BUSINESS_OBJECT_REF.equals(raw.getSimpleName())) {
|
||||
return Class.forName(((ParameterizedType) t).getActualTypeArguments()[0].getTypeName());
|
||||
} else if ("Set".equals(raw.getSimpleName())) { // множества пока не распаковываем
|
||||
return Class.forName(raw.getName());
|
||||
}
|
||||
}
|
||||
return Class.forName(t.getTypeName());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class Subscription {
|
||||
@JsonProperty
|
||||
public String destination;
|
||||
|
||||
@JsonProperty
|
||||
public boolean enabled;
|
||||
|
||||
@JsonProperty(value = "partSize")
|
||||
private Integer partSize;
|
||||
|
||||
public String getDestination() {
|
||||
return destination;
|
||||
}
|
||||
|
||||
public void setDestination(String destination) {
|
||||
this.destination = destination;
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public Integer getPartSize() {
|
||||
return partSize;
|
||||
}
|
||||
|
||||
public void setPartSize(Integer partSize) {
|
||||
this.partSize = partSize;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ package ru.spcex.clearing.backendapi.service;
|
|||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
|
|
@ -11,4 +12,5 @@ import java.util.Optional;
|
|||
public interface IStateLoader {
|
||||
<T extends SpcexObjectBase> Optional<T> getById(Long id, String mapName, Class<T> clazz);
|
||||
<T extends SpcexObjectBase> Collection<T> getAll(String mapName, Class<T> clazz);
|
||||
<T extends SpcexObjectBase> Collection<Map<String, Object>> getAllMetaTransform(String mapName, Class<T> clazz);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package ru.spcex.clearing.backendapi.service.impl;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.spcex.clearing.backendapi.meta.GetResponseFactory;
|
||||
import ru.spcex.clearing.backendapi.service.IStateLoader;
|
||||
import ru.spcex.platform.classes.base.SpcexObjectBase;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
|
|
@ -16,9 +17,11 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
public class StateLoaderImpl implements IStateLoader {
|
||||
private final Map<String, Imdg<?>> allImdgMaps;
|
||||
private final ImdgProvider imdgProvider;
|
||||
private final GetResponseFactory responseFactory;
|
||||
|
||||
@Autowired
|
||||
public StateLoaderImpl(ImdgProvider imdgProvider) {
|
||||
public StateLoaderImpl(ImdgProvider imdgProvider, GetResponseFactory responseFactory) {
|
||||
this.responseFactory = responseFactory;
|
||||
this.allImdgMaps = new ConcurrentHashMap<>();
|
||||
this.imdgProvider = imdgProvider;
|
||||
}
|
||||
|
|
@ -35,6 +38,12 @@ public class StateLoaderImpl implements IStateLoader {
|
|||
return imdg.getAllValues();
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends SpcexObjectBase> Collection<Map<String, Object>> getAllMetaTransform(String mapName, Class<T> clazz) {
|
||||
Collection<T> all = getAll(mapName, clazz);
|
||||
return responseFactory.responseFromObjectCollection(all);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T extends SpcexObjectBase> Imdg<T> getImdg(String mapName, Class<T> clazz) {
|
||||
return (Imdg<T>) allImdgMaps.computeIfAbsent(mapName, (mapName1) -> imdgProvider.getImdg(mapName, clazz));
|
||||
|
|
|
|||
|
|
@ -47,19 +47,19 @@
|
|||
<xsl:template match="*" mode="types">
|
||||
<xsl:if test="position() > 1">,</xsl:if>
|
||||
{
|
||||
"<xsl:value-of select="name(.)"/>": {
|
||||
"code": "<xsl:value-of select="name(.)"/>",
|
||||
<xsl:for-each select="@*">
|
||||
"<xsl:value-of select="name()"/>": "<xsl:value-of select="."/>"
|
||||
<xsl:if test="position() != last()">,</xsl:if>
|
||||
</xsl:for-each>
|
||||
}}
|
||||
}
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template match="*" mode="enums">
|
||||
<xsl:if test="position() > 1">,</xsl:if>
|
||||
"<xsl:value-of select="name(.)"/>": {
|
||||
<xsl:for-each select="@*[name()!='class']">
|
||||
<xsl:for-each select="@*">
|
||||
"<xsl:value-of select="name()"/>": "<xsl:value-of select="."/>",
|
||||
</xsl:for-each>
|
||||
"fields": [<xsl:apply-templates select="*" mode="field"/>]
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
<xsl:template match="*" mode="objects">
|
||||
<xsl:if test="position() > 1">,</xsl:if>
|
||||
"<xsl:value-of select="name(.)"/>": {
|
||||
<xsl:for-each select="@*[name()!='class']">
|
||||
<xsl:for-each select="@*">
|
||||
"<xsl:value-of select="name()"/>": "<xsl:value-of select="."/>",
|
||||
</xsl:for-each>
|
||||
"fields": [<xsl:apply-templates select="*[name()!='actions']" mode="field"/>]
|
||||
|
|
@ -148,8 +148,7 @@
|
|||
|
||||
<xsl:template match="*" mode="field">
|
||||
<xsl:if test="position() > 1">,</xsl:if>
|
||||
{"<xsl:value-of select="name()"/>":
|
||||
{
|
||||
{"code": "<xsl:value-of select="name()"/>",
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:choose>
|
||||
<xsl:when test="name()='type'">"<xsl:value-of select="name()"/>": <xsl:value-of select="."/></xsl:when>
|
||||
|
|
@ -164,7 +163,7 @@
|
|||
</xsl:choose>
|
||||
<xsl:if test="position() != last()">,</xsl:if>
|
||||
</xsl:for-each>
|
||||
}}
|
||||
}
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="value">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--?xml-stylesheet type="text/xsl" href="\..\corp-reports\src\data\meta\meta.server.xslt"?-->
|
||||
<meta version="0.0.0.6">
|
||||
<meta version="1.2.0.0">
|
||||
<!-- _xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" _xsi:noNamespaceSchemaLocation="file:///E:/d/projects/meta/from/meta.xsd" -->
|
||||
<!--Здесь словари-->
|
||||
<enums>
|
||||
|
|
@ -242,7 +242,7 @@
|
|||
</notificationStatus>
|
||||
</enums>
|
||||
<objects>
|
||||
<userCls name="Пользователь" class="com.spicex.Static.User.UserCls" logUpdates="true" table="UserCls">
|
||||
<userCls name="Пользователь" class="ru.clearing.classes.statics.data.user.User" logUpdates="true" table="UserCls">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -254,14 +254,14 @@
|
|||
</put>
|
||||
</actions>
|
||||
</userCls>
|
||||
<userRoleSession name="Набор ролей" class="ccom.spicex.Static.User.UserRoleSession" table="UserRoleSession">
|
||||
<userRoleSession name="Набор ролей" class="ru.clearing.classes.statics.data.user.UserRoleSession" table="UserRoleSession">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<userId type="1" name="Идентификатор пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls"/>
|
||||
<userRole type="12" name="Идентификатор роли" shortname="Роль" searchable="true" sortable="true" visible="true" link="userRole"/>
|
||||
<companyId type="1" name="Идентификатор компании" shortname="Компания" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<status type="12" name="Статус" shortname="Статус" searchable="true" sortable="true" link="workflowStatus"/>
|
||||
</userRoleSession>
|
||||
<userSettings name="Настройки пользователя" class="ru.clearing.classes.static.data.User.UserSettings" table="userSettings">
|
||||
<userSettings name="Настройки пользователя" class="ru.clearing.classes.statics.data.user.UserSettings" table="userSettings">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<userId type="1" name="Пользователь" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls"/>
|
||||
<version type="2" length="50" name="Версия настроек пользователя" shortname="Версия" searchable="false" sortable="false" visible="true"/>
|
||||
|
|
@ -274,7 +274,7 @@
|
|||
</put>
|
||||
</actions>
|
||||
</userSettings>
|
||||
<userConnect name="Активность пользователей в системе" class="com.spicex.Static.User.UserConnect" logUpdates="true" table="UserConnect">
|
||||
<userConnect name="Активность пользователей в системе" class="ru.clearing.classes.statics.data.user.UserConnect" logUpdates="true" table="UserConnect">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -288,7 +288,7 @@
|
|||
<errorCode type="1" name="Код ошибки" shortname="Код ошибки" searchable="true" sortable="true" link="errorCode" linkCode="code"/>
|
||||
<errorText type="12" name="Полный текст ошибки" shortname="Ошибка" searchable="true" sortable="true" link="errorText" linkCode="text"/>
|
||||
</userConnect>
|
||||
<timetable name="Постоянное расписание операционного дня" class="ru.clearing.classes.static.data.Scheduler.TimeTable" table="Timetable">
|
||||
<timetable name="Постоянное расписание операционного дня" class="ru.clearing.classes.statics.data.scheduler.Timetable" table="Timetable">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -312,7 +312,7 @@
|
|||
</delete>
|
||||
</actions>
|
||||
</timetable>
|
||||
<tradingCalendar name="Торговые и неторговые дни" class="ru.clearing.classes.static.data.Scheduler.TradingCalendar" table="TradingCalendar">
|
||||
<tradingCalendar name="Торговые и неторговые дни" class="ru.clearing.classes.statics.data.scheduler.TradingCalendar" table="TradingCalendar">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -336,7 +336,7 @@
|
|||
</delete>
|
||||
</actions>
|
||||
</tradingCalendar>
|
||||
<scheduler name="Расписание планировщика" class="ru.clearing.classes.static.data.Scheduler.Scheduler" table="Scheduler">
|
||||
<scheduler name="Расписание планировщика" class="ru.clearing.classes.statics.data.scheduler.Scheduler" table="Scheduler">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -369,7 +369,7 @@
|
|||
</delete>
|
||||
</actions>
|
||||
</scheduler>
|
||||
<schedulerAllToday name="Расписание на текущий день" class="ru.clearing.classes.static.data.Scheduler.SchedulerAllToday" table="SchedulerAllToday">
|
||||
<schedulerAllToday name="Расписание на текущий день" class="ru.clearing.classes.statics.data.scheduler.SchedulerAllToday" table="SchedulerAllToday">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<task type="12" name="Идентификатор задачи" shortname="Задача" searchable="true" sortable="true" visible="true" link="task"/>
|
||||
<taskTime type="5" name="Время" shortname="Время" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -380,7 +380,7 @@
|
|||
<source type="12" name="Источник записи расписания" shortname="Источник" searchable="true" sortable="true" link="source"/>
|
||||
<origId type="1" name="Идентификатор источника" shortname="ID" searchable="false" sortable="false"/>
|
||||
</schedulerAllToday>
|
||||
<taskRunner name="Запуск задачи" class="ru.clearing.classes.static.data.Scheduler.TaskRunner" table="TaskRunnerRequest">
|
||||
<taskRunner name="Запуск задачи" class="ru.clearing.classes.statics.data.scheduler.TaskRunner" table="TaskRunnerRequest">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt type="4" name="Создано" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -394,9 +394,10 @@
|
|||
<getBalanceDiff group="Обмен с расчетной организацией" name="Поступление средств (загрузка ДФ-09)" destination=""/>
|
||||
<createOrder group="Обмен с расчетной организацией" name="Формирование сводного платежного поручения (экспорт ДФ-03/ДФ-11)" destination=""/>
|
||||
<createOrderConfirm group="Обмен с расчетной организацией" name="Получение подтверждения переводов (загрузка ДФ-04)" destination=""/>
|
||||
<getTrades group="Обмен с Торговой системой" name="Получение сделок из Торговой системы" destination=""/>
|
||||
</actions>
|
||||
</taskRunner>
|
||||
<company name="Участник" class="com.spicex.Static.Account." logUpdates="true">
|
||||
<company name="Участник" class="ru.clearing.classes.statics.data.company.Company" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -412,7 +413,7 @@
|
|||
</delete>
|
||||
</actions>
|
||||
</company>
|
||||
<companyInfo name="Профиль Компании" class="com.spicex.Static.Account." logUpdates="true">
|
||||
<companyInfo name="Профиль Компании" class="ru.clearing.classes.statics.data.profile.CompanyInfo" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<companyId type="1" name="Идентификатор Компании" shortname="Идентификатор Компании" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<corporationSoleType type="12" name="Идентификатор единоличного исполнительного органа" shortname="Единоличный исполнительный орган" searchable="true" sortable="true" visible="true" link="corporationSoleType"/>
|
||||
|
|
@ -446,7 +447,7 @@
|
|||
</put>
|
||||
</actions>
|
||||
</companyInfo>
|
||||
<clearingMemberCategory name="Категории Участника клиринга" class="com.spicex.Static.Account.">
|
||||
<clearingMemberCategory name="Категории Участника клиринга" class="ru.clearing.classes.statics.data.generated.ClearingMemberCategory">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<companyId type="1" name="Идентификатор Компании" shortname="Идентификатор Компании" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<clearingMemberCategory type="12" name="Идентификатор категории участника клиринга" shortname="Категория" searchable="true" sortable="true" visible="true" link="clearingCategory"/>
|
||||
|
|
@ -464,7 +465,7 @@
|
|||
</delete>
|
||||
</actions>
|
||||
</clearingMemberCategory>
|
||||
<contact name="Контакты Компании" class="com.spicex.Static.Account.">
|
||||
<contact name="Контакты Компании" class="ru.clearing.classes.statics.data.profile.Contact">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<companyId type="1" name="Идентификатор Компании" shortname="Идентификатор Компании" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<contactType type="12" name="Идентификатор справочника" shortname="Тип контакта" searchable="true" sortable="true" visible="true" link="contactType"/>
|
||||
|
|
@ -477,7 +478,7 @@
|
|||
</put>
|
||||
</actions>
|
||||
</contact>
|
||||
<profileDocument name="Досье Компании" class="com.spicex.Static.Account.">
|
||||
<profileDocument name="Досье Компании" class="ru.clearing.classes.statics.data.profile.ProfileDocument">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<companyId type="1" name="Идентификатор Компании" shortname="Идентификатор Компании" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<documentType type="12" name="Идентификатор типа документа" shortname="Идентификатор типа документа" searchable="true" sortable="true" visible="true" link="documentType"/>
|
||||
|
|
@ -491,8 +492,24 @@
|
|||
<validFromDate type="6" name="Дата начала срока действия" shortname="Дата начала срока действия" searchable="true" sortable="true"/>
|
||||
<validToDate type="6" name="Дата окончания срока действия" shortname="Дата окончания срока действия" searchable="true" sortable="true"/>
|
||||
<link type="2" length="255" name="Ссылка на документ" shortname="Ссылка на документ" searchable="true" sortable="true" visible="true"/>
|
||||
<actions>
|
||||
<post name="Добавление документов" destination="">
|
||||
<companyId type="1" name="Идентификатор Компании" shortname="Идентификатор Компании" searchable="true" sortable="true" visible="true" link="company" required="true"/>
|
||||
<documentType type="12" name="Идентификатор типа документа" shortname="Идентификатор типа документа" searchable="true" sortable="true" visible="true" link="documentType" required="true"/>
|
||||
<issueDate type="6" name="Дата выдачи" shortname="Дата выдачи" searchable="true" sortable="true" required="true"/>
|
||||
<issuePlace type="2" length="255" name="Место выдачи" shortname="Место выдачи" searchable="true" sortable="true" visible="true" required="true"/>
|
||||
<issuer type="2" length="255" name="Кем выдан" shortname="Кем выдан" searchable="true" sortable="true" visible="true" required="true"/>
|
||||
<issuerCode type="2" length="255" name="Код выдавшего органа" shortname="Код выдавшего органа" searchable="true" sortable="true" visible="true" required="true"/>
|
||||
<name type="2" length="255" name="Наименование" shortname="Наименование" searchable="true" sortable="true" visible="true" required="true"/>
|
||||
<number type="2" length="255" name="Номер" shortname="Номер" searchable="true" sortable="true" visible="true" required="true"/>
|
||||
<place type="2" length="255" name="Место" shortname="Место" searchable="true" sortable="true" visible="true" required="true"/>
|
||||
<validFromDate type="6" name="Дата начала срока действия" shortname="Дата начала срока действия" searchable="true" sortable="true" required="true"/>
|
||||
<validToDate type="6" name="Дата окончания срока действия" shortname="Дата окончания срока действия" searchable="true" sortable="true" required="true"/>
|
||||
<link type="2" length="255" name="Ссылка на документ" shortname="Ссылка на документ" searchable="true" sortable="true" visible="true"/>
|
||||
</post>
|
||||
</actions>
|
||||
</profileDocument>
|
||||
<companySymbols name="Реквизиты Компании" class="com.spicex.Static.Account.">
|
||||
<companySymbols name="Реквизиты Компании" class="ru.clearing.classes.statics.data.company.CompanySymbols">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<companyId type="1" name="Идентификатор Компании" shortname="Идентификатор Компании" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<companySymbol type="12" name="Идентификатор справочника" shortname="Тип реквизита" searchable="true" sortable="true" visible="true" link="companySymbol"/>
|
||||
|
|
@ -540,7 +557,7 @@
|
|||
<clearingCode type="2" length="255" name="Код участника клиринга" shortname="Клиринговый код" searchable="true" sortable="true" visible="true"/>
|
||||
<comment type="2" length="255" name="Комментарий" shortname="Комментарий" searchable="true" sortable="true" visible="true"/>
|
||||
</clearmemberRegistryChange>
|
||||
<keyRate name="Ключевая ставка ЦБ" class="ru.clearing.classes.StaticData.Misc.KeyRate">
|
||||
<keyRate name="Ключевая ставка ЦБ" class="ru.clearing.classes.statics.data.misc.KeyRate">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<rate type="10" name="Ключевая ставка ЦБ РФ" shortname="Ставка" searchable="true" sortable="true" visible="true"/>
|
||||
<startDate type="6" name="Дата начала действия ключевой ставки" shortname="Начальная дата" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -566,12 +583,12 @@
|
|||
</delete>
|
||||
</actions>
|
||||
</keyRate>
|
||||
<companyRoleSet name="Таблица ролей Компании" class="com.spicex.Static.Account.">
|
||||
<companyRoleSet name="Таблица ролей Компании" class="ru.clearing.classes.statics.data.company.CompanyRoleSet">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<companyId type="1" name="Идентификатор списка ролей Компании" shortname="Идентификатор списка ролей Компании" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<roleId type="1" name="Значение справочника" shortname="Значение" searchable="true" sortable="true" visible="true" link="companyRole"/>
|
||||
</companyRoleSet>
|
||||
<account name="Счета" class="com.spicex.Static.Account.CurrentBankAccount" logUpdates="true">
|
||||
<account name="Счета" class="ru.clearing.classes.statics.data.account.Account" logUpdates="true">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -581,7 +598,7 @@
|
|||
<accountStatus type="12" name="Идентификатор статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="accountStatus"/>
|
||||
<processingSign type="12" name="Признак обработки счета" shortname="Обработка счета" searchable="true" sortable="true" visible="true" link="allowed"/>
|
||||
</account>
|
||||
<relation name="Договорные отношения" class="com.spicex.Static.company.Relation.Service" logUpdates="true">
|
||||
<relation name="Договорные отношения" class="ru.clearing.classes.statics.data.company.relation.Relation" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -591,8 +608,15 @@
|
|||
<service type="12" name="Идентификатор сервиса" shortname="Услуга" searchable="true" sortable="true" visible="true" link="service"/>
|
||||
<serviceProduct type="12" name="Идентификатор продукта" shortname="Продукт" searchable="true" sortable="true" visible="true" link="serviceProduct"/>
|
||||
<comment type="2" length="255" name="Текст причины" shortname="Причина" searchable="true" sortable="true" visible="true"/>
|
||||
<actions>
|
||||
<put name="Изменение банковских реквизитов для перечисления денежных средств" destination="">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" link="relation" linkCode="id" required="true"/>
|
||||
<serviceStatus type="12" name="Идентификатор статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="workflowStatus"/>
|
||||
<comment type="2" length="255" name="Текст причины" shortname="Причина" searchable="true" sortable="true" visible="true"/>
|
||||
</put>
|
||||
</actions>
|
||||
</relation>
|
||||
<bankAccount name="Банковские реквизиты для перечисления денежных средств" class="com.spicex.Static.Account.CurrentBankAccount" logUpdates="true">
|
||||
<bankAccount name="Банковские реквизиты для перечисления денежных средств" class="ru.clearing.classes.statics.data.account.BankAccount" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<accountId type="1" name="Идентификатор счета" shortname="ID" searchable="true" sortable="true" visible="true" link="account"/>
|
||||
<bankIdentificationCode type="2" length="255" name="Банковский идентификационный код (БИК)" shortname="БИК" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -635,18 +659,18 @@
|
|||
</delete>
|
||||
</actions>
|
||||
</bankAccount>
|
||||
<informationAccount name="Информационные счета" class="com.spicex.Static.Account.InformationAccount" logUpdates="true">
|
||||
<informationAccount name="Информационные счета" class="ru.clearing.classes.statics.data.account.InformationAccount" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<accountId type="1" name="Идентификатор счета" shortname="Идентификатор счета" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
|
||||
<clearingAccountId type="1" name="Идентификатор клирингового счета" shortname="Клиринговый счет" searchable="true" sortable="true" visible="true" link="account" linkCode="account"/>
|
||||
</informationAccount>
|
||||
<accountRouting name="Маршрутизация счета" class="com.spicex.Static.Account.AccountRouting" logUpdates="true">
|
||||
<accountRouting name="Маршрутизация счета" class="ru.clearing.classes.statics.data.account.AccountRouting" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<destinationId type="1" name="Счет-назначение (зачисления)" shortname="Зачисления" searchable="true" sortable="true" visible="true" link="account"/>
|
||||
<relationId type="1" name="Идентификатор договорных отношений" shortname="Договор" searchable="true" sortable="true" visible="true" link="relation"/>
|
||||
<sourceId type="1" name="Счет-источник (списания)" shortname="Списания" searchable="true" sortable="true" visible="true" link="account"/>
|
||||
</accountRouting>
|
||||
<security name="Инструменты" class="com.spicex.Static.company.Relation.Service" logUpdates="true">
|
||||
<security name="Инструменты" class="ru.clearing.classes.statics.data.security.Security" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
|
|
@ -659,19 +683,19 @@
|
|||
<securitySymbol type="2" name="Код инструмента" shortname="Код" searchable="true" sortable="true" length="255" visible="true"/>
|
||||
<workflowStatus type="12" name="Идентификатор статуса" shortname="Статус" searchable="true" sortable="true" visible="true" link="workflowStatus"/>
|
||||
</security>
|
||||
<currency name="Инструменты Валюты" class="com.spicex.Static.company.Relation.Service" logUpdates="true">
|
||||
<currency name="Инструменты Валюты" class="ru.clearing.classes.statics.data.misc.Currency" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<countryCode type="12" name="Идентификатор кода страны" shortname="Страна" searchable="true" sortable="true" visible="true" link="countryCode"/>
|
||||
<currencyCode type="12" name="Идентификатор кода валюты" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currencyCode"/>
|
||||
</currency>
|
||||
<moneyMarketSecurity name="Инструменты Денежного рынка" class="com.spicex.Static.company.Relation.Service" logUpdates="true">
|
||||
<moneyMarketSecurity name="Инструменты Денежного рынка" class="ru.clearing.classes.statics.data.misc.MoneyMarketSecurity" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<securityId type="1" name="Идентификатор инструмента" shortname="Инструмент" searchable="true" sortable="true" link="security"/>
|
||||
<description type="2" length="255" name="Описание" shortname="Описание" searchable="true" sortable="false"/>
|
||||
<startDate type="6" name="Дата начала действия" shortname="Начальная дата" searchable="true" sortable="true"/>
|
||||
<endDate type="6" name="Дата окончания действия" shortname="Конечная дата" searchable="true" sortable="true"/>
|
||||
<nominalValue field="nominalValue" type="11" name="Номинал" shortname="Номинал" searchable="true" sortable="true"/>
|
||||
<nominalCurrency field="nominalValueCurrencyId" type="1" name="Валюта номинала" shortname="Валюта номинала" searchable="true" sortable="true" link="currencyCode"/>
|
||||
<nominalCurrency type="12" name="Валюта номинала" shortname="Валюта номинала" searchable="true" sortable="true" link="currencyCode"/>
|
||||
<instrumentType type="12" name="Идентификатор типа инструмента" shortname="Тип инструмента" searchable="true" sortable="true" visible="true" link="instrumentType" extends="security"/>
|
||||
<fullName type="2" name="Полное наименование инструмента" shortname="Наименование" searchable="true" sortable="true" length="255" visible="true" extends="security"/>
|
||||
<securitySymbol type="2" name="Код инструмента" shortname="Код" searchable="true" sortable="true" length="255" visible="true" extends="security"/>
|
||||
|
|
@ -682,7 +706,7 @@
|
|||
<startDate type="6" name="Дата начала действия" shortname="Начальная дата" required="true"/>
|
||||
<endDate type="6" name="Дата окончания действия" shortname="Конечная дата" required="true"/>
|
||||
<nominalValue field="nominalValue" type="11" name="Номинал" shortname="Номинал" required="true"/>
|
||||
<nominalCurrency field="nominalValueCurrencyId" type="1" name="Валюта номинала" shortname="Валюта номинала" required="true" link="currencyCode"/>
|
||||
<nominalCurrency type="12" name="Валюта номинала" shortname="Валюта номинала" required="true" link="currencyCode"/>
|
||||
<instrumentType type="12" name="Идентификатор типа инструмента" shortname="Тип инструмента" required="true" link="instrumentType"/>
|
||||
<fullName type="2" name="Полное наименование инструмента" shortname="Наименование" length="255" required="true"/>
|
||||
<securitySymbol type="2" name="Код инструмента" shortname="Код инструмента" length="255" required="true"/>
|
||||
|
|
@ -692,7 +716,7 @@
|
|||
<id type="1" name="Идентификатор записи" shortname="ID" link="security" linkCode="id" required="true"/>
|
||||
<endDate type="6" name="Дата окончания действия" shortname="Конечная дата"/>
|
||||
<nominalValue field="nominalValue" type="11" name="Номинал" shortname="Номинал"/>
|
||||
<nominalCurrency field="nominalValueCurrencyId" type="1" name="Валюта номинала" shortname="Валюта номинала" link="currencyCode"/>
|
||||
<nominalCurrency type="12" name="Валюта номинала" shortname="Валюта номинала" link="currencyCode"/>
|
||||
<instrumentType type="12" name="Идентификатор типа инструмента" shortname="Тип инструмента" link="instrumentType"/>
|
||||
<fullName type="2" name="Полное наименование инструмента" shortname="Наименование" length="255"/>
|
||||
<lotSize type="11" name="Размер лота" shortname="Лот"/>
|
||||
|
|
@ -702,7 +726,7 @@
|
|||
</delete>
|
||||
</actions>
|
||||
</moneyMarketSecurity>
|
||||
<listing name="Листинг инструментов" class="com.spicex.Static.company.Relation.Service" logUpdates="true">
|
||||
<listing name="Листинг инструментов" class="ru.clearing.classes.statics.data.misc.Listing" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
|
|
@ -714,7 +738,7 @@
|
|||
<tradingCurrency type="12" name="Идентификатор кода валюты расчета" shortname="Валюта" searchable="true" sortable="true" visible="true" link="currency"/>
|
||||
<workflowStatus type="12" name="Идентификатор статуса листинга в системе" shortname="Статус" searchable="true" sortable="true" visible="true" link="workflowStatus"/>
|
||||
</listing>
|
||||
<market name="Торговые секции" class="com.spicex.Static.company.Relation.Service" logUpdates="true">
|
||||
<market name="Торговые секции" class="ru.clearing.classes.statics.data.misc.Market" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
|
|
@ -725,7 +749,7 @@
|
|||
<settlementCurrency type="12" name="Валютный код расчетов" shortname="Валюта расчёта" searchable="true" sortable="true" visible="true" link="currency"/>
|
||||
<sector type="12" name="Идентификатор секции" shortname="Секция" searchable="true" sortable="true" visible="true" link="sector"/>
|
||||
</market>
|
||||
<accountBalance name="Информация об остатках ден. средств" class="com.spicex.Static." logUpdates="true">
|
||||
<accountBalance name="Информация об остатках ден. средств" class="ru.clearing.classes.statics.data.account.AccountBalance" logUpdates="true">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<companyId type="1" name="Идентификатор участника" shortname="Участник" searchable="true" sortable="true" link="company"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
|
|
@ -768,7 +792,7 @@
|
|||
<typeRemains type="12" name="Тип остатка" shortname="Тип остатка" searchable="true" sortable="true" visible="true"/>
|
||||
<docNumber type="2" length="255" name="Номер документа" shortname="Номер" searchable="true" sortable="true" visible="true"/>
|
||||
</balanceRegistry>
|
||||
<managementJournal name="Журнал монитора и контроля" class="com.spicex.platform.classes.TransactionData.managementJournal" table="managementJournal">
|
||||
<managementJournal name="Журнал монитора и контроля" class="ru.clearing.classes.statics.data.journal.ManagementJournal" table="managementJournal">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true"/>
|
||||
<companyId type="1" name="Участник" shortname="Участник" searchable="true" sortable="true" visible="true" link="company"/>
|
||||
<userId type="1" name="Автор сообщения" shortname="Сотрудник" searchable="true" sortable="true" visible="true" link="userCls"/>
|
||||
|
|
@ -794,7 +818,7 @@
|
|||
</post>
|
||||
</actions>
|
||||
</managementJournal>
|
||||
<inDocumentJournal name="Журнал входящих документов" class="com.spicex.platform.classes.TransactionData.InDocumentJournal" table="InDocumentJournal">
|
||||
<inDocumentJournal name="Журнал входящих документов" class="ru.clearing.classes.statics.data.journal.InDocumentJournal" table="InDocumentJournal">
|
||||
<id type="1" name="Идентификатор" shortname="№п/п" searchable="true" sortable="true"/>
|
||||
<registrationDate type="6" name="Дата регистрации" shortname="Дата" searchable="true" sortable="true" visible="true"/>
|
||||
<registrationTime type="5" name="Время регистрации" shortname="Время" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -811,7 +835,7 @@
|
|||
<receiptDate type="6" name="Дата получения оригинала" shortname="Дата получения" searchable="true" sortable="true" visible="true"/>
|
||||
<resultStatus type="12" name="Статус загрузки документа" shortname="Статус" searchable="true" sortable="true" visible="true" link="resultStatus"/>
|
||||
</inDocumentJournal>
|
||||
<outDocumentJournal name="Журнал исходящих документов" class="com.spicex.platform.classes.TransactionData.OutDocumentJournal" table="OutDocumentJournal">
|
||||
<outDocumentJournal name="Журнал исходящих документов" class="ru.clearing.classes.statics.data.journal.OutDocumentJournal" table="OutDocumentJournal">
|
||||
<id type="1" name="Идентификатор" shortname="№п/п" searchable="true" sortable="true"/>
|
||||
<registrationDate type="6" name="Дата регистрации" shortname="Дата" searchable="true" sortable="true" visible="true"/>
|
||||
<registrationTime type="5" name="Время регистрации" shortname="Время" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -827,32 +851,35 @@
|
|||
<postDate type="6" name="Дата почтового отправления" shortname="Дата отправления" searchable="true" sortable="true" visible="true"/>
|
||||
<resultStatus type="12" name="Статус выгрузки документа" shortname="Статус" searchable="true" sortable="true" visible="true" link="resultStatus"/>
|
||||
</outDocumentJournal>
|
||||
<executionDeposit name="Сделки" class="ru.clearing.classes.TransactionData.Execution.DepositExecution" table="ExecutionDeposit">
|
||||
<executionDeposit name="Сделки" class="ru.clearing.classes.TransactionData.Execution.DepositExecution" table="execution_deposit">
|
||||
<id type="1" name="ID записи" shortname="ID записи" visible="false" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="3" name="Идентификационный номер сделкт в Торговой Системе" shortname="Сделка №" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionTime type="6" name="Время в Торговой Системе" shortname="Время сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации сделки" shortname="Время сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="1" name="Идентификационный номер сделки в Торговой системе" shortname="Сделка №" visible="true" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionTime type="4" name="Время в Торговой системе" shortname="Время сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<createdAt type="5" name="Время регистрации сделки" shortname="Время сделки" visible="false" searchable="true" sortable="true"/>
|
||||
<updatedAt type="5" name="Время изменения сделки" shortname="Время изменения" visible="false" searchable="true" sortable="true"/>
|
||||
<tradingDate type="6" name="Дата торгов" shortname="Дата торгов" visible="false" searchable="true" sortable="true"/>
|
||||
<accountId field="tradingClearingAccount.id" type="1" name="Торговый счет" shortname="Счет" visible="false" searchable="true" sortable="true" link="account" linkCode="account"/>
|
||||
<accountId field="tradingClearingAccount.id" type="1" name="Торговый счет" shortname="Счет" visible="true" searchable="true" sortable="true" link="account" linkCode="account"/>
|
||||
<market type="12" name="Секция финансового инструмента" shortname="Секция" visible="true" searchable="true" sortable="true" link="market"/>
|
||||
<price field="financialProduct.interestRate.value" type="10" name="Ставка по депозиту" shortname="Ставка,%" visible="true" searchable="true" sortable="true"/>
|
||||
<amount field="financialProduct.amount" type="3" name="Объем сделки" shortname="Объем сделки" visible="true" searchable="true" sortable="true"/>
|
||||
<sideId type="1" name="Направление сделки" shortname="Направление" visible="true" searchable="true" sortable="true" link="moneyFlowSide"/>
|
||||
<settlementCurrencyId type="1" name="Валюта расчетов по инструменту" shortname="Валюта" visible="true" searchable="true" sortable="true" link="currencyCode" linkCode="currencyCode"/>
|
||||
<companyId field="company.id" type="1" name="Название компании" shortname="Участник" visible="false" searchable="true" sortable="true" link="company"/>
|
||||
<duration type="3" name="Срок, дней" shortname="Срок" searchable="true" sortable="true"/>
|
||||
<price field="financialProduct.interestRate.value" type="10" name="Ставка по депозиту" shortname="Ставка, %" visible="true" searchable="true" sortable="true"/>
|
||||
<lots type="11" name="Количество лотов" shortname="Лоты" visible="true" searchable="true" sortable="true"/>
|
||||
<quantity type="11" name="Количество штук" shortname="Штуки" visible="false" searchable="true" sortable="true"/>
|
||||
<firstLegAmount type="11" name="Объем сделки" shortname="Объем" visible="true" searchable="true" sortable="true"/>
|
||||
<secondLegAmount type="11" name="Объем возврата" shortname="Объем возврата" visible="true" searchable="true" sortable="true"/>
|
||||
<interestAmount type="11" name="Объем процентов" shortname="Проценты" visible="false" searchable="true" sortable="true"/>
|
||||
<companyId field="company.id" type="1" name="Название компании" shortname="Компания" visible="true" searchable="true" sortable="true" link="company"/>
|
||||
<duration type="1" name="Срок, дней" shortname="Срок" visible="true" searchable="true" sortable="true"/>
|
||||
<firstLegSettlementDate field="firstLeg.settlementDate" type="6" name="Дата размещения" shortname="Дата размещения" visible="true" searchable="true" sortable="true"/>
|
||||
<secondLegSettlementDate field="secondLeg.settlementDate" type="6" name="Дата возврата" shortname="Дата возврата" visible="true" searchable="true" sortable="true"/>
|
||||
<secondLegAmount type="6" name="Объем возврата" shortname="Объем возврата" visible="true" searchable="true" sortable="true"/>
|
||||
<interestAmount type="6" name="Проценты" shortname="Проценты" visible="true" searchable="true" sortable="true"/>
|
||||
<symbolName type="2" length="50" name="Наименование инструмента в Торговой Системе" shortname="Инструмент" visible="false" searchable="true" sortable="true"/>
|
||||
<symbolCode type="2" length="20" name="Код инструмента в Торговой Системе" shortname="Код инструмента" visible="false" searchable="true" sortable="true"/>
|
||||
<securitiesDepositId type="1" name="Наименование финансового инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true" link="security" linkCode="shortname"/>
|
||||
<counterPartyId type="1" name="Имя фирмы-партнера, с которым заключена сделка" shortname="Партнер" visible="true" searchable="true" sortable="true" link="company"/>
|
||||
<sessionId type="1" name="Сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="moneyMarketSession"/>
|
||||
<coverageStatusId type="1" name="Cтатус достаточности обеспечения" shortname="Обеспеченность" searchable="true" sortable="true" link="allowed"/>
|
||||
<subscription enabled="true" destination="executionDeposit.state"/>
|
||||
<firstLegSettlementCode field="firstLeg.settlementCode" type="6" name="Код расчетов при размещении" shortname="Код расчетов при размещении" visible="false" searchable="true" sortable="true"/>
|
||||
<secondLegSettlementCode field="secondLeg.settlementCode" type="6" name="Код расчетов при возврате" shortname="Код расчетов" visible="true" searchable="true" sortable="true"/>
|
||||
<counterPartyId type="1" name="Имя компании-партнера, с которым заключена сделка" shortname="Партнер" visible="false" searchable="true" sortable="true" link="company"/>
|
||||
<sessionId type="1" name="Идентификатор сессии" shortname="Сессия" visible="true" searchable="true" sortable="true" link="moneyMarketSession"/>
|
||||
<moneyMarketSecurityId type="1" name="Финансовый инструмент" shortname="Инструмент" visible="false" searchable="true" sortable="true" link="moneyMarketSecurity"/>
|
||||
<securitySymbol type="2" length="255" name="Код инструмента в Торговой Системе" shortname="Код инструмента" visible="true" searchable="true" sortable="true"/>
|
||||
<securityFullName type="2" length="255" name="Наименование инструмента" shortname="Инструмент" visible="true" searchable="true" sortable="true"/>
|
||||
<side type="12" name="Направление сделки" shortname="Направление" visible="true" searchable="true" sortable="true" link="moneyFlowSide"/>
|
||||
<settlementCurrency type="12" name="Валюта расчетов по инструменту" shortname="Валюта" visible="true" searchable="true" sortable="true" link="currencyCode" linkCode="currencyCode"/>
|
||||
<coverageStatus type="12" name="Cтатус достаточности обеспечения" shortname="Обеспеченность" searchable="true" sortable="true" link="allowed"/>
|
||||
</executionDeposit>
|
||||
<executionDepositRegister name="Реестр сделок" class="ru.clearing.classes.TransactionData.Execution.DepositExecution" table="ExecutionDeposit">
|
||||
<id type="1" name="ID записи" shortname="ID записи" visible="false" searchable="true" sortable="true"/>
|
||||
|
|
@ -879,7 +906,7 @@
|
|||
<sessionId type="1" name="Сессия" shortname="Сессия" visible="true" searchable="true" sortable="true" link="moneyMarketSession"/>
|
||||
<subscription enabled="true" destination="executionDeposit.state"/>
|
||||
</executionDepositRegister>
|
||||
<admittedDeal name="Реестр сделок, допущенных к клирингу">
|
||||
<admittedDeal name="Реестр сделок, допущенных к клирингу" class="ru.clearing.classes.statics.data.misc.AdmittedDeal">
|
||||
<companyFullName type="2" length="255" name="Наименование биржи" shortname="Наименование биржи" searchable="true" sortable="true" visible="true"/>
|
||||
<executionDepositRegisterTradingDate type="4" name="Дата заключения сделки" shortname="Дата сделки" searchable="true" sortable="true"/>
|
||||
<exchangeExecutionId type="2" length="255" name="Номер сделки" shortname="Номер" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -1018,7 +1045,7 @@
|
|||
<paymentId type="1" name="Платеж" shortname="Платеж" searchable="true" sortable="true"/>
|
||||
<refundPaymentId type="1" name="Обратный платежа" shortname="Обратный платеж" searchable="true" sortable="true"/>
|
||||
</liabilitiesClaimsAssets>
|
||||
<statement name="Денежные средства от расчетной организации" class="ru.clearing.classes.TransactionData.Execution.LiabilitiesClaimsAssets" table="statement">
|
||||
<statement name="Денежные средства от расчетной организации" class="ru.clearing.classes.statics.data.statement.Statement" table="statement">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<addresseeId type="1" name="Идентификатор участника получателя" shortname="Получатель" searchable="true" sortable="true" link="company"/>
|
||||
<senderId type="1" name="Идентификатор участника отправителя" shortname="Отправитель" searchable="true" sortable="true" link="company"/>
|
||||
|
|
@ -1064,7 +1091,7 @@
|
|||
<operationTypeId type="1" name="Тип проводки" shortname="Тип" searchable="true" sortable="true" link="operationType"/>
|
||||
<operationStatus type="12" name="Cтатус обработки" shortname="Статус" searchable="true" sortable="true" link="operationStatus"/>
|
||||
</operation>
|
||||
<paymentInstruction name="Информация о денежных средствах" class="ru.clearing.classes.TransactionData.Execution.LiabilitiesClaimsAssets" table="PaymentInstruction">
|
||||
<paymentInstruction name="Информация о денежных средствах" class="ru.clearing.classes.statics.data.payment.PaymentInstruction" table="PaymentInstruction">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
|
|
@ -1151,7 +1178,7 @@
|
|||
<updatedAt type="4" name="Изменено" shortname="Изменено" searchable="true" sortable="true"/>
|
||||
<companyId type="1" name="Участник" shortname="Участник" searchable="true" sortable="true" link="company"/>
|
||||
</companyTariff>
|
||||
<errorText name="Полные тексты ошибок" class="ru.clearing.Static" table="errorText">
|
||||
<errorText name="Полные тексты ошибок" class="ru.clearing.classes.statics.data.messages.ErrorText" table="errorText">
|
||||
<id type="1" name="Идентификатор" shortname="ID" searchable="true" sortable="true" visible="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
|
|
@ -1160,7 +1187,7 @@
|
|||
<userId type="1" name="Автор сообщения" shortname="Сотрудник" searchable="true" sortable="true" visible="true" link="userCls" ignore="true"/>
|
||||
<clearingDate type="6" name="Текущая дата" shortname="Дата" visible="false" searchable="true" sortable="true" ignore="true"/>
|
||||
</errorText>
|
||||
<sDf01 name="ДФ-01 Информация о денежных средствах, находящихся на торговых банковских счетах Участников клиринга" class="com.spicex.Static.">
|
||||
<sDf01 name="ДФ-01 Информация о денежных средствах, находящихся на торговых банковских счетах Участников клиринга" class="ru.clearing.classes.statics.data.sdf.SDf01">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<curr_code type="2" length="12" name="Код валюты" shortname="Код валюты" searchable="true" sortable="true" visible="true"/>
|
||||
<account type="2" length="35" name="Код счета участника клиринга" shortname="Счет УК" searchable="true" sortable="true"/>
|
||||
|
|
@ -1178,7 +1205,7 @@
|
|||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf01>
|
||||
<sDf02 name="ДФ-02 Уведомление об исполнении операции загрузки денежных средств или уведомление об ошибке" class="com.spicex.Static.">
|
||||
<sDf02 name="ДФ-02 Уведомление об исполнении операции загрузки денежных средств или уведомление об ошибке" class="ru.clearing.classes.statics.data.sdf.SDf02">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<curr_code type="2" length="12" name="Код валюты" shortname="Код валюты" searchable="true" sortable="true" visible="true"/>
|
||||
<account type="2" length="35" name="Код счета участника клиринга" shortname="Счет УК" searchable="true" sortable="true"/>
|
||||
|
|
@ -1197,7 +1224,7 @@
|
|||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<inSDf01Id type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true"/>
|
||||
</sDf02>
|
||||
<sDf03 name="ДФ-03 Сводное платежное поручение" class="com.spicex.Static.">
|
||||
<sDf03 name="ДФ-03 Сводное платежное поручение" class="ru.clearing.classes.statics.data.sdf.SDf03">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<seg_type type="2" length="1" name="Код инициатора в КС" shortname="Инициатор в КС" searchable="true" sortable="true"/>
|
||||
<doc_type type="2" lenght="4" name="Тип документа" shortname="Тип документа" searchable="true" sortable="true"/>
|
||||
|
|
@ -1248,7 +1275,7 @@
|
|||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf03>
|
||||
<sDf04 name="ДФ-04 Подтверждение переводов из Расчетной организации для СПВБ" class="com.spicex.Static.">
|
||||
<sDf04 name="ДФ-04 Подтверждение переводов из Расчетной организации для СПВБ" class="ru.clearing.classes.statics.data.sdf.SDf04">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<seg_type type="2" length="1" name="Код инициатора в КС" shortname="Инициатор в КС" searchable="true" sortable="true"/>
|
||||
<doc_type type="2" lenght="4" name="Тип документа" shortname="Тип документа" searchable="true" sortable="true"/>
|
||||
|
|
@ -1300,7 +1327,7 @@
|
|||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf04>
|
||||
<sDf05 name="ДФ-05 Уведомление о завершении расчетов в ПРЦ" class="com.spicex.Static.">
|
||||
<sDf05 name="ДФ-05 Уведомление о завершении расчетов в ПРЦ" class="ru.clearing.classes.statics.data.sdf.SDf05">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<tp type="10" name="Тип документа" shortname="Тип документа" searchable="true" sortable="true"/>
|
||||
<dt type="6" name="Дата завершения расчетов" shortname="Дата завершения расчетов" searchable="true" sortable="true"/>
|
||||
|
|
@ -1309,14 +1336,14 @@
|
|||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf05>
|
||||
<sDf08 name="ДФ-08 Запрос остатков по всем счетам" class="com.spicex.Static.">
|
||||
<sDf08 name="ДФ-08 Запрос остатков по всем счетам" class="ru.clearing.classes.statics.data.sdf.SDf08">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<number type="10" name="Номер запроса остатков по счетам" shortname="Номер запроса" searchable="true" sortable="true" visible="true" link="currency"/>
|
||||
<datetime type="4" name="Дата и время сообщения" shortname="Дата и время сообщения" searchable="true" sortable="true"/>
|
||||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf08>
|
||||
<sDf09 name="ДФ-09 Уведомление о поступлении средств на клиринговый счет" class="com.spicex.Static.">
|
||||
<sDf09 name="ДФ-09 Уведомление о поступлении средств на клиринговый счет" class="ru.clearing.classes.statics.data.sdf.SDf09">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<account type="2" length="20" name="Номер счета участника торгов" shortname="Номер счета участника торгов" searchable="true" sortable="true"/>
|
||||
<sum type="10" name="Сумма платежного документа (операции)" shortname="Сумма платежного документа" searchable="true" sortable="true"/>
|
||||
|
|
@ -1328,7 +1355,7 @@
|
|||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf09>
|
||||
<sDf10 name="ДФ-10 Подтверждение о загрузке по поступлению на клиринговый счет" class="com.spicex.Static.">
|
||||
<sDf10 name="ДФ-10 Подтверждение о загрузке по поступлению на клиринговый счет" class="ru.clearing.classes.statics.data.sdf.SDf10">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<account type="2" length="20" name="Номер счета участника торгов" shortname="Номер счета участника торгов" searchable="true" sortable="true"/>
|
||||
<sum type="10" name="Сумма платежного документа (операции)" shortname="Сумма платежного документа" searchable="true" sortable="true"/>
|
||||
|
|
@ -1341,7 +1368,7 @@
|
|||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<inSDf09Id type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true"/>
|
||||
</sDf10>
|
||||
<sDf11 name="ДФ-11 Из КС в ПРЦ Платежное распоряжение на перевод средств с ТБС Участника на КС Инициатора" class="com.spicex.Static.">
|
||||
<sDf11 name="ДФ-11 Из КС в ПРЦ Платежное распоряжение на перевод средств с ТБС Участника на КС Инициатора" class="ru.clearing.classes.statics.data.sdf.SDf11">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<seg_type type="2" length="1" name="Код инициатора в КС" shortname="Инициатор в КС" searchable="true" sortable="true"/>
|
||||
<doc_type type="2" lenght="4" name="Тип документа" shortname="Тип документа" searchable="true" sortable="true"/>
|
||||
|
|
@ -1391,7 +1418,7 @@
|
|||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf11>
|
||||
<sDf12 name="ДФ-12 Из ПРЦ в КС Информация о блокировке/разблокировке/закрытии ТБС УК" class="com.spicex.Static.">
|
||||
<sDf12 name="ДФ-12 Из ПРЦ в КС Информация о блокировке/разблокировке/закрытии ТБС УК" class="ru.clearing.classes.statics.data.sdf.SDf12">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<account type="2" length="25" name="Код счета участника клиринга" shortname="Код счета УК" searchable="true" sortable="true" visible="true"/>
|
||||
<deal type="2" length="4" name="Биржевой код участника клиринга" shortname="Биржевой код УК" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -1400,7 +1427,7 @@
|
|||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true"/>
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf12>
|
||||
<sDf13 name="ДФ-13 Вывод свободных средств для инициаторов категории В с клирингового счета 30414/7 - платежное поручение АО СПВБ на вывод средств из РО" class="com.spicex.Static.">
|
||||
<sDf13 name="ДФ-13 Вывод свободных средств для инициаторов категории В с клирингового счета 30414/7 - платежное поручение АО СПВБ на вывод средств из РО" class="ru.clearing.classes.statics.data.sdf.SDf13">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<seg_type type="2" length="1" name="Код инициатора в КС" shortname="Инициатор в КС" searchable="true" sortable="true"/>
|
||||
<doc_type type="2" lenght="4" name="Тип документа" shortname="Тип документа" searchable="true" sortable="true"/>
|
||||
|
|
@ -1450,7 +1477,7 @@
|
|||
<generationTime type="4" name="Дата и время создания записи" shortname="Дата и время создания" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf13>
|
||||
<sDf16 name="ДФ-16 Формат запроса по возврату депозита или дозачисление/списание денежных средств" class="com.spicex.Static.">
|
||||
<sDf16 name="ДФ-16 Формат запроса по возврату депозита или дозачисление/списание денежных средств" class="ru.clearing.classes.statics.data.sdf.SDf16">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<account type="2" length="20" name="Номер счета участника торгов" shortname="Номер счета участника торгов" searchable="true" sortable="true"/>
|
||||
<sum type="10" name="Сумма платежного документа (операции)" shortname="Сумма платежного документа" searchable="true" sortable="true"/>
|
||||
|
|
@ -1464,7 +1491,7 @@
|
|||
<generationTime type="4" name="Дата и время обработки файла" shortname="Дата и время обработки" searchable="true" sortable="true" />
|
||||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
</sDf16>
|
||||
<sDf17 name="ДФ-17 Формат ответа на запрос по возврату депозита или дозачисление/списание денежных средств" class="com.spicex.Static.">
|
||||
<sDf17 name="ДФ-17 Формат ответа на запрос по возврату депозита или дозачисление/списание денежных средств" class="ru.clearing.classes.statics.data.sdf.SDf17">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<account type="2" length="20" name="Номер счета участника торгов" shortname="Номер счета участника торгов" searchable="true" sortable="true"/>
|
||||
<sum type="10" name="Сумма платежного документа (операции)" shortname="Сумма платежного документа" searchable="true" sortable="true"/>
|
||||
|
|
@ -1479,7 +1506,7 @@
|
|||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<inSDf16Id type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true"/>
|
||||
</sDf17>
|
||||
<sDf18 name="ДФ-18 Из КС в ПРЦ Квитанция о получении информации о состоянии счета (блокировка/разблокировка/закрытие)" class="com.spicex.Static.">
|
||||
<sDf18 name="ДФ-18 Из КС в ПРЦ Квитанция о получении информации о состоянии счета (блокировка/разблокировка/закрытие)" class="ru.clearing.classes.statics.data.sdf.SDf18">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<account type="2" length="25" name="Код счета участника клиринга" shortname="Код счета УК" searchable="true" sortable="true" visible="true"/>
|
||||
<deal type="2" length="4" name="Биржевой код участника клиринга" shortname="Биржевой код УК" searchable="true" sortable="true" visible="true"/>
|
||||
|
|
@ -1489,28 +1516,29 @@
|
|||
<generationId type="1" name="Идентификатор взаимодействия" shortname="ID взаимодействия" searchable="true" sortable="true"/>
|
||||
<inSDf12Id type="1" name="Идентификатор соответствующей записи из таблицы-источника" shortname="Входящая запись" searchable="true" sortable="true"/>
|
||||
</sDf18>
|
||||
<trade_arqa name="Выгрузка сделок из торговой системы" class="com.spicex.Static.">
|
||||
<trade_num type="10" name="Номер сделки" shortname="Номер сделки" searchable="true" sortable="true"/>
|
||||
<s_trade name="Сделки из Торговой системы" class="com.spicex.Static.">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<trade_num type="1" name="Номер сделки" shortname="Номер сделки" searchable="true" sortable="true"/>
|
||||
<sec_code type="2" length="255" name="Код ценной бумаги" shortname="Код ценной бумаги" searchable="true" sortable="true"/>
|
||||
<trade_date_time type="4" name="Дата-время сделки" shortname="Дата-время сделки" searchable="true" sortable="true"/>
|
||||
<settle_date type="6" name="Плановая дата исполнения сделки" shortname="Плановая дата исполнения сделки" searchable="true" sortable="true"/>
|
||||
<price type="10" name="Цена сделки" shortname="Цена сделки" searchable="true" sortable="true"/>
|
||||
<value type="10" name="Сумма сделки" shortname="Сумма сделки" searchable="true" sortable="true"/>
|
||||
<qty type="10" name="Количество лотов по сделке" shortname="Количество лотов по сделке" searchable="true" sortable="true"/>
|
||||
<value type="11" name="Сумма сделки" shortname="Сумма сделки" searchable="true" sortable="true"/>
|
||||
<qty type="11" name="Количество лотов по сделке" shortname="Количество лотов по сделке" searchable="true" sortable="true"/>
|
||||
<accruedint type="10" name="НКД за 1 ценную бумагу" shortname="НКД за 1 ценную бумагу" searchable="true" sortable="true"/>
|
||||
<firm_id type="2" length="255" name="ID клиента в КС" shortname="ID клиента в КС" searchable="true" sortable="true"/>
|
||||
<client_code type="2" length="255" name="Код участника торгов = Код участника клиринга = Код участника расчетов" shortname="Участник" searchable="true" sortable="true"/>
|
||||
<exchange_commission type="10" name="Комиссия по сделке" shortname="Комиссия" searchable="true" sortable="true"/>
|
||||
<exchange_commission type="11" name="Комиссия по сделке" shortname="Комиссия" searchable="true" sortable="true"/>
|
||||
<class_code type="2" length="255" name="Код класса сделки из новой ТС" shortname="Код класса сделки" searchable="true" sortable="true"/>
|
||||
<operation type="2" length="255" name="Тип плеча (Купля/Продажа)" shortname="Тип плеча" searchable="true" sortable="true"/>
|
||||
<issue_account type="2" length="255" name="Счет для учета ценной бумаги" shortname="Счет для учета ценной бумаги" searchable="true" sortable="true"/>
|
||||
<money_account type="2" length="255" name="Счет для учета денежных средств" shortname="Счет для учета денежных средств" searchable="true" sortable="true"/>
|
||||
<trade_type type="12" name="Первичное размещение/торги" shortname="Первичное размещение/торги" searchable="true" sortable="true"/>
|
||||
<days_to_mat_date type="10" name="Количество дней до погашения" shortname="Количество дней до погашения" searchable="true" sortable="true"/>
|
||||
<collateral type="12" name="Признак залога (не используется)" shortname="Признак залога (не используется)" searchable="true" sortable="true"/>
|
||||
<settle_code type="2" length="255" name="Код периода сделки из новой ТС" shortname="Код периода сделки из новой ТС" searchable="true" sortable="true"/>
|
||||
</trade_arqa>
|
||||
<notification name="Сообщения" class="com.spicex.TransactionData.Notification" logUpdates="true" table="Notification">
|
||||
<issue_account type="2" length="50" name="Счет для учета ценной бумаги" shortname="Счет для учета ценной бумаги" searchable="true" sortable="true"/>
|
||||
<money_account type="2" length="50" name="Счет для учета денежных средств" shortname="Счет для учета денежных средств" searchable="true" sortable="true"/>
|
||||
<trade_type type="2" length="50" name="Первичное размещение/торги" shortname="Первичное размещение/торги" searchable="true" sortable="true"/>
|
||||
<days_to_mat_date type="1" name="Количество дней до погашения" shortname="Количество дней до погашения" searchable="true" sortable="true"/>
|
||||
<collateral type="2" length="50" name="Признак залога (не используется)" shortname="Признак залога (не используется)" searchable="true" sortable="true"/>
|
||||
<settle_code type="2" length="50" name="Код периода сделки из новой ТС" shortname="Код периода сделки из новой ТС" searchable="true" sortable="true"/>
|
||||
</s_trade>
|
||||
<notification name="Сообщения" class="ru.clearing.classes.statics.data.misc.Notification" logUpdates="true" table="Notification">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
|
|
@ -1527,13 +1555,21 @@
|
|||
</put>
|
||||
</actions>
|
||||
</notification>
|
||||
<session name="Клиринговая сессия" class="com.spicex.TransactionData.Session" logUpdates="true" table="Session">
|
||||
<session name="Клиринговая сессия" class="ru.clearing.classes.statics.data.misc.Session" logUpdates="true" table="Session">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<createdAt type="4" name="Дата и время создания записи" shortname="Создано" searchable="true" sortable="true" ignore="true"/>
|
||||
<updatedAt type="4" name="Дата и время изменения записи" shortname="Изменено" searchable="true" sortable="true" ignore="true"/>
|
||||
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" visible="true"/>
|
||||
<sessionStatus type="12" name="Статус клиринговой сессии" shortname="Статус" searchable="true" sortable="true" visible="true" link="sessionStatus"/>
|
||||
</session>
|
||||
<moneyMarketSession name="Сессия денежного рынка" class="com.spicex.TransactionData.Session" logUpdates="true" table="Session">
|
||||
<id type="1" name="Идентификатор записи" shortname="ID" searchable="true" sortable="true"/>
|
||||
<clearingDate type="6" name="Дата" shortname="Дата" searchable="true" sortable="true" visible="true" extends="session"/>
|
||||
<sessionStatus type="12" name="Статус клиринговой сессии" shortname="Статус" searchable="true" sortable="true" visible="true" link="sessionStatus" extends="session"/>
|
||||
<companyId type="1" name="Идентификатор инициатора торгов" shortname="Инициатор" visible="false" searchable="true" sortable="true" link="company"/>
|
||||
<securityId type="1" name="Идентификатор инструмента" shortname="Инструмент" searchable="false" sortable="true" visible="true" link="security"/>
|
||||
<userId type="1" name="Идентификатор пользователя" shortname="Пользователь" searchable="true" sortable="true" visible="true" link="userCls"/>
|
||||
</moneyMarketSession>
|
||||
</objects>
|
||||
<views>
|
||||
<AccountUnion>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@ContextConfiguration(classes = GetResponseFactoryTestConfiguration.class)
|
||||
public class GetResponseFactoryTest {
|
||||
private final MetaServer meta;
|
||||
|
||||
@Autowired
|
||||
public GetResponseFactoryTest(@Qualifier("metaJsonTest") MetaServer meta) {
|
||||
this.meta = meta;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAllObjectsFields() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
|
||||
Collection<ObjectElement> allMetaObjects = meta.getObjects().values();
|
||||
Set<Map.Entry<String, ObjectElement>> allMetaObjects2 = meta.getObjects().entrySet();
|
||||
Map<String, List<String>> error = new HashMap<>();
|
||||
for (Map.Entry<String, ObjectElement> ent : allMetaObjects2) {
|
||||
ObjectElement objectElement = ent.getValue();
|
||||
String className = objectElement.getClazz();
|
||||
Class<?> classByName = null;
|
||||
if (className == null) {
|
||||
error.computeIfAbsent(ent.getKey(), v -> new ArrayList<>()).add(ent.getKey() + " no class property");
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
classByName = Class.forName(className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
error.computeIfAbsent(ent.getKey(), v -> new ArrayList<>()).add(ent.getKey() + " cannot find class " + className);
|
||||
continue;
|
||||
}
|
||||
Object object = classByName.newInstance();
|
||||
ObjectExtracted objectExtracted = meta.getObjectsExtractedByClazz().get(className);
|
||||
for (FieldExtracted fieldExtracted : objectExtracted.getFields()) {
|
||||
try {
|
||||
fieldExtracted.extractValue(object);
|
||||
} catch (Exception e) {
|
||||
error.computeIfAbsent(ent.getKey(), v -> new ArrayList<>()).add(
|
||||
"memberName " + fieldExtracted.getMemberName() + "; code " + fieldExtracted.getField().getCode() + "; field " + fieldExtracted.getField().getField()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String errorIfPresent = error
|
||||
.entrySet()
|
||||
.stream()
|
||||
.map(entry -> entry.getKey() + ": " + entry.getValue()
|
||||
.stream()
|
||||
.collect(Collectors.joining(" |\n", "[", "]")))
|
||||
.collect(Collectors.joining("\n\n\n"));
|
||||
Assertions.assertEquals(0, error.size(), errorIfPresent);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
package ru.spcex.clearing.backendapi.meta;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.MapperFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.PathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
@Configuration
|
||||
public class GetResponseFactoryTestConfiguration {
|
||||
@Bean("metaJsonTestPath")
|
||||
public Resource metaJsonPath() {
|
||||
Path path = Paths.get("src", "main", "resources", "meta.json");
|
||||
return new PathResource(path);
|
||||
}
|
||||
|
||||
// @Value("file:${spring.config.location}/meta.json")
|
||||
// private Resource meta;
|
||||
//
|
||||
@Bean("metaJsonTestRaw")
|
||||
public String metaJsonRawString(@Qualifier("metaJsonTestPath") Resource meta) throws IOException {
|
||||
if (!meta.isReadable()) throw new IllegalStateException("cannot read meta.json from meta " + meta.getFile());
|
||||
return Files.readString(meta.getFile().toPath());
|
||||
}
|
||||
//
|
||||
@Autowired
|
||||
@Bean("metaJsonTest")
|
||||
public MetaServer metaServer(@Qualifier("metaJsonTestRaw") String metaJson) throws JsonProcessingException {
|
||||
ObjectMapper jsonObjectMapper = new ObjectMapper();
|
||||
jsonObjectMapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
|
||||
jsonObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
MetaServer metaServer = jsonObjectMapper.readValue(metaJson, MetaServer.class);
|
||||
metaServer.initAndValidate();
|
||||
return metaServer;
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
|||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import ru.spcex.clearing.backendapi.service.impl.OperatorImpl;
|
||||
import ru.spcex.clearing.backendapi.service.validation.ActionValidationProvider;
|
||||
import ru.spcex.platform.imdg.iml.hazelcast.service.HazelcastService;
|
||||
|
||||
@Configuration
|
||||
|
|
@ -17,8 +18,13 @@ public class IOperator {
|
|||
|
||||
@Autowired
|
||||
@Bean
|
||||
public OperatorImpl createIOperator(Producer<String, Object> kafka) {
|
||||
return new OperatorImpl(kafka, hazelcastServiceTest);
|
||||
public OperatorImpl createIOperator(Producer<String, Object> kafka, ActionValidationProvider validationProvider) {
|
||||
return new OperatorImpl(kafka, hazelcastServiceTest, validationProvider);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ActionValidationProvider validationForActions() {
|
||||
return new ActionValidationProvider(hazelcastServiceTest);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue