From 65aa2234dccfb3566a084d9b17901b51abfd71e6 Mon Sep 17 00:00:00 2001 From: Lars Johansson <lars.johansson@ess.eu> Date: Wed, 18 Jan 2023 18:56:24 +0100 Subject: [PATCH] Use camel case for field names, parameter names, paths, templates --- .../repository/DeviceGroupRepository.java | 54 +++---- .../repository/DeviceTypeRepository.java | 54 +++---- .../repository/DisciplineRepository.java | 54 +++---- .../names/repository/INameRepository.java | 12 +- .../names/repository/NameRepository.java | 70 +++++----- .../names/repository/SubsystemRepository.java | 54 +++---- .../repository/SystemGroupRepository.java | 54 +++---- .../names/repository/SystemRepository.java | 54 +++---- .../names/repository/model/Name.java | 46 +++--- .../openepics/names/rest/api/v1/INames.java | 100 ++++++------- .../names/rest/api/v1/IStructures.java | 82 +++++------ .../names/rest/beans/element/NameElement.java | 66 ++++----- .../beans/element/NameElementCommand.java | 48 +++---- .../rest/beans/element/StructureElement.java | 26 ++-- .../element/StructureElementCommand.java | 2 +- .../rest/controller/NamesController.java | 22 +-- .../rest/controller/ReportController.java | 12 +- .../rest/controller/StructuresController.java | 32 ++--- .../controller/VerificationController.java | 40 +++--- .../openepics/names/service/NamesService.java | 98 ++++++------- .../names/service/StructuresService.java | 82 +++++------ .../org/openepics/names/util/ExcelUtil.java | 29 ++-- .../openepics/names/util/NameElementUtil.java | 42 +++--- .../org/openepics/names/util/NameUtil.java | 42 +++--- .../names/util/NamingConventionUtil.java | 14 +- .../names/util/StructureElementUtil.java | 54 +++---- .../org/openepics/names/util/TextUtil.java | 6 +- .../names/util/ValidateNameElementUtil.java | 50 +++---- .../util/ValidateStructureElementUtil.java | 130 ++++++++--------- .../openepics/names/util/ValidateUtil.java | 8 +- .../names/util/old/DeviceNameElementUtil.java | 8 +- .../static/templates/NameElementCommand.xlsx | Bin 7168 -> 7168 bytes .../templates/StructureElementCommand.xlsx | Bin 7297 -> 7294 bytes .../names/docker/ITUtilNameElement.java | 34 ++--- .../names/docker/ITUtilStructureElement.java | 36 ++--- .../org/openepics/names/docker/NamesIT.java | 106 +++++++------- .../names/docker/StructuresDeviceGroupIT.java | 106 +++++++------- .../names/docker/StructuresDeviceTypeIT.java | 76 +++++----- .../names/docker/StructuresDisciplineIT.java | 34 ++--- .../names/docker/StructuresSubsystemIT.java | 132 +++++++++--------- .../names/docker/StructuresSystemGroupIT.java | 34 ++--- .../names/docker/StructuresSystemIT.java | 72 +++++----- .../docker/complex/NamesInstanceIndexIT.java | 48 +++---- .../names/docker/complex/NamesMultipleIT.java | 36 ++--- .../names/util/NameElementUtilTest.java | 16 +-- .../openepics/names/util/NameUtilTest.java | 16 +-- .../names/util/StructureElementUtilTest.java | 2 +- 47 files changed, 1094 insertions(+), 1099 deletions(-) diff --git a/src/main/java/org/openepics/names/repository/DeviceGroupRepository.java b/src/main/java/org/openepics/names/repository/DeviceGroupRepository.java index db47eb06..3e5e8b3f 100644 --- a/src/main/java/org/openepics/names/repository/DeviceGroupRepository.java +++ b/src/main/java/org/openepics/names/repository/DeviceGroupRepository.java @@ -62,15 +62,15 @@ public class DeviceGroupRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return count of device groups */ public Long countDeviceGroups(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return countDeviceGroups(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE); } @@ -83,14 +83,14 @@ public class DeviceGroupRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return count of device groups */ public Long countDeviceGroups(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { // note @@ -105,7 +105,7 @@ public class DeviceGroupRepository { Root<DeviceGroup> from = cq.from(DeviceGroup.class); cq.where(cb.and(preparePredicatesDeviceGroups(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(cb.count(from)); @@ -121,16 +121,16 @@ public class DeviceGroupRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return list of device groups */ public List<DeviceGroup> readDeviceGroups(Status status, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return readDeviceGroups(status != null ? new Status[] {status} : null, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, null, null, null, null); } @@ -143,8 +143,8 @@ public class DeviceGroupRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param orderBy order by * @param isAsc is ascending @@ -153,10 +153,10 @@ public class DeviceGroupRepository { * @return list of device groups */ public List<DeviceGroup> readDeviceGroups(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { return readDeviceGroups(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, orderBy, isAsc, offset, limit); } @@ -169,8 +169,8 @@ public class DeviceGroupRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @param orderBy order by @@ -180,7 +180,7 @@ public class DeviceGroupRepository { * @return list of device groups */ public List<DeviceGroup> readDeviceGroups(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { // note @@ -199,7 +199,7 @@ public class DeviceGroupRepository { Root<DeviceGroup> from = cq.from(DeviceGroup.class); cq.where(cb.and(preparePredicatesDeviceGroups(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(from); @@ -260,14 +260,14 @@ public class DeviceGroupRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return list of predicates */ private List<Predicate> preparePredicatesDeviceGroups(CriteriaBuilder cb, Root<DeviceGroup> from, Subquery<Long> sub, Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { List<Predicate> predicates = new ArrayList<>(); @@ -337,11 +337,11 @@ public class DeviceGroupRepository { if (!StringUtils.isEmpty(mnemonic)) { predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonic)))); } - if (!StringUtils.isEmpty(mnemonicequivalence)) { - predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicequivalence)))); + if (!StringUtils.isEmpty(mnemonicEquivalence)) { + predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicEquivalence)))); } - if (!StringUtils.isEmpty(mnemonicpath)) { - predicates.add(cb.and(cb.like(cb.function(DeviceGroup.FUNCTION_GET_MNEMONIC_PATH_DEVICEGROUP, String.class, from.get(NameStructure.FIELD_UUID)), RepositoryUtil.preparePattern(mnemonicpath)))); + if (!StringUtils.isEmpty(mnemonicPath)) { + predicates.add(cb.and(cb.like(cb.function(DeviceGroup.FUNCTION_GET_MNEMONIC_PATH_DEVICEGROUP, String.class, from.get(NameStructure.FIELD_UUID)), RepositoryUtil.preparePattern(mnemonicPath)))); } if (!StringUtils.isEmpty(description)) { predicates.add(cb.and(cb.like(from.get(NameStructure.FIELD_DESCRIPTION), RepositoryUtil.preparePattern(description)))); diff --git a/src/main/java/org/openepics/names/repository/DeviceTypeRepository.java b/src/main/java/org/openepics/names/repository/DeviceTypeRepository.java index b3eca34d..8327d67a 100644 --- a/src/main/java/org/openepics/names/repository/DeviceTypeRepository.java +++ b/src/main/java/org/openepics/names/repository/DeviceTypeRepository.java @@ -62,15 +62,15 @@ public class DeviceTypeRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return count of device types */ public Long countDeviceTypes(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return countDeviceTypes(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE); } @@ -83,14 +83,14 @@ public class DeviceTypeRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return count of device types */ public Long countDeviceTypes(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { // note @@ -105,7 +105,7 @@ public class DeviceTypeRepository { Root<DeviceType> from = cq.from(DeviceType.class); cq.where(cb.and(preparePredicatesDeviceTypes(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(cb.count(from)); @@ -121,16 +121,16 @@ public class DeviceTypeRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return list of device types */ public List<DeviceType> readDeviceTypes(Status status, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return readDeviceTypes(status != null ? new Status[] {status} : null, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, null, null, null, null); } @@ -143,8 +143,8 @@ public class DeviceTypeRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param orderBy order by * @param isAsc is ascending @@ -153,10 +153,10 @@ public class DeviceTypeRepository { * @return list of device types */ public List<DeviceType> readDeviceTypes(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { return readDeviceTypes(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, orderBy, isAsc, offset, limit); } @@ -169,8 +169,8 @@ public class DeviceTypeRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @param orderBy order by @@ -180,7 +180,7 @@ public class DeviceTypeRepository { * @return list of device types */ public List<DeviceType> readDeviceTypes(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { // note @@ -199,7 +199,7 @@ public class DeviceTypeRepository { Root<DeviceType> from = cq.from(DeviceType.class); cq.where(cb.and(preparePredicatesDeviceTypes(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(from); @@ -260,14 +260,14 @@ public class DeviceTypeRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return list of predicates */ private List<Predicate> preparePredicatesDeviceTypes(CriteriaBuilder cb, Root<DeviceType> from, Subquery<Long> sub, Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { List<Predicate> predicates = new ArrayList<>(); @@ -337,11 +337,11 @@ public class DeviceTypeRepository { if (!StringUtils.isEmpty(mnemonic)) { predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonic)))); } - if (!StringUtils.isEmpty(mnemonicequivalence)) { - predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicequivalence)))); + if (!StringUtils.isEmpty(mnemonicEquivalence)) { + predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicEquivalence)))); } - if (!StringUtils.isEmpty(mnemonicpath)) { - predicates.add(cb.and(cb.like(cb.function(DeviceType.FUNCTION_GET_MNEMONIC_PATH_DEVICETYPE, String.class, from.get(NameStructure.FIELD_UUID)), RepositoryUtil.preparePattern(mnemonicpath)))); + if (!StringUtils.isEmpty(mnemonicPath)) { + predicates.add(cb.and(cb.like(cb.function(DeviceType.FUNCTION_GET_MNEMONIC_PATH_DEVICETYPE, String.class, from.get(NameStructure.FIELD_UUID)), RepositoryUtil.preparePattern(mnemonicPath)))); } if (!StringUtils.isEmpty(description)) { predicates.add(cb.and(cb.like(from.get(NameStructure.FIELD_DESCRIPTION), RepositoryUtil.preparePattern(description)))); diff --git a/src/main/java/org/openepics/names/repository/DisciplineRepository.java b/src/main/java/org/openepics/names/repository/DisciplineRepository.java index 9eb3ecbe..7754006d 100644 --- a/src/main/java/org/openepics/names/repository/DisciplineRepository.java +++ b/src/main/java/org/openepics/names/repository/DisciplineRepository.java @@ -60,15 +60,15 @@ public class DisciplineRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return count of disciplines */ public Long countDisciplines(Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return countDisciplines(statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE); } @@ -80,14 +80,14 @@ public class DisciplineRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return count of disciplines */ public Long countDisciplines(Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { // note @@ -102,7 +102,7 @@ public class DisciplineRepository { Root<Discipline> from = cq.from(Discipline.class); cq.where(cb.and(preparePredicatesDisciplines(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(cb.count(from)); @@ -117,16 +117,16 @@ public class DisciplineRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return list of disciplines */ public List<Discipline> readDisciplines(Status status, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return readDisciplines(status != null ? new Status[] {status} : null, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, null, null, null, null); } @@ -138,8 +138,8 @@ public class DisciplineRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param orderBy order by * @param isAsc is ascending @@ -148,10 +148,10 @@ public class DisciplineRepository { * @return list of disciplines */ public List<Discipline> readDisciplines(Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { return readDisciplines(statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, orderBy, isAsc, offset, limit); } @@ -163,8 +163,8 @@ public class DisciplineRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @param orderBy order by @@ -174,7 +174,7 @@ public class DisciplineRepository { * @return list of disciplines */ public List<Discipline> readDisciplines(Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { // note @@ -193,7 +193,7 @@ public class DisciplineRepository { Root<Discipline> from = cq.from(Discipline.class); cq.where(cb.and(preparePredicatesDisciplines(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(from); @@ -253,14 +253,14 @@ public class DisciplineRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return list of predicates */ private List<Predicate> preparePredicatesDisciplines(CriteriaBuilder cb, Root<Discipline> from, Subquery<Long> sub, Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { List<Predicate> predicates = new ArrayList<>(); @@ -327,11 +327,11 @@ public class DisciplineRepository { if (!StringUtils.isEmpty(mnemonic)) { predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonic)))); } - if (!StringUtils.isEmpty(mnemonicequivalence)) { - predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicequivalence)))); + if (!StringUtils.isEmpty(mnemonicEquivalence)) { + predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicEquivalence)))); } - if (!StringUtils.isEmpty(mnemonicpath)) { - predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonicpath)))); + if (!StringUtils.isEmpty(mnemonicPath)) { + predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonicPath)))); } if (!StringUtils.isEmpty(description)) { predicates.add(cb.and(cb.like(from.get(NameStructure.FIELD_DESCRIPTION), RepositoryUtil.preparePattern(description)))); diff --git a/src/main/java/org/openepics/names/repository/INameRepository.java b/src/main/java/org/openepics/names/repository/INameRepository.java index 1568efd3..8e4dcd23 100644 --- a/src/main/java/org/openepics/names/repository/INameRepository.java +++ b/src/main/java/org/openepics/names/repository/INameRepository.java @@ -51,14 +51,14 @@ public interface INameRepository extends JpaRepository<Name, Long> { @Query("SELECT n FROM Name n, SystemGroup sg " + "WHERE n.latest = true " - + "AND sg.uuid = n.systemgroupUuid " + + "AND sg.uuid = n.systemGroupUuid " + "AND sg.latest = true " + "AND sg.uuid = ?1") List<Name> findLatestBySystemGroupUuid(String uuid); @Query("SELECT n FROM Name n, SystemGroup sg " + "WHERE n.latest = true " - + "AND sg.uuid = n.systemgroupUuid " + + "AND sg.uuid = n.systemGroupUuid " + "AND sg.latest = true " + "AND sg.mnemonic = ?1") List<Name> findLatestBySystemGroupMnemonic(String mnemonic); @@ -111,7 +111,7 @@ public interface INameRepository extends JpaRepository<Name, Long> { @Query("SELECT n FROM Name n, DeviceType dt, DeviceGroup dg, Discipline di " + "WHERE n.latest = true " - + "AND dt.uuid = n.devicetypeUuid " + + "AND dt.uuid = n.deviceTypeUuid " + "AND dt.latest = true " + "AND dg.uuid = dt.parentUuid " + "AND dg.latest = true " @@ -122,7 +122,7 @@ public interface INameRepository extends JpaRepository<Name, Long> { @Query("SELECT n FROM Name n, DeviceType dt, DeviceGroup dg, Discipline di " + "WHERE n.latest = true " - + "AND dt.uuid = n.devicetypeUuid " + + "AND dt.uuid = n.deviceTypeUuid " + "AND dt.latest = true " + "AND dg.uuid = dt.parentUuid " + "AND dg.latest = true " @@ -133,14 +133,14 @@ public interface INameRepository extends JpaRepository<Name, Long> { @Query("SELECT n FROM Name n, DeviceType dt " + "WHERE n.latest = true " - + "AND dt.uuid = n.devicetypeUuid " + + "AND dt.uuid = n.deviceTypeUuid " + "AND dt.latest = true " + "AND dt.uuid = ?1") List<Name> findLatestByDeviceTypeUuid(String uuid); @Query("SELECT n FROM Name n, DeviceType dt " + "WHERE n.latest = true " - + "AND dt.uuid = n.devicetypeUuid " + + "AND dt.uuid = n.deviceTypeUuid " + "AND dt.latest = true " + "AND dt.mnemonic = ?1") List<Name> findLatestByDeviceTypeMnemonic(String mnemonic); diff --git a/src/main/java/org/openepics/names/repository/NameRepository.java b/src/main/java/org/openepics/names/repository/NameRepository.java index 84b1ca15..14f1eb81 100644 --- a/src/main/java/org/openepics/names/repository/NameRepository.java +++ b/src/main/java/org/openepics/names/repository/NameRepository.java @@ -54,17 +54,17 @@ public class NameRepository { * @param deleted deleted * @param uuid uuid * @param name name - * @param nameequivalence name equivalence - * @param systemstructure system structure mnemonic - * @param devicestructure device structure mnemonic + * @param nameEquivalence name equivalence + * @param systemStructure system structure mnemonic + * @param deviceStructure device structure mnemonic * @param index index * @param description description * @return count of names */ public Long countNames(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description) { + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description) { return countNames(deleted, - uuid, name, nameequivalence, systemstructure, devicestructure, index, description, + uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, Boolean.FALSE); } @@ -74,16 +74,16 @@ public class NameRepository { * @param deleted deleted * @param uuid uuid * @param name name - * @param nameequivalence name equivalence - * @param systemstructure system structure mnemonic - * @param devicestructure device structure mnemonic + * @param nameEquivalence name equivalence + * @param systemStructure system structure mnemonic + * @param deviceStructure device structure mnemonic * @param index index * @param description description * @param includeHistory include history * @return count of names */ public Long countNames(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description, + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description, Boolean includeHistory) { // note @@ -97,7 +97,7 @@ public class NameRepository { Root<Name> from = cq.from(Name.class); cq.where(cb.and(preparePredicatesNames(cb, from, deleted, - uuid, name, nameequivalence, systemstructure, devicestructure, index, description, + uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, includeHistory).toArray(new Predicate[0]))); cq.select(cb.count(from)); @@ -110,18 +110,18 @@ public class NameRepository { * @param deleted deleted * @param uuid uuid * @param name name - * @param nameequivalence name equivalence - * @param systemstructure system structure mnemonic - * @param devicestructure device structure mnemonic + * @param nameEquivalence name equivalence + * @param systemStructure system structure mnemonic + * @param deviceStructure device structure mnemonic * @param index index * @param description description * @return list of names */ public List<Name> readNames(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description) { + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description) { return readNames(deleted, - uuid, name, nameequivalence, systemstructure, devicestructure, index, description, + uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, Boolean.FALSE, null, null, null, null); } @@ -131,9 +131,9 @@ public class NameRepository { * @param deleted deleted * @param uuid uuid * @param name name - * @param nameequivalence name equivalence - * @param systemstructure system structure mnemonic - * @param devicestructure device structure mnemonic + * @param nameEquivalence name equivalence + * @param systemStructure system structure mnemonic + * @param deviceStructure device structure mnemonic * @param index index * @param description description * @param orderBy order by @@ -143,10 +143,10 @@ public class NameRepository { * @return list of names */ public List<Name> readNames(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description, + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description, FieldName orderBy, Boolean isAsc, Integer offset, Integer limit) { return readNames(deleted, - uuid, name, nameequivalence, systemstructure, devicestructure, index, description, + uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, Boolean.FALSE, orderBy, isAsc, offset, limit); } @@ -156,9 +156,9 @@ public class NameRepository { * @param deleted deleted * @param uuid uuid * @param name name - * @param nameequivalence name equivalence - * @param systemstructure system structure mnemonic - * @param devicestructure device structure mnemonic + * @param nameEquivalence name equivalence + * @param systemStructure system structure mnemonic + * @param deviceStructure device structure mnemonic * @param index index * @param description description * @param includeHistory include history @@ -169,7 +169,7 @@ public class NameRepository { * @return list of names */ public List<Name> readNames(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description, + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description, Boolean includeHistory, FieldName orderBy, Boolean isAsc, Integer offset, Integer limit) { // note @@ -187,7 +187,7 @@ public class NameRepository { Root<Name> from = cq.from(Name.class); cq.where(cb.and(preparePredicatesNames(cb, from, deleted, - uuid, name, nameequivalence, systemstructure, devicestructure, index, description, + uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, includeHistory).toArray(new Predicate[0]))); cq.select(from); @@ -248,16 +248,16 @@ public class NameRepository { * @param deleted deleted * @param uuid uuid * @param name name - * @param nameequivalence name equivalence - * @param systemstructure system structure mnemonic - * @param devicestructure device structure mnemonic + * @param nameEquivalence name equivalence + * @param systemStructure system structure mnemonic + * @param deviceStructure device structure mnemonic * @param index index * @param description description * @param includeHistory include history * @return list of predicates */ private List<Predicate> preparePredicatesNames(CriteriaBuilder cb, Root<Name> from, Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description, + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description, Boolean includeHistory) { List<Predicate> predicates = new ArrayList<>(); @@ -291,14 +291,14 @@ public class NameRepository { if (!StringUtils.isEmpty(name)) { predicates.add(cb.and(cb.like(from.get(Name.FIELD_CONVENTION_NAME), RepositoryUtil.preparePattern(name)))); } - if (!StringUtils.isEmpty(nameequivalence)) { - predicates.add(cb.and(cb.like(from.get(Name.FIELD_CONVENTION_NAME_EQUIVALENCE), RepositoryUtil.preparePattern(nameequivalence)))); + if (!StringUtils.isEmpty(nameEquivalence)) { + predicates.add(cb.and(cb.like(from.get(Name.FIELD_CONVENTION_NAME_EQUIVALENCE), RepositoryUtil.preparePattern(nameEquivalence)))); } - if (!StringUtils.isEmpty(systemstructure)) { - predicates.add(cb.and(cb.like(cb.function(NameStructure.FUNCTION_GET_MNEMONIC_PATH_SYSTEM_STRUCTURE, String.class, from.get(Name.FIELD_CONVENTION_NAME)), RepositoryUtil.preparePattern(systemstructure)))); + if (!StringUtils.isEmpty(systemStructure)) { + predicates.add(cb.and(cb.like(cb.function(NameStructure.FUNCTION_GET_MNEMONIC_PATH_SYSTEM_STRUCTURE, String.class, from.get(Name.FIELD_CONVENTION_NAME)), RepositoryUtil.preparePattern(systemStructure)))); } - if (!StringUtils.isEmpty(devicestructure)) { - predicates.add(cb.and(cb.like(cb.function(NameStructure.FUNCTION_GET_MNEMONIC_PATH_DEVICE_STRUCTURE, String.class, from.get(Name.FIELD_CONVENTION_NAME)), RepositoryUtil.preparePattern(devicestructure)))); + if (!StringUtils.isEmpty(deviceStructure)) { + predicates.add(cb.and(cb.like(cb.function(NameStructure.FUNCTION_GET_MNEMONIC_PATH_DEVICE_STRUCTURE, String.class, from.get(Name.FIELD_CONVENTION_NAME)), RepositoryUtil.preparePattern(deviceStructure)))); } if (!StringUtils.isEmpty(index)) { predicates.add(cb.and(cb.like(cb.function(NameStructure.FUNCTION_GET_INSTANCE_INDEX, String.class, from.get(Name.FIELD_CONVENTION_NAME)), RepositoryUtil.preparePattern(index)))); diff --git a/src/main/java/org/openepics/names/repository/SubsystemRepository.java b/src/main/java/org/openepics/names/repository/SubsystemRepository.java index be409abc..c33ef379 100644 --- a/src/main/java/org/openepics/names/repository/SubsystemRepository.java +++ b/src/main/java/org/openepics/names/repository/SubsystemRepository.java @@ -62,15 +62,15 @@ public class SubsystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return count of subsystems */ public Long countSubsystems(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return countSubsystems(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE); } @@ -83,14 +83,14 @@ public class SubsystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return count of subsystems */ public Long countSubsystems(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { // note @@ -105,7 +105,7 @@ public class SubsystemRepository { Root<Subsystem> from = cq.from(Subsystem.class); cq.where(cb.and(preparePredicatesSubsystems(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(cb.count(from)); @@ -121,16 +121,16 @@ public class SubsystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return list of subsystems */ public List<Subsystem> readSubsystems(Status status, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return readSubsystems(status != null ? new Status[] {status} : null, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, null, null, null, null); } @@ -143,8 +143,8 @@ public class SubsystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param orderBy order by * @param isAsc is ascending @@ -153,10 +153,10 @@ public class SubsystemRepository { * @return list of subsystems */ public List<Subsystem> readSubsystems(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { return readSubsystems(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, orderBy, isAsc, offset, limit); } @@ -169,8 +169,8 @@ public class SubsystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @param orderBy order by @@ -180,7 +180,7 @@ public class SubsystemRepository { * @return list of subsystems */ public List<Subsystem> readSubsystems(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { // note @@ -199,7 +199,7 @@ public class SubsystemRepository { Root<Subsystem> from = cq.from(Subsystem.class); cq.where(cb.and(preparePredicatesSubsystems(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(from); @@ -260,14 +260,14 @@ public class SubsystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return list of predicates */ private List<Predicate> preparePredicatesSubsystems(CriteriaBuilder cb, Root<Subsystem> from, Subquery<Long> sub, Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { List<Predicate> predicates = new ArrayList<>(); @@ -337,11 +337,11 @@ public class SubsystemRepository { if (!StringUtils.isEmpty(mnemonic)) { predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonic)))); } - if (!StringUtils.isEmpty(mnemonicequivalence)) { - predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicequivalence)))); + if (!StringUtils.isEmpty(mnemonicEquivalence)) { + predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicEquivalence)))); } - if (!StringUtils.isEmpty(mnemonicpath)) { - predicates.add(cb.and(cb.like(cb.function(Subsystem.FUNCTION_GET_MNEMONIC_PATH_SUBSYSTEM, String.class, from.get(NameStructure.FIELD_UUID)), RepositoryUtil.preparePattern(mnemonicpath)))); + if (!StringUtils.isEmpty(mnemonicPath)) { + predicates.add(cb.and(cb.like(cb.function(Subsystem.FUNCTION_GET_MNEMONIC_PATH_SUBSYSTEM, String.class, from.get(NameStructure.FIELD_UUID)), RepositoryUtil.preparePattern(mnemonicPath)))); } if (!StringUtils.isEmpty(description)) { predicates.add(cb.and(cb.like(from.get(NameStructure.FIELD_DESCRIPTION), RepositoryUtil.preparePattern(description)))); diff --git a/src/main/java/org/openepics/names/repository/SystemGroupRepository.java b/src/main/java/org/openepics/names/repository/SystemGroupRepository.java index bc4c0249..0a46072e 100644 --- a/src/main/java/org/openepics/names/repository/SystemGroupRepository.java +++ b/src/main/java/org/openepics/names/repository/SystemGroupRepository.java @@ -60,15 +60,15 @@ public class SystemGroupRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return count of system groups */ public Long countSystemGroups(Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return countSystemGroups(statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE); } @@ -80,14 +80,14 @@ public class SystemGroupRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return count of system groups */ public Long countSystemGroups(Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { // where @@ -100,7 +100,7 @@ public class SystemGroupRepository { Root<SystemGroup> from = cq.from(SystemGroup.class); cq.where(cb.and(preparePredicatesSystemGroups(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(cb.count(from)); @@ -115,16 +115,16 @@ public class SystemGroupRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return list of system groups */ public List<SystemGroup> readSystemGroups(Status status, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return readSystemGroups(status != null ? new Status[] {status} : null, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, null, null, null, null); } @@ -136,8 +136,8 @@ public class SystemGroupRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param orderBy order by * @param isAsc is ascending @@ -146,10 +146,10 @@ public class SystemGroupRepository { * @return list of system groups */ public List<SystemGroup> readSystemGroups(Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { return readSystemGroups(statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, orderBy, isAsc, offset, limit); } @@ -161,8 +161,8 @@ public class SystemGroupRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @param orderBy order by @@ -172,7 +172,7 @@ public class SystemGroupRepository { * @return list of system groups */ public List<SystemGroup> readSystemGroups(Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { // where @@ -189,7 +189,7 @@ public class SystemGroupRepository { Root<SystemGroup> from = cq.from(SystemGroup.class); cq.where(cb.and(preparePredicatesSystemGroups(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(from); @@ -249,14 +249,14 @@ public class SystemGroupRepository { * @param uuid uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return list of predicates */ private List<Predicate> preparePredicatesSystemGroups(CriteriaBuilder cb, Root<SystemGroup> from, Subquery<Long> sub, Status[] statuses, Boolean deleted, - String uuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { List<Predicate> predicates = new ArrayList<>(); @@ -323,11 +323,11 @@ public class SystemGroupRepository { if (!StringUtils.isEmpty(mnemonic)) { predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonic)))); } - if (!StringUtils.isEmpty(mnemonicequivalence)) { - predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicequivalence)))); + if (!StringUtils.isEmpty(mnemonicEquivalence)) { + predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicEquivalence)))); } - if (!StringUtils.isEmpty(mnemonicpath)) { - predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonicpath)))); + if (!StringUtils.isEmpty(mnemonicPath)) { + predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonicPath)))); } if (!StringUtils.isEmpty(description)) { predicates.add(cb.and(cb.like(from.get(NameStructure.FIELD_DESCRIPTION), RepositoryUtil.preparePattern(description)))); diff --git a/src/main/java/org/openepics/names/repository/SystemRepository.java b/src/main/java/org/openepics/names/repository/SystemRepository.java index 32978d0e..48761e12 100644 --- a/src/main/java/org/openepics/names/repository/SystemRepository.java +++ b/src/main/java/org/openepics/names/repository/SystemRepository.java @@ -61,15 +61,15 @@ public class SystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return count of systems */ public Long countSystems(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return countSystems(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE); } @@ -82,14 +82,14 @@ public class SystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return count of systems */ public Long countSystems(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { // note @@ -104,7 +104,7 @@ public class SystemRepository { Root<System> from = cq.from(System.class); cq.where(cb.and(preparePredicatesSystems(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(cb.count(from)); @@ -120,16 +120,16 @@ public class SystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @return list of systems */ public List<System> readSystems(Status status, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description) { + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description) { return readSystems(status != null ? new Status[] {status} : null, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, null, null, null, null); } @@ -142,8 +142,8 @@ public class SystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param orderBy order by * @param isAsc is ascending @@ -152,10 +152,10 @@ public class SystemRepository { * @return list of systems */ public List<System> readSystems(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { return readSystems(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, orderBy, isAsc, offset, limit); } @@ -168,8 +168,8 @@ public class SystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @param orderBy order by @@ -179,7 +179,7 @@ public class SystemRepository { * @return list of systems */ public List<System> readSystems(Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { // note @@ -198,7 +198,7 @@ public class SystemRepository { Root<System> from = cq.from(System.class); cq.where(cb.and(preparePredicatesSystems(cb, from, cq.subquery(Long.class), statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parentUuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory).toArray(new Predicate[0]))); cq.select(from); @@ -259,14 +259,14 @@ public class SystemRepository { * @param parentUuid parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @return list of predicates */ private List<Predicate> preparePredicatesSystems(CriteriaBuilder cb, Root<System> from, Subquery<Long> sub, Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parentUuid, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory) { List<Predicate> predicates = new ArrayList<>(); @@ -336,11 +336,11 @@ public class SystemRepository { if (!StringUtils.isEmpty(mnemonic)) { predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC), RepositoryUtil.preparePattern(mnemonic)))); } - if (!StringUtils.isEmpty(mnemonicequivalence)) { - predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicequivalence)))); + if (!StringUtils.isEmpty(mnemonicEquivalence)) { + predicates.add(cb.and(cb.like(from.get(Structure.FIELD_MNEMONIC_EQUIVALENCE), RepositoryUtil.preparePattern(mnemonicEquivalence)))); } - if (!StringUtils.isEmpty(mnemonicpath)) { - predicates.add(cb.and(cb.like(cb.function(System.FUNCTION_GET_MNEMONIC_PATH_SYSTEM, String.class, from.get(NameStructure.FIELD_UUID)), RepositoryUtil.preparePattern(mnemonicpath)))); + if (!StringUtils.isEmpty(mnemonicPath)) { + predicates.add(cb.and(cb.like(cb.function(System.FUNCTION_GET_MNEMONIC_PATH_SYSTEM, String.class, from.get(NameStructure.FIELD_UUID)), RepositoryUtil.preparePattern(mnemonicPath)))); } if (!StringUtils.isEmpty(description)) { predicates.add(cb.and(cb.like(from.get(NameStructure.FIELD_DESCRIPTION), RepositoryUtil.preparePattern(description)))); diff --git a/src/main/java/org/openepics/names/repository/model/Name.java b/src/main/java/org/openepics/names/repository/model/Name.java index 4462a5fe..0898007e 100644 --- a/src/main/java/org/openepics/names/repository/model/Name.java +++ b/src/main/java/org/openepics/names/repository/model/Name.java @@ -52,13 +52,13 @@ public class Name extends NameStructure implements Serializable { public static final String FIELD_CONVENTION_NAME_EQUIVALENCE = "conventionNameEquivalence"; @Column(name = "systemgroup_uuid") - private String systemgroupUuid; + private String systemGroupUuid; @Column(name = "system_uuid") private String systemUuid; @Column(name = "subsystem_uuid") private String subsystemUuid; @Column(name = "devicetype_uuid") - private String devicetypeUuid; + private String deviceTypeUuid; @Column(name = "instance_index") private String instanceIndex; @Column(name = "convention_name") @@ -76,10 +76,10 @@ public class Name extends NameStructure implements Serializable { * Constructor for Name. * * @param uuid uuid - * @param systemgroupUuid system group uuid + * @param systemGroupUuid system group uuid * @param systemUuid system uuid * @param subsystemUuid subsystem uuid - * @param parentdevicestructure parent device structure uuid + * @param deviceTypeUuid device type uuid * @param index index * @param conventionName convention name * @param conventionNameEquivalence convention name equivalence @@ -91,15 +91,15 @@ public class Name extends NameStructure implements Serializable { * @param requestedBy requested by * @param requestedComment requested comment */ - public Name(UUID uuid, UUID systemgroupUuid, UUID systemUuid, UUID subsystemUuid, UUID parentdevicestructure, + public Name(UUID uuid, UUID systemGroupUuid, UUID systemUuid, UUID subsystemUuid, UUID deviceTypeUuid, String index, String conventionName, String conventionNameEquivalence, String description, Status status, Boolean latest, Boolean deleted, Date requested, String requestedBy, String requestedComment) { setUuid(uuid); - setSystemgroupUuid(systemgroupUuid); + setSystemGroupUuid(systemGroupUuid); setSystemUuid(systemUuid); setSubsystemUuid(subsystemUuid); - setDevicetypeUuid(parentdevicestructure); + setDeviceTypeUuid(deviceTypeUuid); setInstanceIndex(index); setConventionName(conventionName); setConventionNameEquivalence(conventionNameEquivalence); @@ -112,11 +112,11 @@ public class Name extends NameStructure implements Serializable { setRequestedComment(requestedComment); } - public UUID getSystemgroupUuid() { - return systemgroupUuid != null ? UUID.fromString(systemgroupUuid) : null; + public UUID getSystemGroupUuid() { + return systemGroupUuid != null ? UUID.fromString(systemGroupUuid) : null; } - public void setSystemgroupUuid(UUID systemgroupUuid) { - this.systemgroupUuid = systemgroupUuid != null ? systemgroupUuid.toString() : null; + public void setSystemGroupUuid(UUID systemGroupUuid) { + this.systemGroupUuid = systemGroupUuid != null ? systemGroupUuid.toString() : null; } public UUID getSystemUuid() { return systemUuid != null ? UUID.fromString(systemUuid) : null; @@ -130,11 +130,11 @@ public class Name extends NameStructure implements Serializable { public void setSubsystemUuid(UUID subsystemUuid) { this.subsystemUuid = subsystemUuid != null ? subsystemUuid.toString() : null; } - public UUID getDevicetypeUuid() { - return devicetypeUuid != null ? UUID.fromString(devicetypeUuid) : null; + public UUID getDeviceTypeUuid() { + return deviceTypeUuid != null ? UUID.fromString(deviceTypeUuid) : null; } - public void setDevicetypeUuid(UUID devicetypeUuid) { - this.devicetypeUuid = devicetypeUuid != null ? devicetypeUuid.toString() : null; + public void setDeviceTypeUuid(UUID deviceTypeUuid) { + this.deviceTypeUuid = deviceTypeUuid != null ? deviceTypeUuid.toString() : null; } public String getInstanceIndex() { return instanceIndex; @@ -175,10 +175,10 @@ public class Name extends NameStructure implements Serializable { return false; } - if (getSystemgroupUuid() == null) { - if (other.getSystemgroupUuid() != null) + if (getSystemGroupUuid() == null) { + if (other.getSystemGroupUuid() != null) return false; - } else if (!getSystemgroupUuid().equals(other.getSystemgroupUuid())) + } else if (!getSystemGroupUuid().equals(other.getSystemGroupUuid())) return false; if (getSystemUuid() == null) { if (other.getSystemUuid() != null) @@ -190,10 +190,10 @@ public class Name extends NameStructure implements Serializable { return false; } else if (!getSubsystemUuid().equals(other.getSubsystemUuid())) return false; - if (getDevicetypeUuid() == null) { - if (other.getDevicetypeUuid() != null) + if (getDeviceTypeUuid() == null) { + if (other.getDeviceTypeUuid() != null) return false; - } else if (!getDevicetypeUuid().equals(other.getDevicetypeUuid())) + } else if (!getDeviceTypeUuid().equals(other.getDeviceTypeUuid())) return false; if (getInstanceIndex() == null) { if (other.getInstanceIndex() != null) @@ -234,10 +234,10 @@ public class Name extends NameStructure implements Serializable { sb.append("\"id\": " + getId()); sb.append(", \"version\": " + getVersion()); sb.append(", \"uuid\": " + getUuid()); - sb.append(", \"systemgroup_uuid\": " + getSystemgroupUuid()); + sb.append(", \"systemgroup_uuid\": " + getSystemGroupUuid()); sb.append(", \"system_uuid\": " + getSystemUuid()); sb.append(", \"subsystem_uuid\": " + getSubsystemUuid()); - sb.append(", \"devicetype_uuid\": " + getDevicetypeUuid()); + sb.append(", \"devicetype_uuid\": " + getDeviceTypeUuid()); sb.append(", \"instance_index\": " + getInstanceIndex()); sb.append(", \"convention_name\": " + getConventionName()); sb.append(", \"convention_name_equivalence\": " + getConventionNameEquivalence()); diff --git a/src/main/java/org/openepics/names/rest/api/v1/INames.java b/src/main/java/org/openepics/names/rest/api/v1/INames.java index 97b1acfa..b2b25a70 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/INames.java +++ b/src/main/java/org/openepics/names/rest/api/v1/INames.java @@ -65,14 +65,14 @@ public interface INames { NameElementCommand - subset of NameElement attributes NameElement uuid (UUID) - parentsystemstructure (UUID) - parentdevicestructure (UUID) + parentSystemStructure (UUID) + parentDeviceStructure (UUID) index (String) description (String) comment (String) ---------------------------------- - systemstructure (String) - devicestructure (String) + systemStructure (String) + deviceStructure (String) name (String) status (Status) latest (Boolean) @@ -87,18 +87,18 @@ public interface INames { read GET /names - readNames (Boolean, String, String, String, String, String, String, FieldName, Boolean, Integer, Integer) read GET /names/download - readNamesDownload (Boolean, String, String, String, String, String, String, FieldName, Boolean, Integer, Integer) read GET /names/{name} - readNames (String, FieldName, Boolean, Integer, Integer) - read GET /names/systemstructure/{mnemonicpath} - readNamesSystemStructure (String, FieldName, Boolean, Integer, Integer) - read GET /names/devicestructure/{mnemonicpath} - readNamesDeviceStructure (String, FieldName, Boolean, Integer, Integer) + read GET /names/systemStructure/{mnemonicPath} - readNamesSystemStructure (String, FieldName, Boolean, Integer, Integer) + read GET /names/deviceStructure/{mnemonicPath} - readNamesDeviceStructure (String, FieldName, Boolean, Integer, Integer) read GET /names/history/{uuid} - readNamesHistory (String, FieldName, Boolean, Integer, Integer) ---------------------------------------------------------------------------------------------------- read GET /names/equivalence/{name} - equivalenceName (String) read GET /names/exists/{name} - existsName (String) - read GET /names/islegacy/{name} - isLegacyName (String) - read GET /names/isvalidtocreate/{name} - isValidToCreateName (String) + read GET /names/isLegacy/{name} - isLegacyName (String) + read GET /names/isValidToCreate/{name} - isValidToCreateName (String) ---------------------------------------------------------------------------------------------------- - read GET /names/validatecreate - validateNamesCreate (List<NameElementCommand>) - read GET /names/validateupdate - validateNamesUpdate (List<NameElementCommand>) - read GET /names/validatedelete - validateNamesDelete (List<NameElementCommand>) + read GET /names/validateCreate - validateNamesCreate (List<NameElementCommand>) + read GET /names/validateUpdate - validateNamesUpdate (List<NameElementCommand>) + read GET /names/validateDelete - validateNamesDelete (List<NameElementCommand>) ---------------------------------------------------------------------------------------------------- update PUT /names - updateNames (List<NameElementCommand>) update PUT /names/upload - updateNames (MultipartFile) @@ -135,12 +135,12 @@ public interface INames { Return array of name elements for created names. Required attributes: - - parentsystemstructure (uuid) + - parentSystemStructure (uuid) - description - comment Optional attributes: - - parentdevicestructure (uuid) + - parentDeviceStructure (uuid) - index Uuid is created by Naming. @@ -185,7 +185,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommand.class, - requiredProperties = {"parentsystemstructure","parentdevicestructure","index","description","comment"})))) + requiredProperties = {"parentSystemStructure","parentDeviceStructure","index","description","comment"})))) @RequestBody List<NameElementCommand> nameElements); /** @@ -204,12 +204,12 @@ public interface INames { Expected columns as in Excel template for names. Required attributes: - - parentsystemstructure (uuid) + - parentSystemStructure (uuid) - description - comment Optional attributes: - - parentdevicestructure (uuid) + - parentDeviceStructure (uuid) - index Uuid is created by Naming. @@ -261,9 +261,9 @@ public interface INames { * (false for non-deleted-only names, true for deleted-only names, not used for both cases) * @param uuid uuid * @param name name - * @param nameequivalence name equivalence - * @param systemstructure system structure mnemonic path - * @param devicestructure device structure mnemonic path + * @param nameEquivalence name equivalence + * @param systemStructure system structure mnemonic path + * @param deviceStructure device structure mnemonic path * @param index index * @param description description * @param orderBy order by field @@ -311,9 +311,9 @@ public interface INames { @Parameter(in = ParameterIn.QUERY, description = "if deleted names are to be included or not, omitted for both deleted and not deleted names") @RequestParam(required = false) Boolean deleted, @Parameter(in = ParameterIn.QUERY, description = "search by uuid") @RequestParam(required = false) String uuid, @Parameter(in = ParameterIn.QUERY, description = "search by name") @RequestParam(required = false) String name, - @Parameter(in = ParameterIn.QUERY, description = "search by name equivalence") @RequestParam(required = false) String nameequivalence, - @Parameter(in = ParameterIn.QUERY, description = "search by system structure mnemonic path") @RequestParam(required = false) String systemstructure, - @Parameter(in = ParameterIn.QUERY, description = "search by device structure mnemonic path") @RequestParam(required = false) String devicestructure, + @Parameter(in = ParameterIn.QUERY, description = "search by name equivalence") @RequestParam(required = false) String nameEquivalence, + @Parameter(in = ParameterIn.QUERY, description = "search by system structure mnemonic path") @RequestParam(required = false) String systemStructure, + @Parameter(in = ParameterIn.QUERY, description = "search by device structure mnemonic path") @RequestParam(required = false) String deviceStructure, @Parameter(in = ParameterIn.QUERY, description = "search by index") @RequestParam(required = false) String index, @Parameter(in = ParameterIn.QUERY, description = "search by description") @RequestParam(required = false) String description, @Parameter(in = ParameterIn.QUERY, description = "order by field") @RequestParam(required = false) FieldName orderBy, @@ -329,9 +329,9 @@ public interface INames { * (false for non-deleted-only names, true for deleted-only names, not used for both cases) * @param uuid uuid * @param name name - * @param nameequivalence name equivalence - * @param systemstructure system structure mnemonic path - * @param devicestructure device structure mnemonic path + * @param nameEquivalence name equivalence + * @param systemStructure system structure mnemonic path + * @param deviceStructure device structure mnemonic path * @param index index * @param description description * @param orderBy order by field @@ -378,9 +378,9 @@ public interface INames { @Parameter(in = ParameterIn.QUERY, description = "if deleted names are to be included or not, omitted for both deleted and not deleted names") @RequestParam(required = false) Boolean deleted, @Parameter(in = ParameterIn.QUERY, description = "search by uuid") @RequestParam(required = false) String uuid, @Parameter(in = ParameterIn.QUERY, description = "search by name") @RequestParam(required = false) String name, - @Parameter(in = ParameterIn.QUERY, description = "search by name equivalence") @RequestParam(required = false) String nameequivalence, - @Parameter(in = ParameterIn.QUERY, description = "search by system structure mnemonic path") @RequestParam(required = false) String systemstructure, - @Parameter(in = ParameterIn.QUERY, description = "search by device structure mnemonic path") @RequestParam(required = false) String devicestructure, + @Parameter(in = ParameterIn.QUERY, description = "search by name equivalence") @RequestParam(required = false) String nameEquivalence, + @Parameter(in = ParameterIn.QUERY, description = "search by system structure mnemonic path") @RequestParam(required = false) String systemStructure, + @Parameter(in = ParameterIn.QUERY, description = "search by device structure mnemonic path") @RequestParam(required = false) String deviceStructure, @Parameter(in = ParameterIn.QUERY, description = "search by index") @RequestParam(required = false) String index, @Parameter(in = ParameterIn.QUERY, description = "search by description") @RequestParam(required = false) String description, @Parameter(in = ParameterIn.QUERY, description = "order by field") @RequestParam(required = false) FieldName orderBy, @@ -446,7 +446,7 @@ public interface INames { * Find valid names by system structure mnemonic path (search). * Return paged list of name elements. * - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path * @param orderBy order by field * @param isAsc sort order, ascending or descending * @param page page starting from 0, offset @@ -487,10 +487,10 @@ public interface INames { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/systemstructure/{mnemonicpath}", + value = "/systemStructure/{mnemonicPath}", produces = {"application/json"}) public ResponsePageNameElements readNamesSystemStructure( - @Parameter(in = ParameterIn.PATH, description = "search by system structure mnemonic path") @PathVariable("mnemonicpath") String mnemonicpath, + @Parameter(in = ParameterIn.PATH, description = "search by system structure mnemonic path") @PathVariable("mnemonicPath") String mnemonicPath, @Parameter(in = ParameterIn.QUERY, description = "order by field") @RequestParam(required = false) FieldName orderBy, @Parameter(in = ParameterIn.QUERY, description = "sort order, ascending or descending") @RequestParam(required = false) Boolean isAsc, @Parameter(in = ParameterIn.QUERY, description = "page starting from 0, offset") @RequestParam(required = false, defaultValue = DEFAULT_PAGE) Integer page, @@ -500,7 +500,7 @@ public interface INames { * Find valid names by device structure mnemonic path (search). * Return paged list of name elements. * - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path * @param orderBy order by field * @param isAsc sort order, ascending or descending * @param page page starting from 0, offset @@ -541,10 +541,10 @@ public interface INames { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/devicestructure/{mnemonicpath}", + value = "/deviceStructure/{mnemonicPath}", produces = {"application/json"}) public ResponsePageNameElements readNamesDeviceStructure( - @Parameter(in = ParameterIn.PATH, description = "search by device structure mnemonic path") @PathVariable("mnemonicpath") String mnemonicpath, + @Parameter(in = ParameterIn.PATH, description = "search by device structure mnemonic path") @PathVariable("mnemonicPath") String mnemonicPath, @Parameter(in = ParameterIn.QUERY, description = "order by field") @RequestParam(required = false) FieldName orderBy, @Parameter(in = ParameterIn.QUERY, description = "sort order, ascending or descending") @RequestParam(required = false) Boolean isAsc, @Parameter(in = ParameterIn.QUERY, description = "page starting from 0, offset") @RequestParam(required = false, defaultValue = DEFAULT_PAGE) Integer page, @@ -762,7 +762,7 @@ public interface INames { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/islegacy/{name}", + value = "/isLegacy/{name}", produces = {"application/json"}) public ResponseEntity<ResponseBoolean> isLegacyName( @Parameter(in = ParameterIn.PATH, description = "name to check if it is legacy name") @PathVariable("name") String name); @@ -816,7 +816,7 @@ public interface INames { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/isvalidtocreate/{name}", + value = "/isValidToCreate/{name}", produces = {"application/json"}) public ResponseEntity<ResponseBoolean> isValidToCreateName( @Parameter(in = ParameterIn.PATH, description = "name to check if it is valid to create") @PathVariable("name") String name); @@ -843,12 +843,12 @@ public interface INames { If names are valid to create, successful create of names can be expected. Required attributes: - - parentsystemstructure (uuid) + - parentSystemStructure (uuid) - description - comment Optional attributes: - - parentdevicestructure (uuid) + - parentDeviceStructure (uuid) - index Uuid is created by Naming. @@ -884,7 +884,7 @@ public interface INames { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/validatecreate", + value = "/validateCreate", produces = {"application/json"}, consumes = {"application/json"}) public ResponseEntity<ResponseBooleanList> validateNamesCreate( @@ -897,7 +897,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommand.class, - requiredProperties = {"parentsystemstructure","parentdevicestructure","index","description","comment"})))) + requiredProperties = {"parentSystemStructure","parentDeviceStructure","index","description","comment"})))) @RequestBody List<NameElementCommand> nameElements); /** @@ -921,12 +921,12 @@ public interface INames { Required attributes: - uuid - - parentsystemstructure (uuid) + - parentSystemStructure (uuid) - description - comment Optional attributes: - - parentdevicestructure (uuid) + - parentDeviceStructure (uuid) - index """ ) @@ -960,7 +960,7 @@ public interface INames { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/validateupdate", + value = "/validateUpdate", produces = {"application/json"}, consumes = {"application/json"}) public ResponseEntity<ResponseBooleanList> validateNamesUpdate( @@ -973,7 +973,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommand.class, - requiredProperties = {"uuid","parentsystemstructure","description","comment"})))) + requiredProperties = {"uuid","parentSystemStructure","description","comment"})))) @RequestBody List<NameElementCommand> nameElements); /** @@ -1032,7 +1032,7 @@ public interface INames { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/validatedelete", + value = "/validateDelete", produces = {"application/json"}, consumes = {"application/json"}) public ResponseEntity<ResponseBooleanList> validateNamesDelete( @@ -1065,12 +1065,12 @@ public interface INames { Required attributes: - uuid - - parentsystemstructure (uuid) + - parentSystemStructure (uuid) - description - comment Optional attributes: - - parentdevicestructure (uuid) + - parentDeviceStructure (uuid) - index """ ) @@ -1113,7 +1113,7 @@ public interface INames { array = @ArraySchema( schema = @Schema( implementation = NameElementCommand.class, - requiredProperties = {"uuid","parentsystemstructure","description","comment"})))) + requiredProperties = {"uuid","parentSystemStructure","description","comment"})))) @RequestBody List<NameElementCommand> nameElements); /** @@ -1133,12 +1133,12 @@ public interface INames { Required attributes: - uuid - - parentsystemstructure (uuid) + - parentSystemStructure (uuid) - description - comment Optional attributes: - - parentdevicestructure (uuid) + - parentDeviceStructure (uuid) - index """ ) diff --git a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java index cc5e8665..2a7ee586 100644 --- a/src/main/java/org/openepics/names/rest/api/v1/IStructures.java +++ b/src/main/java/org/openepics/names/rest/api/v1/IStructures.java @@ -75,7 +75,7 @@ public interface IStructures { description (String) comment (String) ------------------------- - mnemonicpath (String) + mnemonicPath (String) level (Integer) status (Status) latest (Boolean) @@ -91,19 +91,19 @@ public interface IStructures { read GET /structures/{type}/download - readStructuresDownload (Type, Status[], Boolean, String, String, String, String, String, String, String, FieldStructure, Boolean, Integer, Integer) read GET /structures/children/{uuid} - readStructuresChildren (String, Type, Status[], Boolean, String, String, String, String, String, FieldStructure, Boolean, Integer, Integer) read GET /structures/mnemonic/{mnemonic} - readStructuresMnemonic (String, FieldStructure, Boolean, Integer, Integer, FieldStructure, Boolean, Integer, Integer) - read GET /structures/mnemonicpath/{mnemonicpath} - readStructuresMnemonicpath (String, FieldStructure, Boolean, Integer, Integer, FieldStructure, Boolean, Integer, Integer) + read GET /structures/mnemonicPath/{mnemonicPath} - readStructuresMnemonicPath (String, FieldStructure, Boolean, Integer, Integer, FieldStructure, Boolean, Integer, Integer) read GET /structures/history/{uuid} - readStructuresHistory (String, Type, FieldStructure, Boolean, Integer, Integer) ---------------------------------------------------------------------------------------------------- read GET /structures/equivalence/{mnemonic} - equivalenceMnemonic (String) - read GET /structures/exists/{type}/{mnemonicpath} - existsStructure (Type, String) - read GET /structures/isvalidtocreate/{type}/{mnemonicpath} - isValidToCreateStructure (Type, String) + read GET /structures/exists/{type}/{mnemonicPath} - existsStructure (Type, String) + read GET /structures/isValidToCreate/{type}/{mnemonicPath} - isValidToCreateStructure (Type, String) ---------------------------------------------------------------------------------------------------- - read GET /structures/validatecreate - validateStructuresCreate (List<StructureElementCommand>) - read GET /structures/validateupdate - validateStructuresUpdate (List<StructureElementCommand>) - read GET /structures/validatedelete - validateStructuresDelete (List<StructureElementCommand>) - read GET /structures/validateapprove - validateStructuresApprove (List<StructureElementCommand>) - read GET /structures/validatecancel - validateStructuresCancel (List<StructureElementCommand>) - read GET /structures/validatereject - validateStructuresReject (List<StructureElementCommand>) + read GET /structures/validateCreate - validateStructuresCreate (List<StructureElementCommand>) + read GET /structures/validateUpdate - validateStructuresUpdate (List<StructureElementCommand>) + read GET /structures/validateDelete - validateStructuresDelete (List<StructureElementCommand>) + read GET /structures/validateApprove - validateStructuresApprove (List<StructureElementCommand>) + read GET /structures/validateCancel - validateStructuresCancel (List<StructureElementCommand>) + read GET /structures/validateReject - validateStructuresReject (List<StructureElementCommand>) ---------------------------------------------------------------------------------------------------- update PUT /structures - updateStructures (List<StructureElementCommand>) update PUT /structures/upload - updateStructures (MultipartFile) @@ -284,11 +284,11 @@ public interface IStructures { * @param deleted if deleted-only structures are to be included * (false for non-deleted-only structures, true for deleted-only structures, not used for both cases) * @param uuid uuid - * @param parentuuid parent uuid + * @param parent parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param orderBy order by field * @param isAsc sort order, ascending or descending @@ -337,11 +337,11 @@ public interface IStructures { @Parameter(in = ParameterIn.QUERY, description = "search by statuses") @RequestParam(required = false) Status[] statuses, @Parameter(in = ParameterIn.QUERY, description = "if deleted structures are to be included or not, omitted for both deleted and not deleted structures") @RequestParam(required = false) Boolean deleted, @Parameter(in = ParameterIn.QUERY, description = "search by uuid") @RequestParam(required = false) String uuid, - @Parameter(in = ParameterIn.QUERY, description = "search by parent uuid") @RequestParam(required = false) String parentuuid, + @Parameter(in = ParameterIn.QUERY, description = "search by parent uuid") @RequestParam(required = false) String parent, @Parameter(in = ParameterIn.QUERY, description = "search by name") @RequestParam(required = false) String name, @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic") @RequestParam(required = false) String mnemonic, - @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic equivalence") @RequestParam(required = false) String mnemonicequivalence, - @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic path") @RequestParam(required = false) String mnemonicpath, + @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic equivalence") @RequestParam(required = false) String mnemonicEquivalence, + @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic path") @RequestParam(required = false) String mnemonicPath, @Parameter(in = ParameterIn.QUERY, description = "search by description") @RequestParam(required = false) String description, @Parameter(in = ParameterIn.QUERY, description = "order by field") @RequestParam(required = false) FieldStructure orderBy, @Parameter(in = ParameterIn.QUERY, description = "sort order, ascending or descending") @RequestParam(required = false) Boolean isAsc, @@ -357,11 +357,11 @@ public interface IStructures { * @param deleted if deleted-only structures are to be included * (false for non-deleted-only structures, true for deleted-only structures, not used for both cases) * @param uuid uuid - * @param parentuuid parent uuid + * @param parent parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param orderBy order by field * @param isAsc sort order, ascending or descending @@ -408,11 +408,11 @@ public interface IStructures { @Parameter(in = ParameterIn.QUERY, description = "search by statuses") @RequestParam(required = false) Status[] statuses, @Parameter(in = ParameterIn.QUERY, description = "if deleted structures are to be included or not, omitted for both deleted and not deleted structures") @RequestParam(required = false) Boolean deleted, @Parameter(in = ParameterIn.QUERY, description = "search by uuid") @RequestParam(required = false) String uuid, - @Parameter(in = ParameterIn.QUERY, description = "search by parent uuid") @RequestParam(required = false) String parentuuid, + @Parameter(in = ParameterIn.QUERY, description = "search by parent uuid") @RequestParam(required = false) String parent, @Parameter(in = ParameterIn.QUERY, description = "search by name") @RequestParam(required = false) String name, @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic") @RequestParam(required = false) String mnemonic, - @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic equivalence") @RequestParam(required = false) String mnemonicequivalence, - @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic path") @RequestParam(required = false) String mnemonicpath, + @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic equivalence") @RequestParam(required = false) String mnemonicEquivalence, + @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic path") @RequestParam(required = false) String mnemonicPath, @Parameter(in = ParameterIn.QUERY, description = "search by description") @RequestParam(required = false) String description, @Parameter(in = ParameterIn.QUERY, description = "order by field") @RequestParam(required = false) FieldStructure orderBy, @Parameter(in = ParameterIn.QUERY, description = "sort order, ascending or descending") @RequestParam(required = false) Boolean isAsc, @@ -430,8 +430,8 @@ public interface IStructures { * (false for non-deleted-only structures, true for deleted-only structures, not used for both cases) * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param orderBy order by field * @param isAsc sort order, ascending or descending @@ -482,8 +482,8 @@ public interface IStructures { @Parameter(in = ParameterIn.QUERY, description = "if deleted structures are to be included or not, omitted for both deleted and not deleted structures") @RequestParam(required = false) Boolean deleted, @Parameter(in = ParameterIn.QUERY, description = "search by name") @RequestParam(required = false) String name, @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic") @RequestParam(required = false) String mnemonic, - @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic equivalence") @RequestParam(required = false) String mnemonicequivalence, - @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic path") @RequestParam(required = false) String mnemonicpath, + @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic equivalence") @RequestParam(required = false) String mnemonicEquivalence, + @Parameter(in = ParameterIn.QUERY, description = "search by mnemonic path") @RequestParam(required = false) String mnemonicPath, @Parameter(in = ParameterIn.QUERY, description = "search by description") @RequestParam(required = false) String description, @Parameter(in = ParameterIn.QUERY, description = "order by field") @RequestParam(required = false) FieldStructure orderBy, @Parameter(in = ParameterIn.QUERY, description = "sort order, ascending or descending") @RequestParam(required = false) Boolean isAsc, @@ -548,7 +548,7 @@ public interface IStructures { * Find valid structures by mnemonic path (search). * Return paged list of structure elements. * - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path * @param orderBy order by field * @param isAsc sort order, ascending or descending * @param page page starting from 0, offset @@ -589,10 +589,10 @@ public interface IStructures { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/mnemonicpath/{mnemonicpath}", + value = "/mnemonicPath/{mnemonicPath}", produces = {"application/json"}) public ResponsePageStructureElements readStructuresMnemonicpath( - @Parameter(in = ParameterIn.PATH, description = "search by mnemonic path") @PathVariable("mnemonicpath") String mnemonicpath, + @Parameter(in = ParameterIn.PATH, description = "search by mnemonic path") @PathVariable("mnemonicPath") String mnemonicPath, @Parameter(in = ParameterIn.QUERY, description = "order by field") @RequestParam(required = false) FieldStructure orderBy, @Parameter(in = ParameterIn.QUERY, description = "sort order, ascending or descending") @RequestParam(required = false) Boolean isAsc, @Parameter(in = ParameterIn.QUERY, description = "page starting from 0, offset") @RequestParam(required = false, defaultValue = DEFAULT_PAGE) Integer page, @@ -711,7 +711,7 @@ public interface IStructures { * </p> * * @param type type of structure to search in - * @param mnemonicpath mnemonic path to find structure for + * @param mnemonicPath mnemonic path to find structure for * @return if mnemonic path exists in structure */ @Operation( @@ -751,10 +751,10 @@ public interface IStructures { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/exists/{type}/{mnemonicpath}") + value = "/exists/{type}/{mnemonicPath}") public ResponseEntity<ResponseBoolean> existsStructure( @Parameter(in = ParameterIn.PATH, description = "type of structure to search in") @PathVariable("type") Type type, - @Parameter(in = ParameterIn.PATH, description = "mnemonic path to find structure for") @PathVariable("mnemonicpath") String mnemonicpath); + @Parameter(in = ParameterIn.PATH, description = "mnemonic path to find structure for") @PathVariable("mnemonicPath") String mnemonicPath); /** * Return if mnemonic path is valid to create in structure (exact match). @@ -768,7 +768,7 @@ public interface IStructures { * </p> * * @param type type of structure to search in - * @param mnemonicpath mnemonic path to find structure for + * @param mnemonicPath mnemonic path to find structure for * @return if mnemonic path is valid to create in structure */ @Operation( @@ -819,11 +819,11 @@ public interface IStructures { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/isvalidtocreate/{type}/{mnemonicpath}", + value = "/isValidToCreate/{type}/{mnemonicPath}", produces = {"application/json"}) public ResponseEntity<ResponseBoolean> isValidToCreateStructure( @Parameter(in = ParameterIn.PATH, description = "type of structure to search in") @PathVariable("type") Type type, - @Parameter(in = ParameterIn.PATH, description = "mnemonic path to find structure for") @PathVariable("mnemonicpath") String mnemonicpath); + @Parameter(in = ParameterIn.PATH, description = "mnemonic path to find structure for") @PathVariable("mnemonicPath") String mnemonicPath); // ---------------------------------------------------------------------------------------------------- @@ -897,7 +897,7 @@ public interface IStructures { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/validatecreate", + value = "/validateCreate", produces = {"application/json"}, consumes = {"application/json"}) public ResponseEntity<ResponseBooleanList> validateStructuresCreate( @@ -984,7 +984,7 @@ public interface IStructures { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/validateupdate", + value = "/validateUpdate", produces = {"application/json"}, consumes = {"application/json"}) public ResponseEntity<ResponseBooleanList> validateStructuresUpdate( @@ -1067,7 +1067,7 @@ public interface IStructures { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/validatedelete", + value = "/validateDelete", produces = {"application/json"}, consumes = {"application/json"}) public ResponseEntity<ResponseBooleanList> validateStructuresDelete( @@ -1154,7 +1154,7 @@ public interface IStructures { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/validateapprove", + value = "/validateApprove", produces = {"application/json"}, consumes = {"application/json"}) public ResponseEntity<ResponseBooleanList> validateStructuresApprove( @@ -1241,7 +1241,7 @@ public interface IStructures { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/validatecancel", + value = "/validateCancel", produces = {"application/json"}, consumes = {"application/json"}) public ResponseEntity<ResponseBooleanList> validateStructuresCancel( @@ -1328,7 +1328,7 @@ public interface IStructures { schema = @Schema(implementation = Response.class))) }) @GetMapping( - value = "/validatereject", + value = "/validateReject", produces = {"application/json"}, consumes = {"application/json"}) public ResponseEntity<ResponseBooleanList> validateStructuresReject( diff --git a/src/main/java/org/openepics/names/rest/beans/element/NameElement.java b/src/main/java/org/openepics/names/rest/beans/element/NameElement.java index 3b389db6..1dda8262 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/NameElement.java +++ b/src/main/java/org/openepics/names/rest/beans/element/NameElement.java @@ -45,9 +45,9 @@ public class NameElement extends NameElementCommand implements Serializable { private static final long serialVersionUID = 2716415801117244814L; @Schema(description = "Mnemonic path for for the system structure.") - private String systemstructure; + private String systemStructure; @Schema(description = "Mnemonic path for for the device structure.") - private String devicestructure; + private String deviceStructure; @Schema(description = "Name (verbose) of the name entry.") private String name; @Schema(description = "Status of the name entry.") @@ -72,29 +72,29 @@ public class NameElement extends NameElementCommand implements Serializable { * Public constructor. * * @param uuid uuid - * @param parentsystemstructure parent system structure uuid - * @param parentdevicestructure parent device structure uuid + * @param parentSystemStructure parent system structure uuid + * @param parentDeviceStructure parent device structure uuid * @param index index * @param description description * @param comment comment */ public NameElement( - UUID uuid, UUID parentsystemstructure, UUID parentdevicestructure, String index, + UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, String index, String description, String comment) { - super(uuid, parentsystemstructure, parentdevicestructure, index, description, comment); + super(uuid, parentSystemStructure, parentDeviceStructure, index, description, comment); } /** * Public constructor. * * @param uuid uuid - * @param parentsystemstructure parent system structure uuid - * @param parentdevicestructure parent device structure uuid + * @param parentSystemStructure parent system structure uuid + * @param parentDeviceStructure parent device structure uuid * @param index index * @param description description * @param comment comment - * @param systemstructure system structure mnemonic path - * @param devicestructure device structure mnemonic path + * @param systemStructure system structure mnemonic path + * @param deviceStructure device structure mnemonic path * @param name name * @param status status * @param latest latest @@ -103,14 +103,14 @@ public class NameElement extends NameElementCommand implements Serializable { * @param who who */ public NameElement( - UUID uuid, UUID parentsystemstructure, UUID parentdevicestructure, String index, + UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, String index, String description, String comment, - String systemstructure, String devicestructure, String name, + String systemStructure, String deviceStructure, String name, Status status, Boolean latest, Boolean deleted, Date when, String who) { - super(uuid, parentsystemstructure, parentdevicestructure, index, description, comment); - this.systemstructure = systemstructure; - this.devicestructure = devicestructure; + super(uuid, parentSystemStructure, parentDeviceStructure, index, description, comment); + this.systemStructure = systemStructure; + this.deviceStructure = deviceStructure; this.name = name; this.status = status; this.latest = latest; @@ -119,17 +119,17 @@ public class NameElement extends NameElementCommand implements Serializable { this.who = who; } - public String getSystemstructure() { - return systemstructure; + public String getSystemStructure() { + return systemStructure; } - public void setSystemstructure(String systemstructure) { - this.systemstructure = systemstructure; + public void setSystemStructure(String systemStructure) { + this.systemStructure = systemStructure; } - public String getDevicestructure() { - return devicestructure; + public String getDeviceStructure() { + return deviceStructure; } - public void setDevicestructure(String devicestructure) { - this.devicestructure = devicestructure; + public void setDeviceStructure(String deviceStructure) { + this.deviceStructure = deviceStructure; } public String getName() { return name; @@ -188,15 +188,15 @@ public class NameElement extends NameElementCommand implements Serializable { return false; } - if (getSystemstructure() == null) { - if (other.getSystemstructure() != null) + if (getSystemStructure() == null) { + if (other.getSystemStructure() != null) return false; - } else if (!getSystemstructure().equals(other.getSystemstructure())) + } else if (!getSystemStructure().equals(other.getSystemStructure())) return false; - if (getDevicestructure() == null) { - if (other.getDevicestructure() != null) + if (getDeviceStructure() == null) { + if (other.getDeviceStructure() != null) return false; - } else if (!getDevicestructure().equals(other.getDevicestructure())) + } else if (!getDeviceStructure().equals(other.getDeviceStructure())) return false; if (getName() == null) { if (other.getName() != null) @@ -242,10 +242,10 @@ public class NameElement extends NameElementCommand implements Serializable { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("\"uuid\": " + getUuid()); - sb.append(", \"parentsystemstructure\": " + getParentsystemstructure()); - sb.append(", \"parentdevicestructure\": " + getParentdevicestructure()); - sb.append(", \"systemstructure\": " + getSystemstructure()); - sb.append(", \"devicestructure\": " + getDevicestructure()); + sb.append(", \"parentSystemStructure\": " + getParentSystemStructure()); + sb.append(", \"parentDeviceStructure\": " + getParentDeviceStructure()); + sb.append(", \"systemStructure\": " + getSystemStructure()); + sb.append(", \"deviceStructure\": " + getDeviceStructure()); sb.append(", \"index\": " + getIndex()); sb.append(", \"name\": " + getName()); sb.append(", \"description\": " + getDescription()); diff --git a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java index bd07555e..32ee57d2 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java +++ b/src/main/java/org/openepics/names/rest/beans/element/NameElementCommand.java @@ -44,9 +44,9 @@ public class NameElementCommand implements Serializable { @Schema(description = "Identity (uuid) of the name entry. Value is created server-side.") private UUID uuid; @Schema(description = "Identity (uuid) for the system structure parent.") - private UUID parentsystemstructure; + private UUID parentSystemStructure; @Schema(description = "Identity (uuid) for the device structure parent (if the name entry refers to device structure).") - private UUID parentdevicestructure; + private UUID parentDeviceStructure; @Schema(description = "Index (instance) of the name entry (if the name entry refers to device structure).") private String index; @Schema(description = "Description of the name entry.") @@ -64,19 +64,19 @@ public class NameElementCommand implements Serializable { * Public constructor. * * @param uuid uuid - * @param parentsystemstructure parent system structure uuid - * @param parentdevicestructure parent device structure uuid + * @param parentSystemStructure parent system structure uuid + * @param parentDeviceStructure parent device structure uuid * @param index index * @param description description * @param comment comment */ public NameElementCommand( - UUID uuid, UUID parentsystemstructure, UUID parentdevicestructure, String index, + UUID uuid, UUID parentSystemStructure, UUID parentDeviceStructure, String index, String description, String comment) { super(); this.uuid = uuid; - this.parentsystemstructure = parentsystemstructure; - this.parentdevicestructure = parentdevicestructure; + this.parentSystemStructure = parentSystemStructure; + this.parentDeviceStructure = parentDeviceStructure; this.index = index; this.description = description; this.comment = comment; @@ -88,17 +88,17 @@ public class NameElementCommand implements Serializable { public void setUuid(UUID uuid) { this.uuid = uuid; } - public UUID getParentsystemstructure() { - return parentsystemstructure; + public UUID getParentSystemStructure() { + return parentSystemStructure; } - public void setParentsystemstructure(UUID parentsystemstructure) { - this.parentsystemstructure = parentsystemstructure; + public void setParentSystemStructure(UUID parentSystemStructure) { + this.parentSystemStructure = parentSystemStructure; } - public UUID getParentdevicestructure() { - return parentdevicestructure; + public UUID getParentDeviceStructure() { + return parentDeviceStructure; } - public void setParentdevicestructure(UUID parentdevicestructure) { - this.parentdevicestructure = parentdevicestructure; + public void setParentDeviceStructure(UUID parentDeviceStructure) { + this.parentDeviceStructure = parentDeviceStructure; } public String getIndex() { return index; @@ -144,15 +144,15 @@ public class NameElementCommand implements Serializable { return false; } else if (!getUuid().equals(other.getUuid())) return false; - if (getParentsystemstructure() == null) { - if (other.getParentsystemstructure() != null) + if (getParentSystemStructure() == null) { + if (other.getParentSystemStructure() != null) return false; - } else if (!getParentsystemstructure().equals(other.getParentsystemstructure())) + } else if (!getParentSystemStructure().equals(other.getParentSystemStructure())) return false; - if (getParentdevicestructure() == null) { - if (other.getParentdevicestructure() != null) + if (getParentDeviceStructure() == null) { + if (other.getParentDeviceStructure() != null) return false; - } else if (!getParentdevicestructure().equals(other.getParentdevicestructure())) + } else if (!getParentDeviceStructure().equals(other.getParentDeviceStructure())) return false; if (getIndex() == null) { if (other.getIndex() != null) @@ -176,7 +176,7 @@ public class NameElementCommand implements Serializable { @Override public int hashCode() { return Objects.hash( - getUuid(), getParentsystemstructure(), getParentdevicestructure(), getIndex(), + getUuid(), getParentSystemStructure(), getParentDeviceStructure(), getIndex(), getDescription(), getComment()); } @@ -185,8 +185,8 @@ public class NameElementCommand implements Serializable { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("\"uuid\": " + getUuid()); - sb.append(", \"parentsystemstructure\": " + getParentsystemstructure()); - sb.append(", \"parentdevicestructure\": " + getParentdevicestructure()); + sb.append(", \"parentSystemStructure\": " + getParentSystemStructure()); + sb.append(", \"parentDeviceStructure\": " + getParentDeviceStructure()); sb.append(", \"index\": " + getIndex()); sb.append(", \"description\": " + getDescription()); sb.append(", \"comment\": " + getComment()); diff --git a/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java b/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java index 161d3652..2c62da8a 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java +++ b/src/main/java/org/openepics/names/rest/beans/element/StructureElement.java @@ -46,7 +46,7 @@ public class StructureElement extends StructureElementCommand implements Seriali private static final long serialVersionUID = 356654987707139728L; @Schema(description = "Mnemonic path of the structure entry.") - private String mnemonicpath; + private String mnemonicPath; @Schema(description = "Level of the structure entry.") private Integer level; @Schema(description = "Status of the structure entry.") @@ -95,7 +95,7 @@ public class StructureElement extends StructureElementCommand implements Seriali * @param mnemonic mnemonic * @param description description * @param comment comment - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path * @param level level * @param status status * @param latest latest @@ -106,11 +106,11 @@ public class StructureElement extends StructureElementCommand implements Seriali public StructureElement( UUID uuid, Type type, UUID parent, String name, String mnemonic, String description, String comment, - String mnemonicpath, Integer level, + String mnemonicPath, Integer level, Status status, Boolean latest, Boolean deleted, Date when, String who) { super(uuid, type, parent, name, mnemonic, description, comment); - this.mnemonicpath = mnemonicpath; + this.mnemonicPath = mnemonicPath; this.level = level; this.status = status; this.latest = latest; @@ -119,11 +119,11 @@ public class StructureElement extends StructureElementCommand implements Seriali this.who = who; } - public String getMnemonicpath() { - return mnemonicpath; + public String getMnemonicPath() { + return mnemonicPath; } - public void setMnemonicpath(String mnemonicpath) { - this.mnemonicpath = mnemonicpath; + public void setMnemonicPath(String mnemonicPath) { + this.mnemonicPath = mnemonicPath; } public Integer getLevel() { return level; @@ -182,10 +182,10 @@ public class StructureElement extends StructureElementCommand implements Seriali return false; } - if (getMnemonicpath() == null) { - if (other.getMnemonicpath() != null) + if (getMnemonicPath() == null) { + if (other.getMnemonicPath() != null) return false; - } else if (!getMnemonicpath().equals(other.getMnemonicpath())) + } else if (!getMnemonicPath().equals(other.getMnemonicPath())) return false; if (getLevel() == null) { if (other.getLevel() != null) @@ -232,10 +232,10 @@ public class StructureElement extends StructureElementCommand implements Seriali sb.append("{"); sb.append("\"uuid\": " + getUuid()); sb.append(", \"type\": " + getType()); - sb.append(", \"parent_uuid\": " + getParent()); + sb.append(", \"parent\": " + getParent()); sb.append(", \"name\": " + getName()); sb.append(", \"mnemonic\": " + getMnemonic()); - sb.append(", \"mnemonicpath\": " + getMnemonicpath()); + sb.append(", \"mnemonicPath\": " + getMnemonicPath()); sb.append(", \"level\": " + getLevel()); sb.append(", \"description\": " + getDescription()); sb.append(", \"status\": " + getStatus()); diff --git a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java index d2589d9e..63b3b307 100644 --- a/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java +++ b/src/main/java/org/openepics/names/rest/beans/element/StructureElementCommand.java @@ -200,7 +200,7 @@ public class StructureElementCommand implements Serializable { sb.append("{"); sb.append("\"uuid\": " + getUuid()); sb.append(", \"type\": " + getType()); - sb.append(", \"parent_uuid\": " + getParent()); + sb.append(", \"parent\": " + getParent()); sb.append(", \"name\": " + getName()); sb.append(", \"mnemonic\": " + getMnemonic()); sb.append(", \"description\": " + getDescription()); diff --git a/src/main/java/org/openepics/names/rest/controller/NamesController.java b/src/main/java/org/openepics/names/rest/controller/NamesController.java index 1b2b9983..6b890f0d 100644 --- a/src/main/java/org/openepics/names/rest/controller/NamesController.java +++ b/src/main/java/org/openepics/names/rest/controller/NamesController.java @@ -144,7 +144,7 @@ public class NamesController implements INames { @Override public ResponsePageNameElements readNames(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description, + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description, FieldName orderBy, Boolean isAsc, Integer page, Integer pageSize) { // validate // read names @@ -152,12 +152,12 @@ public class NamesController implements INames { try { ValidateNameElementUtil.validateNamesInputRead( deleted, - uuid, name, nameequivalence, systemstructure, devicestructure, description, + uuid, name, nameEquivalence, systemStructure, deviceStructure, description, null, orderBy, isAsc, page, pageSize); return namesService.readNames(deleted, - uuid, name, nameequivalence, systemstructure, devicestructure, index, description, + uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, orderBy, isAsc, page, pageSize); } catch (ServiceException e) { logService.logServiceException(LOGGER, Level.WARNING, e); @@ -171,14 +171,14 @@ public class NamesController implements INames { @Override public ResponseEntity<Resource> readNamesDownload(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description, + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description, FieldName orderBy, Boolean isAsc, Integer page, Integer pageSize) { // validate // read names // convert to output ResponsePageNameElements nameElements = readNames(deleted, - uuid, name, nameequivalence, systemstructure, devicestructure, index, description, + uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, orderBy, isAsc, page, pageSize); InputStreamResource isr = new InputStreamResource(ExcelUtil.nameElementsToExcel(nameElements)); return ResponseEntity.ok() @@ -207,14 +207,14 @@ public class NamesController implements INames { } @Override - public ResponsePageNameElements readNamesSystemStructure(String mnemonicpath, + public ResponsePageNameElements readNamesSystemStructure(String mnemonicPath, FieldName orderBy, Boolean isAsc, Integer page, Integer pageSize) { // validate // read names try { - ValidateUtil.validateInputMnemonicpath(mnemonicpath); - return namesService.readNamesSystemStructure(mnemonicpath, + ValidateUtil.validateInputMnemonicPath(mnemonicPath); + return namesService.readNamesSystemStructure(mnemonicPath, orderBy, isAsc, page, pageSize); } catch (ServiceException e) { logService.logServiceException(LOGGER, Level.WARNING, e); @@ -227,14 +227,14 @@ public class NamesController implements INames { } @Override - public ResponsePageNameElements readNamesDeviceStructure(String mnemonicpath, + public ResponsePageNameElements readNamesDeviceStructure(String mnemonicPath, FieldName orderBy, Boolean isAsc, Integer page, Integer pageSize) { // validate // read names try { - ValidateUtil.validateInputMnemonicpath(mnemonicpath); - return namesService.readNamesDeviceStructure(mnemonicpath, + ValidateUtil.validateInputMnemonicPath(mnemonicPath); + return namesService.readNamesDeviceStructure(mnemonicPath, orderBy, isAsc, page, pageSize); } catch (ServiceException e) { logService.logServiceException(LOGGER, Level.WARNING, e); diff --git a/src/main/java/org/openepics/names/rest/controller/ReportController.java b/src/main/java/org/openepics/names/rest/controller/ReportController.java index 35ec892c..8298d680 100644 --- a/src/main/java/org/openepics/names/rest/controller/ReportController.java +++ b/src/main/java/org/openepics/names/rest/controller/ReportController.java @@ -150,16 +150,16 @@ public class ReportController { long nbrEssNameOther = 0; for (NameElement nameElement : nameElementsEssNamesNotDeleted.getList()) { - if (!StringUtils.isEmpty(nameElement.getSystemstructure()) - && StringUtils.isEmpty(nameElement.getDevicestructure()) + if (!StringUtils.isEmpty(nameElement.getSystemStructure()) + && StringUtils.isEmpty(nameElement.getDeviceStructure()) && StringUtils.isEmpty(nameElement.getIndex())) { nbrEssNameSystemstructure++; - } else if (!StringUtils.isEmpty(nameElement.getSystemstructure()) - && !StringUtils.isEmpty(nameElement.getDevicestructure()) + } else if (!StringUtils.isEmpty(nameElement.getSystemStructure()) + && !StringUtils.isEmpty(nameElement.getDeviceStructure()) && StringUtils.isEmpty(nameElement.getIndex())) { nbrEssNameSystemstructureDevicestructure++; - } else if (!StringUtils.isEmpty(nameElement.getSystemstructure()) - && !StringUtils.isEmpty(nameElement.getDevicestructure()) + } else if (!StringUtils.isEmpty(nameElement.getSystemStructure()) + && !StringUtils.isEmpty(nameElement.getDeviceStructure()) && !StringUtils.isEmpty(nameElement.getIndex())) { nbrEssNameSystemstructureDevicestructureIndex++; } else { diff --git a/src/main/java/org/openepics/names/rest/controller/StructuresController.java b/src/main/java/org/openepics/names/rest/controller/StructuresController.java index 35500553..7f99ea79 100644 --- a/src/main/java/org/openepics/names/rest/controller/StructuresController.java +++ b/src/main/java/org/openepics/names/rest/controller/StructuresController.java @@ -146,17 +146,17 @@ public class StructuresController implements IStructures { @Override public ResponsePageStructureElements readStructures(Type type, Status[] statuses, Boolean deleted, - String uuid, String parentuuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parent, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer page, Integer pageSize) { // validate // read structures try { ValidateStructureElementUtil.validateStructuresInputRead(type, statuses, deleted, - uuid, parentuuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, null, orderBy, isAsc, page, pageSize); return structuresService.readStructures(type, statuses, deleted, - uuid, parentuuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, orderBy, isAsc, page, pageSize); } catch (ServiceException e) { logService.logServiceException(LOGGER, Level.WARNING, e); @@ -170,14 +170,14 @@ public class StructuresController implements IStructures { @Override public ResponseEntity<Resource> readStructuresDownload(Type type, Status[] statuses, Boolean deleted, - String uuid, String parentuuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parent, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer page, Integer pageSize) { // validate // read structures // convert to output ResponsePageStructureElements structureElements = readStructures(type, statuses, deleted, - uuid, parentuuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, orderBy, isAsc, page, pageSize); InputStreamResource isr = new InputStreamResource(ExcelUtil.structureElementsToExcel(structureElements)); return ResponseEntity.ok() @@ -188,7 +188,7 @@ public class StructuresController implements IStructures { @Override public ResponsePageStructureElements readStructuresChildren(String uuid, Type type, Status[] statuses, Boolean deleted, - String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer page, Integer pageSize) { // validate // read structures @@ -196,7 +196,7 @@ public class StructuresController implements IStructures { try { ValidateUtil.validateInputUuid(uuid); return structuresService.readStructuresChildren(uuid, type, statuses, deleted, - name, mnemonic, mnemonicequivalence, mnemonicpath, description, + name, mnemonic, mnemonicEquivalence, mnemonicPath, description, orderBy, isAsc, page, pageSize); } catch (ServiceException e) { logService.logServiceException(LOGGER, Level.WARNING, e); @@ -228,14 +228,14 @@ public class StructuresController implements IStructures { } @Override - public ResponsePageStructureElements readStructuresMnemonicpath(String mnemonicpath, + public ResponsePageStructureElements readStructuresMnemonicpath(String mnemonicPath, FieldStructure orderBy, Boolean isAsc, Integer page, Integer pageSize) { // validate // read structures try { - ValidateUtil.validateInputMnemonicpath(mnemonicpath); - return structuresService.readStructuresMnemonicpath(mnemonicpath, orderBy, isAsc, page, pageSize); + ValidateUtil.validateInputMnemonicPath(mnemonicPath); + return structuresService.readStructuresMnemonicpath(mnemonicPath, orderBy, isAsc, page, pageSize); } catch (ServiceException e) { logService.logServiceException(LOGGER, Level.WARNING, e); logService.logStackTraceElements(LOGGER, Level.WARNING, e); @@ -287,14 +287,14 @@ public class StructuresController implements IStructures { } @Override - public ResponseEntity<ResponseBoolean> existsStructure(Type type, String mnemonicpath) { + public ResponseEntity<ResponseBoolean> existsStructure(Type type, String mnemonicPath) { // validate // read structures try { ValidateUtil.validateInputType(type); - ValidateUtil.validateInputMnemonicpath(mnemonicpath); - return new ResponseEntity<>(new ResponseBoolean(structuresService.existsStructure(type, mnemonicpath)), Response.getHeaderJson(), HttpStatus.OK); + ValidateUtil.validateInputMnemonicPath(mnemonicPath); + return new ResponseEntity<>(new ResponseBoolean(structuresService.existsStructure(type, mnemonicPath)), Response.getHeaderJson(), HttpStatus.OK); } catch (ServiceException e) { logService.logServiceException(LOGGER, Level.WARNING, e); logService.logStackTraceElements(LOGGER, Level.WARNING, e); @@ -306,14 +306,14 @@ public class StructuresController implements IStructures { } @Override - public ResponseEntity<ResponseBoolean> isValidToCreateStructure(Type type, String mnemonicpath) { + public ResponseEntity<ResponseBoolean> isValidToCreateStructure(Type type, String mnemonicPath) { // validate // read structures try { ValidateUtil.validateInputType(type); - ValidateUtil.validateInputMnemonicpath(mnemonicpath); - return new ResponseEntity<>(new ResponseBoolean(structuresService.isValidToCreateStructure(type, mnemonicpath)), Response.getHeaderJson(), HttpStatus.OK); + ValidateUtil.validateInputMnemonicPath(mnemonicPath); + return new ResponseEntity<>(new ResponseBoolean(structuresService.isValidToCreateStructure(type, mnemonicPath)), Response.getHeaderJson(), HttpStatus.OK); } catch (ServiceException e) { logService.logServiceException(LOGGER, Level.WARNING, e); logService.logStackTraceElements(LOGGER, Level.WARNING, e); diff --git a/src/main/java/org/openepics/names/rest/controller/VerificationController.java b/src/main/java/org/openepics/names/rest/controller/VerificationController.java index 35b7937a..197315ba 100644 --- a/src/main/java/org/openepics/names/rest/controller/VerificationController.java +++ b/src/main/java/org/openepics/names/rest/controller/VerificationController.java @@ -247,7 +247,7 @@ public class VerificationController { // parent 1, 2 but not parent 3 - system // parent 1, 2, 3 - subsystem // else nok - UUID systemGroupUuid = name.getSystemgroupUuid(); + UUID systemGroupUuid = name.getSystemGroupUuid(); UUID systemUuid = name.getSystemUuid(); UUID subsystemUuid = name.getSubsystemUuid(); UUID sectionUuid = deviceRevision.getSection().getUuid(); @@ -261,8 +261,8 @@ public class VerificationController { check = false; } - check = check && ((name.getDevicetypeUuid() == null && deviceRevision.getDeviceType() == null) - || (name.getDevicetypeUuid().equals(deviceRevision.getDeviceType().getUuid()))); + check = check && ((name.getDeviceTypeUuid() == null && deviceRevision.getDeviceType() == null) + || (name.getDeviceTypeUuid().equals(deviceRevision.getDeviceType().getUuid()))); check = check && StringUtils.equals(name.getInstanceIndex(), deviceRevision.getInstanceIndex()); check = check && StringUtils.equals(name.getConventionName(), deviceRevision.getConventionName()); check = check && StringUtils.equals(name.getConventionNameEquivalence(), deviceRevision.getConventionNameEqClass()); @@ -331,23 +331,23 @@ public class VerificationController { // date may be in different format for different objects, to be formatted before being compared // ---------- // e.g. - // system.id = namepartrevision.id - // system.version = namepartrevision.version - // system.uuid = namepartrevision.namepart_id (namepart.id --> namepart.uuid) - // ( system.parent_uuid = namepartrevision.parent_id (namepart.id --> namepart.uuid) ) - // system.name = namepartrevision.name - // system.mnemonic = namepartrevision.mnemonic - // system.mnemonicequivalence = namepartrevision.mnemoniceqclass - // system.description = namepartrevision.description - // system.status = namepartrevision.status - // system.latest = true if id = get max id for uuid (consider status, but not PENDING) - // system.deleted = namepartrevision.deleted - // system.requested = namepartrevision.requestdate - // system.requested_by = namepartrevision.requestedby_id (useraccount.id --> useraccount.username) - // system.requested_comment = namepartrevision.requestercomment - // system.processed = namepartrevision.processdate - // system.processed_by = namepartrevision.processedby_id (useraccount.id --> useraccount.username) - // system.processed_comment = namepartrevision.processorcomment + // system.id = namepartrevision.id + // system.version = namepartrevision.version + // system.uuid = namepartrevision.namepart_id (namepart.id --> namepart.uuid) + // ( system.parent_uuid = namepartrevision.parent_id (namepart.id --> namepart.uuid) ) + // system.name = namepartrevision.name + // system.mnemonic = namepartrevision.mnemonic + // system.mnemonic_equivalence = namepartrevision.mnemoniceqclass + // system.description = namepartrevision.description + // system.status = namepartrevision.status + // system.latest = true if id = get max id for uuid (consider status, but not PENDING) + // system.deleted = namepartrevision.deleted + // system.requested = namepartrevision.requestdate + // system.requested_by = namepartrevision.requestedby_id (useraccount.id --> useraccount.username) + // system.requested_comment = namepartrevision.requestercomment + // system.processed = namepartrevision.processdate + // system.processed_by = namepartrevision.processedby_id (useraccount.id --> useraccount.username) + // system.processed_comment = namepartrevision.processorcomment StringBuilder reportHtml = new StringBuilder(); diff --git a/src/main/java/org/openepics/names/service/NamesService.java b/src/main/java/org/openepics/names/service/NamesService.java index fc12a77d..ba27edcb 100644 --- a/src/main/java/org/openepics/names/service/NamesService.java +++ b/src/main/java/org/openepics/names/service/NamesService.java @@ -184,12 +184,12 @@ public class NamesService { // find // system structure - system group, system, subsystem - one of the three expected to be non-null, other two expected to be null // device structure - device type - may be null - SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); - System system = holderIRepositories.getSystemRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); - Subsystem subsystem = holderIRepositories.getSubsystemRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); + SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); + System system = holderIRepositories.getSystemRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); + Subsystem subsystem = holderIRepositories.getSubsystemRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); DeviceType deviceType = null; - if (nameElement.getParentdevicestructure() != null) { - deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(nameElement.getParentdevicestructure().toString()); + if (nameElement.getParentDeviceStructure() != null) { + deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(nameElement.getParentDeviceStructure().toString()); } String derivedName = null; @@ -206,7 +206,7 @@ public class NamesService { systemGroup != null ? systemGroup.getUuid() : null, system != null ? system.getUuid() : null, subsystem != null ? subsystem.getUuid() : null, - nameElement.getParentdevicestructure(), + nameElement.getParentDeviceStructure(), nameElement.getIndex(), derivedName, namingConvention.equivalenceClassRepresentative(derivedName), nameElement.getDescription(), Status.APPROVED, Boolean.TRUE, Boolean.FALSE, when, username, nameElement.getComment()); @@ -218,15 +218,15 @@ public class NamesService { // ---------------------------------------------------------------------------------------------------- public ResponsePageNameElements readNames(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description, + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description, FieldName orderBy, Boolean isAsc, Integer offset, Integer limit) { return readNames(deleted, - uuid, name, nameequivalence, systemstructure, devicestructure, index, description, + uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, Boolean.FALSE, orderBy, isAsc, offset, limit); } public ResponsePageNameElements readNames(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String index, String description, + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String index, String description, Boolean includeHistory, FieldName orderBy, Boolean isAsc, Integer offset, Integer limit) { // validation outside method // read names @@ -236,9 +236,9 @@ public class NamesService { LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "deleted", deleted)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "uuid", uuid)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "name", name)); - LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "nameequivalence", nameequivalence)); - LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "systemstructure", systemstructure)); - LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "devicestructure", devicestructure)); + LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "nameEquivalence", nameEquivalence)); + LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "systemStructure", systemStructure)); + LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "deviceStructure", deviceStructure)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "index", index)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "description", description)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "includeHistory", includeHistory)); @@ -248,8 +248,8 @@ public class NamesService { LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_NAMES, "limit", limit)); } - List<Name> names = nameRepository.readNames(deleted, uuid, name, nameequivalence, systemstructure, devicestructure, index, description, includeHistory, orderBy, isAsc, offset, limit); - Long totalCount = nameRepository.countNames(deleted, uuid, name, nameequivalence, systemstructure, devicestructure, index, description, includeHistory); + List<Name> names = nameRepository.readNames(deleted, uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, includeHistory, orderBy, isAsc, offset, limit); + Long totalCount = nameRepository.countNames(deleted, uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description, includeHistory); final List<NameElement> nameElements = NameElementUtil.getNameElements(names); @@ -287,29 +287,29 @@ public class NamesService { return new ResponsePageNameElements(nameElements, Long.valueOf(nameElements.size()), nameElements.size(), offset, limit); } - public ResponsePageNameElements readNamesSystemStructure(String mnemonicpath, + public ResponsePageNameElements readNamesSystemStructure(String mnemonicPath, FieldName orderBy, Boolean isAsc, Integer offset, Integer limit) { // validation outside method // read mnemonic path // return name elements - LOGGER.log(Level.FINE, () -> MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Read names system structure", "mnemonicpath", mnemonicpath)); + LOGGER.log(Level.FINE, () -> MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Read names system structure", "mnemonicPath", mnemonicPath)); return readNames(false, - null, null, null, mnemonicpath, null, null, null, + null, null, null, mnemonicPath, null, null, null, orderBy, isAsc, offset, limit); } - public ResponsePageNameElements readNamesDeviceStructure(String mnemonicpath, + public ResponsePageNameElements readNamesDeviceStructure(String mnemonicPath, FieldName orderBy, Boolean isAsc, Integer offset, Integer limit) { // validation outside method // read mnemonic path // return name elements - LOGGER.log(Level.FINE, () -> MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Read names device structure", "mnemonicpath", mnemonicpath)); + LOGGER.log(Level.FINE, () -> MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Read names device structure", "mnemonicPath", mnemonicPath)); return readNames(false, - null, null, null, null,mnemonicpath, null, null, + null, null, null, null,mnemonicPath, null, null, orderBy, isAsc, offset, limit); } @@ -362,10 +362,10 @@ public class NamesService { Name toBeChecked = names.get(0); // system structure - if (toBeChecked.getSystemgroupUuid() != null) { + if (toBeChecked.getSystemGroupUuid() != null) { // system group - SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestNotDeletedByUuid(toBeChecked.getSystemgroupUuid().toString()); + SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestNotDeletedByUuid(toBeChecked.getSystemGroupUuid().toString()); if (systemGroup == null) { return Boolean.TRUE; } @@ -403,12 +403,12 @@ public class NamesService { } } // device structure - if (toBeChecked.getDevicetypeUuid() != null) { + if (toBeChecked.getDeviceTypeUuid() != null) { // device type // device group // discipline - DeviceType deviceType = holderIRepositories.getDeviceTypeRepository().findLatestNotDeletedByUuid(toBeChecked.getDevicetypeUuid().toString()); + DeviceType deviceType = holderIRepositories.getDeviceTypeRepository().findLatestNotDeletedByUuid(toBeChecked.getDeviceTypeUuid().toString()); if (deviceType == null) { return Boolean.TRUE; } @@ -563,12 +563,12 @@ public class NamesService { // find out system group, system, subsystem // one of the three expected to be non-null, other two expected to be null - SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); - System system = holderIRepositories.getSystemRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); - Subsystem subsystem = holderIRepositories.getSubsystemRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); + SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); + System system = holderIRepositories.getSystemRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); + Subsystem subsystem = holderIRepositories.getSubsystemRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); DeviceType deviceType = null; - if (nameElement.getParentdevicestructure() != null) { - deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(nameElement.getParentdevicestructure().toString()); + if (nameElement.getParentDeviceStructure() != null) { + deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(nameElement.getParentDeviceStructure().toString()); } String derivedName = null; @@ -585,7 +585,7 @@ public class NamesService { systemGroup != null ? systemGroup.getUuid() : null, system != null ? system.getUuid() : null, subsystem != null ? subsystem.getUuid() : null, - nameElement.getParentdevicestructure(), + nameElement.getParentDeviceStructure(), nameElement.getIndex(), derivedName, namingConvention.equivalenceClassRepresentative(derivedName), nameElement.getDescription(), Status.APPROVED, Boolean.TRUE, Boolean.FALSE, when, username, nameElement.getComment()); @@ -628,7 +628,7 @@ public class NamesService { && !StringUtils.isEmpty(structure.getMnemonic())) { List<Name> names = null; List<NameElementCommand> nameElements = Lists.newArrayList(); - UUID parentsystemstructure = null; + UUID parentSystemStructure = null; if (previousStructure instanceof SystemGroup && structure instanceof SystemGroup) { // find // prepare @@ -636,7 +636,7 @@ public class NamesService { for (Name name : names) { nameElements.add( new NameElementCommand( - name.getUuid(), name.getSystemgroupUuid(), name.getDevicetypeUuid(), + name.getUuid(), name.getSystemGroupUuid(), name.getDeviceTypeUuid(), name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); } } else if (previousStructure instanceof System && structure instanceof System) { @@ -646,7 +646,7 @@ public class NamesService { for (Name name : names) { nameElements.add( new NameElementCommand( - name.getUuid(), name.getSystemUuid(), name.getDevicetypeUuid(), + name.getUuid(), name.getSystemUuid(), name.getDeviceTypeUuid(), name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); } @@ -654,7 +654,7 @@ public class NamesService { for (Name name : names) { nameElements.add( new NameElementCommand( - name.getUuid(), name.getSubsystemUuid(), name.getDevicetypeUuid(), + name.getUuid(), name.getSubsystemUuid(), name.getDeviceTypeUuid(), name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); } } else if (previousStructure instanceof Subsystem && structure instanceof Subsystem) { @@ -664,7 +664,7 @@ public class NamesService { for (Name name : names) { nameElements.add( new NameElementCommand( - name.getUuid(), name.getSubsystemUuid(), name.getDevicetypeUuid(), + name.getUuid(), name.getSubsystemUuid(), name.getDeviceTypeUuid(), name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); } } else if (previousStructure instanceof Discipline && structure instanceof Discipline) { @@ -672,16 +672,16 @@ public class NamesService { // prepare names = holderIRepositories.getNameRepository().findLatestByDisciplineUuid(structure.getUuid().toString()); for (Name name : names) { - parentsystemstructure = name.getSubsystemUuid() != null + parentSystemStructure = name.getSubsystemUuid() != null ? name.getSubsystemUuid() : name.getSystemUuid() != null ? name.getSystemUuid() - : name.getSystemgroupUuid() != null - ? name.getSystemgroupUuid() + : name.getSystemGroupUuid() != null + ? name.getSystemGroupUuid() : null; nameElements.add( new NameElementCommand( - name.getUuid(), parentsystemstructure, name.getDevicetypeUuid(), + name.getUuid(), parentSystemStructure, name.getDeviceTypeUuid(), name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); } } else if (previousStructure instanceof DeviceType && structure instanceof DeviceType) { @@ -689,16 +689,16 @@ public class NamesService { // prepare names = holderIRepositories.getNameRepository().findLatestByDeviceTypeUuid(structure.getUuid().toString()); for (Name name : names) { - parentsystemstructure = name.getSubsystemUuid() != null + parentSystemStructure = name.getSubsystemUuid() != null ? name.getSubsystemUuid() : name.getSystemUuid() != null ? name.getSystemUuid() - : name.getSystemgroupUuid() != null - ? name.getSystemgroupUuid() + : name.getSystemGroupUuid() != null + ? name.getSystemGroupUuid() : null; nameElements.add( new NameElementCommand( - name.getUuid(), parentsystemstructure, name.getDevicetypeUuid(), + name.getUuid(), parentSystemStructure, name.getDeviceTypeUuid(), name.getInstanceIndex(), name.getDescription(), UPDATE_AFTER_APPROVE_STRUCTURE_CHANGE)); } } @@ -741,12 +741,12 @@ public class NamesService { // find out system group, system, subsystem // one of the three expected to be non-null, other two expected to be null - SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); - System system = holderIRepositories.getSystemRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); - Subsystem subsystem = holderIRepositories.getSubsystemRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); + SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); + System system = holderIRepositories.getSystemRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); + Subsystem subsystem = holderIRepositories.getSubsystemRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); DeviceType deviceType = null; - if (nameElement.getParentdevicestructure() != null) { - deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(nameElement.getParentdevicestructure().toString()); + if (nameElement.getParentDeviceStructure() != null) { + deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(nameElement.getParentDeviceStructure().toString()); } String derivedName = null; @@ -762,7 +762,7 @@ public class NamesService { systemGroup != null ? systemGroup.getUuid() : null, system != null ? system.getUuid() : null, subsystem != null ? subsystem.getUuid() : null, - nameElement.getParentdevicestructure(), + nameElement.getParentDeviceStructure(), nameElement.getIndex(), derivedName, namingConvention.equivalenceClassRepresentative(derivedName), nameElement.getDescription(), Status.APPROVED, Boolean.TRUE, Boolean.TRUE, when, username, nameElement.getComment()); diff --git a/src/main/java/org/openepics/names/service/StructuresService.java b/src/main/java/org/openepics/names/service/StructuresService.java index 5d641139..02b6d4d1 100644 --- a/src/main/java/org/openepics/names/service/StructuresService.java +++ b/src/main/java/org/openepics/names/service/StructuresService.java @@ -218,15 +218,15 @@ public class StructuresService { // ---------------------------------------------------------------------------------------------------- public ResponsePageStructureElements readStructures(Type type, Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parent, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { return readStructures(type, statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, Boolean.FALSE, orderBy, isAsc, offset, limit, StructureChoice.STRUCTURE); } public ResponsePageStructureElements readStructures(Type type, Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parent, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit, StructureChoice structureChoice) { // validation outside method @@ -238,11 +238,11 @@ public class StructuresService { LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "statuses.length", Utilities.getLength(statuses))); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "deleted", deleted)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "uuid", uuid)); - LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "parentUuid", parentUuid)); + LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "parent", parent)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "name", name)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "mnemonic", mnemonic)); - LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "mnemonicequivalence", mnemonicequivalence)); - LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "mnemonicpath", mnemonicpath)); + LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "mnemonicEquivalence", mnemonicEquivalence)); + LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "mnemonicPath", mnemonicPath)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "description", description)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "includeHistory", includeHistory)); LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, TextUtil.READ_STRUCTURES, "orderBy", orderBy)); @@ -265,12 +265,12 @@ public class StructuresService { if (Type.SYSTEMGROUP.equals(type)) { // system group has no parent uuid List<SystemGroup> systemGroups = null; - if (StringUtils.isEmpty(parentUuid)) { + if (StringUtils.isEmpty(parent)) { systemGroups = holderRepositories.getSystemGroupRepository().readSystemGroups(statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory, orderBy, isAsc, offset, limit); totalCount = holderRepositories.getSystemGroupRepository().countSystemGroups(statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory); } else { systemGroups = Lists.newArrayList(); @@ -279,29 +279,29 @@ public class StructuresService { structureElements.addAll(StructureElementUtil.getStructureElementsForSystemGroups(systemGroups, holder, structureChoice)); } else if (Type.SYSTEM.equals(type)) { List<System> systems = holderRepositories.getSystemRepository().readSystems(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory, orderBy, isAsc, offset, limit); totalCount = holderRepositories.getSystemRepository().countSystems(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory); structureElements.addAll(StructureElementUtil.getStructureElementsForSystems(systems, holder, structureChoice)); } else if (Type.SUBSYSTEM.equals(type)) { List<Subsystem> subsystems = holderRepositories.getSubsystemRepository().readSubsystems(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory, orderBy, isAsc, offset, limit); totalCount = holderRepositories.getSubsystemRepository().countSubsystems(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory); structureElements.addAll(StructureElementUtil.getStructureElementsForSubsystems(subsystems, holder, structureChoice)); } else if (Type.DISCIPLINE.equals(type)) { // discipline has no parent uuid List<Discipline> disciplines = null; - if (StringUtils.isEmpty(parentUuid)) { + if (StringUtils.isEmpty(parent)) { disciplines = holderRepositories.getDisciplineRepository().readDisciplines(statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory, orderBy, isAsc, offset, limit); totalCount = holderRepositories.getDisciplineRepository().countDisciplines(statuses, deleted, - uuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory); } else { disciplines = Lists.newArrayList(); @@ -310,18 +310,18 @@ public class StructuresService { structureElements.addAll(StructureElementUtil.getStructureElementsForDisciplines(disciplines, holder, structureChoice)); } else if (Type.DEVICEGROUP.equals(type)) { List<DeviceGroup> deviceGroups = holderRepositories.getDeviceGroupRepository().readDeviceGroups(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory, orderBy, isAsc, offset, limit); totalCount = holderRepositories.getDeviceGroupRepository().countDeviceGroups(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory); structureElements.addAll(StructureElementUtil.getStructureElementsForDeviceGroups(deviceGroups, holder, structureChoice)); } else if (Type.DEVICETYPE.equals(type)) { List<DeviceType> deviceTypes = holderRepositories.getDeviceTypeRepository().readDeviceTypes(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory, orderBy, isAsc, offset, limit); totalCount = holderRepositories.getDeviceTypeRepository().countDeviceTypes(statuses, deleted, - uuid, parentUuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description, + uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description, includeHistory); structureElements.addAll(StructureElementUtil.getStructureElementsForDeviceTypes(deviceTypes, holder, structureChoice)); } @@ -336,7 +336,7 @@ public class StructuresService { } public ResponsePageStructureElements readStructuresChildren(String uuid, Type type, - Status[] statuses, Boolean deleted, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + Status[] statuses, Boolean deleted, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { // validation outside method // read structure latest by uuid for type @@ -418,22 +418,22 @@ public class StructuresService { return new ResponsePageStructureElements(structureElements, Long.valueOf(structureElements.size()), structureElements.size(), 0, structureElements.size()); } - public ResponsePageStructureElements readStructuresMnemonicpath(String mnemonicpath, + public ResponsePageStructureElements readStructuresMnemonicpath(String mnemonicPath, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { // validation outside method - // read structure latest by mnemonicpath + // read structure latest by mnemonic path // return structure elements for structures - LOGGER.log(Level.FINE, () -> MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Read structures mnemonic path", "mnemonicpath", mnemonicpath)); + LOGGER.log(Level.FINE, () -> MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Read structures mnemonic path", "mnemonicPath", mnemonicPath)); // TODO handle orderBy, isAsc, offset, limit - ResponsePageStructureElements responseSystemGroup = readStructures(Type.SYSTEMGROUP, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicpath, null, orderBy, isAsc, offset, limit); - ResponsePageStructureElements responseSystem = readStructures(Type.SYSTEM, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicpath, null, orderBy, isAsc, offset, limit); - ResponsePageStructureElements responseSubsystem = readStructures(Type.SUBSYSTEM, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicpath, null, orderBy, isAsc, offset, limit); - ResponsePageStructureElements responseDiscipline = readStructures(Type.DISCIPLINE, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicpath, null, orderBy, isAsc, offset, limit); - ResponsePageStructureElements responseDeviceGroup = readStructures(Type.DEVICEGROUP, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicpath, null, orderBy, isAsc, offset, limit); - ResponsePageStructureElements responseDeviceType = readStructures(Type.DEVICETYPE, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicpath, null, orderBy, isAsc, offset, limit); + ResponsePageStructureElements responseSystemGroup = readStructures(Type.SYSTEMGROUP, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicPath, null, orderBy, isAsc, offset, limit); + ResponsePageStructureElements responseSystem = readStructures(Type.SYSTEM, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicPath, null, orderBy, isAsc, offset, limit); + ResponsePageStructureElements responseSubsystem = readStructures(Type.SUBSYSTEM, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicPath, null, orderBy, isAsc, offset, limit); + ResponsePageStructureElements responseDiscipline = readStructures(Type.DISCIPLINE, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicPath, null, orderBy, isAsc, offset, limit); + ResponsePageStructureElements responseDeviceGroup = readStructures(Type.DEVICEGROUP, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicPath, null, orderBy, isAsc, offset, limit); + ResponsePageStructureElements responseDeviceType = readStructures(Type.DEVICETYPE, new Status[] {Status.APPROVED}, false, null, null, null, null, null, mnemonicPath, null, orderBy, isAsc, offset, limit); List<StructureElement> structureElements = Lists.newArrayList(); structureElements.addAll(responseSystemGroup.getList()); @@ -531,52 +531,52 @@ public class StructuresService { return namingConvention.equivalenceClassRepresentative(mnemonic); } - public Boolean existsStructure(Type type, String mnemonicpath) { + public Boolean existsStructure(Type type, String mnemonicPath) { // validation outside method // read exists if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Exists structure", "type", type)); - LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Exists structure", "mnemonicpath", mnemonicpath)); + LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Exists structure", "mnemonicPath", mnemonicPath)); } if (Type.SYSTEMGROUP.equals(type)) { - List<SystemGroup> systemGroups = holderRepositories.getSystemGroupRepository().readSystemGroups(Status.APPROVED, false, null, null, null, null, mnemonicpath, null); + List<SystemGroup> systemGroups = holderRepositories.getSystemGroupRepository().readSystemGroups(Status.APPROVED, false, null, null, null, null, mnemonicPath, null); return !systemGroups.isEmpty(); } else if (Type.SYSTEM.equals(type)) { - List<System> systems = holderRepositories.getSystemRepository().readSystems(Status.APPROVED, false, null, null, null, null, null, mnemonicpath, null); + List<System> systems = holderRepositories.getSystemRepository().readSystems(Status.APPROVED, false, null, null, null, null, null, mnemonicPath, null); return !systems.isEmpty(); } else if (Type.SUBSYSTEM.equals(type)) { - List<Subsystem> subsystems = holderRepositories.getSubsystemRepository().readSubsystems(Status.APPROVED, false, null, null, null, null, null, mnemonicpath, null); + List<Subsystem> subsystems = holderRepositories.getSubsystemRepository().readSubsystems(Status.APPROVED, false, null, null, null, null, null, mnemonicPath, null); return !subsystems.isEmpty(); } else if (Type.DISCIPLINE.equals(type)) { - List<Discipline> disciplines = holderRepositories.getDisciplineRepository().readDisciplines(Status.APPROVED, false, null, null, null, null, mnemonicpath, null); + List<Discipline> disciplines = holderRepositories.getDisciplineRepository().readDisciplines(Status.APPROVED, false, null, null, null, null, mnemonicPath, null); return !disciplines.isEmpty(); } else if (Type.DEVICEGROUP.equals(type)) { - List<DeviceGroup> deviceGroups = holderRepositories.getDeviceGroupRepository().readDeviceGroups(Status.APPROVED, false, null, null, null, null, null, mnemonicpath, null); + List<DeviceGroup> deviceGroups = holderRepositories.getDeviceGroupRepository().readDeviceGroups(Status.APPROVED, false, null, null, null, null, null, mnemonicPath, null); return !deviceGroups.isEmpty(); } else if (Type.DEVICETYPE.equals(type)) { - List<DeviceType> deviceTypes = holderRepositories.getDeviceTypeRepository().readDeviceTypes(Status.APPROVED, false, null, null, null, null, null, mnemonicpath, null); + List<DeviceType> deviceTypes = holderRepositories.getDeviceTypeRepository().readDeviceTypes(Status.APPROVED, false, null, null, null, null, null, mnemonicPath, null); return !deviceTypes.isEmpty(); } return Boolean.FALSE; } - public Boolean isValidToCreateStructure(Type type, String mnemonicpath) { + public Boolean isValidToCreateStructure(Type type, String mnemonicPath) { // validation outside method // validate data - not exists if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Is valid to create structure", "type", type)); - LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Is valid to create structure", "mnemonicpath", mnemonicpath)); + LOGGER.log(Level.FINE, MessageFormat.format(TextUtil.DESCRIPTION_NAME_VALUE, "Is valid to create structure", "mnemonicPath", mnemonicPath)); } // initiate holder of containers for system and device structure content, for performance reasons // note false to not include deleted entries HolderSystemDeviceStructure holder = new HolderSystemDeviceStructure(holderIRepositories, false); - ValidateStructureElementUtil.validateStructureDataCreate(type, mnemonicpath, namingConvention, holderIRepositories, holder); + ValidateStructureElementUtil.validateStructureDataCreate(type, mnemonicPath, namingConvention, holderIRepositories, holder); return Boolean.TRUE; } diff --git a/src/main/java/org/openepics/names/util/ExcelUtil.java b/src/main/java/org/openepics/names/util/ExcelUtil.java index d568f509..5f59d780 100644 --- a/src/main/java/org/openepics/names/util/ExcelUtil.java +++ b/src/main/java/org/openepics/names/util/ExcelUtil.java @@ -75,14 +75,14 @@ public class ExcelUtil { private static final int NAMEELEMENTCOMMAND_LENGTH = 6; private static final String[][] NAMEELEMENT_HEADER_COMMENT = { {"Uuid", "Identity (uuid) of the name entry. Value is created server-side."}, - {"Parentsystemstructure", "Identity (uuid) for the system structure parent."}, - {"Parentdevicestructure", "Identity (uuid) for the device structure parent (if the name entry refers to device structure)."}, + {"ParentSystemStructure", "Identity (uuid) for the system structure parent."}, + {"ParentDeviceStructure", "Identity (uuid) for the device structure parent (if the name entry refers to device structure)."}, {"Index", "Index (instance) of the name entry (if the name entry refers to device structure)."}, {"Description", "Description of the name entry."}, {"Comment", "Comment of the name entry command."}, // above NameElementCommand - {"Systemstructure", "Mnemonic path for for the system structure."}, - {"Devicestructure", "Mnemonic path for for the device structure."}, + {"SystemStructure", "Mnemonic path for for the system structure."}, + {"DeviceStructure", "Mnemonic path for for the device structure."}, {"Name", "Name (verbose) of the name entry."}, {"Status", "Status of the name entry."}, {"Latest", "If the name entry is latest (with status APPROVED) in its line of entries."}, @@ -100,7 +100,7 @@ public class ExcelUtil { {"Description", "Description of the structure entry."}, {"Comment", "Comment of the structure entry command."}, // above StructureElementCommand - {"Mnemonicpath", "Mnemonic path of the structure entry."}, + {"MnemonicPath", "Mnemonic path of the structure entry."}, {"Level", "Level of the structure entry."}, {"Status", "Status of the structure entry."}, {"Latest", "If the structure entry is latest (with status APPROVED) in its line of entries."}, @@ -110,11 +110,6 @@ public class ExcelUtil { private static final String SHEET = "Entries"; -// private static final String ENTRIES_EXCEL_TO_NAME_ELEMENT_COMMANDS = "excelToNameElementCommands, # entries: {0}"; -// private static final String ENTRIES_EXCEL_TO_STRUCTURE_ELEMENT_COMMANDS = "excelToStructureElementCommands, # entries: {0}"; -// private static final String ENTRIES_NAME_ELEMENTS_TO_EXCEL = "nameElementsToExcel, # entries: {0}"; -// private static final String ENTRIES_STRUCTURE_ELEMENTS_TO_EXCEL = "structureElementsToExcel, # entries: {0}"; - private static final String FAILED_TO_EXPORT_VALUES_TO_FILE = "Failed to export values to file"; private static final String FILE_COULD_NOT_BE_PARSED_FOR_VALUE_AT_ROW_CELL = "File could not be parsed for value at row: {0} cell: {1}"; private static final String INVALID_SHEET_EXPECTED_SHEET = "Invalid sheet. Expected sheet: {0}"; @@ -184,10 +179,10 @@ public class ExcelUtil { nameElementCommand.setUuid(!StringUtils.isEmpty(value) ? UUID.fromString(value) : null); break; case 1: - nameElementCommand.setParentsystemstructure(!StringUtils.isEmpty(value) ? UUID.fromString(value) : null); + nameElementCommand.setParentSystemStructure(!StringUtils.isEmpty(value) ? UUID.fromString(value) : null); break; case 2: - nameElementCommand.setParentdevicestructure(!StringUtils.isEmpty(value) ? UUID.fromString(value) : null); + nameElementCommand.setParentDeviceStructure(!StringUtils.isEmpty(value) ? UUID.fromString(value) : null); break; case 3: nameElementCommand.setIndex(value); @@ -443,13 +438,13 @@ public class ExcelUtil { for (NameElement nameElement : nameElements) { Row row = sheet.createRow(rowIndex++); row.createCell(0).setCellValue(nameElement.getUuid() != null ? nameElement.getUuid().toString() : null); - row.createCell(1).setCellValue(nameElement.getParentsystemstructure() != null ? nameElement.getParentsystemstructure().toString() : null); - row.createCell(2).setCellValue(nameElement.getParentdevicestructure() != null ? nameElement.getParentdevicestructure().toString() : null); + row.createCell(1).setCellValue(nameElement.getParentSystemStructure() != null ? nameElement.getParentSystemStructure().toString() : null); + row.createCell(2).setCellValue(nameElement.getParentDeviceStructure() != null ? nameElement.getParentDeviceStructure().toString() : null); row.createCell(3).setCellValue(nameElement.getIndex()); row.createCell(4).setCellValue(nameElement.getDescription()); row.createCell(5).setCellValue(nameElement.getComment()); - row.createCell(6).setCellValue(nameElement.getSystemstructure()); - row.createCell(7).setCellValue(nameElement.getDevicestructure()); + row.createCell(6).setCellValue(nameElement.getSystemStructure()); + row.createCell(7).setCellValue(nameElement.getDeviceStructure()); row.createCell(8).setCellValue(nameElement.getName()); row.createCell(9).setCellValue(nameElement.getStatus() != null ? nameElement.getStatus().toString() : null); row.createCell(10).setCellValue(nameElement.isLatest()); @@ -539,7 +534,7 @@ public class ExcelUtil { row.createCell(4).setCellValue(structureElement.getMnemonic()); row.createCell(5).setCellValue(structureElement.getDescription()); row.createCell(6).setCellValue(structureElement.getComment()); - row.createCell(7).setCellValue(structureElement.getMnemonicpath()); + row.createCell(7).setCellValue(structureElement.getMnemonicPath()); row.createCell(8).setCellValue(structureElement.getLevel()); row.createCell(9).setCellValue(structureElement.getStatus() != null ? structureElement.getStatus().toString() : null); row.createCell(10).setCellValue(structureElement.isLatest()); diff --git a/src/main/java/org/openepics/names/util/NameElementUtil.java b/src/main/java/org/openepics/names/util/NameElementUtil.java index 28090ea5..a945be92 100644 --- a/src/main/java/org/openepics/names/util/NameElementUtil.java +++ b/src/main/java/org/openepics/names/util/NameElementUtil.java @@ -80,17 +80,17 @@ public class NameElementUtil { return null; } - UUID parentsystemstructure = name.getSubsystemUuid() != null + UUID parentSystemStructure = name.getSubsystemUuid() != null ? name.getSubsystemUuid() : name.getSystemUuid() != null ? name.getSystemUuid() - : name.getSystemgroupUuid() != null - ? name.getSystemgroupUuid() + : name.getSystemGroupUuid() != null + ? name.getSystemGroupUuid() : null; return getNameElement( name.getUuid(), - parentsystemstructure, name.getDevicetypeUuid(), + parentSystemStructure, name.getDeviceTypeUuid(), NamingConventionUtil.extractMnemonicPathSystemStructure(name.getConventionName()), NamingConventionUtil.extractMnemonicPathDeviceStructure(name.getConventionName()), name.getInstanceIndex(), name.getConventionName(), @@ -102,10 +102,10 @@ public class NameElementUtil { * Populate and return name element. * * @param uuid uuid - * @param parentsystemstructure parent system structure uuid (system group, system, subsystem) - * @param parentdevicestructure parent device structure uuid (device type) - * @param systemstructure system structure mnemonic path - * @param devicestructure device structure mnemonic path + * @param parentSystemStructure parent system structure uuid (system group, system, subsystem) + * @param parentDeviceStructure parent device structure uuid (device type) + * @param systemStructure system structure mnemonic path + * @param deviceStructure device structure mnemonic path * @param index instance index * @param name name * @param description description @@ -119,16 +119,16 @@ public class NameElementUtil { */ protected static NameElement getNameElement( UUID uuid, - UUID parentsystemstructure, UUID parentdevicestructure, - String systemstructure, String devicestructure, + UUID parentSystemStructure, UUID parentDeviceStructure, + String systemStructure, String deviceStructure, String index, String name, String description, Status status, Boolean latest, Boolean deleted, Date when, String who, String comment) { return new NameElement( - uuid, parentsystemstructure, parentdevicestructure, index, + uuid, parentSystemStructure, parentDeviceStructure, index, description, comment, - systemstructure, devicestructure, name, + systemStructure, deviceStructure, name, status, latest, deleted, when, who); } @@ -144,14 +144,14 @@ public class NameElementUtil { */ public static boolean hasSameContent(NameElementCommand nameElement, Name name, HolderIRepositories holderIRepositories, HolderSystemDeviceStructure holder) { // NameElement - // x parentsystemstructure (system group, system, subsystem) - // x parentdevicestructure (device type) + // x parentSystemStructure (system group, system, subsystem) + // x parentDeviceStructure (device type) // x index // x name // NameElementCommand // uuid - // parentsystemstructure - // parentdevicestructure + // parentSystemStructure + // parentDeviceStructure // index // description // comment @@ -166,12 +166,12 @@ public class NameElementUtil { // find out system group, system, subsystem // one of the three expected to be non-null, other two expected to be null - SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); - System system = holderIRepositories.getSystemRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); - Subsystem subsystem = holderIRepositories.getSubsystemRepository().findLatestByUuid(nameElement.getParentsystemstructure().toString()); + SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); + System system = holderIRepositories.getSystemRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); + Subsystem subsystem = holderIRepositories.getSubsystemRepository().findLatestByUuid(nameElement.getParentSystemStructure().toString()); DeviceType deviceType = null; - if (nameElement.getParentdevicestructure() != null) { - deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(nameElement.getParentdevicestructure().toString()); + if (nameElement.getParentDeviceStructure() != null) { + deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(nameElement.getParentDeviceStructure().toString()); } String derivedName = null; diff --git a/src/main/java/org/openepics/names/util/NameUtil.java b/src/main/java/org/openepics/names/util/NameUtil.java index a33ef15c..cec7dc01 100644 --- a/src/main/java/org/openepics/names/util/NameUtil.java +++ b/src/main/java/org/openepics/names/util/NameUtil.java @@ -57,7 +57,7 @@ public class NameUtil { } int count = 0; - if (name.getSystemgroupUuid() != null) { + if (name.getSystemGroupUuid() != null) { count++; } if (name.getSystemUuid() != null) { @@ -74,7 +74,7 @@ public class NameUtil { ? 3 : name.getSystemUuid() != null ? 2 - : name.getSystemgroupUuid() != null + : name.getSystemGroupUuid() != null ? 1 : -1; } @@ -94,41 +94,41 @@ public class NameUtil { return -1; } - return name.getDevicetypeUuid() != null + return name.getDeviceTypeUuid() != null ? 3 : -1; } public static String getName(SystemGroup systemGroup, DeviceType deviceType, String index, HolderSystemDeviceStructure holderSystemDeviceStructure) { - String systemstructure = StructureUtil.getMnemonicPath(systemGroup, holderSystemDeviceStructure); - String devicestructure = StructureUtil.getMnemonicPath(deviceType, holderSystemDeviceStructure); + String systemStructure = StructureUtil.getMnemonicPath(systemGroup, holderSystemDeviceStructure); + String deviceStructure = StructureUtil.getMnemonicPath(deviceType, holderSystemDeviceStructure); - return !StringUtils.isEmpty(systemstructure) - ? !StringUtils.isEmpty(devicestructure) && !StringUtils.isEmpty(index) - ? systemstructure + NamingConventionUtil.DELIMITER_EXTRA + devicestructure + NamingConventionUtil.DELIMITER_INTRA + index - : systemstructure + return !StringUtils.isEmpty(systemStructure) + ? !StringUtils.isEmpty(deviceStructure) && !StringUtils.isEmpty(index) + ? systemStructure + NamingConventionUtil.DELIMITER_EXTRA + deviceStructure + NamingConventionUtil.DELIMITER_INTRA + index + : systemStructure : null; } public static String getName(System system, DeviceType deviceType, String index, HolderSystemDeviceStructure holderSystemDeviceStructure) { - String systemstructure = StructureUtil.getMnemonicPath(system, holderSystemDeviceStructure); - String devicestructure = StructureUtil.getMnemonicPath(deviceType, holderSystemDeviceStructure); + String systemStructure = StructureUtil.getMnemonicPath(system, holderSystemDeviceStructure); + String deviceStructure = StructureUtil.getMnemonicPath(deviceType, holderSystemDeviceStructure); - return !StringUtils.isEmpty(systemstructure) - ? !StringUtils.isEmpty(devicestructure) && !StringUtils.isEmpty(index) - ? systemstructure + NamingConventionUtil.DELIMITER_EXTRA + devicestructure + NamingConventionUtil.DELIMITER_INTRA + index - : systemstructure + return !StringUtils.isEmpty(systemStructure) + ? !StringUtils.isEmpty(deviceStructure) && !StringUtils.isEmpty(index) + ? systemStructure + NamingConventionUtil.DELIMITER_EXTRA + deviceStructure + NamingConventionUtil.DELIMITER_INTRA + index + : systemStructure : null; } public static String getName(Subsystem subsystem, DeviceType deviceType, String index, HolderSystemDeviceStructure holderSystemDeviceStructure) { - String systemstructure = StructureUtil.getMnemonicPath(subsystem, holderSystemDeviceStructure); - String devicestructure = StructureUtil.getMnemonicPath(deviceType, holderSystemDeviceStructure); + String systemStructure = StructureUtil.getMnemonicPath(subsystem, holderSystemDeviceStructure); + String deviceStructure = StructureUtil.getMnemonicPath(deviceType, holderSystemDeviceStructure); - return !StringUtils.isEmpty(systemstructure) - ? !StringUtils.isEmpty(devicestructure) && !StringUtils.isEmpty(index) - ? systemstructure + NamingConventionUtil.DELIMITER_EXTRA + devicestructure + NamingConventionUtil.DELIMITER_INTRA + index - : systemstructure + return !StringUtils.isEmpty(systemStructure) + ? !StringUtils.isEmpty(deviceStructure) && !StringUtils.isEmpty(index) + ? systemStructure + NamingConventionUtil.DELIMITER_EXTRA + deviceStructure + NamingConventionUtil.DELIMITER_INTRA + index + : systemStructure : null; } diff --git a/src/main/java/org/openepics/names/util/NamingConventionUtil.java b/src/main/java/org/openepics/names/util/NamingConventionUtil.java index 68603fa7..37768a29 100644 --- a/src/main/java/org/openepics/names/util/NamingConventionUtil.java +++ b/src/main/java/org/openepics/names/util/NamingConventionUtil.java @@ -279,23 +279,23 @@ public class NamingConventionUtil { public static String extractMnemonicPathSystemStructure(String conventionName) { if (!StringUtils.isEmpty(conventionName)) { int index = conventionName.indexOf(DELIMITER_EXTRA); - String mnemonicpath = null; + String mnemonicPath = null; if (index != -1) { - mnemonicpath = conventionName.substring(0, index); + mnemonicPath = conventionName.substring(0, index); } else { - mnemonicpath = conventionName; + mnemonicPath = conventionName; } // 0 or 1 DELIMITER_INTRA expected - index = mnemonicpath.indexOf(DELIMITER_INTRA); + index = mnemonicPath.indexOf(DELIMITER_INTRA); if (index != -1) { - if (mnemonicpath.indexOf(DELIMITER_INTRA, index + 1) != -1) { + if (mnemonicPath.indexOf(DELIMITER_INTRA, index + 1) != -1) { return null; } else { - return mnemonicpath; + return mnemonicPath; } } else { - return mnemonicpath; + return mnemonicPath; } } return null; diff --git a/src/main/java/org/openepics/names/util/StructureElementUtil.java b/src/main/java/org/openepics/names/util/StructureElementUtil.java index e98422b3..4dfc7d8b 100644 --- a/src/main/java/org/openepics/names/util/StructureElementUtil.java +++ b/src/main/java/org/openepics/names/util/StructureElementUtil.java @@ -298,13 +298,13 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not for history of structure // for latest & approved status - String mnemonicpath = null; + String mnemonicPath = null; return getStructureElement( Type.SYSTEMGROUP, systemGroup.getUuid(), null, - systemGroup.getName(), systemGroup.getMnemonic(), mnemonicpath, 1, + systemGroup.getName(), systemGroup.getMnemonic(), mnemonicPath, 1, systemGroup.getDescription(), Status.PENDING, Boolean.FALSE, systemGroup.isDeleted(), systemGroup.getRequested(), systemGroup.getRequestedBy(), systemGroup.getRequestedComment()); } @@ -325,7 +325,7 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = StructureChoice.HISTORY.equals(structureChoice) || !(systemGroup.isLatest() && Status.APPROVED.equals(systemGroup.getStatus())) + String mnemonicPath = StructureChoice.HISTORY.equals(structureChoice) || !(systemGroup.isLatest() && Status.APPROVED.equals(systemGroup.getStatus())) ? null : StructureUtil.getMnemonicPath(systemGroup, holderSystemDeviceStructure); @@ -333,7 +333,7 @@ public class StructureElementUtil { Type.SYSTEMGROUP, systemGroup.getUuid(), null, - systemGroup.getName(), systemGroup.getMnemonic(), mnemonicpath, 1, + systemGroup.getName(), systemGroup.getMnemonic(), mnemonicPath, 1, systemGroup.getDescription(), systemGroup.getStatus(), systemGroup.isLatest(), systemGroup.isDeleted(), systemGroup.getProcessed(), systemGroup.getProcessedBy(), systemGroup.getProcessedComment()); } @@ -352,13 +352,13 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = null; + String mnemonicPath = null; return getStructureElement( Type.SYSTEM, system.getUuid(), system.getParentUuid(), - system.getName(), system.getMnemonic(), mnemonicpath, 2, + system.getName(), system.getMnemonic(), mnemonicPath, 2, system.getDescription(), Status.PENDING, Boolean.FALSE, system.isDeleted(), system.getRequested(), system.getRequestedBy(), system.getRequestedComment()); } @@ -379,7 +379,7 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = StructureChoice.HISTORY.equals(structureChoice) || !(system.isLatest() && Status.APPROVED.equals(system.getStatus())) + String mnemonicPath = StructureChoice.HISTORY.equals(structureChoice) || !(system.isLatest() && Status.APPROVED.equals(system.getStatus())) ? null : StructureUtil.getMnemonicPath(system, holderSystemDeviceStructure); @@ -387,7 +387,7 @@ public class StructureElementUtil { Type.SYSTEM, system.getUuid(), system.getParentUuid(), - system.getName(), system.getMnemonic(), mnemonicpath, 2, + system.getName(), system.getMnemonic(), mnemonicPath, 2, system.getDescription(), system.getStatus(), system.isLatest(), system.isDeleted(), system.getProcessed(), system.getProcessedBy(), system.getProcessedComment()); } @@ -406,13 +406,13 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = null; + String mnemonicPath = null; return getStructureElement( Type.SUBSYSTEM, subsystem.getUuid(), subsystem.getParentUuid(), - subsystem.getName(), subsystem.getMnemonic(), mnemonicpath, 3, + subsystem.getName(), subsystem.getMnemonic(), mnemonicPath, 3, subsystem.getDescription(), Status.PENDING, Boolean.FALSE, subsystem.isDeleted(), subsystem.getRequested(), subsystem.getRequestedBy(), subsystem.getRequestedComment()); } @@ -433,7 +433,7 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = StructureChoice.HISTORY.equals(structureChoice) || !(subsystem.isLatest() && Status.APPROVED.equals(subsystem.getStatus())) + String mnemonicPath = StructureChoice.HISTORY.equals(structureChoice) || !(subsystem.isLatest() && Status.APPROVED.equals(subsystem.getStatus())) ? null : StructureUtil.getMnemonicPath(subsystem, holderSystemDeviceStructure); @@ -441,7 +441,7 @@ public class StructureElementUtil { Type.SUBSYSTEM, subsystem.getUuid(), subsystem.getParentUuid(), - subsystem.getName(), subsystem.getMnemonic(), mnemonicpath, 3, + subsystem.getName(), subsystem.getMnemonic(), mnemonicPath, 3, subsystem.getDescription(), subsystem.getStatus(), subsystem.isLatest(), subsystem.isDeleted(), subsystem.getProcessed(), subsystem.getProcessedBy(), subsystem.getProcessedComment()); } @@ -461,13 +461,13 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = null; + String mnemonicPath = null; return getStructureElement( Type.DISCIPLINE, discipline.getUuid(), null, - discipline.getName(), discipline.getMnemonic(), mnemonicpath, 1, + discipline.getName(), discipline.getMnemonic(), mnemonicPath, 1, discipline.getDescription(), Status.PENDING, Boolean.FALSE, discipline.isDeleted(), discipline.getRequested(), discipline.getRequestedBy(), discipline.getRequestedComment()); } @@ -488,7 +488,7 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = StructureChoice.HISTORY.equals(structureChoice) || !(discipline.isLatest() && Status.APPROVED.equals(discipline.getStatus())) + String mnemonicPath = StructureChoice.HISTORY.equals(structureChoice) || !(discipline.isLatest() && Status.APPROVED.equals(discipline.getStatus())) ? null : StructureUtil.getMnemonicPath(discipline, holderSystemDeviceStructure); @@ -496,7 +496,7 @@ public class StructureElementUtil { Type.DISCIPLINE, discipline.getUuid(), null, - discipline.getName(), discipline.getMnemonic(), mnemonicpath, 1, + discipline.getName(), discipline.getMnemonic(), mnemonicPath, 1, discipline.getDescription(), discipline.getStatus(), discipline.isLatest(), discipline.isDeleted(), discipline.getProcessed(), discipline.getProcessedBy(), discipline.getProcessedComment()); } @@ -515,13 +515,13 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = null; + String mnemonicPath = null; return getStructureElement( Type.DEVICEGROUP, deviceGroup.getUuid(), deviceGroup.getParentUuid(), - deviceGroup.getName(), deviceGroup.getMnemonic(), mnemonicpath, 2, + deviceGroup.getName(), deviceGroup.getMnemonic(), mnemonicPath, 2, deviceGroup.getDescription(), Status.PENDING, Boolean.FALSE, deviceGroup.isDeleted(), deviceGroup.getRequested(), deviceGroup.getRequestedBy(), deviceGroup.getRequestedComment()); } @@ -542,7 +542,7 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = StructureChoice.HISTORY.equals(structureChoice) || !(deviceGroup.isLatest() && Status.APPROVED.equals(deviceGroup.getStatus())) + String mnemonicPath = StructureChoice.HISTORY.equals(structureChoice) || !(deviceGroup.isLatest() && Status.APPROVED.equals(deviceGroup.getStatus())) ? null : StructureUtil.getMnemonicPath(deviceGroup, holderSystemDeviceStructure); @@ -550,7 +550,7 @@ public class StructureElementUtil { Type.DEVICEGROUP, deviceGroup.getUuid(), deviceGroup.getParentUuid(), - deviceGroup.getName(), deviceGroup.getMnemonic(), mnemonicpath, 2, + deviceGroup.getName(), deviceGroup.getMnemonic(), mnemonicPath, 2, deviceGroup.getDescription(), deviceGroup.getStatus(), deviceGroup.isLatest(), deviceGroup.isDeleted(), deviceGroup.getProcessed(), deviceGroup.getProcessedBy(), deviceGroup.getProcessedComment()); } @@ -569,13 +569,13 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = null; + String mnemonicPath = null; return getStructureElement( Type.DEVICETYPE, deviceType.getUuid(), deviceType.getParentUuid(), - deviceType.getName(), deviceType.getMnemonic(), mnemonicpath, 3, + deviceType.getName(), deviceType.getMnemonic(), mnemonicPath, 3, deviceType.getDescription(), Status.PENDING, Boolean.FALSE, deviceType.isDeleted(), deviceType.getRequested(), deviceType.getRequestedBy(), deviceType.getRequestedComment()); } @@ -596,7 +596,7 @@ public class StructureElementUtil { // ambiguous if considered in past (requested, processed) // not history of structure // latest & approved status - String mnemonicpath = StructureChoice.HISTORY.equals(structureChoice) || !(deviceType.isLatest() && Status.APPROVED.equals(deviceType.getStatus())) + String mnemonicPath = StructureChoice.HISTORY.equals(structureChoice) || !(deviceType.isLatest() && Status.APPROVED.equals(deviceType.getStatus())) ? null : StructureUtil.getMnemonicPath(deviceType, holderSystemDeviceStructure); @@ -604,7 +604,7 @@ public class StructureElementUtil { Type.DEVICETYPE, deviceType.getUuid(), deviceType.getParentUuid(), - deviceType.getName(), deviceType.getMnemonic(), mnemonicpath, 3, + deviceType.getName(), deviceType.getMnemonic(), mnemonicPath, 3, deviceType.getDescription(), deviceType.getStatus(), deviceType.isLatest(), deviceType.isDeleted(), deviceType.getProcessed(), deviceType.getProcessedBy(), deviceType.getProcessedComment()); } @@ -617,7 +617,7 @@ public class StructureElementUtil { * @param parent parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path * @param level level * @param description description * @param status status @@ -632,14 +632,14 @@ public class StructureElementUtil { Type type, UUID uuid, UUID parent, - String name, String mnemonic, String mnemonicpath, Integer level, + String name, String mnemonic, String mnemonicPath, Integer level, String description, Status status, Boolean latest, Boolean deleted, Date when, String who, String comment) { return new StructureElement( uuid, type, parent, name, mnemonic, description, comment, - mnemonicpath, level, + mnemonicPath, level, status, latest, deleted, when, who); } diff --git a/src/main/java/org/openepics/names/util/TextUtil.java b/src/main/java/org/openepics/names/util/TextUtil.java index 605f8159..d75fa277 100644 --- a/src/main/java/org/openepics/names/util/TextUtil.java +++ b/src/main/java/org/openepics/names/util/TextUtil.java @@ -46,10 +46,10 @@ public class TextUtil { public static final String DESCRIPTION = "description"; public static final String INDEX = "index"; public static final String MNEMONIC = "mnemonic"; - public static final String MNEMONICPATH = "mnemonicpath"; + public static final String MNEMONICPATH = "mnemonicPath"; public static final String PARENT = "parent"; - public static final String PARENTDEVICESTRUCTURE = "parentdevicestructure"; - public static final String PARENTSYSTEMSTRUCTURE = "parentsystemstructure"; + public static final String PARENTDEVICESTRUCTURE = "parentDeviceStructure"; + public static final String PARENTSYSTEMSTRUCTURE = "parentSystemStructure"; public static final String STATUS = "status"; public static final String TYPE = "type"; public static final String UUID = "uuid"; diff --git a/src/main/java/org/openepics/names/util/ValidateNameElementUtil.java b/src/main/java/org/openepics/names/util/ValidateNameElementUtil.java index 6e568115..212cacd3 100644 --- a/src/main/java/org/openepics/names/util/ValidateNameElementUtil.java +++ b/src/main/java/org/openepics/names/util/ValidateNameElementUtil.java @@ -45,13 +45,13 @@ public class ValidateNameElementUtil { // // NameElement // uuid, - // systemgroup, system, subsystem, devicetype, systemstructure, devicestructure, + // systemGroup, system, subsystem, deviceType, systemStructure, deviceStructure, // index, name, // description, status, latest, deleted, when, who, comment // // NameElementCommand - // create - parentsystemstructure, parentdevicestructure (optional), index, description, comment - // update - uuid, parentsystemstructure, parentdevicestructure (optional), index, description, comment + // create - parentSystemStructure, parentDeviceStructure (optional), index, description, comment + // update - uuid, parentSystemStructure, parentDeviceStructure (optional), index, description, comment // delete - uuid, comment /** @@ -67,9 +67,9 @@ public class ValidateNameElementUtil { * @param deleted deleted * @param uuid uuid * @param name name - * @param nameequivalence name equivalence - * @param systemstructure system structure mnemonic - * @param devicestructure device structure mnemonic + * @param nameEquivalence name equivalence + * @param systemStructure system structure mnemonic + * @param deviceStructure device structure mnemonic * @param description description * @param includeHistory include history * @param orderBy order by @@ -78,7 +78,7 @@ public class ValidateNameElementUtil { * @param limit limit */ public static void validateNamesInputRead(Boolean deleted, - String uuid, String name, String nameequivalence, String systemstructure, String devicestructure, String description, + String uuid, String name, String nameEquivalence, String systemStructure, String deviceStructure, String description, Boolean includeHistory, FieldName orderBy, Boolean isAsc, Integer offset, Integer limit) { // validate input @@ -125,8 +125,8 @@ public class ValidateNameElementUtil { private static void validateNameElementInput(NameElementCommand nameElement, NameCommand nameCommand) { // attributes // uuid - required if not create, required empty if create - // parentsystemstructure (uuid) - // parentdevicestructure (uuid) + // parentSystemStructure (uuid) + // parentDeviceStructure (uuid) // index // description // comment @@ -136,8 +136,8 @@ public class ValidateNameElementUtil { } UUID uuid = nameElement.getUuid(); - UUID parentSystemstructure = nameElement.getParentsystemstructure(); - UUID parentDevicestructure = nameElement.getParentdevicestructure(); + UUID parentSystemStructure = nameElement.getParentSystemStructure(); + UUID parentDeviceStructure = nameElement.getParentDeviceStructure(); String index = nameElement.getIndex(); String description = nameElement.getDescription(); @@ -151,15 +151,15 @@ public class ValidateNameElementUtil { } if (!NameCommand.DELETE.equals(nameCommand)) { - ExceptionUtil.validateConditionInputNotAvailableException(parentSystemstructure != null, + ExceptionUtil.validateConditionInputNotAvailableException(parentSystemStructure != null, TextUtil.VALUE_IS_NOT_AVAILABLE, nameElement.toString(), TextUtil.PARENTSYSTEMSTRUCTURE); // optional (either none or both) - // parentdevicestructure + // parentDeviceStructure // index - if (parentDevicestructure != null && index == null) { + if (parentDeviceStructure != null && index == null) { throw ExceptionUtil.createInputNotCorrectException(null, nameElement.toString(), TextUtil.INDEX); - } else if (parentDevicestructure == null && index != null) { + } else if (parentDeviceStructure == null && index != null) { throw ExceptionUtil.createInputNotCorrectException(null, nameElement.toString(), TextUtil.PARENTDEVICESTRUCTURE); } @@ -223,8 +223,8 @@ public class ValidateNameElementUtil { private static void validateNameElementData(NameElementCommand nameElement, EssNamingConvention namingConvention, HolderIRepositories holderIRepositories, NameRepository nameRepository, HolderSystemDeviceStructure holder, NameCommand nameCommand) { // attributes // uuid - // parentsystemstructure - // parentdevicestructure + // parentSystemDtructure + // parentDeviceDtructure // index // description // comment @@ -260,8 +260,8 @@ public class ValidateNameElementUtil { boolean condition = true; UUID uuid = nameElement.getUuid(); - UUID parentSystemstructure = nameElement.getParentsystemstructure(); - UUID parentDevicestructure = nameElement.getParentdevicestructure(); + UUID parentSystemstructure = nameElement.getParentSystemStructure(); + UUID parentDevicestructure = nameElement.getParentDeviceStructure(); String index = nameElement.getIndex(); if (ValidateUtil.isAnyEqual(nameCommand, NameCommand.CREATE, NameCommand.UPDATE)) { @@ -387,8 +387,8 @@ public class ValidateNameElementUtil { String dt = NamingConventionUtil.extractDeviceType(name); String idx = NamingConventionUtil.extractInstanceIndex(name); - String mnemonicPathSystemstructure = NamingConventionUtil.extractMnemonicPathSystemStructure(name); - String mnemonicPathDevicestructure = NamingConventionUtil.extractMnemonicPathDeviceStructure(name); + String mnemonicPathSystemStructure = NamingConventionUtil.extractMnemonicPathSystemStructure(name); + String mnemonicPathDeviceStructure = NamingConventionUtil.extractMnemonicPathDeviceStructure(name); int count = 0; int countSgSys = 0; @@ -430,16 +430,16 @@ public class ValidateNameElementUtil { // device structure if (!StringUtils.isEmpty(dt)) { - List<DeviceType> deviceTypes = holderRepositories.getDeviceTypeRepository().readDeviceTypes(Status.APPROVED, false, null, null, null, null, null, mnemonicPathDevicestructure, null); + List<DeviceType> deviceTypes = holderRepositories.getDeviceTypeRepository().readDeviceTypes(Status.APPROVED, false, null, null, null, null, null, mnemonicPathDeviceStructure, null); ExceptionUtil.validateConditionDataNotAvailableException(ValidateUtil.isSize(deviceTypes, 1), TextUtil.DEVICETYPE_IS_NOT_AVAILABLE, details, field); deviceType = deviceTypes.get(0); } // system structure - List<Subsystem> subsystems = holderRepositories.getSubsystemRepository().readSubsystems(Status.APPROVED, false, null, null, null, null, null, mnemonicPathSystemstructure, null); - List<System> systems = holderRepositories.getSystemRepository().readSystems(Status.APPROVED, false, null, null, null, null, null, mnemonicPathSystemstructure, null); - List<SystemGroup> systemGroups = holderRepositories.getSystemGroupRepository().readSystemGroups(Status.APPROVED, false, null, null, null, null, mnemonicPathSystemstructure, null); + List<Subsystem> subsystems = holderRepositories.getSubsystemRepository().readSubsystems(Status.APPROVED, false, null, null, null, null, null, mnemonicPathSystemStructure, null); + List<System> systems = holderRepositories.getSystemRepository().readSystems(Status.APPROVED, false, null, null, null, null, null, mnemonicPathSystemStructure, null); + List<SystemGroup> systemGroups = holderRepositories.getSystemGroupRepository().readSystemGroups(Status.APPROVED, false, null, null, null, null, mnemonicPathSystemStructure, null); if (ValidateUtil.isSize(subsystems, 1)) { subsystem = subsystems.get(0); diff --git a/src/main/java/org/openepics/names/util/ValidateStructureElementUtil.java b/src/main/java/org/openepics/names/util/ValidateStructureElementUtil.java index 296df25b..f965fa71 100644 --- a/src/main/java/org/openepics/names/util/ValidateStructureElementUtil.java +++ b/src/main/java/org/openepics/names/util/ValidateStructureElementUtil.java @@ -45,7 +45,7 @@ public class ValidateStructureElementUtil { // parent device structure uuid (device type) // // StructureElement - // type, uuid, parent uuid, + // type, uuid, parent, // name, mnemonic, mnemonic path, level, // description, status, latest, deleted, when, who, comment // @@ -68,11 +68,11 @@ public class ValidateStructureElementUtil { * @param statuses statuses * @param deleted deleted * @param uuid uuid - * @param parentUuid parent uuid + * @param parent parent uuid * @param name name * @param mnemonic mnemonic - * @param mnemonicequivalence mnemonic equivalence - * @param mnemonicpath mnemonic path + * @param mnemonicEquivalence mnemonic equivalence + * @param mnemonicPath mnemonic path * @param description description * @param includeHistory include history * @param orderBy order by @@ -81,7 +81,7 @@ public class ValidateStructureElementUtil { * @param limit limit */ public static void validateStructuresInputRead(Type type, Status[] statuses, Boolean deleted, - String uuid, String parentUuid, String name, String mnemonic, String mnemonicequivalence, String mnemonicpath, String description, + String uuid, String parent, String name, String mnemonic, String mnemonicEquivalence, String mnemonicPath, String description, Boolean includeHistory, FieldStructure orderBy, Boolean isAsc, Integer offset, Integer limit) { // validate input @@ -156,13 +156,13 @@ public class ValidateStructureElementUtil { */ private static void validateStructureElementInput(StructureElementCommand structureElement, EssNamingConvention namingConvention, StructureCommand structureCommand) { // check structure element input - // uuid - required if not create, required empty if create - // type - required - // parent (uuid) - also validate data, parent uuid available if type is system, subsystem, device group, device type - // name - required - // mnemonic - required except for device group - // description - required - // comment - required + // uuid - required if not create, required empty if create + // type - required + // parent - also validate data, parent uuid available if type is system, subsystem, device group, device type + // name - required + // mnemonic - required except for device group + // description - required + // comment - required if (ValidateUtil.isAnyNull(structureElement, structureCommand)) { return; @@ -170,7 +170,7 @@ public class ValidateStructureElementUtil { Type type = structureElement.getType(); UUID uuid = structureElement.getUuid(); - UUID parentUuid = structureElement.getParent(); + UUID parent = structureElement.getParent(); String name = structureElement.getName(); String mnemonic = structureElement.getMnemonic(); @@ -188,9 +188,9 @@ public class ValidateStructureElementUtil { if (!StructureCommand.DELETE.equals(structureCommand)) { if (ValidateUtil.isAnyEqual(type, Type.SYSTEM, Type.SUBSYSTEM, Type.DEVICEGROUP, Type.DEVICETYPE)) { - ExceptionUtil.validateConditionInputNotAvailableException(parentUuid != null, + ExceptionUtil.validateConditionInputNotAvailableException(parent != null, TextUtil.PARENT_IS_NOT_AVAILABLE, structureElement.toString(), TextUtil.PARENT); - ValidateUtil.validateInputUuid(parentUuid.toString()); + ValidateUtil.validateInputUuid(parent.toString()); } ValidateUtil.validateInputName(name); @@ -316,7 +316,7 @@ public class ValidateStructureElementUtil { Type type = structureElement.getType(); UUID uuid = structureElement.getUuid(); - UUID parentUuid = structureElement.getParent(); + UUID parent = structureElement.getParent(); // validate data in itself // systemgroup, discipline @@ -327,7 +327,7 @@ public class ValidateStructureElementUtil { // approve, cancel, reject // entry pending - if (ValidateUtil.isAnyEqual(type, Type.SYSTEMGROUP, Type.DISCIPLINE) && parentUuid != null) { + if (ValidateUtil.isAnyEqual(type, Type.SYSTEMGROUP, Type.DISCIPLINE) && parent != null) { throw ExceptionUtil.createDataNotCorrectException(TextUtil.PARENT_IS_NOT_CORRECT, details, field); } else if (ValidateUtil.isAnyEqual(structureCommand, StructureCommand.UPDATE, StructureCommand.DELETE)) { validateStructuresStatusSize0(uuid, type, Status.PENDING, null, @@ -383,7 +383,7 @@ public class ValidateStructureElementUtil { public static void validateStructureElementDataRelativeOtherData(StructureElementCommand structureElement, EssNamingConvention namingConvention, HolderRepositories holderRepositories, HolderSystemDeviceStructure holder, StructureCommand structureCommand) { // check structure element data in relation to other data // create, update - // parent uuid - (if applicable) approved, latest, not deleted + // parent - (if applicable) approved, latest, not deleted // mnemonic - (if not same) not exists // mnemonic equivalence - (if not same) equivalence not exists // approve @@ -406,7 +406,7 @@ public class ValidateStructureElementUtil { Type type = structureElement.getType(); UUID uuid = structureElement.getUuid(); - UUID parentUuid = structureElement.getParent(); + UUID parent = structureElement.getParent(); String mnemonic = structureElement.getMnemonic(); // validate data relative other data @@ -422,55 +422,55 @@ public class ValidateStructureElementUtil { if (!StringUtils.isEmpty(mnemonic)) { // status, mnemonic message = TextUtil.SYSTEMGROUP_IS_NOT_CORRECT; - validateStructuresStatusMnemonic(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonic(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); // status, mnemonic equivalence - validateStructuresStatusMnemonicequivalence(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonicequivalence(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); } } else if (Type.SYSTEM.equals(type)) { // status, parent message = TextUtil.SYSTEMGROUP_IS_NOT_CORRECT; - validateStructuresParent(type, parentUuid, Status.APPROVED, false, + validateStructuresParent(type, parent, Status.APPROVED, false, holderRepositories, message, details, field); // status, mnemonic message = TextUtil.SYSTEM_IS_NOT_CORRECT; - validateStructuresStatusMnemonic(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonic(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); // status, mnemonic equivalence - validateStructuresStatusMnemonicequivalence(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonicequivalence(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); } else if (Type.SUBSYSTEM.equals(type)) { // status, parent message = TextUtil.SYSTEM_IS_NOT_CORRECT; - validateStructuresParent(type, parentUuid, Status.APPROVED, false, + validateStructuresParent(type, parent, Status.APPROVED, false, holderRepositories, message, details, field); // status, mnemonic message = TextUtil.SUBSYSTEM_IS_NOT_CORRECT; - validateStructuresStatusMnemonic(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonic(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); // status, mnemonic equivalence - validateStructuresStatusMnemonicequivalence(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonicequivalence(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); } else if (Type.DISCIPLINE.equals(type)) { message = TextUtil.DISCIPLINE_IS_NOT_CORRECT; // status, mnemonic - validateStructuresStatusMnemonic(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonic(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); // status, mnemonic equivalence - validateStructuresStatusMnemonicequivalence(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonicequivalence(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); } else if (Type.DEVICEGROUP.equals(type)) { // status, parent message = TextUtil.DISCIPLINE_IS_NOT_CORRECT; - List<Discipline> disciplines = holderRepositories.getDisciplineRepository().readDisciplines(Status.APPROVED, false, parentUuid.toString(), null, null, null, null, null); + List<Discipline> disciplines = holderRepositories.getDisciplineRepository().readDisciplines(Status.APPROVED, false, parent.toString(), null, null, null, null, null); ExceptionUtil.validateConditionDataConflictException(ValidateUtil.isSize(disciplines, 1), message, details, TextUtil.PARENT); @@ -482,16 +482,16 @@ public class ValidateStructureElementUtil { } else if (Type.DEVICETYPE.equals(type)) { // status, parent message = TextUtil.DEVICEGROUP_IS_NOT_CORRECT; - validateStructuresParent(type, parentUuid, Status.APPROVED, false, + validateStructuresParent(type, parent, Status.APPROVED, false, holderRepositories, message, details, field); // status, mnemonic message = TextUtil.DEVICETYPE_IS_NOT_CORRECT; - validateStructuresStatusMnemonic(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonic(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); // status, mnemonic equivalence - validateStructuresStatusMnemonicequivalence(uuid, type, parentUuid, mnemonic, + validateStructuresStatusMnemonicequivalence(uuid, type, parent, mnemonic, namingConvention, holderRepositories, structureCommand, message, details, field); } } else if (StructureCommand.APPROVE.equals(structureCommand)) { @@ -506,7 +506,7 @@ public class ValidateStructureElementUtil { } else if (Type.SYSTEM.equals(type)) { // status, parent message = TextUtil.SYSTEMGROUP_IS_NOT_CORRECT; - validateStructuresStatusSize1(parentUuid, Type.SYSTEMGROUP, Status.APPROVED, false, + validateStructuresStatusSize1(parent, Type.SYSTEMGROUP, Status.APPROVED, false, holderRepositories, message, details, field); // status, uuid @@ -516,7 +516,7 @@ public class ValidateStructureElementUtil { } else if (Type.SUBSYSTEM.equals(type)) { // status, parent message = TextUtil.SYSTEM_IS_NOT_CORRECT; - validateStructuresStatusSize1(parentUuid, Type.SYSTEM, Status.APPROVED, false, + validateStructuresStatusSize1(parent, Type.SYSTEM, Status.APPROVED, false, holderRepositories, message, details, field); // status, uuid @@ -531,7 +531,7 @@ public class ValidateStructureElementUtil { } else if (Type.DEVICEGROUP.equals(type)) { // status, parent message = TextUtil.DISCIPLINE_IS_NOT_CORRECT; - validateStructuresStatusSize1(parentUuid, Type.DISCIPLINE, Status.APPROVED, false, + validateStructuresStatusSize1(parent, Type.DISCIPLINE, Status.APPROVED, false, holderRepositories, message, details, field); // status, uuid @@ -544,7 +544,7 @@ public class ValidateStructureElementUtil { } else if (Type.DEVICETYPE.equals(type)) { // status, parent message = TextUtil.DISCIPLINE_IS_NOT_CORRECT; - validateStructuresStatusSize1(parentUuid, Type.DEVICEGROUP, Status.APPROVED, false, + validateStructuresStatusSize1(parent, Type.DEVICEGROUP, Status.APPROVED, false, holderRepositories, message, details, field); // status, uuid @@ -615,14 +615,14 @@ public class ValidateStructureElementUtil { // before ok to create or approve, structures need to exist or not exist, this method helps to find out String queryUuid = null; - String queryParentUuid = null; + String queryParent = null; String queryMnemonic = null; - String queryMnemonicequivalence = null; + String queryMnemonicEquivalence = null; boolean hasMnemonic = !StringUtils.isEmpty(mnemonic); if (hasMnemonic) { if (equivalence) { - queryMnemonicequivalence = namingConvention.equivalenceClassRepresentative(mnemonic); + queryMnemonicEquivalence = namingConvention.equivalenceClassRepresentative(mnemonic); } else { queryMnemonic = mnemonic; } @@ -640,45 +640,45 @@ public class ValidateStructureElementUtil { // parent if (hasMnemonic) { // query table for type - queryParentUuid = parent.toString(); + queryParent = parent.toString(); } else { // query table for parent to type queryParentTable = true; queryUuid = parent.toString(); - queryParentUuid = null; + queryParent = null; queryMnemonic = null; - queryMnemonicequivalence = null; + queryMnemonicEquivalence = null; } } // query table and return list with uuid if (Type.SYSTEMGROUP.equals(type)) { return StructureUtil.listSystemGroup2Uuid( - holderRepositories.getSystemGroupRepository().readSystemGroups(status, deleted, queryUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); + holderRepositories.getSystemGroupRepository().readSystemGroups(status, deleted, queryUuid, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } else if (Type.SYSTEM.equals(type)) { if (queryParentTable) { - return StructureUtil.listSystemGroup2Uuid(holderRepositories.getSystemGroupRepository().readSystemGroups(status, deleted, queryUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); + return StructureUtil.listSystemGroup2Uuid(holderRepositories.getSystemGroupRepository().readSystemGroups(status, deleted, queryUuid, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } else { - return StructureUtil.listSystem2Uuid(holderRepositories.getSystemRepository().readSystems(status, deleted, queryUuid, queryParentUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); + return StructureUtil.listSystem2Uuid(holderRepositories.getSystemRepository().readSystems(status, deleted, queryUuid, queryParent, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } } else if (Type.SUBSYSTEM.equals(type)) { if (queryParentTable) { - return StructureUtil.listSystem2Uuid(holderRepositories.getSystemRepository().readSystems(status, deleted, queryUuid, queryParentUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); + return StructureUtil.listSystem2Uuid(holderRepositories.getSystemRepository().readSystems(status, deleted, queryUuid, queryParent, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } else { - return StructureUtil.listSubsystem2Uuid(holderRepositories.getSubsystemRepository().readSubsystems(status, deleted, queryUuid, queryParentUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); + return StructureUtil.listSubsystem2Uuid(holderRepositories.getSubsystemRepository().readSubsystems(status, deleted, queryUuid, queryParent, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } } else if (Type.DISCIPLINE.equals(type)) { - return StructureUtil.listDiscipline2Uuid(holderRepositories.getDisciplineRepository().readDisciplines(status, deleted, queryUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); + return StructureUtil.listDiscipline2Uuid(holderRepositories.getDisciplineRepository().readDisciplines(status, deleted, queryUuid, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } else if (Type.DEVICEGROUP.equals(type)) { if (queryParentTable) { - return StructureUtil.listDiscipline2Uuid(holderRepositories.getDisciplineRepository().readDisciplines(status, deleted, queryUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); + return StructureUtil.listDiscipline2Uuid(holderRepositories.getDisciplineRepository().readDisciplines(status, deleted, queryUuid, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } else { - return StructureUtil.listDeviceGroup2Uuid(holderRepositories.getDeviceGroupRepository().readDeviceGroups(status, deleted, queryUuid, queryParentUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); } + return StructureUtil.listDeviceGroup2Uuid(holderRepositories.getDeviceGroupRepository().readDeviceGroups(status, deleted, queryUuid, queryParent, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } } else if (Type.DEVICETYPE.equals(type)) { if (queryParentTable) { - return StructureUtil.listDeviceGroup2Uuid(holderRepositories.getDeviceGroupRepository().readDeviceGroups(status, deleted, queryUuid, queryParentUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); + return StructureUtil.listDeviceGroup2Uuid(holderRepositories.getDeviceGroupRepository().readDeviceGroups(status, deleted, queryUuid, queryParent, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } else { - return StructureUtil.listDeviceType2Uuid(holderRepositories.getDeviceTypeRepository().readDeviceTypes(status, deleted, queryUuid, queryParentUuid, null, queryMnemonic, queryMnemonicequivalence, null, null)); + return StructureUtil.listDeviceType2Uuid(holderRepositories.getDeviceTypeRepository().readDeviceTypes(status, deleted, queryUuid, queryParent, null, queryMnemonic, queryMnemonicEquivalence, null, null)); } } return Lists.newArrayList(); @@ -691,21 +691,21 @@ public class ValidateStructureElementUtil { * This method corresponds to structure element data for create, albeit in a different way. * * @param type type - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path * @param namingConvention naming convention * @param holderIRepositories holder repositories * @param holder holder */ - public static void validateStructureDataCreate(Type type, String mnemonicpath, EssNamingConvention namingConvention, HolderIRepositories holderIRepositories, HolderSystemDeviceStructure holder) { - if (ValidateUtil.isAnyNull(type, mnemonicpath, namingConvention, holderIRepositories, holder)) { + public static void validateStructureDataCreate(Type type, String mnemonicPath, EssNamingConvention namingConvention, HolderIRepositories holderIRepositories, HolderSystemDeviceStructure holder) { + if (ValidateUtil.isAnyNull(type, mnemonicPath, namingConvention, holderIRepositories, holder)) { return; } - String details = mnemonicpath; + String details = mnemonicPath; String field = TextUtil.MNEMONIC_PATH; - String[] path = NamingConventionUtil.string2MnemonicPath(mnemonicpath); - String mnemonicpathEquivalence = namingConvention.equivalenceClassRepresentative(mnemonicpath); + String[] path = NamingConventionUtil.string2MnemonicPath(mnemonicPath); + String mnemonicpathEquivalence = namingConvention.equivalenceClassRepresentative(mnemonicPath); // validate path, including null check ExceptionUtil.validateConditionDataNotValidException(path != null && path.length >= 1 && path.length <= 2, @@ -714,7 +714,7 @@ public class ValidateStructureElementUtil { if (Type.SYSTEMGROUP.equals(type)) { validateStructuresMnemonicpathNotValid(path.length == 1, type, details, field); - // system group may have empty path but there will be mnemonicpath in this context + // system group may have empty path but there will be mnemonic path in this context // mnemonic path SystemGroup sg = holderIRepositories.getSystemGroupRepository().findLatestNotDeletedByMnemonic(path[0]); @@ -737,7 +737,7 @@ public class ValidateStructureElementUtil { List<String> mnemonicPaths = StructureUtil.getMnemonicPathsSystemGroup(holder, false, namingConvention); for (String existingPath : mnemonicPaths) { validateStructuresMnemonicpathDuplicate( - !StringUtils.equals(mnemonicpath, existingPath), + !StringUtils.equals(mnemonicPath, existingPath), type, details, field); } @@ -753,7 +753,7 @@ public class ValidateStructureElementUtil { mnemonicPaths = StructureUtil.getMnemonicPathsSystem(holder, false, namingConvention); for (String existingPath : mnemonicPaths) { validateStructuresMnemonicpathDuplicate( - !StringUtils.equals(mnemonicpath, existingPath), + !StringUtils.equals(mnemonicPath, existingPath), type, details, field); } @@ -782,7 +782,7 @@ public class ValidateStructureElementUtil { List<String> mnemonicPaths = StructureUtil.getMnemonicPathsSubsystem(holder, false, namingConvention); for (String existingPath : mnemonicPaths) { validateStructuresMnemonicpathDuplicate( - !StringUtils.equals(mnemonicpath, existingPath), + !StringUtils.equals(mnemonicPath, existingPath), type, details, field); } @@ -824,7 +824,7 @@ public class ValidateStructureElementUtil { // therefore it can not be known to which mnemonic line it belongs // by looking at mnemonic // instead similar approach as for other Type, i.e. compare with list of mnemonic paths - // rest of checks in validatecreate + // rest of checks in validate create validateStructuresMnemonicpathNotValid(path.length == 2, type, details, field); @@ -839,7 +839,7 @@ public class ValidateStructureElementUtil { List<String> mnemonicPaths = StructureUtil.getMnemonicPathsDeviceType(holder, false, namingConvention); for (String existingPath : mnemonicPaths) { validateStructuresMnemonicpathDuplicate( - !StringUtils.equals(mnemonicpath, existingPath), + !StringUtils.equals(mnemonicPath, existingPath), type, details, field); } diff --git a/src/main/java/org/openepics/names/util/ValidateUtil.java b/src/main/java/org/openepics/names/util/ValidateUtil.java index 1919ecdc..7094dcd9 100644 --- a/src/main/java/org/openepics/names/util/ValidateUtil.java +++ b/src/main/java/org/openepics/names/util/ValidateUtil.java @@ -87,12 +87,12 @@ public class ValidateUtil { /** * Validate mnemonic path. * - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path */ - public static void validateInputMnemonicpath(String mnemonicpath) { + public static void validateInputMnemonicPath(String mnemonicPath) { // available - ExceptionUtil.validateConditionInputNotAvailableException(!StringUtils.isEmpty(mnemonicpath), - TextUtil.VALUE_IS_NOT_AVAILABLE, mnemonicpath, TextUtil.MNEMONICPATH); + ExceptionUtil.validateConditionInputNotAvailableException(!StringUtils.isEmpty(mnemonicPath), + TextUtil.VALUE_IS_NOT_AVAILABLE, mnemonicPath, TextUtil.MNEMONICPATH); } /** diff --git a/src/main/java/org/openepics/names/util/old/DeviceNameElementUtil.java b/src/main/java/org/openepics/names/util/old/DeviceNameElementUtil.java index ce1b5216..5c75033b 100644 --- a/src/main/java/org/openepics/names/util/old/DeviceNameElementUtil.java +++ b/src/main/java/org/openepics/names/util/old/DeviceNameElementUtil.java @@ -92,7 +92,7 @@ public class DeviceNameElementUtil { break; } case 1: { - SystemGroup systemGroup = holderSystemDeviceStructure.findSystemGroupByUuid(name.getSystemgroupUuid()); + SystemGroup systemGroup = holderSystemDeviceStructure.findSystemGroupByUuid(name.getSystemGroupUuid()); deviceNameElement.setSystemGroup(systemGroup.getMnemonic()); break; @@ -105,7 +105,7 @@ public class DeviceNameElementUtil { // populate return element for device structure switch (levelDeviceStructure) { case 3: { - DeviceType deviceType = holderSystemDeviceStructure.findDeviceTypeByUuid(name.getDevicetypeUuid()); + DeviceType deviceType = holderSystemDeviceStructure.findDeviceTypeByUuid(name.getDeviceTypeUuid()); DeviceGroup deviceGroup = holderSystemDeviceStructure.findDeviceGroupByUuid(deviceType.getParentUuid()); Discipline discipline = holderSystemDeviceStructure.findDisciplineByUuid(deviceGroup.getParentUuid()); @@ -169,7 +169,7 @@ public class DeviceNameElementUtil { break; } case 1: { - SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(name.getSystemgroupUuid().toString()); + SystemGroup systemGroup = holderIRepositories.getSystemGroupRepository().findLatestByUuid(name.getSystemGroupUuid().toString()); deviceNameElement.setSystemGroup(systemGroup.getMnemonic()); break; @@ -182,7 +182,7 @@ public class DeviceNameElementUtil { // populate return element for device structure switch (levelDeviceStructure) { case 3: { - DeviceType deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(name.getDevicetypeUuid().toString()); + DeviceType deviceType = holderIRepositories.getDeviceTypeRepository().findLatestByUuid(name.getDeviceTypeUuid().toString()); DeviceGroup deviceGroup = holderIRepositories.getDeviceGroupRepository().findLatestByUuid(deviceType.getParentUuid().toString()); Discipline discipline = holderIRepositories.getDisciplineRepository().findLatestByUuid(deviceGroup.getParentUuid().toString()); diff --git a/src/main/resources/static/templates/NameElementCommand.xlsx b/src/main/resources/static/templates/NameElementCommand.xlsx index 04db6c54a4d35f2b81fd79e2827ba481bb54b4d5..bddda9b8c789cd7daf1940ab52342bac678c5cf8 100644 GIT binary patch delta 2039 zcmaKteK-^98^<@pyfmWOW<q(3Od{qrN{Bfm$~z&BIeu&j7p-kL)e$RY8Ykqv&KgaP z6)D5XIw?dg+KO1-Elxs4epuJJ`kg<1&tISCe(vkJpZoh<_kE{Zr&}v|dw`^&06951 z0I$;A@2-+AP<jJcmOyhU3B`dXzEglK<ojtX*i~9`%2I?$Y}6N9c9DMpnQd|Yw5m`^ z81Ymtmu8-JGo1Hx`wZ;xV_j&N4*EN9h4{{CqE?T45N8n?l~Q2AkTK@|q+8<;GSn+Q zRP|Zz)?xuS#v64xvuNK3Isd5s0dPC&cJRf+h0f3X;uf|Ua2X+2mW8@+gjJnqcp<x+ zINK_!0v#dkuDjs!`Q7A8QRg6kxX!UYeDe=(e|fz$%LG0~NE~bpfJ+m8F+-T}#&P4? zvoDV8*@Ok|)vQLF)(&fSf%d!{A$IvIq&8l(-yufk%#Y%R7j3FZue2HBZPRdX53t<i z@hwCi003wM0s#N3*t+qbwUspo;eA)5Q`v<44%fGLD`)VlvCikWNnX84p#j-jvBMe4 z^0M|`cSg`ZUpCEthaO>$O;=S%tMWle7tA&En7EEOCN?^1dV+mT0bOCHn&eesrk~NX zU4iaz^EHvE*5wwC>XY#;bMX?L+i5!1y(bhwYWNFn6KG|-uNkVgFG4>JBuhgJy`#xR zn5*xVzX`#e)xwIF8J)L>owH~;tE&7g2c0NI&x4}{MbGnVU<-F(8K}g>KA#mqe_@B- zP`a1vHx6Y4i<x-3mIpBR4Sr=)dVRor*K4<A*W{u8&f0O_U5Fri$j&W(x}?p<IM(G* zSMkdisx?SIxANLS6~XAAP1V*|lLzEvyXWq|=H*!1^)EWem!=ma;He&TC|JhR>xSuE zJKgTk{omTU1)fVQh7nH-ed?|uJL!q{l2k|xOGNBl8*}#FGM-=a9|5d9+hdWjENcw+ zR1m+U*Qw;__Jrt&P84QhY5U>oD-6|=n3I!4$T|Ln*X1X4`uYP*(dBBjkl)Fp`WAuu zIZow1$i^#}w-0NaFZDb;X&kQcfRr2^gm|2={Cv3vo;}CE(|iY37_t+^V`es}gt(Ik z-r(mL7!gZ}KIP(03r!*?K8!S=#y&I9%93TuvJ*@=4NAuxlI<gpK21)>dOI<dOu(x> zoFMq+=1dln!7Ox~LKA93$idAKG#PF9pxODjmNDh<(71*HLVp&nm&TlXMaf;FcoJ&T zKE~PRx*ja1NKG<Rq35Wg8zDDlh{cO<+tgt3q$l|*@7aB2Uy#ZZQ^xxKXGo9+mKOGm zn4d7OBtAJdoAPN^o_%`ql^0$<^2qTf-!J#zi)m|<OTdAa%xOI`Mzm9-_f)><?xl$* zOT%#X%Orb^x>f)F4o!B1u+hb+5g}vkb_B@Bau(=yC9W@j?Kc?F)6}|ut2I9H&l%~) z{pH+vd%XCVplde57B61I+u01G_nRb8Gx)cL(G~M6KzyaV=6mXq^ZfZNz7Zxi(bn`C z6)4yRvbwprMzvdp2m%EVaN?14!Gua9T<g8>2Q(3SKPJ9<)DgH*Ry5l0XVpOffCv2F zWkogJrb`aRwe5fs2btJZoYBlZ>t0?|@Y(BssaggvbPNRzDCnpAt*v5Td+i$(eH{uB zosVqt_pAp^MKL^_^PnzeX~tD|JnDnGhUK%1V}j~#zV@yFSzFYK6cP+^Cd~u9^e?I* z(9HTuK|XfmQ8~iyG4M%<>UP_#Dc<f;P`xFZLSCyw;%PUP12SSV(=LcP{gjL2P@^S8 zESs$^CC%+gmzvQukZ&c2Df=}Rfn`6o(W@L04`TP{R1!W3vC~a^CjM?kijK^3SCY*r zNRM~SY|w3mR-^lzvvCZm6PezMcmZal{aNm?nhL%>=@CRsKfq-?30J3+K0{8EwBD1k zCI{^`ojM?*dimR4AyC&cZbo-6;oHi+;_}@dEPF5apA0%FJ@(a$Ut<R6ZNta^6R}Io z^ts9{pUM))J)C)Cg(nxsN|!J6TH&j@Kenv-u1amFuKi&8x$k--%aQuG>i=}Ib=V4^ zc0(P=rPFVCC&l_x?u==GgIiqCF*W^X9K3PWK*KnT&{<%pcvZbM-?FDdSGxYDvamfE z?0}IA)G6$#AW{;}pBf_cprG`4pP0HZRw1UPJq4lnn}6qFh{13ZN@I(!wC(|+NWmFC zJh^pEQH@qAQsj%qRde%{>U~jC`b)GFG}-*MJET5HZ#C#@%vin<W#BRHN+P5>e&Xar zhM}_0u&@4Hyv&U5v&tQKcc7HC1k{>qE`CJux!7#5q?MwBGY#vTq#ODcgTGm1;@G_> zHuAp$epIo%o?+4dZRXq7J)&?_1z4M8(DlH&zPI)Ygyp7*%178p0HJOr0bg}b2~?>& zNnldlS$<=nZcY%Y71Bm~W0zA|e2l&x{=Dpl&_Av>)Lf+Yrq7SXq4A>&;4$?Da<|;Z qJsV$1T|>fvJE$;?9h-qRv!gm{r~&U$k85a4UXiM?UjmI9hyM%L1CDwC delta 2041 zcmaKtc{tly7srFx#u8g&NlC4>MHp0QZ5ir)(HEl_J1<^Kkfx=z2US|B^%tWgG4`cO z5kjk_7?g^o4b{jfr7feD)=n{&KJ)aMKi>P-=bm$(d++()=bRIdibo0BT5*8IKs-D= zAWQ$j%k_ftY~UlH>azXFenJ?I`ET?Km%uk~AooS^iI>U;J+T3F{<HZ1aA@(HEytM8 zo~L&fp&hbiQZrj{g>WIoa#-L@(ztUI-o^yYvW-5yoz^Qw+S5k{b@x<d-b$f^e^4Rb zoAaIC+P``LPVKf|vyyGRVw(K4RePW~IcL06{pTAl*Y0UWPZCpgl;CB4$e(Dy2j;Lv zfv_TS2bWJX*flFe&*K%Kv_gZjq4X5bMgFt?adOw)VkP=~xP4rOS@jhGji{3LBK$MG zx0y*u^?S}Pke9H@sk<%Z@y+_4D(|*czewsgUiQ<$pTaBaXO!&!VpuTM2C}u{=IK;; zC_V}TfjZehhx_jZJ2d{igh13)fzfYj3_uWgE9?YHD1LcY4ZIPg!g#TuoJA-m6sE+2 zLLNu+2c*)*ZBLt)hLp9(r4T<c5p{juS?laS`eIO!Y;7_`BxaX}y<8_s$ttuGu^@uc z*D6aViL<MF?k#5$>aCru6QGKbBFRtO_rn%CSE?`7tM$=d-I{I+xW^0YJFi(slf|c$ zkL#x1ja#vatMjnZ=$Vi$#+xS1Jwj>JXUy}VH-;U2BU{z1=`P;Cxd=bMuK+RZ9=drc z0L?Bq=R4~(fV%UMIQSLGTc}xMPFW4itFd}H!0@_!Hob&J@RpwFDB)>~XY?4Ukf~XY zVYB^`f2enq`{al*cceRf{{6r;^(KBS(Y3iNJ52e}?P?$v4y^D-%(Lk|`qdI=JDf91 zmog?l)((rV{5sH;gdG$~PE_HHuBs>BSHOr*H!~BnprjHnHI5)m_oc4KX^bKfjH?1p zMllitvE&Oe#kJ(-)DTb=BkUGUnItKSxbS)#S7&T5a~NqC5d47T9$=2e|5P3+;6C#F z{?C=fi?yZM8&#Ed@@v!Ms^i?Xp6+>$$=Fscs@6izf4}0CA69cJIq?$KF<uz3Q?_vd zgN>R!Dv|Hy>}L0JUC6M2Rdg@#+>rB!gt?VJy_Uz=-4@K=+xN;tb6DppxD?kuFs{CY zNC$_%e_oBk)bFHjQ<n&v`2MDD<Uqqz#;CaU^yKpPjk?;Vop*ZUciKy9-p*7>!awtp zHr!SRUx!H!B`Q!j8J>OWJk;reNe}5*^5$5lG&Cf#mnb}WeYkL41~NZ%!!mU3i;RoE z;mF+$NY|Xxr;M9jDJ5MN<H#!e^Bsz}4M*opb^ARoeAug*IqQ3H3hzrr?XkVdyoihY z{an%Ok?{Sri3k~lQs{wND3CCrxiM8t^cZ44J)8S1<N|Kjg*7;{<sAA-nIzMkn-CI} z9FjclF+6iFuPzo5EWV{lsoQ(&MWT3<JfXDtq(zK3%zkH8o7E#p@c@uqtgrkmeapxw z{pG$lW=qvsq+z(>0kD(KG8a)4ZOLU@I`m_Pmdd<H?K~6JZFVo(*^Vl!?}v-FFb)vN zQv9El1!#!M<6UjK&WOcrI_W%VCWdMNjqb(&v(eCcbGJt?i7JR7f?D^Y16xNCON%k$ zZC(1ALxT6yuX|B~!xH|LUCg6{O=37COggScq{@BFgFXn=5u4)?r1!UyVf`?^hcqp( zr(p40XBL(9IGGVx<(_n`iB>K+MeyC@`qXVu$Sr{xyzv8ea@jmsZN*x1=n71NBr8mj z<Alr6$Hv^_rzC=G3!io=$ZicSbg14~HK}kz<*Zq7=+*e+uE5Es@9ypyy~!}Zv>125 z3AuiHLF(bHs)CgRoE0qg)ilJl7+y5u8BQ$?qPE<vCO4Ho9|YU5PfUONE5)ynNq;@C zZ61LyX##(a;Fr{Ed8JfofU}cG*x>lBY;)w*YEXK=I=ul!`Q7)4oKKW-+3YkmBuaWX zoK^=cI;r$EE*MO0Fhh6O1z4Nf0%sT=J5o_QZu`5&?~zBUzZe$)+aLBa0{cHz|GSwT zf)EH86f?r_zC#+)JR1rc`vs?NHkO+^*cJ2hH>3022}Z5WF?Sk-@`SCOIS>YD6U>f@ z(Ub70lB7(<L|z25cg|6QyN#QU&SENsb1mo+RMyW2r<h)iXo_KY$<@AS=+HFRWH(!? zH3^fg75v<8>%BeSR=1e0@mYD^<b1cBZ6em&UmkByVVG2#-}lu1@`;>H?pEOa<2e?x z{82i>ZUA^qP1BiS;1Q&@$bluUowY8=%I%NuKlu?YXLUO^>qH}?NAewQ%=127SaFiy zQc~OFJW4+VBHg-um>}u@wsX<L2w$uZzz6L(8Fj<Z!EepISVH&M1WZWipMZp<-U--C zUOItNN%RT)DQU)gG*XX;2%smW4?o%wO30V14)4FkbtLrnYYfPcf*;3xUmURSLqJaf ux|Ax<(K$z72^>g4*<=AI?9A~+$LRsauv2VQzySt7c|`=w@B|*gEdB!5UY3yn diff --git a/src/main/resources/static/templates/StructureElementCommand.xlsx b/src/main/resources/static/templates/StructureElementCommand.xlsx index c85d544f9f7119f0a945bd81af6084fe2e539a7a..4f0b0b720089e3491e9350cd19c5f9d1480cc220 100644 GIT binary patch delta 1461 zcmZp){Aa-z;LXe;!ob17!SG_SQP@U4WkwbdW3wrv5fg-!&HNt9ieux2%I332vp{6e zaf?C4Uhu$VfAY#fbWD~O(5;W|pKT%1aQ}O_!go`HXJTq49-*bCuMWp8d0X<m@QH-_ zj^vz{xh*f(-%oZ9+BDVb^9HX<1*L;_;<umws4;r@E;gL|{eh^nQ*{C)5}p`(hMs)7 z&SAd%yT8#-GM!UATPCe>IPbH#{B``hHPSUp&+)U~+HQ1xOOoluy0e+9x7?DNU%$%A z{t6Rs*(>+5tldwi@NS>%{+)~eT433{M-q?1cgTcBFZy~{@w#Z{jLN(j$4@iamPy$4 zs~r;jw1P?b?0%;sfjf>=Jgl3zyy&jPgvi-#Ggdi#b^79EXe4t>_VshawN**?#E&jD zJI{1%&CW#KT^qfuyS8V0o}6it=lW`;!!bYC`l(ZTq;?--+InG=ocZF?`OO84JFY3~ z6rFBe;I(3#L;ki83vawz80-Af?HzkfvEYVNodT~;s4fW>$;h_76C}NKXXB$2C*8C+ zn!m~Qy(K$+UqbX`_e3d|%w#{O#j|9bzn}09e)`ae*XTuP&wDL{eY_hsUp-~NZOO;G zB0F0SRaJke=Y8Gdud+5|_VqnFtQ<R^N$c&XJf}Uupz_wXAX(e!^=7`(zTe*p+!Xlg zCh+UZ^6Sr-nzUy&{<)g9UQ%?9UGFD`z>h@*y$ZT!njg1)mn(ZW<%~t-GL=GyEd^U& zWjqfuxbE@9sa-cs_5Stb)`TMSYdx<PhE_*Lee&{>I<Ze7Z+-plKg}CbKWZBu`Ca^( z)v2N&`=7I9bX4rW-BugwcdWEKurBlYN6xNqL7(nDEs@pRqY+neBlhB<&x`-b-M>30 zcg@#(E2=$i{hG&dcFsE$#<$Elm+rr3y?^p+bJm(N70EC1zwhM-$g4N^r#J7vQrNrp zhFMNSK=9T#uFkhj&llFO{!uS^^FQlNm7e|1*N!{Rs5|_P<<)_=ToUs){`I`!X1lHK z#g46OdEQCJ1V1pFvvaT5_R|J`E(Y#C)f8$qf9vH2Gr9R&J@3yv6)1i7L>%|c=si_0 zSDX#2Ek9ru!?xXcn?3jKCy&<nzBT@IsM*hoHSh7v+u4QENptqH<Vmr8JoDCMhi{ht zj#ww{IA8WVDQw@f9=QGZ{XOtMt2t+w@s7(3<&}(iX$O6mG3Qw|SDO|H|9KRx`J=u2 zx%<=33A1A-NZ$%Sd9&n1?7pr$v)75eu4fGJX6KOjc;DTFnSp^xnt=f|_ikP<+y}{w zlO09%>V2cPH3dj*$-KpxX<d@BUCTS>#1ws1O|AcRj3y6k=D)dqE%~?VYtPkh80<W< zqe4VgPaP=GUUGBmi_O)ir)zLelsq`a^ui)#mMzQppB#>6xAWqNRGM*NQEg9NYvF_H z3pyezbA!@1#BHA8wf}ILgi3q(X?I?=N4s>Sd4gG#9iG&`<8l#y^h)4Ax9GI_@3?Qj zdm+?6iEm4=4wLGSX=P?cS3P;RWKF7Ddt!63SCQCc)e`0XwtME6KX5hF7jw0}?P2Wq z_xh%nvyZ>YTi|d1hoQeB?p&PPN|!j{8h-1E+r`&sehrzTd5*bW>Y#b_OMOtta3$wo z_{G4$Fq;t+GCary+vG~IE06*!Q2ZP;jFcr!!9tT`BrPF~nUdxZ#uZ6l2t!rM3Bt&h za)B^5OW8pfU!|;gK}97zJ|^2p+d!mhq@@_=O`a~TzyVSKa@OSi(qfDTldnn3%Y%d- sUSnvO4s_{9AQlE<1jv{yBBKN`#Y#qs$w7Q_ytwG(Y#9MI0ZEW50MM|Nb^rhX delta 1562 zcmexo(P+sR;LXe;!ob17!SFOKFmxlIG9wF!vDuW-hzY{VW_}N4#j){1W%JpiSs=3K zxW%AiFL+?GKY8UKIwngC=+=AZ-?k8Fc>h<Fsd}qS5WjYqvbbyag7z};8_RYdZ<v<R z&Fjjgl&k&stM!r;_j^pfeBAErlAB!5H9z5b&YXI8PrmlUw~>o?PLfnA?y*rT4lUSu z_QLnw(f_3?Zv{jKEL1stLHY8Fzpu{rmNu`y^3u+Ex7#u+{YclX@gMgDM&<U@&tI)| zH=OBf*{kxhtj!NCU+25`e`A$fbM|It7xO{=0?QT499GY+UF98R{5it7UtDrmzG2Nf z-v;I<Pq}(b{&Nblr!;;%^H<4#=`J&c&1R;iscoxfzL=7faASM)wX?}mUk~h&@AA%- zW9^A7JS<g`I<-tB|MrC@<IFo<SDf2==GJS42W`4@Lo{tg<Fv0kq}KcvY2iMw^<Cmb zX+4*9Em=li%9!WN+_v44t#RkX-G==0OktX$PO>{%O1gM**R)4xtu-+ZkkO3IRxNAW zyE<d@(@Wwx$(I_Ad{$U@HZUV(Zqf_6io{b>bRJbQ?Va>7m-E>5;x{>4Kk@Uftu=Sm zTDaj}{oC5ZQICUXPG9Az9Vf!n67$(q{Ep2sRgW1qdC?2`=B*8%y=?2ba$osK`L9tI z{w(xff0mUc+<^J#>MMSmV?O*zoWS1ECB8SCA#<ZAr}^CS{l&*q+Ab<Bo5;MVadjZO z_4KBlY)ax*IfmLl)=6oxOuoG^Er7rG*2zPY!k=tud&6D->f0_~d#-4)`70LQoBvu~ z;LzOY&+?~kT*|t<KI{Cyhs*wO>|QqaxVgry;*;#tFN@BsbhP-qVRzHa=j?ZF_w2N~ z8S#2<;PweyuIh@;vb-C}bj$k2lKu7^`=+k84vl{6aOt&u`Ck11dH3e?>dpJFB(|=- zVV2Vn5IpsbOYLn_|3drv&_6A2{x{{g9EzXt_2Zl){x_IbJmI{ps$duR+v^IO>{h$N z8@IxkzO$?|Oz>9A(Qkd*G~xc-EvHlV^(<dpCUc?f@M5!9R>_u`&73#A6{~xvpP#$s z<fXZ5ZMUWv?w_}!RyS+$=EY{){7)G3TYZ$+z^e{4LieCWW#8=?XAV~|mDkHWIF|lE zZ-J=ZapydfiPeTh%zs|LUh#jD^jupF|0ny@c6J*V347<6$Q3>Aywg2V`eFKguY>V1 zMvc~d1(S^nI%_A->0!TfwEMu`EbWcI!~?w9Ic8nHq~*=bz`!WYz<`>88IXV=ke!mh zd7p3%B!^D66V<EtjNZn#&?MvX7U4@}FD~STPTMhI<<Edgi$1*<cVIsEBW3?Kx!d}& zzEvl_J!syv%u!V@fXyvp<(X}c@o%g5IYf5c@vw_v=CyKg(EjFNzqj<k;-(3zO`N>9 zj=q@I!m^S1EVEzkWUIYjXB`jurMt0qJ<Fa*!z_b|A+CYKGn6Dajq1zA6|97(|E|yv zi7MQqpL46(+r};WLf!*G3DxUcwoc?<d+ER_tC!Qe_F0%~98BKSvi53!d;ev=Pd(3f z9J`vc_KZd8{q9|><u}i6)cgB^TWM0IVYTd4h0k4+qHj#xV_ALnlzPk(3*JB3Q(|&c z>p@|)RN?l5U%-%<%?JuB9^}$)a+%l_NGawgehwN&3X-N^p~;bwmJr4?NplF}qNFc` zp(N!5VPr_TKo}dO>>!L!QdYd6@)I6IlP#rf<Ut~toQIwS1KrTg#J~WG83b53d5W|` zEJzKqTLlmbfGlHCP+TSl6y+Bb>n9cz=vCzA1b8zti7+4v?}yhI8m0r)egtA+6y4dA f1!a`LuDHP*(AN)ig+DvG8t2JDGHPtXk|2!$XhD&A diff --git a/src/test/java/org/openepics/names/docker/ITUtilNameElement.java b/src/test/java/org/openepics/names/docker/ITUtilNameElement.java index b40d692d..d5cd9249 100644 --- a/src/test/java/org/openepics/names/docker/ITUtilNameElement.java +++ b/src/test/java/org/openepics/names/docker/ITUtilNameElement.java @@ -152,10 +152,10 @@ public class ITUtilNameElement { * * @param actual name element * @param expectedUuid expected uuid - * @param expectedParentSystemstructure expected parent system structure uuid (system group, system, subsystem) - * @param expectedParentDevicestructure parent device structure uuid (device type) - * @param expectedSystemstructure expected system structure - * @param expectedDevicestructure expected device structure + * @param expectedParentSystemStructure expected parent system structure uuid (system group, system, subsystem) + * @param expectedParentDeviceStructure parent device structure uuid (device type) + * @param expectedSystemStructure expected system structure + * @param expectedDeviceStructure expected device structure * @param expectedIndex expected index * @param expectedName expected name * @param expectedDescription expected description @@ -166,17 +166,17 @@ public class ITUtilNameElement { * @param expectedComment expected comment */ static void assertContent(NameElement actual, - UUID expectedUuid, UUID expectedParentSystemstructure, UUID expectedParentDevicestructure, - String expectedSystemstructure, String expectedDevicestructure, + UUID expectedUuid, UUID expectedParentSystemStructure, UUID expectedParentDeviceStructure, + String expectedSystemStructure, String expectedDeviceStructure, String expectedIndex, String expectedName, String expectedDescription, Status expectedStatus, Boolean expectedIsLatest, Boolean expectedIsDeleted, String expectedWho, String expectedComment) { assertNotNull(actual); assertEquals(expectedUuid, actual.getUuid()); - assertEquals(expectedParentSystemstructure, actual.getParentsystemstructure()); - assertEquals(expectedParentDevicestructure, actual.getParentdevicestructure()); - assertEquals(expectedSystemstructure, actual.getSystemstructure()); - assertEquals(expectedDevicestructure, actual.getDevicestructure()); + assertEquals(expectedParentSystemStructure, actual.getParentSystemStructure()); + assertEquals(expectedParentDeviceStructure, actual.getParentDeviceStructure()); + assertEquals(expectedSystemStructure, actual.getSystemStructure()); + assertEquals(expectedDeviceStructure, actual.getDeviceStructure()); assertEquals(expectedIndex, actual.getIndex()); assertEquals(expectedName, actual.getName()); assertEquals(expectedDescription, actual.getDescription()); @@ -198,8 +198,8 @@ public class ITUtilNameElement { assertNotNull(actual); if (expected != null) { assertEquals(expected.getUuid(), actual.getUuid()); - assertEquals(expected.getParentsystemstructure(), actual.getParentsystemstructure()); - assertEquals(expected.getParentdevicestructure(), actual.getParentdevicestructure()); + assertEquals(expected.getParentSystemStructure(), actual.getParentSystemStructure()); + assertEquals(expected.getParentDeviceStructure(), actual.getParentDeviceStructure()); assertEquals(expected.getIndex(), actual.getIndex()); assertEquals(expected.getDescription(), actual.getDescription()); assertEquals(expected.getComment(), actual.getComment()); @@ -351,7 +351,7 @@ public class ITUtilNameElement { try { String[] response = null; - response = ITUtil.doGetJson(ITUtil.HTTP_IP_PORT_NAMING_API_V1_NAMES + "/islegacy/" + name); + response = ITUtil.doGetJson(ITUtil.HTTP_IP_PORT_NAMING_API_V1_NAMES + "/isLegacy/" + name); ITUtil.assertResponseLength2CodeOK(response); ITUtil.assertEqualsResponseBoolean(mapper.readValue(response[1], ResponseBoolean.class), expected); } catch (IOException e) { @@ -371,7 +371,7 @@ public class ITUtilNameElement { try { String[] response = null; - response = ITUtil.doGetJson(ITUtil.HTTP_IP_PORT_NAMING_API_V1_NAMES + "/isvalidtocreate/" + name); + response = ITUtil.doGetJson(ITUtil.HTTP_IP_PORT_NAMING_API_V1_NAMES + "/isValidToCreate/" + name); ITUtil.assertResponseLength2CodeOK(response); ITUtil.assertEqualsResponseBoolean(mapper.readValue(response[1], ResponseBoolean.class), expected); } catch (IOException e) { @@ -511,13 +511,13 @@ public class ITUtilNameElement { String validatePath = ""; switch (nameCommand) { case CREATE: - validatePath = "/validatecreate"; + validatePath = "/validateCreate"; break; case UPDATE: - validatePath = "/validateupdate"; + validatePath = "/validateUpdate"; break; case DELETE: - validatePath = "/validatedelete"; + validatePath = "/validateDelete"; break; default: break; diff --git a/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java b/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java index 00f69e36..181fd5b1 100644 --- a/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java +++ b/src/test/java/org/openepics/names/docker/ITUtilStructureElement.java @@ -157,7 +157,7 @@ public class ITUtilStructureElement { * @param expectedParent expected parent * @param expectedName expected name * @param expectedMnemonic expected mnemonic - * @param expectedMnemonicpath expected mnemonic path + * @param expectedMnemonicPath expected mnemonic path * @param expectedLevel expected level * @param expectedDescription expected description * @param expectedStatus expected status @@ -168,7 +168,7 @@ public class ITUtilStructureElement { */ static void assertContent(StructureElement actual, Type expectedType, UUID expectedUuid, UUID expectedParent, - String expectedName, String expectedMnemonic, String expectedMnemonicpath, Integer expectedLevel, + String expectedName, String expectedMnemonic, String expectedMnemonicPath, Integer expectedLevel, String expectedDescription, Status expectedStatus, Boolean expectedIsLatest, Boolean expectedIsDeleted, String expectedWho, String expectedComment) { assertNotNull(actual); @@ -177,7 +177,7 @@ public class ITUtilStructureElement { assertEquals(expectedParent, actual.getParent()); assertEquals(expectedName, actual.getName()); assertEquals(expectedMnemonic, actual.getMnemonic()); - assertEquals(expectedMnemonicpath, actual.getMnemonicpath()); + assertEquals(expectedMnemonicPath, actual.getMnemonicPath()); assertEquals(expectedLevel, actual.getLevel()); assertEquals(expectedDescription, actual.getDescription()); assertEquals(expectedStatus, actual.getStatus()); @@ -313,25 +313,25 @@ public class ITUtilStructureElement { * Utility method to check if structure exists. * * @param type type - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path * @param expected expected response */ - public static void assertExists(Type type, String mnemonicpath, Boolean expected) { - assertExists(type, mnemonicpath, expected, null); + public static void assertExists(Type type, String mnemonicPath, Boolean expected) { + assertExists(type, mnemonicPath, expected, null); } /** * Utility method to check if structure exists. * * @param type type - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path * @param expected expected response * @param expectedMessageEmpty expected message empty */ - public static void assertExists(Type type, String mnemonicpath, Boolean expected, Boolean expectedMessageEmpty) { + public static void assertExists(Type type, String mnemonicPath, Boolean expected, Boolean expectedMessageEmpty) { try { String[] response = null; - response = ITUtil.doGetJson(ITUtil.HTTP_IP_PORT_NAMING_API_V1_STRUCTURES + "/exists/" + type.toString() + "/" + mnemonicpath); + response = ITUtil.doGetJson(ITUtil.HTTP_IP_PORT_NAMING_API_V1_STRUCTURES + "/exists/" + type.toString() + "/" + mnemonicPath); ITUtil.assertResponseLength2CodeOK(response); if (expectedMessageEmpty != null) { ITUtil.assertEqualsResponseBoolean(mapper.readValue(response[1], ResponseBoolean.class), expected, expectedMessageEmpty); @@ -350,14 +350,14 @@ public class ITUtilStructureElement { * Method will not produce a message. * * @param type type - * @param mnemonicpath mnemonic path + * @param mnemonicPath mnemonic path * @param expected expected response */ - public static void assertIsValidToCreate(Type type, String mnemonicpath, Boolean expected) { + public static void assertIsValidToCreate(Type type, String mnemonicPath, Boolean expected) { try { String[] response = null; - response = ITUtil.doGetJson(ITUtil.HTTP_IP_PORT_NAMING_API_V1_STRUCTURES + "/isvalidtocreate/" + type.toString() + "/" + mnemonicpath); + response = ITUtil.doGetJson(ITUtil.HTTP_IP_PORT_NAMING_API_V1_STRUCTURES + "/isValidToCreate/" + type.toString() + "/" + mnemonicPath); ITUtil.assertResponseLength2CodeOK(response); ITUtil.assertEqualsResponseBoolean(mapper.readValue(response[1], ResponseBoolean.class), expected); } catch (IOException e) { @@ -464,22 +464,22 @@ public class ITUtilStructureElement { String validatePath = ""; switch (structureCommand) { case CREATE: - validatePath = "/validatecreate"; + validatePath = "/validateCreate"; break; case UPDATE: - validatePath = "/validateupdate"; + validatePath = "/validateUpdate"; break; case DELETE: - validatePath = "/validatedelete"; + validatePath = "/validateDelete"; break; case APPROVE: - validatePath = "/validateapprove"; + validatePath = "/validateApprove"; break; case CANCEL: - validatePath = "/validatecancel"; + validatePath = "/validateCancel"; break; case REJECT: - validatePath = "/validatereject"; + validatePath = "/validateReject"; break; default: break; diff --git a/src/test/java/org/openepics/names/docker/NamesIT.java b/src/test/java/org/openepics/names/docker/NamesIT.java index 1358774a..04d40486 100644 --- a/src/test/java/org/openepics/names/docker/NamesIT.java +++ b/src/test/java/org/openepics/names/docker/NamesIT.java @@ -321,7 +321,7 @@ class NamesIT { // convention name exists // already exists since create subsystem was approved - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); // ---------- @@ -334,14 +334,14 @@ class NamesIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); ITUtilNameElement.assertCreate(nameElement, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - nameElement.setParentdevicestructure(deviceTypeRFA); + nameElement.setParentDeviceStructure(deviceTypeRFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.TRUE); // ---------- - nameElement.setParentsystemstructure(null); + nameElement.setParentSystemStructure(null); nameElement.setIndex(null); - nameElement.setParentdevicestructure(null); + nameElement.setParentDeviceStructure(null); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); ITUtilNameElement.assertCreate(nameElement, ITUtil.HTTP_UNPROCESSABLE_ENTITY); @@ -354,7 +354,7 @@ class NamesIT { // convention name exists // already exists since create system was approved - nameElement.setParentsystemstructure(systemRFQ); + nameElement.setParentSystemStructure(systemRFQ); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); // ---------- @@ -367,14 +367,14 @@ class NamesIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); ITUtilNameElement.assertCreate(nameElement, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - nameElement.setParentdevicestructure(deviceTypeRFA); + nameElement.setParentDeviceStructure(deviceTypeRFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.TRUE); // ---------- - nameElement.setParentsystemstructure(null); + nameElement.setParentSystemStructure(null); nameElement.setIndex(null); - nameElement.setParentdevicestructure(null); + nameElement.setParentDeviceStructure(null); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); ITUtilNameElement.assertCreate(nameElement, ITUtil.HTTP_UNPROCESSABLE_ENTITY); @@ -387,7 +387,7 @@ class NamesIT { // convention name exists // already exists since create system group was approved - nameElement.setParentsystemstructure(systemGroupAcc); + nameElement.setParentSystemStructure(systemGroupAcc); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); // ---------- @@ -400,17 +400,17 @@ class NamesIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); ITUtilNameElement.assertCreate(nameElement, ITUtil.HTTP_UNPROCESSABLE_ENTITY); - nameElement.setParentdevicestructure(deviceTypeTT); + nameElement.setParentDeviceStructure(deviceTypeTT); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.TRUE); - nameElement.setParentdevicestructure(deviceTypeRFA); + nameElement.setParentDeviceStructure(deviceTypeRFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.TRUE); // ---------- - nameElement.setParentsystemstructure(null); + nameElement.setParentSystemStructure(null); nameElement.setIndex(null); - nameElement.setParentdevicestructure(null); + nameElement.setParentDeviceStructure(null); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); ITUtilNameElement.assertCreate(nameElement, ITUtil.HTTP_UNPROCESSABLE_ENTITY); @@ -423,10 +423,10 @@ class NamesIT { // convention name exists // already exists since create system was approved - nameElement.setParentsystemstructure(systemRFQ); + nameElement.setParentSystemStructure(systemRFQ); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); - nameElement.setParentdevicestructure(deviceTypeRFA); + nameElement.setParentDeviceStructure(deviceTypeRFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, Boolean.FALSE); nameElement.setIndex("051"); @@ -549,30 +549,30 @@ class NamesIT { // ---------- - nameElement.setParentsystemstructure(null); + nameElement.setParentSystemStructure(null); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.FALSE); - nameElement.setParentsystemstructure(systemGroupAcc); + nameElement.setParentSystemStructure(systemGroupAcc); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.TRUE); - nameElement.setParentsystemstructure(null); + nameElement.setParentSystemStructure(null); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.FALSE); - nameElement.setParentsystemstructure(systemRFQ); + nameElement.setParentSystemStructure(systemRFQ); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.TRUE); - nameElement.setParentsystemstructure(null); + nameElement.setParentSystemStructure(null); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.FALSE); // subsystemN1U1 used in isLegacyName but not here // order of tests not guaranteed - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.TRUE); // ---------- - nameElement.setParentdevicestructure(null); + nameElement.setParentDeviceStructure(null); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.FALSE); // convention name exists @@ -583,16 +583,16 @@ class NamesIT { nameElement.setIndex("053"); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.FALSE); - nameElement.setParentdevicestructure(deviceGroupEMR); + nameElement.setParentDeviceStructure(deviceGroupEMR); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.FALSE); - nameElement.setParentdevicestructure(deviceTypeFS); + nameElement.setParentDeviceStructure(deviceTypeFS); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.TRUE); - nameElement.setParentdevicestructure(deviceTypeTT); + nameElement.setParentDeviceStructure(deviceTypeTT); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.TRUE); - nameElement.setParentdevicestructure(deviceTypeRFA); + nameElement.setParentDeviceStructure(deviceTypeRFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.UPDATE, Boolean.TRUE); nameElement.setIndex(null); @@ -701,24 +701,24 @@ class NamesIT { // system structure not used for validation - nameElement.setParentsystemstructure(systemGroupAcc); + nameElement.setParentSystemStructure(systemGroupAcc); ITUtilNameElement.assertValidate(nameElement, NameCommand.DELETE, Boolean.TRUE); - nameElement.setParentsystemstructure(null); + nameElement.setParentSystemStructure(null); ITUtilNameElement.assertValidate(nameElement, NameCommand.DELETE, Boolean.TRUE); - nameElement.setParentsystemstructure(systemRFQ); + nameElement.setParentSystemStructure(systemRFQ); ITUtilNameElement.assertValidate(nameElement, NameCommand.DELETE, Boolean.TRUE); - nameElement.setParentsystemstructure(null); + nameElement.setParentSystemStructure(null); ITUtilNameElement.assertValidate(nameElement, NameCommand.DELETE, Boolean.TRUE); - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); ITUtilNameElement.assertValidate(nameElement, NameCommand.DELETE, Boolean.TRUE); // device type not used for validation - nameElement.setParentdevicestructure(deviceTypeRFA); + nameElement.setParentDeviceStructure(deviceTypeRFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.DELETE, Boolean.TRUE); // index not used for validation @@ -864,7 +864,7 @@ class NamesIT { try { // read & search - // deleted, uuid, name, nameequivalence, systemstructure, devicestructure, index, description + // deleted, uuid, name, nameEquivalence, systemStructure, deviceStructure, index, description // combination ITUtilNameElement.assertRead("", 8, -1); @@ -878,17 +878,17 @@ class NamesIT { ITUtilNameElement.assertRead("?name=RFQ-010%", 8, -1); ITUtilNameElement.assertRead("?name=RFQ-10%", 0); - ITUtilNameElement.assertRead("?nameequivalence=RFQ-10%", 8, -1); + ITUtilNameElement.assertRead("?nameEquivalence=RFQ-10%", 8, -1); - ITUtilNameElement.assertRead("?systemstructure=RFQ-010", 6, -1); - ITUtilNameElement.assertRead("?systemstructure=RFQ-0", 0); - ITUtilNameElement.assertRead("?systemstructure=RFQ-0__", 6, -1); - ITUtilNameElement.assertRead("?systemstructure=RFQ-N1U1", 0, -1); + ITUtilNameElement.assertRead("?systemStructure=RFQ-010", 6, -1); + ITUtilNameElement.assertRead("?systemStructure=RFQ-0", 0); + ITUtilNameElement.assertRead("?systemStructure=RFQ-0__", 6, -1); + ITUtilNameElement.assertRead("?systemStructure=RFQ-N1U1", 0, -1); - ITUtilNameElement.assertRead("?devicestructure=EMR-FS", 6, -1); - ITUtilNameElement.assertRead("?devicestructure=EMR-F", 0); - ITUtilNameElement.assertRead("?devicestructure=EMR-F_", 6, -1); - ITUtilNameElement.assertRead("?devicestructure=EMR-TT", 0); + ITUtilNameElement.assertRead("?deviceStructure=EMR-FS", 6, -1); + ITUtilNameElement.assertRead("?deviceStructure=EMR-F", 0); + ITUtilNameElement.assertRead("?deviceStructure=EMR-F_", 6, -1); + ITUtilNameElement.assertRead("?deviceStructure=EMR-TT", 0); ITUtilNameElement.assertRead("?index=003", 1); @@ -898,7 +898,7 @@ class NamesIT { ITUtilNameElement.assertRead("?description=updated description%", 1, -1); ITUtilNameElement.assertRead("?description=updated description again", 1); - ITUtilNameElement.assertRead("?nameequivalence=RFQ-10%&devicestructure=EMR-FS", 6, -1); + ITUtilNameElement.assertRead("?nameEquivalence=RFQ-10%&deviceStructure=EMR-FS", 6, -1); // name or uuid // /{name} @@ -915,18 +915,18 @@ class NamesIT { ITUtilNameElement.assertRead("/RFQ-010:EMR-FS-0%", 6, -1); // system structure mnemonic path - // /systemstructure/{mnemonicpath} - ITUtilNameElement.assertRead("/systemstructure/RFQ-010", 6, -1); - ITUtilNameElement.assertRead("/systemstructure/RFQ-0", 0); - ITUtilNameElement.assertRead("/systemstructure/RFQ-0__", 6, -1); - ITUtilNameElement.assertRead("/systemstructure/RFQ-N1U1", 0, -1); + // /systemStructure/{mnemonicPath} + ITUtilNameElement.assertRead("/systemStructure/RFQ-010", 6, -1); + ITUtilNameElement.assertRead("/systemStructure/RFQ-0", 0); + ITUtilNameElement.assertRead("/systemStructure/RFQ-0__", 6, -1); + ITUtilNameElement.assertRead("/systemStructure/RFQ-N1U1", 0, -1); // device structure mnemonic path - // /devicestructure/{mnemonicpath} - ITUtilNameElement.assertRead("/devicestructure/EMR-FS", 6, -1); - ITUtilNameElement.assertRead("/devicestructure/EMR-F", 0); - ITUtilNameElement.assertRead("/devicestructure/EMR-F_", 6, -1); - ITUtilNameElement.assertRead("/devicestructure/EMR-TT", 0); + // /deviceStructure/{mnemonicPath} + ITUtilNameElement.assertRead("/deviceStructure/EMR-FS", 6, -1); + ITUtilNameElement.assertRead("/deviceStructure/EMR-F", 0); + ITUtilNameElement.assertRead("/deviceStructure/EMR-F_", 6, -1); + ITUtilNameElement.assertRead("/deviceStructure/EMR-TT", 0); // history // /history/{uuid} diff --git a/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java b/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java index 0f39e6ad..00438e6e 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDeviceGroupIT.java @@ -998,9 +998,9 @@ class StructuresDeviceGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rsha", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1026,9 +1026,9 @@ class StructuresDeviceGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rsha", 0); ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); @@ -1081,9 +1081,9 @@ class StructuresDeviceGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rshc", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1109,9 +1109,9 @@ class StructuresDeviceGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rshc", 0); ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); @@ -1164,9 +1164,9 @@ class StructuresDeviceGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rshr", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1192,9 +1192,9 @@ class StructuresDeviceGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rshr", 0); ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1); @@ -1775,34 +1775,34 @@ class StructuresDeviceGroupIT { // read & search // /{type} - // type, statuses, deleted, uuid, parentuuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // type, statuses, deleted, uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description // combination - ITUtilStructureElement.assertRead("/DEVICEGROUP?mnemonicpath=Di2", 30); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&mnemonicpath=Di2", 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&mnemonicpath=Di2", 20); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&mnemonicpath=Di2", 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&mnemonicpath=Di2", 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&statuses=APPROVED&mnemonicpath=Di2", 25); - - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&mnemonicpath=Di2", 15); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=PENDING&mnemonicpath=Di2", 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=APPROVED&mnemonicpath=Di2", 15); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=CANCELLED&mnemonicpath=Di2", 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=REJECTED&mnemonicpath=Di2", 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=PENDING&statuses=APPROVED&mnemonicpath=Di2", 15); - - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&mnemonicpath=Di2", 15); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=PENDING&mnemonicpath=Di2", 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=APPROVED&mnemonicpath=Di2", 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=CANCELLED&mnemonicpath=Di2", 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=REJECTED&mnemonicpath=Di2", 5); - ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=PENDING&statuses=APPROVED&mnemonicpath=Di2", 10); - - ITUtilStructureElement.assertRead("/DEVICEGROUP?uuid=" + discipline2Uuid.toString(), 0); - ITUtilStructureElement.assertRead("/DEVICEGROUP?uuid=" + uuid.toString(), 1); - - ITUtilStructureElement.assertRead("/DEVICEGROUP?parentuuid=" + discipline2Uuid.toString(), 45, -1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?parentuuid=" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?mnemonicPath=Di2", 30); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&mnemonicPath=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=APPROVED&mnemonicPath=Di2", 20); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=CANCELLED&mnemonicPath=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=REJECTED&mnemonicPath=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?statuses=PENDING&statuses=APPROVED&mnemonicPath=Di2", 25); + + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&mnemonicPath=Di2", 15); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=PENDING&mnemonicPath=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=APPROVED&mnemonicPath=Di2", 15); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=CANCELLED&mnemonicPath=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=REJECTED&mnemonicPath=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=false&statuses=PENDING&statuses=APPROVED&mnemonicPath=Di2", 15); + + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&mnemonicPath=Di2", 15); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=PENDING&mnemonicPath=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=APPROVED&mnemonicPath=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=CANCELLED&mnemonicPath=Di2", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=REJECTED&mnemonicPath=Di2", 5); + ITUtilStructureElement.assertRead("/DEVICEGROUP?deleted=true&statuses=PENDING&statuses=APPROVED&mnemonicPath=Di2", 10); + + ITUtilStructureElement.assertRead("/DEVICEGROUP?uuid=" + discipline2Uuid.toString(), 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?uuid=" + uuid.toString(), 1); + + ITUtilStructureElement.assertRead("/DEVICEGROUP?parent=" + discipline2Uuid.toString(), 45, -1); + ITUtilStructureElement.assertRead("/DEVICEGROUP?parent=" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/DEVICEGROUP?name=na", 0); ITUtilStructureElement.assertRead("/DEVICEGROUP?name=na_", 0); @@ -1811,7 +1811,7 @@ class StructuresDeviceGroupIT { ITUtilStructureElement.assertRead("/DEVICEGROUP?name=na%", 45, -1); ITUtilStructureElement.assertRead("/DEVICEGROUP?name=name", 45, -1); - ITUtilStructureElement.assertRead("/DEVICEGROUP?mnemonicequivalence=A__", 0); + ITUtilStructureElement.assertRead("/DEVICEGROUP?mnemonicEquivalence=A__", 0); ITUtilStructureElement.assertRead("/DEVICEGROUP?mnemonic=A__", 0); @@ -1825,7 +1825,7 @@ class StructuresDeviceGroupIT { // children // /children/{uuid} - // uuid, type, statuses, deleted, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // uuid, type, statuses, deleted, name, mnemonic, mnemonicEquivalence, mnemonicPath, description ITUtilStructureElement.assertRead("/children/" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/children/" + discipline2Uuid.toString(), 15, -1); ITUtilStructureElement.assertRead("/children/" + uuid.toString() + "?type=DEVICEGROUP", 0); @@ -1842,12 +1842,12 @@ class StructuresDeviceGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Di2", 1); // mnemonic path - // /mnemonicpath/{mnemonicpath} - ITUtilStructureElement.assertRead("/mnemonicpath/D", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/D%", 16, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/D__", 16, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Di_", 16, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Di2", 16); + // /mnemonicPath/{mnemonicPath} + ITUtilStructureElement.assertRead("/mnemonicPath/D", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/D%", 16, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/D__", 16, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Di_", 16, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Di2", 16); // history // /history/{uuid} diff --git a/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java b/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java index 6913661c..ee7f1c63 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDeviceTypeIT.java @@ -1002,9 +1002,9 @@ class StructuresDeviceTypeIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rsha", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1031,9 +1031,9 @@ class StructuresDeviceTypeIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1); ITUtilStructureElement.assertRead("/mnemonic/Di-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rsha", 1); ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); @@ -1087,9 +1087,9 @@ class StructuresDeviceTypeIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rshc", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1116,9 +1116,9 @@ class StructuresDeviceTypeIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rshc", 0); ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); @@ -1172,9 +1172,9 @@ class StructuresDeviceTypeIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rshr", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1201,9 +1201,9 @@ class StructuresDeviceTypeIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); ITUtilStructureElement.assertRead("/mnemonic/Di-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di", 1, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di", 1, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-Rshr", 0); ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); @@ -1791,7 +1791,7 @@ class StructuresDeviceTypeIT { // read & search // /{type} - // type, statuses, deleted, uuid, parentuuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // type, statuses, deleted, uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description // combination ITUtilStructureElement.assertRead("/DEVICETYPE?mnemonic=A__", 45); ITUtilStructureElement.assertRead("/DEVICETYPE?statuses=PENDING&mnemonic=A__", 10); @@ -1814,13 +1814,13 @@ class StructuresDeviceTypeIT { ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=REJECTED&mnemonic=A__", 5); ITUtilStructureElement.assertRead("/DEVICETYPE?deleted=true&statuses=PENDING&statuses=APPROVED&mnemonic=A__", 10); - ITUtilStructureElement.assertRead("/DEVICETYPE?uuid=" + disciplineUuid.toString(), 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?uuid=" + deviceGroupUuid.toString(), 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?uuid=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/DEVICETYPE?uuid=" + disciplineUuid.toString(), 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?uuid=" + deviceGroupUuid.toString(), 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?uuid=" + uuid.toString(), 1); - ITUtilStructureElement.assertRead("/DEVICETYPE?parentuuid=" + disciplineUuid.toString(), 0); - ITUtilStructureElement.assertRead("/DEVICETYPE?parentuuid=" + deviceGroupUuid.toString(), 45, -1); - ITUtilStructureElement.assertRead("/DEVICETYPE?parentuuid=" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?parent=" + disciplineUuid.toString(), 0); + ITUtilStructureElement.assertRead("/DEVICETYPE?parent=" + deviceGroupUuid.toString(), 45, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?parent=" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/DEVICETYPE?name=na", 0); ITUtilStructureElement.assertRead("/DEVICETYPE?name=na_", 0); @@ -1829,9 +1829,9 @@ class StructuresDeviceTypeIT { ITUtilStructureElement.assertRead("/DEVICETYPE?name=na%", 45, -1); ITUtilStructureElement.assertRead("/DEVICETYPE?name=name", 45, -1); - ITUtilStructureElement.assertRead("/DEVICETYPE?mnemonicequivalence=A__", 45, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?mnemonicEquivalence=A__", 45, -1); - ITUtilStructureElement.assertRead("/DEVICETYPE?mnemonicepath=A__", 45, -1); + ITUtilStructureElement.assertRead("/DEVICETYPE?mnemonicPath=A__", 0); ITUtilStructureElement.assertRead("/DEVICETYPE?description=desc", 0); ITUtilStructureElement.assertRead("/DEVICETYPE?description=desc%", 35, -1); @@ -1843,7 +1843,7 @@ class StructuresDeviceTypeIT { // children // /children/{uuid} - // uuid, type, statuses, deleted, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // uuid, type, statuses, deleted, name, mnemonic, mnemonicEquivalence, mnemonicPath, description ITUtilStructureElement.assertRead("/children/" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/children/" + deviceGroupUuid.toString(), 15, -1); ITUtilStructureElement.assertRead("/children/" + disciplineUuid.toString(), 1); @@ -1866,16 +1866,16 @@ class StructuresDeviceTypeIT { ITUtilStructureElement.assertRead("/mnemonic/Di", 1); // mnemonic path - // /mnemonicpath/{mnemonicpath} - ITUtilStructureElement.assertRead("/mnemonicpath/A", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/A__", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/AG_", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/AG1", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-A%", 15, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-A", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-A__", 15, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-AG_", 5); - ITUtilStructureElement.assertRead("/mnemonicpath/Di-AG1", 1); + // /mnemonicPath/{mnemonicPath} + ITUtilStructureElement.assertRead("/mnemonicPath/A", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/A__", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/AG_", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/AG1", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-A%", 15, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-A", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-A__", 15, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-AG_", 5); + ITUtilStructureElement.assertRead("/mnemonicPath/Di-AG1", 1); // history // /history/{uuid} diff --git a/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java b/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java index 20399ae0..6e8e1738 100644 --- a/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresDisciplineIT.java @@ -943,7 +943,7 @@ class StructuresDisciplineIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -967,7 +967,7 @@ class StructuresDisciplineIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 1); ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); @@ -1018,7 +1018,7 @@ class StructuresDisciplineIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1042,7 +1042,7 @@ class StructuresDisciplineIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); @@ -1093,7 +1093,7 @@ class StructuresDisciplineIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1117,7 +1117,7 @@ class StructuresDisciplineIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); @@ -1696,7 +1696,7 @@ class StructuresDisciplineIT { // read & search // /{type} - // type, statuses, deleted, uuid, parentuuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // type, statuses, deleted, uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description // combination ITUtilStructureElement.assertRead("/DISCIPLINE?mnemonic=A__", 45); ITUtilStructureElement.assertRead("/DISCIPLINE?statuses=PENDING&mnemonic=A__", 10); @@ -1719,9 +1719,9 @@ class StructuresDisciplineIT { ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=REJECTED&mnemonic=A__", 5); ITUtilStructureElement.assertRead("/DISCIPLINE?deleted=true&statuses=PENDING&statuses=APPROVED&mnemonic=A__", 10); - ITUtilStructureElement.assertRead("/DISCIPLINE?uuid=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/DISCIPLINE?uuid=" + uuid.toString(), 1); - ITUtilStructureElement.assertRead("/DISCIPLINE?parentuuid=" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/DISCIPLINE?parent=" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/DISCIPLINE?name=na", 0); ITUtilStructureElement.assertRead("/DISCIPLINE?name=na_", 0); @@ -1730,9 +1730,9 @@ class StructuresDisciplineIT { ITUtilStructureElement.assertRead("/DISCIPLINE?name=na%", 45, -1); ITUtilStructureElement.assertRead("/DISCIPLINE?name=name", 45, -1); - ITUtilStructureElement.assertRead("/DISCIPLINE?mnemonicequivalence=A__", 45, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?mnemonicEquivalence=A__", 45, -1); - ITUtilStructureElement.assertRead("/DISCIPLINE?mnemonicepath=A__", 45, -1); + ITUtilStructureElement.assertRead("/DISCIPLINE?mnemonicPath=A__", 45, -1); ITUtilStructureElement.assertRead("/DISCIPLINE?description=desc", 0); ITUtilStructureElement.assertRead("/DISCIPLINE?description=desc%", 35, -1); @@ -1744,7 +1744,7 @@ class StructuresDisciplineIT { // children // /children/{uuid} - // uuid, type, statuses, deleted, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // uuid, type, statuses, deleted, name, mnemonic, mnemonicEquivalence, mnemonicPath, description ITUtilStructureElement.assertRead("/children/" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/children/" + uuid.toString() + "?type=DISCIPLINE", 0); @@ -1756,11 +1756,11 @@ class StructuresDisciplineIT { ITUtilStructureElement.assertRead("/mnemonic/AG1", 1); // mnemonic path - // /mnemonicpath/{mnemonicpath} - ITUtilStructureElement.assertRead("/mnemonicpath/A", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/A__", 15, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/AG_", 5); - ITUtilStructureElement.assertRead("/mnemonicpath/AG1", 1); + // /mnemonicPath/{mnemonicPath} + ITUtilStructureElement.assertRead("/mnemonicPath/A", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/A__", 15, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/AG_", 5); + ITUtilStructureElement.assertRead("/mnemonicPath/AG1", 1); // history // /history/{uuid} diff --git a/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java b/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java index fa926dda..adaaef36 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSubsystemIT.java @@ -1007,12 +1007,12 @@ class StructuresSubsystemIT { ITUtilStructureElement.assertRead("/mnemonic/Sys-Rsha", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys-Rsha", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1043,12 +1043,12 @@ class StructuresSubsystemIT { ITUtilStructureElement.assertRead("/mnemonic/Sys-Rsha", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rsha", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys-Rsha", 0); ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); @@ -1106,12 +1106,12 @@ class StructuresSubsystemIT { ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshc", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys-Rshc", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1142,12 +1142,12 @@ class StructuresSubsystemIT { ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshc", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys-Rshc", 0); ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); @@ -1205,12 +1205,12 @@ class StructuresSubsystemIT { ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshr", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys-Rshr", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1241,12 +1241,12 @@ class StructuresSubsystemIT { ITUtilStructureElement.assertRead("/mnemonic/Sys-Rshr", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Sys-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys-Rshr", 0); ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); @@ -1843,7 +1843,7 @@ class StructuresSubsystemIT { // read & search // /{type} - // type, statuses, deleted, uuid, parentuuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // type, statuses, deleted, uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description // combination ITUtilStructureElement.assertRead("/SUBSYSTEM?mnemonic=A__", 45); ITUtilStructureElement.assertRead("/SUBSYSTEM?statuses=PENDING&mnemonic=A__", 10); @@ -1866,13 +1866,13 @@ class StructuresSubsystemIT { ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=REJECTED&mnemonic=A__", 5); ITUtilStructureElement.assertRead("/SUBSYSTEM?deleted=true&statuses=PENDING&statuses=APPROVED&mnemonic=A__", 10); - ITUtilStructureElement.assertRead("/SUBSYSTEM?uuid=" + systemGroupUuid.toString(), 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?uuid=" + systemUuid.toString(), 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?uuid=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?uuid=" + systemGroupUuid.toString(), 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?uuid=" + systemUuid.toString(), 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?uuid=" + uuid.toString(), 1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?parentuuid=" + systemGroupUuid.toString(), 0); - ITUtilStructureElement.assertRead("/SUBSYSTEM?parentuuid=" + systemUuid.toString(), 45, -1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?parentuuid=" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?parent=" + systemGroupUuid.toString(), 0); + ITUtilStructureElement.assertRead("/SUBSYSTEM?parent=" + systemUuid.toString(), 45, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?parent=" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/SUBSYSTEM?name=na", 0); ITUtilStructureElement.assertRead("/SUBSYSTEM?name=na_", 0); @@ -1881,9 +1881,9 @@ class StructuresSubsystemIT { ITUtilStructureElement.assertRead("/SUBSYSTEM?name=na%", 45, -1); ITUtilStructureElement.assertRead("/SUBSYSTEM?name=name", 45, -1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?mnemonicequivalence=A__", 45, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?mnemonicEquivalence=A__", 45, -1); - ITUtilStructureElement.assertRead("/SUBSYSTEM?mnemonicepath=A__", 45, -1); + ITUtilStructureElement.assertRead("/SUBSYSTEM?mnemonicPath=A__", 0); ITUtilStructureElement.assertRead("/SUBSYSTEM?description=desc", 0); ITUtilStructureElement.assertRead("/SUBSYSTEM?description=desc%", 35, -1); @@ -1895,7 +1895,7 @@ class StructuresSubsystemIT { // children // /children/{uuid} - // uuid, type, statuses, deleted, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // uuid, type, statuses, deleted, name, mnemonic, mnemonicEquivalence, mnemonicPath, description ITUtilStructureElement.assertRead("/children/" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/children/" + systemUuid.toString(), 15, -1); ITUtilStructureElement.assertRead("/children/" + systemGroupUuid.toString(), 1); @@ -1918,26 +1918,26 @@ class StructuresSubsystemIT { ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); // mnemonic path - // /mnemonicpath/{mnemonicpath} - ITUtilStructureElement.assertRead("/mnemonicpath/A", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/A__", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/AG_", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/AG1", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-A%", 15, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-A", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-A__", 15, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-AG_", 5); - ITUtilStructureElement.assertRead("/mnemonicpath/Sys-AG1", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-A%", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-A", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-A__", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-AG_", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-AG1", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys%", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys__", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys_", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Sys", 0); + // /mnemonicPath/{mnemonicPath} + ITUtilStructureElement.assertRead("/mnemonicPath/A", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/A__", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/AG_", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/AG1", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-A%", 15, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-A", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-A__", 15, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-AG_", 5); + ITUtilStructureElement.assertRead("/mnemonicPath/Sys-AG1", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-A%", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-A", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-A__", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-AG_", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-AG1", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys%", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys__", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys_", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Sys", 0); // history // /history/{uuid} diff --git a/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java b/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java index 1d32afd4..25de030a 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSystemGroupIT.java @@ -987,7 +987,7 @@ class StructuresSystemGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1011,7 +1011,7 @@ class StructuresSystemGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 1); ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1); @@ -1062,7 +1062,7 @@ class StructuresSystemGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1086,7 +1086,7 @@ class StructuresSystemGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); @@ -1137,7 +1137,7 @@ class StructuresSystemGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1161,7 +1161,7 @@ class StructuresSystemGroupIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); @@ -1740,7 +1740,7 @@ class StructuresSystemGroupIT { // read & search // /{type} - // type, statuses, deleted, uuid, parentuuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // type, statuses, deleted, uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description // combination ITUtilStructureElement.assertRead("/SYSTEMGROUP?mnemonic=A__", 45); ITUtilStructureElement.assertRead("/SYSTEMGROUP?statuses=PENDING&mnemonic=A__", 10); @@ -1763,9 +1763,9 @@ class StructuresSystemGroupIT { ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=REJECTED&mnemonic=A__", 5); ITUtilStructureElement.assertRead("/SYSTEMGROUP?deleted=true&statuses=PENDING&statuses=APPROVED&mnemonic=A__", 10); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?uuid=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?uuid=" + uuid.toString(), 1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?parentuuid=" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?parent=" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/SYSTEMGROUP?name=na", 0); ITUtilStructureElement.assertRead("/SYSTEMGROUP?name=na_", 0); @@ -1774,9 +1774,9 @@ class StructuresSystemGroupIT { ITUtilStructureElement.assertRead("/SYSTEMGROUP?name=na%", 45, -1); ITUtilStructureElement.assertRead("/SYSTEMGROUP?name=name", 45, -1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?mnemonicequivalence=A__", 45, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?mnemonicEquivalence=A__", 45, -1); - ITUtilStructureElement.assertRead("/SYSTEMGROUP?mnemonicepath=A__", 45, -1); + ITUtilStructureElement.assertRead("/SYSTEMGROUP?mnemonicPath=A__", 45, -1); ITUtilStructureElement.assertRead("/SYSTEMGROUP?description=desc", 0); ITUtilStructureElement.assertRead("/SYSTEMGROUP?description=desc%", 35, -1); @@ -1788,7 +1788,7 @@ class StructuresSystemGroupIT { // children // /children/{uuid} - // uuid, type, statuses, deleted, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // uuid, type, statuses, deleted, name, mnemonic, mnemonicEquivalence, mnemonicPath, description ITUtilStructureElement.assertRead("/children/" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/children/" + uuid.toString() + "?type=SYSTEMGROUP", 0); @@ -1800,11 +1800,11 @@ class StructuresSystemGroupIT { ITUtilStructureElement.assertRead("/mnemonic/AG1", 1); // mnemonic path - // /mnemonicpath/{mnemonicpath} - ITUtilStructureElement.assertRead("/mnemonicpath/A", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/A__", 15, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/AG_", 5); - ITUtilStructureElement.assertRead("/mnemonicpath/AG1", 1); + // /mnemonicPath/{mnemonicPath} + ITUtilStructureElement.assertRead("/mnemonicPath/A", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/A__", 15, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/AG_", 5); + ITUtilStructureElement.assertRead("/mnemonicPath/AG1", 1); // history // /history/{uuid} diff --git a/src/test/java/org/openepics/names/docker/StructuresSystemIT.java b/src/test/java/org/openepics/names/docker/StructuresSystemIT.java index f6e1bec0..539eb4f4 100644 --- a/src/test/java/org/openepics/names/docker/StructuresSystemIT.java +++ b/src/test/java/org/openepics/names/docker/StructuresSystemIT.java @@ -987,9 +987,9 @@ class StructuresSystemIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Rsha", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1016,9 +1016,9 @@ class StructuresSystemIT { ITUtilStructureElement.assertRead("/mnemonic/Rsha", 1); ITUtilStructureElement.assertRead("/mnemonic/Sg-Rsha", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rsha", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rsha", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rsha", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Rsha", 0); ITUtilStructureElement.assertRead("/history/" + approvedStructureElement.getUuid().toString(), 1, -1); @@ -1072,9 +1072,9 @@ class StructuresSystemIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Rshc", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1101,9 +1101,9 @@ class StructuresSystemIT { ITUtilStructureElement.assertRead("/mnemonic/Rshc", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshc", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshc", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Rshc", 0); ITUtilStructureElement.assertRead("/history/" + cancelledStructureElement.getUuid().toString(), 1, -1); @@ -1157,9 +1157,9 @@ class StructuresSystemIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Rshr", 0); ITUtilStructureElement.assertRead("/history/" + createdStructureElement.getUuid().toString(), 1, -1); @@ -1186,9 +1186,9 @@ class StructuresSystemIT { ITUtilStructureElement.assertRead("/mnemonic/Rshr", 0); ITUtilStructureElement.assertRead("/mnemonic/Sg-Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Rshr", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Rshr", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-Rshr", 0); ITUtilStructureElement.assertRead("/history/" + rejectedStructureElement.getUuid().toString(), 1, -1); @@ -1776,7 +1776,7 @@ class StructuresSystemIT { // read & search // /{type} - // type, statuses, deleted, uuid, parentuuid, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // type, statuses, deleted, uuid, parent, name, mnemonic, mnemonicEquivalence, mnemonicPath, description // combination ITUtilStructureElement.assertRead("/SYSTEM?mnemonic=A__", 45); ITUtilStructureElement.assertRead("/SYSTEM?statuses=PENDING&mnemonic=A__", 10); @@ -1799,11 +1799,11 @@ class StructuresSystemIT { ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=REJECTED&mnemonic=A__", 5); ITUtilStructureElement.assertRead("/SYSTEM?deleted=true&statuses=PENDING&statuses=APPROVED&mnemonic=A__", 10); - ITUtilStructureElement.assertRead("/SYSTEM?uuid=" + systemGroupUuid.toString(), 0); - ITUtilStructureElement.assertRead("/SYSTEM?uuid=" + uuid.toString(), 1); + ITUtilStructureElement.assertRead("/SYSTEM?uuid=" + systemGroupUuid.toString(), 0); + ITUtilStructureElement.assertRead("/SYSTEM?uuid=" + uuid.toString(), 1); - ITUtilStructureElement.assertRead("/SYSTEM?parentuuid=" + systemGroupUuid.toString(), 45, -1); - ITUtilStructureElement.assertRead("/SYSTEM?parentuuid=" + uuid.toString(), 0); + ITUtilStructureElement.assertRead("/SYSTEM?parent=" + systemGroupUuid.toString(), 45, -1); + ITUtilStructureElement.assertRead("/SYSTEM?parent=" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/SYSTEM?name=na", 0); ITUtilStructureElement.assertRead("/SYSTEM?name=na_", 0); @@ -1812,9 +1812,9 @@ class StructuresSystemIT { ITUtilStructureElement.assertRead("/SYSTEM?name=na%", 45, -1); ITUtilStructureElement.assertRead("/SYSTEM?name=name", 45, -1); - ITUtilStructureElement.assertRead("/SYSTEM?mnemonicequivalence=A__", 45, -1); + ITUtilStructureElement.assertRead("/SYSTEM?mnemonicEquivalence=A__", 45, -1); - ITUtilStructureElement.assertRead("/SYSTEM?mnemonicepath=A__", 45, -1); + ITUtilStructureElement.assertRead("/SYSTEM?mnemonicPath=A__", 30); ITUtilStructureElement.assertRead("/SYSTEM?description=desc", 0); ITUtilStructureElement.assertRead("/SYSTEM?description=desc%", 35, -1); @@ -1826,7 +1826,7 @@ class StructuresSystemIT { // children // /children/{uuid} - // uuid, type, statuses, deleted, name, mnemonic, mnemonicequivalence, mnemonicpath, description + // uuid, type, statuses, deleted, name, mnemonic, mnemonicEquivalence, mnemonicPath, description ITUtilStructureElement.assertRead("/children/" + uuid.toString(), 0); ITUtilStructureElement.assertRead("/children/" + systemGroupUuid.toString(), 15, -1); ITUtilStructureElement.assertRead("/children/" + uuid.toString() + "?type=SYSTEM", 0); @@ -1843,16 +1843,16 @@ class StructuresSystemIT { ITUtilStructureElement.assertRead("/mnemonic/Sg", 1); // mnemonic path - // /mnemonicpath/{mnemonicpath} - ITUtilStructureElement.assertRead("/mnemonicpath/A", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/A__", 15, -1); - ITUtilStructureElement.assertRead("/mnemonicpath/AG_", 5); - ITUtilStructureElement.assertRead("/mnemonicpath/AG1", 1); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-A%", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-A", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-A__", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-AG_", 0); - ITUtilStructureElement.assertRead("/mnemonicpath/Sg-AG1", 0); + // /mnemonicPath/{mnemonicPath} + ITUtilStructureElement.assertRead("/mnemonicPath/A", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/A__", 15, -1); + ITUtilStructureElement.assertRead("/mnemonicPath/AG_", 5); + ITUtilStructureElement.assertRead("/mnemonicPath/AG1", 1); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-A%", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-A", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-A__", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-AG_", 0); + ITUtilStructureElement.assertRead("/mnemonicPath/Sg-AG1", 0); // history // /history/{uuid} diff --git a/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java b/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java index 4f764c70..eb0e06fd 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesInstanceIndexIT.java @@ -551,11 +551,11 @@ class NamesInstanceIndexIT { NameElementCommand nameElement = new NameElementCommand(); nameElement.setDescription("description"); nameElement.setComment("comment"); - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); // ---------------------------------------------------------------------------------------------------- - nameElement.setParentdevicestructure(deviceType_Cryo_IOC); + nameElement.setParentDeviceStructure(deviceType_Cryo_IOC); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -614,7 +614,7 @@ class NamesInstanceIndexIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "abc123", Boolean.FALSE); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "a!", Boolean.FALSE); - nameElement.setParentdevicestructure(deviceType_Cryo_RFA); + nameElement.setParentDeviceStructure(deviceType_Cryo_RFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -690,11 +690,11 @@ class NamesInstanceIndexIT { NameElementCommand nameElement = new NameElementCommand(); nameElement.setDescription("description"); nameElement.setComment("comment"); - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); // ---------------------------------------------------------------------------------------------------- - nameElement.setParentdevicestructure(deviceType_EMR_IOC); + nameElement.setParentDeviceStructure(deviceType_EMR_IOC); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -753,7 +753,7 @@ class NamesInstanceIndexIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "abc123", Boolean.FALSE); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "a!", Boolean.FALSE); - nameElement.setParentdevicestructure(deviceType_EMR_RFA); + nameElement.setParentDeviceStructure(deviceType_EMR_RFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -829,11 +829,11 @@ class NamesInstanceIndexIT { NameElementCommand nameElement = new NameElementCommand(); nameElement.setDescription("description"); nameElement.setComment("comment"); - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); // ---------------------------------------------------------------------------------------------------- - nameElement.setParentdevicestructure(deviceType_HVAC_IOC); + nameElement.setParentDeviceStructure(deviceType_HVAC_IOC); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -892,7 +892,7 @@ class NamesInstanceIndexIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "abc123", Boolean.FALSE); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "a!", Boolean.FALSE); - nameElement.setParentdevicestructure(deviceType_HVAC_RFA); + nameElement.setParentDeviceStructure(deviceType_HVAC_RFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -968,11 +968,11 @@ class NamesInstanceIndexIT { NameElementCommand nameElement = new NameElementCommand(); nameElement.setDescription("description"); nameElement.setComment("comment"); - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); // ---------------------------------------------------------------------------------------------------- - nameElement.setParentdevicestructure(deviceType_Proc_IOC); + nameElement.setParentDeviceStructure(deviceType_Proc_IOC); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -1031,7 +1031,7 @@ class NamesInstanceIndexIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "abc123", Boolean.FALSE); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "a!", Boolean.FALSE); - nameElement.setParentdevicestructure(deviceType_Proc_RFA); + nameElement.setParentDeviceStructure(deviceType_Proc_RFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -1107,11 +1107,11 @@ class NamesInstanceIndexIT { NameElementCommand nameElement = new NameElementCommand(); nameElement.setDescription("description"); nameElement.setComment("comment"); - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); // ---------------------------------------------------------------------------------------------------- - nameElement.setParentdevicestructure(deviceType_SC_IOC); + nameElement.setParentDeviceStructure(deviceType_SC_IOC); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -1170,7 +1170,7 @@ class NamesInstanceIndexIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "abc123", Boolean.FALSE); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "a!", Boolean.FALSE); - nameElement.setParentdevicestructure(deviceType_SC_RFA); + nameElement.setParentDeviceStructure(deviceType_SC_RFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -1246,11 +1246,11 @@ class NamesInstanceIndexIT { NameElementCommand nameElement = new NameElementCommand(); nameElement.setDescription("description"); nameElement.setComment("comment"); - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); // ---------------------------------------------------------------------------------------------------- - nameElement.setParentdevicestructure(deviceType_Vac_IOC); + nameElement.setParentDeviceStructure(deviceType_Vac_IOC); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -1309,7 +1309,7 @@ class NamesInstanceIndexIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "abc123", Boolean.FALSE); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "a!", Boolean.FALSE); - nameElement.setParentdevicestructure(deviceType_Vac_RFA); + nameElement.setParentDeviceStructure(deviceType_Vac_RFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -1385,11 +1385,11 @@ class NamesInstanceIndexIT { NameElementCommand nameElement = new NameElementCommand(); nameElement.setDescription("description"); nameElement.setComment("comment"); - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); // ---------------------------------------------------------------------------------------------------- - nameElement.setParentdevicestructure(deviceType_WtrC_IOC); + nameElement.setParentDeviceStructure(deviceType_WtrC_IOC); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -1448,7 +1448,7 @@ class NamesInstanceIndexIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "abc123", Boolean.FALSE); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "a!", Boolean.FALSE); - nameElement.setParentdevicestructure(deviceType_WtrC_RFA); + nameElement.setParentDeviceStructure(deviceType_WtrC_RFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -1524,11 +1524,11 @@ class NamesInstanceIndexIT { NameElementCommand nameElement = new NameElementCommand(); nameElement.setDescription("description"); nameElement.setComment("comment"); - nameElement.setParentsystemstructure(subsystem010PRL); + nameElement.setParentSystemStructure(subsystem010PRL); // ---------------------------------------------------------------------------------------------------- - nameElement.setParentdevicestructure(deviceType_BMD_IOC); + nameElement.setParentDeviceStructure(deviceType_BMD_IOC); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); @@ -1587,7 +1587,7 @@ class NamesInstanceIndexIT { ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "abc123", Boolean.FALSE); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "a!", Boolean.FALSE); - nameElement.setParentdevicestructure(deviceType_BMD_RFA); + nameElement.setParentDeviceStructure(deviceType_BMD_RFA); ITUtilNameElement.assertValidate(nameElement, NameCommand.CREATE, "051", Boolean.TRUE); diff --git a/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java b/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java index 81599ab6..89d86565 100644 --- a/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java +++ b/src/test/java/org/openepics/names/docker/complex/NamesMultipleIT.java @@ -171,16 +171,16 @@ class NamesMultipleIT { nameElements[3].setUuid(null); ITUtilNameElement.assertValidate(nameElements, NameCommand.CREATE, Boolean.TRUE); - uuid = nameElements[3].getParentsystemstructure(); - nameElements[3].setParentsystemstructure(null); + uuid = nameElements[3].getParentSystemStructure(); + nameElements[3].setParentSystemStructure(null); ITUtilNameElement.assertValidate(nameElements, NameCommand.CREATE, Boolean.FALSE); - nameElements[3].setParentsystemstructure(uuid); + nameElements[3].setParentSystemStructure(uuid); ITUtilNameElement.assertValidate(nameElements, NameCommand.CREATE, Boolean.TRUE); - uuid = nameElements[3].getParentdevicestructure(); - nameElements[3].setParentdevicestructure(null); + uuid = nameElements[3].getParentDeviceStructure(); + nameElements[3].setParentDeviceStructure(null); ITUtilNameElement.assertValidate(nameElements, NameCommand.CREATE, Boolean.FALSE); - nameElements[3].setParentdevicestructure(uuid); + nameElements[3].setParentDeviceStructure(uuid); ITUtilNameElement.assertValidate(nameElements, NameCommand.CREATE, Boolean.TRUE); value = nameElements[3].getIndex(); @@ -344,16 +344,16 @@ class NamesMultipleIT { createdNameElements[3].setUuid(uuid); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.UPDATE, Boolean.TRUE); - uuid = createdNameElements[3].getParentsystemstructure(); - createdNameElements[3].setParentsystemstructure(null); + uuid = createdNameElements[3].getParentSystemStructure(); + createdNameElements[3].setParentSystemStructure(null); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.UPDATE, Boolean.FALSE); - createdNameElements[3].setParentsystemstructure(uuid); + createdNameElements[3].setParentSystemStructure(uuid); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.UPDATE, Boolean.TRUE); - uuid = createdNameElements[3].getParentdevicestructure(); - createdNameElements[3].setParentdevicestructure(null); + uuid = createdNameElements[3].getParentDeviceStructure(); + createdNameElements[3].setParentDeviceStructure(null); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.UPDATE, Boolean.FALSE); - createdNameElements[3].setParentdevicestructure(uuid); + createdNameElements[3].setParentDeviceStructure(uuid); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.UPDATE, Boolean.TRUE); value = createdNameElements[3].getIndex(); @@ -545,16 +545,16 @@ class NamesMultipleIT { createdNameElements[3].setUuid(uuid); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.DELETE, Boolean.TRUE); - uuid = createdNameElements[3].getParentsystemstructure(); - createdNameElements[3].setParentsystemstructure(null); + uuid = createdNameElements[3].getParentSystemStructure(); + createdNameElements[3].setParentSystemStructure(null); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.DELETE, Boolean.TRUE); - createdNameElements[3].setParentsystemstructure(uuid); + createdNameElements[3].setParentSystemStructure(uuid); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.DELETE, Boolean.TRUE); - uuid = createdNameElements[3].getParentdevicestructure(); - createdNameElements[3].setParentdevicestructure(null); + uuid = createdNameElements[3].getParentDeviceStructure(); + createdNameElements[3].setParentDeviceStructure(null); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.DELETE, Boolean.TRUE); - createdNameElements[3].setParentdevicestructure(uuid); + createdNameElements[3].setParentDeviceStructure(uuid); ITUtilNameElement.assertValidate(createdNameElements, NameCommand.DELETE, Boolean.TRUE); value = createdNameElements[3].getIndex(); diff --git a/src/test/java/org/openepics/names/util/NameElementUtilTest.java b/src/test/java/org/openepics/names/util/NameElementUtilTest.java index 02d67ec2..33c94532 100644 --- a/src/test/java/org/openepics/names/util/NameElementUtilTest.java +++ b/src/test/java/org/openepics/names/util/NameElementUtilTest.java @@ -49,10 +49,10 @@ class NameElementUtilTest { assertNotNull(nameElement); assertEquals(null, nameElement.getUuid()); - assertEquals(null, nameElement.getParentsystemstructure()); - assertEquals(null, nameElement.getParentdevicestructure()); - assertEquals(null, nameElement.getSystemstructure()); - assertEquals(null, nameElement.getDevicestructure()); + assertEquals(null, nameElement.getParentSystemStructure()); + assertEquals(null, nameElement.getParentDeviceStructure()); + assertEquals(null, nameElement.getSystemStructure()); + assertEquals(null, nameElement.getDeviceStructure()); assertEquals(null, nameElement.getIndex()); assertEquals(null, nameElement.getName()); assertEquals(null, nameElement.getDescription()); @@ -79,10 +79,10 @@ class NameElementUtilTest { assertNotNull(nameElement); assertEquals(null, nameElement.getUuid()); - assertEquals(null, nameElement.getParentsystemstructure()); - assertEquals(null, nameElement.getParentdevicestructure()); - assertEquals(null, nameElement.getSystemstructure()); - assertEquals(null, nameElement.getDevicestructure()); + assertEquals(null, nameElement.getParentSystemStructure()); + assertEquals(null, nameElement.getParentDeviceStructure()); + assertEquals(null, nameElement.getSystemStructure()); + assertEquals(null, nameElement.getDeviceStructure()); assertEquals(null, nameElement.getIndex()); assertEquals(null, nameElement.getName()); assertEquals(null, nameElement.getDescription()); diff --git a/src/test/java/org/openepics/names/util/NameUtilTest.java b/src/test/java/org/openepics/names/util/NameUtilTest.java index 2c63e397..60cac77d 100644 --- a/src/test/java/org/openepics/names/util/NameUtilTest.java +++ b/src/test/java/org/openepics/names/util/NameUtilTest.java @@ -44,37 +44,37 @@ class NameUtilTest { name.setSubsystemUuid(UUID.randomUUID()); name.setSystemUuid(null); - name.setSystemgroupUuid(null); + name.setSystemGroupUuid(null); assertEquals(3, NameUtil.getLevelSystemStructure(name)); name.setSubsystemUuid(null); name.setSystemUuid(UUID.randomUUID()); - name.setSystemgroupUuid(null); + name.setSystemGroupUuid(null); assertEquals(2, NameUtil.getLevelSystemStructure(name)); name.setSubsystemUuid(UUID.randomUUID()); name.setSystemUuid(UUID.randomUUID()); - name.setSystemgroupUuid(null); + name.setSystemGroupUuid(null); assertEquals(-1, NameUtil.getLevelSystemStructure(name)); name.setSubsystemUuid(null); name.setSystemUuid(null); - name.setSystemgroupUuid(UUID.randomUUID()); + name.setSystemGroupUuid(UUID.randomUUID()); assertEquals(1, NameUtil.getLevelSystemStructure(name)); name.setSubsystemUuid(UUID.randomUUID()); name.setSystemUuid(null); - name.setSystemgroupUuid(UUID.randomUUID()); + name.setSystemGroupUuid(UUID.randomUUID()); assertEquals(-1, NameUtil.getLevelSystemStructure(name)); name.setSubsystemUuid(null); name.setSystemUuid(UUID.randomUUID()); - name.setSystemgroupUuid(UUID.randomUUID()); + name.setSystemGroupUuid(UUID.randomUUID()); assertEquals(-1, NameUtil.getLevelSystemStructure(name)); name.setSubsystemUuid(UUID.randomUUID()); name.setSystemUuid(UUID.randomUUID()); - name.setSystemgroupUuid(UUID.randomUUID()); + name.setSystemGroupUuid(UUID.randomUUID()); assertEquals(-1, NameUtil.getLevelSystemStructure(name)); } @@ -86,7 +86,7 @@ class NameUtilTest { Name name = new Name(); assertEquals(-1, NameUtil.getLevelDeviceStructure(name)); - name.setDevicetypeUuid(UUID.randomUUID()); + name.setDeviceTypeUuid(UUID.randomUUID()); assertEquals(3, NameUtil.getLevelDeviceStructure(name)); } diff --git a/src/test/java/org/openepics/names/util/StructureElementUtilTest.java b/src/test/java/org/openepics/names/util/StructureElementUtilTest.java index ec4cf2cd..60114c5d 100644 --- a/src/test/java/org/openepics/names/util/StructureElementUtilTest.java +++ b/src/test/java/org/openepics/names/util/StructureElementUtilTest.java @@ -53,7 +53,7 @@ class StructureElementUtilTest { assertEquals(null, structureElement.getParent()); assertEquals(null, structureElement.getName()); assertEquals(null, structureElement.getMnemonic()); - assertEquals(null, structureElement.getMnemonicpath()); + assertEquals(null, structureElement.getMnemonicPath()); assertEquals(null, structureElement.getLevel()); assertEquals(null, structureElement.getDescription()); assertEquals(null, structureElement.getStatus()); -- GitLab