Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DeveloperValidation implements Validation {
- @Override
- public void validate(ControllerDocumentType document, DocumentContext docCtx) {
- if (document.getDocsCo().getDocId() == null)
- return;
- DocumentEntity entity = documentRepository.get(document.getDocsCo().getDocId());
- if (document.getDocsCo().getDeveloperOgrn().equals(entity.getDeveloper().getOgrn().toString()))
- return;
- throw CodifiedException.buildClientAvailable(String.format("Недопустимое значение атрибута [developer_ogrn]. Ожидаемое значение [%s]", entity.getDeveloper().getOgrn()));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement