Skip to content
Snippets Groups Projects
Commit c1548de6 authored by Lars Johansson's avatar Lars Johansson
Browse files

Refactor enum handling

Refactor to reduce complexity and have uniform handling of enums.
parent e9ba9045
No related branches found
No related tags found
No related merge requests found
Pipeline #125389 passed
Showing
with 2349 additions and 2302 deletions
......@@ -36,7 +36,7 @@ import org.openepics.names.rest.beans.response.ResponsePageStructureElements;
import org.openepics.names.service.NamesService;
import org.openepics.names.service.StructuresService;
import org.openepics.names.util.NamingConventionUtil;
import org.openepics.names.util.StructureElementUtil.StructureChoice;
import org.openepics.names.util.StructureChoice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
......
......@@ -57,11 +57,11 @@ import org.openepics.names.util.EssNamingConvention;
import org.openepics.names.util.HolderIRepositories;
import org.openepics.names.util.HolderRepositories;
import org.openepics.names.util.HolderSystemDeviceStructure;
import org.openepics.names.util.StructureChoice;
import org.openepics.names.util.StructureElementUtil;
import org.openepics.names.util.TextUtil;
import org.openepics.names.util.Utilities;
import org.openepics.names.util.ValidateStructureElementUtil;
import org.openepics.names.util.StructureElementUtil.StructureChoice;
import org.openepics.names.util.StructureUtil;
import org.openepics.names.util.ValidateUtil;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -19,20 +19,12 @@
package org.openepics.names.util;
/**
* Utility class to help provide proper enumerations for various purposes.
* Kind of name command and operation (server-side).
*
* @author Lars Johansson
*/
public class EnumUtil {
public enum NameCommand {
public enum NameChoice {CREATE, UPDATE, DELETE}
public enum StructureChoice {CREATE, UPDATE, DELETE, APPROVE, REJECT, CANCEL}
/**
* This class is not to be instantiated.
*/
private EnumUtil() {
throw new IllegalStateException("Utility class");
}
CREATE, UPDATE, DELETE;
}
/*
* Copyright (C) 2022 European Spallation Source ERIC.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.openepics.names.util;
/**
* Kind of structure choice. Used in how to handle structure entries, in particular for history of structure entries.
*
* @author Lars Johansson
*/
public enum StructureChoice {
HISTORY, STRUCTURE;
}
/*
* Copyright (C) 2022 European Spallation Source ERIC.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package org.openepics.names.util;
/**
* Kind of structure command and operation (server-side).
*
* @author Lars Johansson
*/
public enum StructureCommand {
CREATE, UPDATE, DELETE, APPROVE, CANCEL, REJECT;
}
......@@ -43,8 +43,7 @@ import com.google.common.collect.Lists;
*/
public class StructureElementUtil {
public enum StructureChoice {HISTORY, STRUCTURE}
// used in handling structure attributes - requested, processed
private static final long THOUSAND_MILLISECONDS = 1000;
/**
......
......@@ -54,8 +54,6 @@ public class ValidateNameElementUtil {
// update - uuid, parentsystemstructure, parentdevicestructure (optional), index, description, comment
// delete - uuid, comment
private enum NameChoice {CREATE, UPDATE, DELETE}
/**
* This class is not to be instantiated.
*/
......@@ -97,7 +95,7 @@ public class ValidateNameElementUtil {
* @param nameElement name element
*/
public static void validateNameElementInputCreate(NameElementCommand nameElement) {
validateNameElementInput(nameElement, NameChoice.CREATE);
validateNameElementInput(nameElement, NameCommand.CREATE);
}
/**
......@@ -106,7 +104,7 @@ public class ValidateNameElementUtil {
* @param nameElement name element
*/
public static void validateNameElementInputUpdate(NameElementCommand nameElement) {
validateNameElementInput(nameElement, NameChoice.UPDATE);
validateNameElementInput(nameElement, NameCommand.UPDATE);
}
/**
......@@ -115,16 +113,16 @@ public class ValidateNameElementUtil {
* @param nameElement name element
*/
public static void validateNameElementInputDelete(NameElementCommand nameElement) {
validateNameElementInput(nameElement, NameChoice.DELETE);
validateNameElementInput(nameElement, NameCommand.DELETE);
}
/**
* Validate name element parameters (input).
*
* @param nameElement name element
* @param nameChoice name choice
* @param nameCommand name command
*/
private static void validateNameElementInput(NameElementCommand nameElement, NameChoice nameChoice) {
private static void validateNameElementInput(NameElementCommand nameElement, NameCommand nameCommand) {
// attributes
// uuid - required if not create, required empty if create
// parentsystemstructure (uuid)
......@@ -133,7 +131,7 @@ public class ValidateNameElementUtil {
// description
// comment
if (ValidateUtil.isAnyNull(nameElement, nameChoice)) {
if (ValidateUtil.isAnyNull(nameElement, nameCommand)) {
return;
}
......@@ -145,14 +143,14 @@ public class ValidateNameElementUtil {
String description = nameElement.getDescription();
String comment = nameElement.getComment();
if (NameChoice.CREATE.equals(nameChoice)) {
if (NameCommand.CREATE.equals(nameCommand)) {
ExceptionUtil.validateConditionInputNotEmptyException(uuid == null,
TextUtil.VALUE_IS_NOT_EMPTY, uuid != null ? uuid.toString() : null, TextUtil.UUID);
} else {
ValidateUtil.validateInputUuid(uuid != null ? uuid.toString() : null);
}
if (!NameChoice.DELETE.equals(nameChoice)) {
if (!NameCommand.DELETE.equals(nameCommand)) {
ExceptionUtil.validateConditionInputNotAvailableException(parentSystemstructure != null,
TextUtil.VALUE_IS_NOT_AVAILABLE, nameElement.toString(), TextUtil.PARENTSYSTEMSTRUCTURE);
......@@ -183,7 +181,7 @@ public class ValidateNameElementUtil {
* @param holder holder
*/
public static void validateNameElementDataCreate(NameElementCommand nameElement, EssNamingConvention namingConvention, HolderIRepositories holderIRepositories, NameRepository nameRepository, HolderSystemDeviceStructure holder) {
validateNameElementData(nameElement, namingConvention, holderIRepositories, nameRepository, holder, NameChoice.CREATE);
validateNameElementData(nameElement, namingConvention, holderIRepositories, nameRepository, holder, NameCommand.CREATE);
}
/**
......@@ -196,7 +194,7 @@ public class ValidateNameElementUtil {
* @param holder holder
*/
public static void validateNameElementDataUpdate(NameElementCommand nameElement, EssNamingConvention namingConvention, HolderIRepositories holderIRepositories, NameRepository nameRepository, HolderSystemDeviceStructure holder) {
validateNameElementData(nameElement, namingConvention, holderIRepositories, nameRepository, holder, NameChoice.UPDATE);
validateNameElementData(nameElement, namingConvention, holderIRepositories, nameRepository, holder, NameCommand.UPDATE);
}
/**
......@@ -209,7 +207,7 @@ public class ValidateNameElementUtil {
* @param holder holder
*/
public static void validateNameElementDataDelete(NameElementCommand nameElement, EssNamingConvention namingConvention, HolderIRepositories holderIRepositories, NameRepository nameRepository, HolderSystemDeviceStructure holder) {
validateNameElementData(nameElement, namingConvention, holderIRepositories, nameRepository, holder, NameChoice.DELETE);
validateNameElementData(nameElement, namingConvention, holderIRepositories, nameRepository, holder, NameCommand.DELETE);
}
/**
......@@ -220,9 +218,9 @@ public class ValidateNameElementUtil {
* @param holderIRepositories holder repositories
* @param nameRepository name repository
* @param holder holder
* @param nameChoice name choice
* @param nameCommand name command
*/
private static void validateNameElementData(NameElementCommand nameElement, EssNamingConvention namingConvention, HolderIRepositories holderIRepositories, NameRepository nameRepository, HolderSystemDeviceStructure holder, NameChoice nameChoice) {
private static void validateNameElementData(NameElementCommand nameElement, EssNamingConvention namingConvention, HolderIRepositories holderIRepositories, NameRepository nameRepository, HolderSystemDeviceStructure holder, NameCommand nameCommand) {
// attributes
// uuid
// parentsystemstructure
......@@ -236,7 +234,7 @@ public class ValidateNameElementUtil {
// ( - system structure uuid, device structure uuid )
// - system structure uuid, device structure uuid, index
if (ValidateUtil.isAnyNull(nameElement, namingConvention, holderIRepositories, nameRepository, holder, nameChoice)) {
if (ValidateUtil.isAnyNull(nameElement, namingConvention, holderIRepositories, nameRepository, holder, nameCommand)) {
return;
}
......@@ -245,7 +243,7 @@ public class ValidateNameElementUtil {
// name
// update, delete - uuid available, not deleted
// retrieve for uuid and check
if (ValidateUtil.isAnyEqual(nameChoice, NameChoice.UPDATE, NameChoice.DELETE)) {
if (ValidateUtil.isAnyEqual(nameCommand, NameCommand.UPDATE, NameCommand.DELETE)) {
List<Name> names = nameRepository.readNames(false, nameElement.getUuid().toString(), null, null, null, null, null, null);
ExceptionUtil.validateConditionDataNotCorrectException(ValidateUtil.isSize(names, 1),
TextUtil.VALUE_IS_NOT_CORRECT, details, TextUtil.UUID);
......@@ -266,7 +264,7 @@ public class ValidateNameElementUtil {
UUID parentDevicestructure = nameElement.getParentdevicestructure();
String index = nameElement.getIndex();
if (ValidateUtil.isAnyEqual(nameChoice, NameChoice.CREATE, NameChoice.UPDATE)) {
if (ValidateUtil.isAnyEqual(nameCommand, NameCommand.CREATE, NameCommand.UPDATE)) {
// systemgroup, system, subsystem - in repository
// found
// not deleted
......@@ -332,25 +330,25 @@ public class ValidateNameElementUtil {
// name
// ok with same name, name equivalence if same uuid
List<Name> names = nameRepository.readNames(false, null, derivedName, null, null, null, null, null);
if (NameChoice.CREATE.equals(nameChoice)) {
if (NameCommand.CREATE.equals(nameCommand)) {
condition = ValidateUtil.isNullOrEmpty(names);
} else {
// NameChoice.UPDATE.equals(nameChoice)
// NameCommand.UPDATE.equals(nameCommand)
condition = ValidateUtil.isNullOrEmpty(names) || names.size() == 1 && names.get(0).getUuid().equals(uuid);
}
ExceptionUtil.validateConditionDataExistException(condition,
TextUtil.CONVENTION_NAME_EXISTS, details, TextUtil.PARENTSYSTEMSTRUCTURE);
names = nameRepository.readNames(false, null, null, namingConvention.equivalenceClassRepresentative(derivedName), null, null, null, null);
if (NameChoice.CREATE.equals(nameChoice)) {
if (NameCommand.CREATE.equals(nameCommand)) {
condition = ValidateUtil.isNullOrEmpty(names);
} else {
// NameChoice.UPDATE.equals(nameChoice)
// NameCommand.UPDATE.equals(nameCommand)
condition = ValidateUtil.isNullOrEmpty(names) || names.size() == 1 && names.get(0).getUuid().equals(uuid);
}
ExceptionUtil.validateConditionDataExistException(condition,
TextUtil.CONVENTION_NAME_EQUIVALENCE_EXISTS, details, TextUtil.PARENTSYSTEMSTRUCTURE);
} else if (NameChoice.DELETE.equals(nameChoice)) {
} else if (NameCommand.DELETE.equals(nameCommand)) {
// n.a.
// uuid - already handled
// comment - already handled
......
......@@ -40,7 +40,7 @@ import org.openepics.names.rest.beans.element.NameElementCommand;
import org.openepics.names.rest.beans.response.ResponseBoolean;
import org.openepics.names.rest.beans.response.ResponseBooleanList;
import org.openepics.names.rest.beans.response.ResponsePageNameElements;
import org.openepics.names.util.EnumUtil.NameChoice;
import org.openepics.names.util.NameCommand;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
......@@ -389,11 +389,11 @@ public class ITUtilNameElement {
* but instead assert response code (possibly also a non-empty message).
*
* @param json json
* @param nameChoice name choice
* @param nameCommand name command
* @param responseCode response code
*/
public static void assertValidate(String json, NameChoice nameChoice, int responseCode) {
assertValidate(AuthorizationChoice.NONE, json, nameChoice, responseCode, Boolean.FALSE, Boolean.FALSE);
public static void assertValidate(String json, NameCommand nameCommand, int responseCode) {
assertValidate(AuthorizationChoice.NONE, json, nameCommand, responseCode, Boolean.FALSE, Boolean.FALSE);
}
/**
* Utility method to (try to) validate a name element from given json and assert expected response.
......@@ -401,13 +401,13 @@ public class ITUtilNameElement {
* but instead assert response code (possibly also a non-empty message).
*
* @param json json
* @param nameChoice name choice
* @param nameCommand name command
* @param responseCode response code
* @param expected expected
* @param expectedMessageEmpty expected message empty
*/
public static void assertValidate(String json, NameChoice nameChoice, int responseCode, Boolean expected, Boolean expectedMessageEmpty) {
assertValidate(AuthorizationChoice.NONE, json, nameChoice, responseCode, expected, expectedMessageEmpty);
public static void assertValidate(String json, NameCommand nameCommand, int responseCode, Boolean expected, Boolean expectedMessageEmpty) {
assertValidate(AuthorizationChoice.NONE, json, nameCommand, responseCode, expected, expectedMessageEmpty);
}
/**
* Utility method to (try to) validate a name element from given json and assert expected response.
......@@ -416,13 +416,13 @@ public class ITUtilNameElement {
*
* @param authorizationChoice authorization choice (none, user, admin)
* @param json json
* @param nameChoice name choice
* @param nameCommand name command
* @param responseCode response code
* @param expected expected
* @param expectedMessageEmpty expected message empty
*/
public static void assertValidate(AuthorizationChoice authorizationChoice, String json, NameChoice nameChoice, int responseCode, Boolean expected, Boolean expectedMessageEmpty) {
String validatePath = getValidatePath(nameChoice);
public static void assertValidate(AuthorizationChoice authorizationChoice, String json, NameCommand nameCommand, int responseCode, Boolean expected, Boolean expectedMessageEmpty) {
String validatePath = getValidatePath(nameCommand);
try {
String[] response = null;
......@@ -447,44 +447,44 @@ public class ITUtilNameElement {
* Utility method to validate and assert expected response.
*
* @param nameElement name element
* @param nameChoice name choice
* @param nameCommand name command
* @param index index
* @param expected expected response
*/
public static void assertValidate(NameElementCommand nameElement, NameChoice nameChoice, String index, Boolean expected) {
public static void assertValidate(NameElementCommand nameElement, NameCommand nameCommand, String index, Boolean expected) {
nameElement.setIndex(index);
assertValidate(AuthorizationChoice.NONE, new NameElementCommand[] {nameElement}, nameChoice, expected);
assertValidate(AuthorizationChoice.NONE, new NameElementCommand[] {nameElement}, nameCommand, expected);
}
/**
* Utility method to validate name element and assert expected response.
*
* @param nameElement name element
* @param nameChoice name choice
* @param nameCommand name command
* @param expected expected response
*/
public static void assertValidate(NameElementCommand nameElement, NameChoice nameChoice, Boolean expected) {
assertValidate(AuthorizationChoice.NONE, new NameElementCommand[] {nameElement}, nameChoice, expected);
public static void assertValidate(NameElementCommand nameElement, NameCommand nameCommand, Boolean expected) {
assertValidate(AuthorizationChoice.NONE, new NameElementCommand[] {nameElement}, nameCommand, expected);
}
/**
* Utility method to validate name elements and assert expected response.
*
* @param nameElements name elements
* @param nameChoice name choice
* @param nameCommand name command
* @param expected expected response
*/
public static void assertValidate(NameElementCommand[] nameElements, NameChoice nameChoice, Boolean expected) {
assertValidate(AuthorizationChoice.NONE, nameElements, nameChoice, expected);
public static void assertValidate(NameElementCommand[] nameElements, NameCommand nameCommand, Boolean expected) {
assertValidate(AuthorizationChoice.NONE, nameElements, nameCommand, expected);
}
/**
* Utility method to validate name elements and assert expected response.
*
* @param authorizationChoice authorization choice (none, user, admin)
* @param nameElements name elements
* @param nameChoice name choice
* @param nameCommand name command
* @param expected expected response
*/
public static void assertValidate(AuthorizationChoice authorizationChoice, NameElementCommand[] nameElements, NameChoice nameChoice, Boolean expected) {
String path = getValidatePath(nameChoice);
public static void assertValidate(AuthorizationChoice authorizationChoice, NameElementCommand[] nameElements, NameCommand nameCommand, Boolean expected) {
String path = getValidatePath(nameCommand);
try {
String[] response = null;
......@@ -502,14 +502,14 @@ public class ITUtilNameElement {
}
/**
* Utility method to return validate path for name choice.
* Utility method to return validate path for name command.
*
* @param nameChoice name choice
* @param nameCommand name command
* @return validate path
*/
private static String getValidatePath(NameChoice nameChoice) {
private static String getValidatePath(NameCommand nameCommand) {
String validatePath = "";
switch (nameChoice) {
switch (nameCommand) {
case CREATE:
validatePath = "/validatecreate";
break;
......@@ -601,7 +601,7 @@ public class ITUtilNameElement {
* @return created name element
*/
public static NameElement[] assertCreate(AuthorizationChoice authorizationChoice, NameElementCommand[] nameElements) {
String path = getValidatePath(NameChoice.CREATE);
String path = getValidatePath(NameCommand.CREATE);
try {
String[] response = null;
......@@ -663,7 +663,7 @@ public class ITUtilNameElement {
* @return updated name element
*/
public static NameElement[] assertUpdate(AuthorizationChoice authorizationChoice, NameElementCommand[] nameElements) {
String path = getValidatePath(NameChoice.UPDATE);
String path = getValidatePath(NameCommand.UPDATE);
try {
String[] response = null;
......@@ -722,7 +722,7 @@ public class ITUtilNameElement {
* @return deleted name element
*/
public static NameElement[] assertDelete(AuthorizationChoice authorizationChoice, NameElementCommand[] nameElements) {
String path = getValidatePath(NameChoice.DELETE);
String path = getValidatePath(NameCommand.DELETE);
try {
String[] response = null;
......
......@@ -41,7 +41,7 @@ import org.openepics.names.rest.beans.element.StructureElementCommand;
import org.openepics.names.rest.beans.response.ResponseBoolean;
import org.openepics.names.rest.beans.response.ResponseBooleanList;
import org.openepics.names.rest.beans.response.ResponsePageStructureElements;
import org.openepics.names.util.EnumUtil.StructureChoice;
import org.openepics.names.util.StructureCommand;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
......@@ -375,11 +375,11 @@ public class ITUtilStructureElement {
* but instead assert response code (possibly also a non-empty message).
*
* @param json json
* @param structureChoice structure choice
* @param structureCommand structure command
* @param responseCode response code
*/
public static void assertValidate(String json, StructureChoice structureChoice, int responseCode) {
assertValidate(AuthorizationChoice.NONE, json, structureChoice, responseCode);
public static void assertValidate(String json, StructureCommand structureCommand, int responseCode) {
assertValidate(AuthorizationChoice.NONE, json, structureCommand, responseCode);
}
/**
* Utility method to (try to) validate a structure element from given json and assert expected response.
......@@ -388,11 +388,11 @@ public class ITUtilStructureElement {
*
* @param authorizationChoice authorization choice (none, user, admin)
* @param json json
* @param structureChoice structure choice
* @param structureCommand structure command
* @param responseCode response code
*/
public static void assertValidate(AuthorizationChoice authorizationChoice, String json, StructureChoice structureChoice, int responseCode) {
String validatePath = getValidatePath(structureChoice);
public static void assertValidate(AuthorizationChoice authorizationChoice, String json, StructureCommand structureCommand, int responseCode) {
String validatePath = getValidatePath(structureCommand);
try {
String[] response = ITUtil.runShellCommand(ITUtil.curlGetPathJson(authorizationChoice, EndpointChoice.STRUCTURES, validatePath, json));
......@@ -412,32 +412,32 @@ public class ITUtilStructureElement {
* Utility method to validate structure element and assert expected response.
*
* @param structureElement structure element
* @param structureChoice structure choice
* @param structureCommand structure command
* @param expected expected response
*/
public static void assertValidate(StructureElementCommand structureElement, StructureChoice structureChoice, Boolean expected) {
assertValidate(AuthorizationChoice.NONE, new StructureElementCommand[] {structureElement}, structureChoice, expected);
public static void assertValidate(StructureElementCommand structureElement, StructureCommand structureCommand, Boolean expected) {
assertValidate(AuthorizationChoice.NONE, new StructureElementCommand[] {structureElement}, structureCommand, expected);
}
/**
* Utility method to validate structure elements and assert expected response.
*
* @param structureElements structure elements
* @param structureChoice structure choice
* @param structureCommand structure command
* @param expected expected response
*/
public static void assertValidate(StructureElementCommand[] structureElements, StructureChoice structureChoice, Boolean expected) {
assertValidate(AuthorizationChoice.NONE, structureElements, structureChoice, expected);
public static void assertValidate(StructureElementCommand[] structureElements, StructureCommand structureCommand, Boolean expected) {
assertValidate(AuthorizationChoice.NONE, structureElements, structureCommand, expected);
}
/**
* Utility method to validate structure elements and assert expected response.
*
* @param authorizationChoice authorization choice (none, user, admin)
* @param structureElements structure elements
* @param structureChoice structure choice
* @param structureCommand structure command
* @param expected expected response
*/
public static void assertValidate(AuthorizationChoice authorizationChoice, StructureElementCommand[] structureElements, StructureChoice structureChoice, Boolean expected) {
String path = getValidatePath(structureChoice);
public static void assertValidate(AuthorizationChoice authorizationChoice, StructureElementCommand[] structureElements, StructureCommand structureCommand, Boolean expected) {
String path = getValidatePath(structureCommand);
try {
String[] response = null;
......@@ -455,14 +455,14 @@ public class ITUtilStructureElement {
}
/**
* Utility method to return validate path for structure choice.
* Utility method to return validate path for structure command.
*
* @param structureChoice structure choice
* @param structureCommand structure command
* @return validate path
*/
private static String getValidatePath(StructureChoice structureChoice) {
private static String getValidatePath(StructureCommand structureCommand) {
String validatePath = "";
switch (structureChoice) {
switch (structureCommand) {
case CREATE:
validatePath = "/validatecreate";
break;
......@@ -563,7 +563,7 @@ public class ITUtilStructureElement {
* @return created structure element
*/
public static StructureElement[] assertCreate(AuthorizationChoice authorizationChoice, StructureElementCommand[] structureElements) {
String path = getValidatePath(StructureChoice.CREATE);
String path = getValidatePath(StructureCommand.CREATE);
try {
String[] response = null;
......@@ -626,7 +626,7 @@ public class ITUtilStructureElement {
* @return updated structure element
*/
public static StructureElement[] assertUpdate(AuthorizationChoice authorizationChoice, StructureElementCommand[] structureElements) {
String path = getValidatePath(StructureChoice.UPDATE);
String path = getValidatePath(StructureCommand.UPDATE);
try {
String[] response = null;
......@@ -686,7 +686,7 @@ public class ITUtilStructureElement {
* @return deleted structure element
*/
public static StructureElement[] assertDelete(AuthorizationChoice authorizationChoice, StructureElementCommand[] structureElements) {
String path = getValidatePath(StructureChoice.DELETE);
String path = getValidatePath(StructureCommand.DELETE);
try {
String[] response = null;
......@@ -746,7 +746,7 @@ public class ITUtilStructureElement {
* @return approved structure element
*/
public static StructureElement[] assertApprove(AuthorizationChoice authorizationChoice, StructureElementCommand[] structureElements) {
String path = getValidatePath(StructureChoice.APPROVE);
String path = getValidatePath(StructureCommand.APPROVE);
try {
String[] response = null;
......@@ -806,7 +806,7 @@ public class ITUtilStructureElement {
* @return cancelled structure element
*/
public static StructureElement[] assertCancel(AuthorizationChoice authorizationChoice, StructureElementCommand[] structureElements) {
String path = getValidatePath(StructureChoice.CANCEL);
String path = getValidatePath(StructureCommand.CANCEL);
try {
String[] response = null;
......@@ -866,7 +866,7 @@ public class ITUtilStructureElement {
* @return rejected structure element
*/
public static StructureElement[] assertReject(AuthorizationChoice authorizationChoice, StructureElementCommand[] structureElements) {
String path = getValidatePath(StructureChoice.REJECT);
String path = getValidatePath(StructureCommand.REJECT);
try {
String[] response = null;
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment