TSK-1807: renamed setCustomAttribute to setCustomField

This commit is contained in:
holgerhagen 2022-02-24 16:54:38 +01:00 committed by holgerhagen
parent cb2dd603b5
commit 4f48fe93c6
55 changed files with 410 additions and 320 deletions

View File

@ -45,10 +45,10 @@ class CreateHistoryEventOnClassificationsUpdateAccTest extends AbstractAccTest {
classification.setName("new name");
classification.setDescription("new description");
classification.setCategory("EXTERNAL");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_1, "new custom 1");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_2, "new custom 2");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_3, "new custom 3");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_4, "new custom 4");
classification.setCustomField(ClassificationCustomField.CUSTOM_1, "new custom 1");
classification.setCustomField(ClassificationCustomField.CUSTOM_2, "new custom 2");
classification.setCustomField(ClassificationCustomField.CUSTOM_3, "new custom 3");
classification.setCustomField(ClassificationCustomField.CUSTOM_4, "new custom 4");
classificationService.updateClassification(classification);
events =

View File

@ -44,10 +44,10 @@ class CreateHistoryEventOnWorkbasketUpdateAccTest extends AbstractAccTest {
workbasket.setOrgLevel2("new level 2");
workbasket.setOrgLevel3("new level 3");
workbasket.setOrgLevel4("new level 4");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_1, "new custom 1");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_2, "new custom 2");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_3, "new custom 3");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_4, "new custom 4");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_1, "new custom 1");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_2, "new custom 2");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_3, "new custom 3");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_4, "new custom 4");
workbasket.setDescription("new description");
workbasketService.updateWorkbasket(workbasket);

View File

@ -129,9 +129,18 @@ public interface Classification extends ClassificationSummary {
*
* @param customField identifies which custom attribute is to be set.
* @param value the value of the custom attribute to be set
* @deprecated Use {@link #setCustomField(ClassificationCustomField, String)} instead
*/
void setCustomAttribute(ClassificationCustomField customField, String value);
/**
* Sets the value for custom field.
*
* @param customField identifies which custom field is to be set.
* @param value the value of the custom field to be set
*/
void setCustomField(ClassificationCustomField customField, String value);
/**
* Return a summary of the current Classification.
*

View File

@ -91,9 +91,18 @@ public interface ClassificationSummary {
*
* @param customField identifies which custom attribute is requested.
* @return the value for the given customField
* @deprecated Use {@link #getCustomField(ClassificationCustomField)} instead
*/
String getCustomAttribute(ClassificationCustomField customField);
/**
* Gets the custom field of the classification.
*
* @param customField identifies which custom field is requested.
* @return the value for the given custom field
*/
String getCustomField(ClassificationCustomField customField);
/**
* Duplicates this ClassificationSummary without the id.
*

View File

@ -79,7 +79,7 @@ public class ClassificationBuilder {
public ClassificationBuilder customAttribute(
ClassificationCustomField customField, String value) {
testClassification.setCustomAttribute(customField, value);
testClassification.setCustomField(customField, value);
return this;
}

View File

@ -81,8 +81,14 @@ public class ClassificationImpl extends ClassificationSummaryImpl implements Cla
this.description = description;
}
@Deprecated
@Override
public void setCustomAttribute(ClassificationCustomField customField, String value) {
setCustomField(customField, value);
}
@Override
public void setCustomField(ClassificationCustomField customField, String value) {
switch (customField) {
case CUSTOM_1:
custom1 = value;

View File

@ -150,8 +150,14 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
this.priority = priority;
}
@Deprecated
@Override
public String getCustomAttribute(ClassificationCustomField customField) {
return getCustomField(customField);
}
@Override
public String getCustomField(ClassificationCustomField customField) {
switch (customField) {
case CUSTOM_1:
return custom1;

View File

@ -99,11 +99,11 @@ public interface TimeIntervalReportBuilder<
* Adds the values of a certain {@linkplain TaskCustomField} for exact matching to the builder.
*
* <p>The created report contains only tasks with a {@linkplain
* Task#getCustomAttribute(TaskCustomField) custom attribute} value exactly matching one of the
* Task#getCustomField(TaskCustomField) custom attribute} value exactly matching one of the
* items in the list.
*
* @param customField the specified {@linkplain TaskCustomField}
* @param strings the values the specified {@linkplain Task#getCustomAttribute(TaskCustomField)
* @param strings the values the specified {@linkplain Task#getCustomField(TaskCustomField)
* custom attribute} should match
* @return the modified {@linkplain TimeIntervalReportBuilder}
* @throws InvalidArgumentException if filter values are not given
@ -115,11 +115,11 @@ public interface TimeIntervalReportBuilder<
* Excludes the values of a certain {@linkplain TaskCustomField} to the builder.
*
* <p>The created report contains only tasks with a {@linkplain
* Task#getCustomAttribute(TaskCustomField) custom attribute} value not matching one of the items
* Task#getCustomField(TaskCustomField) custom attribute} value not matching one of the items
* in the list.
*
* @param customField the specified {@linkplain TaskCustomField}
* @param strings the values the specified {@linkplain Task#getCustomAttribute(TaskCustomField)
* @param strings the values the specified {@linkplain Task#getCustomField(TaskCustomField)
* custom attribute} should not match
* @return the modified {@linkplain TimeIntervalReportBuilder}
* @throws InvalidArgumentException if filter values are not given
@ -131,13 +131,13 @@ public interface TimeIntervalReportBuilder<
* Adds the values of a certain {@linkplain TaskCustomField} for pattern matching to the builder.
*
* <p>The created report contains only tasks with a {@linkplain
* Task#getCustomAttribute(TaskCustomField) custom attribute} value pattern-matching one of the
* Task#getCustomField(TaskCustomField) custom attribute} value pattern-matching one of the
* items in the list. They will be compared in SQL with the LIKE operator. You may use a wildcard
* like % to specify the pattern. If you specify multiple arguments they are combined with the OR
* keyword.
*
* @param customField the specified {@linkplain TaskCustomField}
* @param strings the values the specified {@linkplain Task#getCustomAttribute(TaskCustomField)
* @param strings the values the specified {@linkplain Task#getCustomField(TaskCustomField)
* custom attribute} should match
* @return the modified {@linkplain TimeIntervalReportBuilder}
* @throws InvalidArgumentException if filter values are not given

View File

@ -100,11 +100,11 @@ public class WorkbasketPriorityReport extends Report<PriorityQueryItem, Priority
* Adds the values of a certain {@linkplain TaskCustomField} for exact matching to the builder.
*
* <p>The created report contains only tasks with a {@linkplain
* Task#getCustomAttribute(TaskCustomField) custom attribute} value exactly matching one of the
* Task#getCustomField(TaskCustomField) custom attribute} value exactly matching one of the
* items in the list.
*
* @param customField the specified {@linkplain TaskCustomField}
* @param strings the values the specified {@linkplain Task#getCustomAttribute(TaskCustomField)
* @param strings the values the specified {@linkplain Task#getCustomField(TaskCustomField)
* custom attribute} should match
* @return the modified {@linkplain TimeIntervalReportBuilder}
* @throws InvalidArgumentException if filter values are not given
@ -116,11 +116,11 @@ public class WorkbasketPriorityReport extends Report<PriorityQueryItem, Priority
* Excludes the values of a certain {@linkplain TaskCustomField} to the builder.
*
* <p>The created report contains only tasks with a {@linkplain
* Task#getCustomAttribute(TaskCustomField) custom attribute} value not matching one of the
* Task#getCustomField(TaskCustomField) custom attribute} value not matching one of the
* items in the list.
*
* @param customField the specified {@linkplain TaskCustomField}
* @param strings the values the specified {@linkplain Task#getCustomAttribute(TaskCustomField)
* @param strings the values the specified {@linkplain Task#getCustomField(TaskCustomField)
* custom attribute} should not match
* @return the modified {@linkplain TimeIntervalReportBuilder}
* @throws InvalidArgumentException if filter values are not given
@ -133,13 +133,13 @@ public class WorkbasketPriorityReport extends Report<PriorityQueryItem, Priority
* builder.
*
* <p>The created report contains only tasks with a {@linkplain
* Task#getCustomAttribute(TaskCustomField) custom attribute} value pattern-matching one of the
* Task#getCustomField(TaskCustomField) custom attribute} value pattern-matching one of the
* items in the list. They will be compared in SQL with the LIKE operator. You may use a
* wildcard like % to specify the pattern. If you specify multiple arguments they are combined
* with the OR keyword.
*
* @param customField the specified {@linkplain TaskCustomField}
* @param strings the values the specified {@linkplain Task#getCustomAttribute(TaskCustomField)
* @param strings the values the specified {@linkplain Task#getCustomField(TaskCustomField)
* custom attribute} should match
* @return the modified {@linkplain TimeIntervalReportBuilder}
* @throws InvalidArgumentException if filter values are not given

View File

@ -53,14 +53,14 @@ public class ClassificationHistoryEvent {
priority = classification.getPriority();
serviceLevel = classification.getServiceLevel();
type = classification.getType();
custom1 = classification.getCustomAttribute(ClassificationCustomField.CUSTOM_1);
custom2 = classification.getCustomAttribute(ClassificationCustomField.CUSTOM_2);
custom3 = classification.getCustomAttribute(ClassificationCustomField.CUSTOM_3);
custom4 = classification.getCustomAttribute(ClassificationCustomField.CUSTOM_4);
custom5 = classification.getCustomAttribute(ClassificationCustomField.CUSTOM_5);
custom6 = classification.getCustomAttribute(ClassificationCustomField.CUSTOM_6);
custom7 = classification.getCustomAttribute(ClassificationCustomField.CUSTOM_7);
custom8 = classification.getCustomAttribute(ClassificationCustomField.CUSTOM_8);
custom1 = classification.getCustomField(ClassificationCustomField.CUSTOM_1);
custom2 = classification.getCustomField(ClassificationCustomField.CUSTOM_2);
custom3 = classification.getCustomField(ClassificationCustomField.CUSTOM_3);
custom4 = classification.getCustomField(ClassificationCustomField.CUSTOM_4);
custom5 = classification.getCustomField(ClassificationCustomField.CUSTOM_5);
custom6 = classification.getCustomField(ClassificationCustomField.CUSTOM_6);
custom7 = classification.getCustomField(ClassificationCustomField.CUSTOM_7);
custom8 = classification.getCustomField(ClassificationCustomField.CUSTOM_8);
this.details = details;
}

View File

@ -42,10 +42,10 @@ public class WorkbasketHistoryEvent {
key = workbasket.getKey();
type = workbasket.getType().name();
owner = workbasket.getOwner();
custom1 = workbasket.getCustomAttribute(WorkbasketCustomField.CUSTOM_1);
custom2 = workbasket.getCustomAttribute(WorkbasketCustomField.CUSTOM_2);
custom3 = workbasket.getCustomAttribute(WorkbasketCustomField.CUSTOM_3);
custom4 = workbasket.getCustomAttribute(WorkbasketCustomField.CUSTOM_4);
custom1 = workbasket.getCustomField(WorkbasketCustomField.CUSTOM_1);
custom2 = workbasket.getCustomField(WorkbasketCustomField.CUSTOM_2);
custom3 = workbasket.getCustomField(WorkbasketCustomField.CUSTOM_3);
custom4 = workbasket.getCustomField(WorkbasketCustomField.CUSTOM_4);
orgLevel1 = workbasket.getOrgLevel1();
orgLevel2 = workbasket.getOrgLevel2();
orgLevel3 = workbasket.getOrgLevel3();

View File

@ -112,9 +112,18 @@ public interface Task extends TaskSummary {
*
* @param customField identifies which custom attribute is to be set.
* @param value the value of the custom attribute to be set
* @deprecated Use {@link #setCustomField(TaskCustomField, String)} instead
*/
void setCustomAttribute(TaskCustomField customField, String value);
/**
* Sets the value for custom field.
*
* @param customField identifies which custom field is to be set.
* @param value the value of the custom field to be set
*/
void setCustomField(TaskCustomField customField, String value);
/**
* Add an attachment.<br>
* NULL will be ignored and an attachment with the same ID will be replaced by the newer one.<br>

View File

@ -245,9 +245,18 @@ public interface TaskSummary {
*
* @param customField identifies which custom attribute is requested.
* @return the value for the given customField
* @deprecated Use {@link #getCustomField(TaskCustomField)} instead
*/
String getCustomAttribute(TaskCustomField customField);
/**
* Gets the custom attribute of the task.
*
* @param customField identifies which custom attribute is requested.
* @return the value for the given customField
*/
String getCustomField(TaskCustomField customField);
/**
* Duplicates this TaskSummary without the internal and external id.
*

View File

@ -1773,7 +1773,7 @@ public class TaskServiceImpl implements TaskService {
for (Map.Entry<TaskCustomField, String> entry : customFieldsToUpdate.entrySet()) {
TaskCustomField key = entry.getKey();
fieldSelector.setCustomProperty(key, true);
newTask.setCustomAttribute(key, entry.getValue());
newTask.setCustomField(key, entry.getValue());
}
return newTask;
}

View File

@ -175,7 +175,7 @@ public class TaskBuilder {
}
public TaskBuilder customAttribute(TaskCustomField customField, String value) {
testTask.setCustomAttribute(customField, value);
testTask.setCustomField(customField, value);
return this;
}

View File

@ -108,8 +108,14 @@ public class TaskImpl extends TaskSummaryImpl implements Task {
this.callbackInfo = callbackInfo;
}
@Deprecated
@Override
public void setCustomAttribute(TaskCustomField customField, String value) {
setCustomField(customField, value);
}
@Override
public void setCustomField(TaskCustomField customField, String value) {
switch (customField) {
case CUSTOM_1:
custom1 = value;

View File

@ -363,8 +363,14 @@ public class TaskSummaryImpl implements TaskSummary {
this.isTransferred = isTransferred;
}
@Deprecated
@Override
public String getCustomAttribute(TaskCustomField customField) {
return getCustomField(customField);
}
@Override
public String getCustomField(TaskCustomField customField) {
switch (customField) {
case CUSTOM_1:

View File

@ -34,9 +34,18 @@ public interface Workbasket extends WorkbasketSummary {
*
* @param customField identifies which custom attribute is to be set.
* @param value the value of the custom attribute to be set
* @deprecated Use {@link #setCustomField(WorkbasketCustomField, String)} instead
*/
void setCustomAttribute(WorkbasketCustomField customField, String value);
/**
* Sets the value for custom field.
*
* @param customField identifies which custom field is to be set.
* @param value the value of the custom field to be set
*/
void setCustomField(WorkbasketCustomField customField, String value);
/**
* Sets the value for orgLevel1 attribute.
*

View File

@ -63,9 +63,18 @@ public interface WorkbasketSummary {
*
* @param customField identifies which custom attribute is requested.
* @return the value for the given customField
* @deprecated Use {@link #getCustomField(WorkbasketCustomField)} instead
*/
String getCustomAttribute(WorkbasketCustomField customField);
/**
* Gets the custom attribute of the workbasket.
*
* @param customField identifies which custom attribute is requested.
* @return the value for the given customField
*/
String getCustomField(WorkbasketCustomField customField);
/**
* Gets the orglevel1 property of the workbasket.
*

View File

@ -58,7 +58,7 @@ public class WorkbasketBuilder {
}
public WorkbasketBuilder customAttribute(WorkbasketCustomField customField, String value) {
testWorkbasket.setCustomAttribute(customField, value);
testWorkbasket.setCustomField(customField, value);
return this;
}

View File

@ -24,8 +24,14 @@ public class WorkbasketImpl extends WorkbasketSummaryImpl implements Workbasket
this.key = key;
}
@Deprecated
@Override
public void setCustomAttribute(WorkbasketCustomField customField, String value) {
setCustomField(customField, value);
}
@Override
public void setCustomField(WorkbasketCustomField customField, String value) {
switch (customField) {
case CUSTOM_1:
custom1 = value;

View File

@ -109,8 +109,14 @@ public class WorkbasketSummaryImpl implements WorkbasketSummary {
this.type = type;
}
@Deprecated
@Override
public String getCustomAttribute(WorkbasketCustomField customField) {
return getCustomField(customField);
}
@Override
public String getCustomField(WorkbasketCustomField customField) {
switch (customField) {
case CUSTOM_1:
return custom1;

View File

@ -98,14 +98,14 @@ class ClassificationBuilderTest {
expectedClassification.setParentKey(parentClassification.getKey());
expectedClassification.setPriority(1337);
expectedClassification.setServiceLevel("P15D");
expectedClassification.setCustomAttribute(ClassificationCustomField.CUSTOM_1, "custom 1 value");
expectedClassification.setCustomAttribute(ClassificationCustomField.CUSTOM_2, "custom 2 value");
expectedClassification.setCustomAttribute(ClassificationCustomField.CUSTOM_3, "custom 3 value");
expectedClassification.setCustomAttribute(ClassificationCustomField.CUSTOM_4, "custom 4 value");
expectedClassification.setCustomAttribute(ClassificationCustomField.CUSTOM_5, "custom 5 value");
expectedClassification.setCustomAttribute(ClassificationCustomField.CUSTOM_6, "custom 6 value");
expectedClassification.setCustomAttribute(ClassificationCustomField.CUSTOM_7, "custom 7 value");
expectedClassification.setCustomAttribute(ClassificationCustomField.CUSTOM_8, "custom 8 value");
expectedClassification.setCustomField(ClassificationCustomField.CUSTOM_1, "custom 1 value");
expectedClassification.setCustomField(ClassificationCustomField.CUSTOM_2, "custom 2 value");
expectedClassification.setCustomField(ClassificationCustomField.CUSTOM_3, "custom 3 value");
expectedClassification.setCustomField(ClassificationCustomField.CUSTOM_4, "custom 4 value");
expectedClassification.setCustomField(ClassificationCustomField.CUSTOM_5, "custom 5 value");
expectedClassification.setCustomField(ClassificationCustomField.CUSTOM_6, "custom 6 value");
expectedClassification.setCustomField(ClassificationCustomField.CUSTOM_7, "custom 7 value");
expectedClassification.setCustomField(ClassificationCustomField.CUSTOM_8, "custom 8 value");
expectedClassification.setIsValidInDomain(false);
expectedClassification.setCreated(Instant.parse("2021-05-17T07:16:26.747Z"));
expectedClassification.setModified(Instant.parse("2021-05-18T07:16:26.747Z"));

View File

@ -176,22 +176,22 @@ class TaskBuilderTest {
expectedTask.setTransferred(true);
expectedTask.setCreator("user-1-1");
expectedTask.addAttachment(attachment);
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_1, "custom1");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_2, "custom2");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_3, "custom3");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_4, "custom4");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_5, "custom5");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_6, "custom6");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_7, "custom7");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_8, "custom8");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_9, "custom9");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_10, "custom10");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_11, "custom11");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_12, "custom12");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_13, "custom13");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_14, "custom14");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_15, "custom15");
expectedTask.setCustomAttribute(TaskCustomField.CUSTOM_16, "custom16");
expectedTask.setCustomField(TaskCustomField.CUSTOM_1, "custom1");
expectedTask.setCustomField(TaskCustomField.CUSTOM_2, "custom2");
expectedTask.setCustomField(TaskCustomField.CUSTOM_3, "custom3");
expectedTask.setCustomField(TaskCustomField.CUSTOM_4, "custom4");
expectedTask.setCustomField(TaskCustomField.CUSTOM_5, "custom5");
expectedTask.setCustomField(TaskCustomField.CUSTOM_6, "custom6");
expectedTask.setCustomField(TaskCustomField.CUSTOM_7, "custom7");
expectedTask.setCustomField(TaskCustomField.CUSTOM_8, "custom8");
expectedTask.setCustomField(TaskCustomField.CUSTOM_9, "custom9");
expectedTask.setCustomField(TaskCustomField.CUSTOM_10, "custom10");
expectedTask.setCustomField(TaskCustomField.CUSTOM_11, "custom11");
expectedTask.setCustomField(TaskCustomField.CUSTOM_12, "custom12");
expectedTask.setCustomField(TaskCustomField.CUSTOM_13, "custom13");
expectedTask.setCustomField(TaskCustomField.CUSTOM_14, "custom14");
expectedTask.setCustomField(TaskCustomField.CUSTOM_15, "custom15");
expectedTask.setCustomField(TaskCustomField.CUSTOM_16, "custom16");
expectedTask.setCallbackInfo(Map.of("custom", "value"));
expectedTask.setCallbackState(CallbackState.CALLBACK_PROCESSING_COMPLETED);

View File

@ -95,10 +95,10 @@ class WorkbasketBuilderTest {
expectedWorkbasket.setDescription("A test description");
expectedWorkbasket.setOwner("user-1-1");
expectedWorkbasket.setType(WorkbasketType.PERSONAL);
expectedWorkbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_1, "custom 1 value");
expectedWorkbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_2, "custom 2 value");
expectedWorkbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_3, "custom 3 value");
expectedWorkbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_4, "custom 4 value");
expectedWorkbasket.setCustomField(WorkbasketCustomField.CUSTOM_1, "custom 1 value");
expectedWorkbasket.setCustomField(WorkbasketCustomField.CUSTOM_2, "custom 2 value");
expectedWorkbasket.setCustomField(WorkbasketCustomField.CUSTOM_3, "custom 3 value");
expectedWorkbasket.setCustomField(WorkbasketCustomField.CUSTOM_4, "custom 4 value");
expectedWorkbasket.setOrgLevel1("org level 1");
expectedWorkbasket.setOrgLevel2("org level 2");
expectedWorkbasket.setOrgLevel3("org level 3");

View File

@ -23,14 +23,14 @@ class ClassificationModelsCloneTest {
Classification dummyClassificationForSummaryTest = new ClassificationImpl();
dummyClassificationForSummaryTest.setApplicationEntryPoint("dummyEntryPoint");
dummyClassificationForSummaryTest.setCategory("dummyCategory");
dummyClassificationForSummaryTest.setCustomAttribute(CUSTOM_1, "dummyCustom1");
dummyClassificationForSummaryTest.setCustomAttribute(CUSTOM_2, "dummyCustom2");
dummyClassificationForSummaryTest.setCustomAttribute(CUSTOM_3, "dummyCustom3");
dummyClassificationForSummaryTest.setCustomAttribute(CUSTOM_4, "dummyCustom4");
dummyClassificationForSummaryTest.setCustomAttribute(CUSTOM_5, "dummyCustom5");
dummyClassificationForSummaryTest.setCustomAttribute(CUSTOM_6, "dummyCustom6");
dummyClassificationForSummaryTest.setCustomAttribute(CUSTOM_7, "dummyCustom7");
dummyClassificationForSummaryTest.setCustomAttribute(CUSTOM_8, "dummyCustom8");
dummyClassificationForSummaryTest.setCustomField(CUSTOM_1, "dummyCustom1");
dummyClassificationForSummaryTest.setCustomField(CUSTOM_2, "dummyCustom2");
dummyClassificationForSummaryTest.setCustomField(CUSTOM_3, "dummyCustom3");
dummyClassificationForSummaryTest.setCustomField(CUSTOM_4, "dummyCustom4");
dummyClassificationForSummaryTest.setCustomField(CUSTOM_5, "dummyCustom5");
dummyClassificationForSummaryTest.setCustomField(CUSTOM_6, "dummyCustom6");
dummyClassificationForSummaryTest.setCustomField(CUSTOM_7, "dummyCustom7");
dummyClassificationForSummaryTest.setCustomField(CUSTOM_8, "dummyCustom8");
dummyClassificationForSummaryTest.setDescription("dummyDescription");
dummyClassificationForSummaryTest.setIsValidInDomain(true);
dummyClassificationForSummaryTest.setParentId("dummyParentId");
@ -57,14 +57,14 @@ class ClassificationModelsCloneTest {
dummyClassification.setId("dummyId");
dummyClassification.setApplicationEntryPoint("dummyEntryPoint");
dummyClassification.setCategory("dummyCategory");
dummyClassification.setCustomAttribute(CUSTOM_1, "dummyCustom1");
dummyClassification.setCustomAttribute(CUSTOM_2, "dummyCustom2");
dummyClassification.setCustomAttribute(CUSTOM_3, "dummyCustom3");
dummyClassification.setCustomAttribute(CUSTOM_4, "dummyCustom4");
dummyClassification.setCustomAttribute(CUSTOM_5, "dummyCustom5");
dummyClassification.setCustomAttribute(CUSTOM_6, "dummyCustom6");
dummyClassification.setCustomAttribute(CUSTOM_7, "dummyCustom7");
dummyClassification.setCustomAttribute(CUSTOM_8, "dummyCustom8");
dummyClassification.setCustomField(CUSTOM_1, "dummyCustom1");
dummyClassification.setCustomField(CUSTOM_2, "dummyCustom2");
dummyClassification.setCustomField(CUSTOM_3, "dummyCustom3");
dummyClassification.setCustomField(CUSTOM_4, "dummyCustom4");
dummyClassification.setCustomField(CUSTOM_5, "dummyCustom5");
dummyClassification.setCustomField(CUSTOM_6, "dummyCustom6");
dummyClassification.setCustomField(CUSTOM_7, "dummyCustom7");
dummyClassification.setCustomField(CUSTOM_8, "dummyCustom8");
dummyClassification.setDescription("dummyDescription");
dummyClassification.setIsValidInDomain(true);
dummyClassification.setParentId("dummyParentId");

View File

@ -51,14 +51,14 @@ class GetClassificationAccTest extends AbstractAccTest {
assertThat(classification.getPriority()).isEqualTo(2);
assertThat(classification.getServiceLevel()).isEqualTo("P2D");
assertThat(classification.getApplicationEntryPoint()).isEqualTo("point0815");
assertThat(classification.getCustomAttribute(CUSTOM_1)).isEqualTo("VNR");
assertThat(classification.getCustomAttribute(CUSTOM_2)).isEqualTo("custom2");
assertThat(classification.getCustomAttribute(CUSTOM_3)).isEqualTo("custom3");
assertThat(classification.getCustomAttribute(CUSTOM_4)).isEqualTo("custom4");
assertThat(classification.getCustomAttribute(CUSTOM_5)).isEqualTo("custom5");
assertThat(classification.getCustomAttribute(CUSTOM_6)).isEqualTo("custom6");
assertThat(classification.getCustomAttribute(CUSTOM_7)).isEqualTo("custom7");
assertThat(classification.getCustomAttribute(CUSTOM_8)).isEqualTo("custom8");
assertThat(classification.getCustomField(CUSTOM_1)).isEqualTo("VNR");
assertThat(classification.getCustomField(CUSTOM_2)).isEqualTo("custom2");
assertThat(classification.getCustomField(CUSTOM_3)).isEqualTo("custom3");
assertThat(classification.getCustomField(CUSTOM_4)).isEqualTo("custom4");
assertThat(classification.getCustomField(CUSTOM_5)).isEqualTo("custom5");
assertThat(classification.getCustomField(CUSTOM_6)).isEqualTo("custom6");
assertThat(classification.getCustomField(CUSTOM_7)).isEqualTo("custom7");
assertThat(classification.getCustomField(CUSTOM_8)).isEqualTo("custom8");
}
@Test
@ -76,14 +76,14 @@ class GetClassificationAccTest extends AbstractAccTest {
assertThat(classification.getPriority()).isEqualTo(2);
assertThat(classification.getServiceLevel()).isEqualTo("P2D");
assertThat(classification.getApplicationEntryPoint()).isEqualTo("point0815");
assertThat(classification.getCustomAttribute(CUSTOM_1)).isEqualTo("VNR");
assertThat(classification.getCustomAttribute(CUSTOM_2)).isEqualTo("custom2");
assertThat(classification.getCustomAttribute(CUSTOM_3)).isEqualTo("custom3");
assertThat(classification.getCustomAttribute(CUSTOM_4)).isEqualTo("custom4");
assertThat(classification.getCustomAttribute(CUSTOM_5)).isEqualTo("custom5");
assertThat(classification.getCustomAttribute(CUSTOM_6)).isEqualTo("custom6");
assertThat(classification.getCustomAttribute(CUSTOM_7)).isEqualTo("custom7");
assertThat(classification.getCustomAttribute(CUSTOM_8)).isEqualTo("custom8");
assertThat(classification.getCustomField(CUSTOM_1)).isEqualTo("VNR");
assertThat(classification.getCustomField(CUSTOM_2)).isEqualTo("custom2");
assertThat(classification.getCustomField(CUSTOM_3)).isEqualTo("custom3");
assertThat(classification.getCustomField(CUSTOM_4)).isEqualTo("custom4");
assertThat(classification.getCustomField(CUSTOM_5)).isEqualTo("custom5");
assertThat(classification.getCustomField(CUSTOM_6)).isEqualTo("custom6");
assertThat(classification.getCustomField(CUSTOM_7)).isEqualTo("custom7");
assertThat(classification.getCustomField(CUSTOM_8)).isEqualTo("custom8");
}
@Test

View File

@ -604,7 +604,7 @@ class QueryClassificationAccTest extends AbstractAccTest {
assertThat(results)
.hasSizeGreaterThan(2)
.extracting(c -> c.getCustomAttribute(customField))
.extracting(c -> c.getCustomField(customField))
.isSortedAccordingTo(CASE_INSENSITIVE_ORDER);
};
return DynamicTest.stream(iterator, c -> "for " + c, test);
@ -624,7 +624,7 @@ class QueryClassificationAccTest extends AbstractAccTest {
assertThat(results)
.hasSizeGreaterThan(2)
.extracting(c -> c.getCustomAttribute(customField))
.extracting(c -> c.getCustomField(customField))
.isSortedAccordingTo(CASE_INSENSITIVE_ORDER.reversed());
};
return DynamicTest.stream(iterator, c -> "for " + c, test);

View File

@ -62,14 +62,14 @@ class UpdateClassificationAccTest extends AbstractAccTest {
classification.setApplicationEntryPoint(newEntryPoint);
classification.setCategory("PROCESS");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_1, "newCustom1");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_2, "newCustom2");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_3, "newCustom3");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_4, "newCustom4");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_5, "newCustom5");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_6, "newCustom6");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_7, "newCustom7");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_8, "newCustom8");
classification.setCustomField(ClassificationCustomField.CUSTOM_1, "newCustom1");
classification.setCustomField(ClassificationCustomField.CUSTOM_2, "newCustom2");
classification.setCustomField(ClassificationCustomField.CUSTOM_3, "newCustom3");
classification.setCustomField(ClassificationCustomField.CUSTOM_4, "newCustom4");
classification.setCustomField(ClassificationCustomField.CUSTOM_5, "newCustom5");
classification.setCustomField(ClassificationCustomField.CUSTOM_6, "newCustom6");
classification.setCustomField(ClassificationCustomField.CUSTOM_7, "newCustom7");
classification.setCustomField(ClassificationCustomField.CUSTOM_8, "newCustom8");
classification.setDescription("newDescription");
classification.setIsValidInDomain(false);
classification.setName(newName);
@ -93,7 +93,7 @@ class UpdateClassificationAccTest extends AbstractAccTest {
@Test
void should_ThrowException_When_UserIsNotAuthorized() throws Exception {
Classification classification = classificationService.getClassification("T2100", "DOMAIN_A");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_1, "newCustom1");
classification.setCustomField(ClassificationCustomField.CUSTOM_1, "newCustom1");
ThrowingCallable call = () -> classificationService.updateClassification(classification);
assertThatThrownBy(call).isInstanceOf(NotAuthorizedException.class);
}

View File

@ -66,7 +66,7 @@ class UpdateObjectsUseUtcTimeStampsAccTest extends AbstractAccTest {
newTask.setPrimaryObjRef(
createObjectReference("COMPANY_A", "SYSTEM_A", "INSTANCE_A", "VNR", "1234567"));
for (TaskCustomField taskCustomField : TaskCustomField.values()) {
newTask.setCustomAttribute(taskCustomField, taskCustomField.name());
newTask.setCustomField(taskCustomField, taskCustomField.name());
}
newTask.setCustomAttributeMap(createSimpleCustomPropertyMap(5));
newTask.setDescription("Description of test task");
@ -140,7 +140,7 @@ class UpdateObjectsUseUtcTimeStampsAccTest extends AbstractAccTest {
WorkbasketService workbasketService = taskanaEngine.getWorkbasketService();
Workbasket workbasket =
workbasketService.getWorkbasket("WBI:100000000000000000000000000000000001");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_1, "bla");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_1, "bla");
TimeZone originalZone = TimeZone.getDefault();
Workbasket updatedWorkbasket = workbasketService.updateWorkbasket(workbasket);

View File

@ -38,7 +38,7 @@ class PriorityServiceAccTest extends AbstractAccTest {
ThrowingConsumer<Pair<String, Integer>> test =
x -> {
Task task = taskService.newTask("USER-1-1", "DOMAIN_A");
task.setCustomAttribute(TaskCustomField.CUSTOM_6, x.getLeft());
task.setCustomField(TaskCustomField.CUSTOM_6, x.getLeft());
task.setClassificationKey("T2100");
ObjectReference objectReference =
createObjectReference("COMPANY_A", "SYSTEM_A", "INSTANCE_A", "VNR", "1234567");
@ -65,7 +65,7 @@ class PriorityServiceAccTest extends AbstractAccTest {
ThrowingConsumer<Pair<String, Integer>> test =
x -> {
task.setCustomAttribute(TaskCustomField.CUSTOM_6, x.getLeft());
task.setCustomField(TaskCustomField.CUSTOM_6, x.getLeft());
Task updatedTask = taskService.updateTask(task);
assertThat(updatedTask.getPriority()).isEqualTo(daysSinceCreated * x.getRight());

View File

@ -30,7 +30,7 @@ public class TestPriorityServiceProvider implements PriorityServiceProvider {
priority = Duration.between(taskSummary.getCreated(), Instant.now()).toMinutes();
}
if (Boolean.parseBoolean(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_6))) {
if (Boolean.parseBoolean(taskSummary.getCustomField(TaskCustomField.CUSTOM_6))) {
priority *= MULTIPLIER;
}

View File

@ -677,7 +677,7 @@ class CreateTaskAccTest extends AbstractAccTest {
newTask.setPrimaryObjRef(
createObjectReference("COMPANY_A", "SYSTEM_A", "INSTANCE_A", "VNR", "1234567"));
for (TaskCustomField taskCustomField : TaskCustomField.values()) {
newTask.setCustomAttribute(taskCustomField, taskCustomField.name());
newTask.setCustomField(taskCustomField, taskCustomField.name());
}
newTask.setCustomAttributeMap(createSimpleCustomPropertyMap(5));
newTask.setDescription("Description of test task");

View File

@ -62,22 +62,22 @@ class GetTaskAccTest extends AbstractAccTest {
assertThat(task.isTransferred()).isFalse();
assertThat(task.getCallbackInfo()).isEqualTo(new HashMap<String, String>());
assertThat(task.getCustomAttributeMap()).isEqualTo(new HashMap<String, String>());
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_1)).isEqualTo("custom1");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_2)).isEqualTo("custom2");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_3)).isEqualTo("custom3");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_4)).isEqualTo("custom4");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_5)).isEqualTo("custom5");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_6)).isEqualTo("custom6");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_7)).isEqualTo("custom7");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_8)).isEqualTo("custom8");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_9)).isEqualTo("custom9");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_10)).isEqualTo("custom10");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_11)).isEqualTo("custom11");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_12)).isEqualTo("custom12");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_13)).isEqualTo("custom13");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_14)).isEqualTo("abc");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_15)).isEqualTo("custom15");
assertThat(task.getCustomAttribute(TaskCustomField.CUSTOM_16)).isEqualTo("custom16");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_1)).isEqualTo("custom1");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_2)).isEqualTo("custom2");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_3)).isEqualTo("custom3");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_4)).isEqualTo("custom4");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_5)).isEqualTo("custom5");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_6)).isEqualTo("custom6");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_7)).isEqualTo("custom7");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_8)).isEqualTo("custom8");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_9)).isEqualTo("custom9");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_10)).isEqualTo("custom10");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_11)).isEqualTo("custom11");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_12)).isEqualTo("custom12");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_13)).isEqualTo("custom13");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_14)).isEqualTo("abc");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_15)).isEqualTo("custom15");
assertThat(task.getCustomField(TaskCustomField.CUSTOM_16)).isEqualTo("custom16");
assertThatCode(() -> task.getCustomAttributeMap().put("X", "Y")).doesNotThrowAnyException();
assertThatCode(() -> task.getCallbackInfo().put("X", "Y")).doesNotThrowAnyException();
}

View File

@ -299,7 +299,7 @@ class QueryTasksAccTest extends AbstractAccTest {
assertThat(results).hasSize(expectedResult);
String[] customAttributes =
results.stream().map(t -> t.getCustomAttribute(customField)).toArray(String[]::new);
results.stream().map(t -> t.getCustomField(customField)).toArray(String[]::new);
List<TaskSummary> result2 =
taskService.createTaskQuery().customAttributeIn(customField, customAttributes).list();

View File

@ -475,7 +475,7 @@ class QueryTasksWithSortingAccTest extends AbstractAccTest {
assertThat(results)
.hasSizeGreaterThan(2)
.extracting(t -> t.getCustomAttribute(customField))
.extracting(t -> t.getCustomField(customField))
.filteredOn(Objects::nonNull)
.isSortedAccordingTo(comparator);
}

View File

@ -170,10 +170,10 @@ class UpdateTaskAccTest extends AbstractAccTest {
Task task = taskService.getTask(taskId);
final Task task2 = taskService.getTask(taskId);
task.setCustomAttribute(CUSTOM_1, "willi");
task.setCustomField(CUSTOM_1, "willi");
Thread.sleep(10);
taskService.updateTask(task);
task2.setCustomAttribute(CUSTOM_2, "Walter");
task2.setCustomField(CUSTOM_2, "Walter");
// TODO flaky test ... if speed is too high,
assertThatThrownBy(() -> taskService.updateTask(task2))
.isInstanceOf(ConcurrencyException.class)
@ -236,7 +236,7 @@ class UpdateTaskAccTest extends AbstractAccTest {
@Test
void should_UpdateTask_When_CustomPropertiesOfTaskWereChanged() throws Exception {
Task task = taskService.getTask("TKI:000000000000000000000000000000000000");
task.setCustomAttribute(CUSTOM_1, "T2100");
task.setCustomField(CUSTOM_1, "T2100");
Task updatedTask = taskService.updateTask(task);
updatedTask = taskService.getTask(updatedTask.getId());
@ -293,10 +293,10 @@ class UpdateTaskAccTest extends AbstractAccTest {
assertThat(taskIds).hasSize(6);
for (String taskId : taskIds) {
Task task = taskService.getTask(taskId);
assertThat(task.getCustomAttribute(CUSTOM_3)).isEqualTo("This is modifiedValue 3");
assertThat(task.getCustomAttribute(CUSTOM_7)).isEqualTo("This is modifiedValue 7");
assertThat(task.getCustomAttribute(CUSTOM_16)).isEqualTo("This is modifiedValue 16");
assertThat(task.getCustomAttribute(CUSTOM_14)).isNull();
assertThat(task.getCustomField(CUSTOM_3)).isEqualTo("This is modifiedValue 3");
assertThat(task.getCustomField(CUSTOM_7)).isEqualTo("This is modifiedValue 7");
assertThat(task.getCustomField(CUSTOM_16)).isEqualTo("This is modifiedValue 16");
assertThat(task.getCustomField(CUSTOM_14)).isNull();
}
}
@ -319,12 +319,12 @@ class UpdateTaskAccTest extends AbstractAccTest {
assertThat(changedTasks).hasSize(3);
for (String taskId : changedTasks) {
Task task = taskService.getTask(taskId);
assertThat(task.getCustomAttribute(CUSTOM_1)).isEqualTo("This is modifiedValue 1");
assertThat(task.getCustomAttribute(CUSTOM_5)).isEqualTo("This is modifiedValue 5");
assertThat(task.getCustomAttribute(CUSTOM_10)).isEqualTo("This is modifiedValue 10");
assertThat(task.getCustomAttribute(CUSTOM_12)).isEqualTo("This is modifiedValue 12");
assertThat(task.getCustomAttribute(CUSTOM_2)).isNotNull();
assertThat(task.getCustomAttribute(CUSTOM_16)).isNull();
assertThat(task.getCustomField(CUSTOM_1)).isEqualTo("This is modifiedValue 1");
assertThat(task.getCustomField(CUSTOM_5)).isEqualTo("This is modifiedValue 5");
assertThat(task.getCustomField(CUSTOM_10)).isEqualTo("This is modifiedValue 10");
assertThat(task.getCustomField(CUSTOM_12)).isEqualTo("This is modifiedValue 12");
assertThat(task.getCustomField(CUSTOM_2)).isNotNull();
assertThat(task.getCustomField(CUSTOM_16)).isNull();
}
}

View File

@ -62,7 +62,7 @@ class CreateTaskPreprocessingAccTest {
Task createdTask = taskService.createTask(newTaskToCreate);
assertThat(createdTask.getCustomAttribute(TaskCustomField.CUSTOM_1))
assertThat(createdTask.getCustomField(TaskCustomField.CUSTOM_1))
.isEqualTo("preprocessedCustomField");
}
@ -70,7 +70,7 @@ class CreateTaskPreprocessingAccTest {
@Override
public void processTaskBeforeCreation(Task taskToProcess) {
taskToProcess.setCustomAttribute(TaskCustomField.CUSTOM_1, "preprocessedCustomField");
taskToProcess.setCustomField(TaskCustomField.CUSTOM_1, "preprocessedCustomField");
}
}
}

View File

@ -47,10 +47,10 @@ class GetWorkbasketAccTest extends AbstractAccTest {
assertThat(workbasket.getOrgLevel2()).isEqualTo("abteilung");
assertThat(workbasket.getOrgLevel3()).isEqualTo("projekt");
assertThat(workbasket.getOrgLevel4()).isEqualTo("team");
assertThat(workbasket.getCustomAttribute(CUSTOM_1)).isEqualTo("custom1");
assertThat(workbasket.getCustomAttribute(CUSTOM_2)).isEqualTo("custom2");
assertThat(workbasket.getCustomAttribute(CUSTOM_3)).isEqualTo("custom3");
assertThat(workbasket.getCustomAttribute(CUSTOM_4)).isEqualTo("custom4");
assertThat(workbasket.getCustomField(CUSTOM_1)).isEqualTo("custom1");
assertThat(workbasket.getCustomField(CUSTOM_2)).isEqualTo("custom2");
assertThat(workbasket.getCustomField(CUSTOM_3)).isEqualTo("custom3");
assertThat(workbasket.getCustomField(CUSTOM_4)).isEqualTo("custom4");
}
@WithAccessId(user = "admin")
@ -96,10 +96,10 @@ class GetWorkbasketAccTest extends AbstractAccTest {
assertThat(workbasket.getOrgLevel2()).isEqualTo("abteilung");
assertThat(workbasket.getOrgLevel3()).isEqualTo("projekt");
assertThat(workbasket.getOrgLevel4()).isEqualTo("team");
assertThat(workbasket.getCustomAttribute(CUSTOM_1)).isEqualTo("custom1");
assertThat(workbasket.getCustomAttribute(CUSTOM_2)).isEqualTo("custom2");
assertThat(workbasket.getCustomAttribute(CUSTOM_3)).isEqualTo("custom3");
assertThat(workbasket.getCustomAttribute(CUSTOM_4)).isEqualTo("custom4");
assertThat(workbasket.getCustomField(CUSTOM_1)).isEqualTo("custom1");
assertThat(workbasket.getCustomField(CUSTOM_2)).isEqualTo("custom2");
assertThat(workbasket.getCustomField(CUSTOM_3)).isEqualTo("custom3");
assertThat(workbasket.getCustomField(CUSTOM_4)).isEqualTo("custom4");
}
@WithAccessId(user = "user-1-1", groups = GROUP_1_DN)
@ -141,10 +141,10 @@ class GetWorkbasketAccTest extends AbstractAccTest {
assertThat(workbasketSummary.getOrgLevel2()).isEqualTo("abteilung");
assertThat(workbasketSummary.getOrgLevel3()).isEqualTo("projekt");
assertThat(workbasketSummary.getOrgLevel4()).isEqualTo("team");
assertThat(workbasketSummary.getCustomAttribute(CUSTOM_1)).isEqualTo("custom1");
assertThat(workbasketSummary.getCustomAttribute(CUSTOM_2)).isEqualTo("custom2");
assertThat(workbasketSummary.getCustomAttribute(CUSTOM_3)).isEqualTo("custom3");
assertThat(workbasketSummary.getCustomAttribute(CUSTOM_4)).isEqualTo("custom4");
assertThat(workbasketSummary.getCustomField(CUSTOM_1)).isEqualTo("custom1");
assertThat(workbasketSummary.getCustomField(CUSTOM_2)).isEqualTo("custom2");
assertThat(workbasketSummary.getCustomField(CUSTOM_3)).isEqualTo("custom3");
assertThat(workbasketSummary.getCustomField(CUSTOM_4)).isEqualTo("custom4");
assertThat(workbasketSummary.isMarkedForDeletion()).isFalse();
}

View File

@ -584,7 +584,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest {
assertThat(results)
.hasSizeGreaterThan(2)
.extracting(w -> w.getCustomAttribute(customField))
.extracting(w -> w.getCustomField(customField))
.isSortedAccordingTo(CASE_INSENSITIVE_ORDER);
};
return DynamicTest.stream(iterator, c -> "for " + c, test);
@ -606,7 +606,7 @@ class QueryWorkbasketAccTest extends AbstractAccTest {
assertThat(results)
.hasSizeGreaterThan(2)
.extracting(w -> w.getCustomAttribute(customField))
.extracting(w -> w.getCustomField(customField))
.isSortedAccordingTo(CASE_INSENSITIVE_ORDER.reversed());
};
return DynamicTest.stream(iterator, c -> "for " + c, test);

View File

@ -42,10 +42,10 @@ class UpdateWorkbasketAccTest extends AbstractAccTest {
workbasket.setOrgLevel2("new level 2");
workbasket.setOrgLevel3("new level 3");
workbasket.setOrgLevel4("new level 4");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_1, "new custom 1");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_2, "new custom 2");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_3, "new custom 3");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_4, "new custom 4");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_1, "new custom 1");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_2, "new custom 2");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_3, "new custom 3");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_4, "new custom 4");
workbasket.setDescription("new description");
workbasketService.updateWorkbasket(workbasket);

View File

@ -19,10 +19,10 @@ class WorkbasketModelsCloneTest {
@Test
void should_CopyWithoutId_When_WorkbasketSummaryClone() {
Workbasket dummyWorkbasketForSummaryTest = new WorkbasketImpl();
dummyWorkbasketForSummaryTest.setCustomAttribute(CUSTOM_1, "dummyCustom1");
dummyWorkbasketForSummaryTest.setCustomAttribute(CUSTOM_2, "dummyCustom2");
dummyWorkbasketForSummaryTest.setCustomAttribute(CUSTOM_3, "dummyCustom3");
dummyWorkbasketForSummaryTest.setCustomAttribute(CUSTOM_4, "dummyCustom4");
dummyWorkbasketForSummaryTest.setCustomField(CUSTOM_1, "dummyCustom1");
dummyWorkbasketForSummaryTest.setCustomField(CUSTOM_2, "dummyCustom2");
dummyWorkbasketForSummaryTest.setCustomField(CUSTOM_3, "dummyCustom3");
dummyWorkbasketForSummaryTest.setCustomField(CUSTOM_4, "dummyCustom4");
dummyWorkbasketForSummaryTest.setDescription("dummyDescription");
dummyWorkbasketForSummaryTest.setMarkedForDeletion(false);
dummyWorkbasketForSummaryTest.setName("dummyName");

View File

@ -246,30 +246,30 @@ public class ClassificationDefinitionController {
currentClassification.setPriority(newClassification.getPriority());
currentClassification.setServiceLevel(newClassification.getServiceLevel());
currentClassification.setApplicationEntryPoint(newClassification.getApplicationEntryPoint());
currentClassification.setCustomAttribute(
currentClassification.setCustomField(
ClassificationCustomField.CUSTOM_1,
newClassification.getCustomAttribute(ClassificationCustomField.CUSTOM_1));
currentClassification.setCustomAttribute(
newClassification.getCustomField(ClassificationCustomField.CUSTOM_1));
currentClassification.setCustomField(
ClassificationCustomField.CUSTOM_2,
newClassification.getCustomAttribute(ClassificationCustomField.CUSTOM_2));
currentClassification.setCustomAttribute(
newClassification.getCustomField(ClassificationCustomField.CUSTOM_2));
currentClassification.setCustomField(
ClassificationCustomField.CUSTOM_3,
newClassification.getCustomAttribute(ClassificationCustomField.CUSTOM_3));
currentClassification.setCustomAttribute(
newClassification.getCustomField(ClassificationCustomField.CUSTOM_3));
currentClassification.setCustomField(
ClassificationCustomField.CUSTOM_4,
newClassification.getCustomAttribute(ClassificationCustomField.CUSTOM_4));
currentClassification.setCustomAttribute(
newClassification.getCustomField(ClassificationCustomField.CUSTOM_4));
currentClassification.setCustomField(
ClassificationCustomField.CUSTOM_5,
newClassification.getCustomAttribute(ClassificationCustomField.CUSTOM_5));
currentClassification.setCustomAttribute(
newClassification.getCustomField(ClassificationCustomField.CUSTOM_5));
currentClassification.setCustomField(
ClassificationCustomField.CUSTOM_6,
newClassification.getCustomAttribute(ClassificationCustomField.CUSTOM_6));
currentClassification.setCustomAttribute(
newClassification.getCustomField(ClassificationCustomField.CUSTOM_6));
currentClassification.setCustomField(
ClassificationCustomField.CUSTOM_7,
newClassification.getCustomAttribute(ClassificationCustomField.CUSTOM_7));
currentClassification.setCustomAttribute(
newClassification.getCustomField(ClassificationCustomField.CUSTOM_7));
currentClassification.setCustomField(
ClassificationCustomField.CUSTOM_8,
newClassification.getCustomAttribute(ClassificationCustomField.CUSTOM_8));
newClassification.getCustomField(ClassificationCustomField.CUSTOM_8));
classificationService.updateClassification(currentClassification);
}
}

View File

@ -66,14 +66,14 @@ public class ClassificationRepresentationModelAssembler
repModel.setPriority(classification.getPriority());
repModel.setServiceLevel(classification.getServiceLevel());
repModel.setType(classification.getType());
repModel.setCustom1(classification.getCustomAttribute(ClassificationCustomField.CUSTOM_1));
repModel.setCustom2(classification.getCustomAttribute(ClassificationCustomField.CUSTOM_2));
repModel.setCustom3(classification.getCustomAttribute(ClassificationCustomField.CUSTOM_3));
repModel.setCustom4(classification.getCustomAttribute(ClassificationCustomField.CUSTOM_4));
repModel.setCustom5(classification.getCustomAttribute(ClassificationCustomField.CUSTOM_5));
repModel.setCustom6(classification.getCustomAttribute(ClassificationCustomField.CUSTOM_6));
repModel.setCustom7(classification.getCustomAttribute(ClassificationCustomField.CUSTOM_7));
repModel.setCustom8(classification.getCustomAttribute(ClassificationCustomField.CUSTOM_8));
repModel.setCustom1(classification.getCustomField(ClassificationCustomField.CUSTOM_1));
repModel.setCustom2(classification.getCustomField(ClassificationCustomField.CUSTOM_2));
repModel.setCustom3(classification.getCustomField(ClassificationCustomField.CUSTOM_3));
repModel.setCustom4(classification.getCustomField(ClassificationCustomField.CUSTOM_4));
repModel.setCustom5(classification.getCustomField(ClassificationCustomField.CUSTOM_5));
repModel.setCustom6(classification.getCustomField(ClassificationCustomField.CUSTOM_6));
repModel.setCustom7(classification.getCustomField(ClassificationCustomField.CUSTOM_7));
repModel.setCustom8(classification.getCustomField(ClassificationCustomField.CUSTOM_8));
repModel.setIsValidInDomain(classification.getIsValidInDomain());
repModel.setCreated(classification.getCreated());
repModel.setModified(classification.getModified());
@ -94,14 +94,14 @@ public class ClassificationRepresentationModelAssembler
classification.setParentKey(repModel.getParentKey());
classification.setPriority(repModel.getPriority());
classification.setServiceLevel(repModel.getServiceLevel());
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_1, repModel.getCustom1());
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_2, repModel.getCustom2());
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_3, repModel.getCustom3());
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_4, repModel.getCustom4());
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_5, repModel.getCustom5());
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_6, repModel.getCustom6());
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_7, repModel.getCustom7());
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_8, repModel.getCustom8());
classification.setCustomField(ClassificationCustomField.CUSTOM_1, repModel.getCustom1());
classification.setCustomField(ClassificationCustomField.CUSTOM_2, repModel.getCustom2());
classification.setCustomField(ClassificationCustomField.CUSTOM_3, repModel.getCustom3());
classification.setCustomField(ClassificationCustomField.CUSTOM_4, repModel.getCustom4());
classification.setCustomField(ClassificationCustomField.CUSTOM_5, repModel.getCustom5());
classification.setCustomField(ClassificationCustomField.CUSTOM_6, repModel.getCustom6());
classification.setCustomField(ClassificationCustomField.CUSTOM_7, repModel.getCustom7());
classification.setCustomField(ClassificationCustomField.CUSTOM_8, repModel.getCustom8());
classification.setIsValidInDomain(repModel.getIsValidInDomain());
classification.setDescription(repModel.getDescription());
classification.setId(repModel.getClassificationId());

View File

@ -55,14 +55,14 @@ public class ClassificationSummaryRepresentationModelAssembler
repModel.setPriority(classificationSummary.getPriority());
repModel.setServiceLevel(classificationSummary.getServiceLevel());
repModel.setType(classificationSummary.getType());
repModel.setCustom1(classificationSummary.getCustomAttribute(CUSTOM_1));
repModel.setCustom2(classificationSummary.getCustomAttribute(CUSTOM_2));
repModel.setCustom3(classificationSummary.getCustomAttribute(CUSTOM_3));
repModel.setCustom4(classificationSummary.getCustomAttribute(CUSTOM_4));
repModel.setCustom5(classificationSummary.getCustomAttribute(CUSTOM_5));
repModel.setCustom6(classificationSummary.getCustomAttribute(CUSTOM_6));
repModel.setCustom7(classificationSummary.getCustomAttribute(CUSTOM_7));
repModel.setCustom8(classificationSummary.getCustomAttribute(CUSTOM_8));
repModel.setCustom1(classificationSummary.getCustomField(CUSTOM_1));
repModel.setCustom2(classificationSummary.getCustomField(CUSTOM_2));
repModel.setCustom3(classificationSummary.getCustomField(CUSTOM_3));
repModel.setCustom4(classificationSummary.getCustomField(CUSTOM_4));
repModel.setCustom5(classificationSummary.getCustomField(CUSTOM_5));
repModel.setCustom6(classificationSummary.getCustomField(CUSTOM_6));
repModel.setCustom7(classificationSummary.getCustomField(CUSTOM_7));
repModel.setCustom8(classificationSummary.getCustomField(CUSTOM_8));
return repModel;
}

View File

@ -92,22 +92,22 @@ public class TaskRepresentationModelAssembler
task.getCallbackInfo().entrySet().stream()
.map(CustomAttribute::of)
.collect(Collectors.toList()));
repModel.setCustom1(task.getCustomAttribute(TaskCustomField.CUSTOM_1));
repModel.setCustom2(task.getCustomAttribute(TaskCustomField.CUSTOM_2));
repModel.setCustom3(task.getCustomAttribute(TaskCustomField.CUSTOM_3));
repModel.setCustom4(task.getCustomAttribute(TaskCustomField.CUSTOM_4));
repModel.setCustom5(task.getCustomAttribute(TaskCustomField.CUSTOM_5));
repModel.setCustom6(task.getCustomAttribute(TaskCustomField.CUSTOM_6));
repModel.setCustom7(task.getCustomAttribute(TaskCustomField.CUSTOM_7));
repModel.setCustom8(task.getCustomAttribute(TaskCustomField.CUSTOM_8));
repModel.setCustom9(task.getCustomAttribute(TaskCustomField.CUSTOM_9));
repModel.setCustom10(task.getCustomAttribute(TaskCustomField.CUSTOM_10));
repModel.setCustom11(task.getCustomAttribute(TaskCustomField.CUSTOM_11));
repModel.setCustom12(task.getCustomAttribute(TaskCustomField.CUSTOM_12));
repModel.setCustom13(task.getCustomAttribute(TaskCustomField.CUSTOM_13));
repModel.setCustom14(task.getCustomAttribute(TaskCustomField.CUSTOM_14));
repModel.setCustom15(task.getCustomAttribute(TaskCustomField.CUSTOM_15));
repModel.setCustom16(task.getCustomAttribute(TaskCustomField.CUSTOM_16));
repModel.setCustom1(task.getCustomField(TaskCustomField.CUSTOM_1));
repModel.setCustom2(task.getCustomField(TaskCustomField.CUSTOM_2));
repModel.setCustom3(task.getCustomField(TaskCustomField.CUSTOM_3));
repModel.setCustom4(task.getCustomField(TaskCustomField.CUSTOM_4));
repModel.setCustom5(task.getCustomField(TaskCustomField.CUSTOM_5));
repModel.setCustom6(task.getCustomField(TaskCustomField.CUSTOM_6));
repModel.setCustom7(task.getCustomField(TaskCustomField.CUSTOM_7));
repModel.setCustom8(task.getCustomField(TaskCustomField.CUSTOM_8));
repModel.setCustom9(task.getCustomField(TaskCustomField.CUSTOM_9));
repModel.setCustom10(task.getCustomField(TaskCustomField.CUSTOM_10));
repModel.setCustom11(task.getCustomField(TaskCustomField.CUSTOM_11));
repModel.setCustom12(task.getCustomField(TaskCustomField.CUSTOM_12));
repModel.setCustom13(task.getCustomField(TaskCustomField.CUSTOM_13));
repModel.setCustom14(task.getCustomField(TaskCustomField.CUSTOM_14));
repModel.setCustom15(task.getCustomField(TaskCustomField.CUSTOM_15));
repModel.setCustom16(task.getCustomField(TaskCustomField.CUSTOM_16));
try {
repModel.add(linkTo(methodOn(TaskController.class).getTask(task.getId())).withSelfRel());
} catch (Exception e) {
@ -148,22 +148,22 @@ public class TaskRepresentationModelAssembler
task.setPrimaryObjRef(objectReferenceAssembler.toEntity(repModel.getPrimaryObjRef()));
task.setRead(repModel.isRead());
task.setTransferred(repModel.isTransferred());
task.setCustomAttribute(TaskCustomField.CUSTOM_1, repModel.getCustom1());
task.setCustomAttribute(TaskCustomField.CUSTOM_2, repModel.getCustom2());
task.setCustomAttribute(TaskCustomField.CUSTOM_3, repModel.getCustom3());
task.setCustomAttribute(TaskCustomField.CUSTOM_4, repModel.getCustom4());
task.setCustomAttribute(TaskCustomField.CUSTOM_5, repModel.getCustom5());
task.setCustomAttribute(TaskCustomField.CUSTOM_6, repModel.getCustom6());
task.setCustomAttribute(TaskCustomField.CUSTOM_7, repModel.getCustom7());
task.setCustomAttribute(TaskCustomField.CUSTOM_8, repModel.getCustom8());
task.setCustomAttribute(TaskCustomField.CUSTOM_9, repModel.getCustom9());
task.setCustomAttribute(TaskCustomField.CUSTOM_10, repModel.getCustom10());
task.setCustomAttribute(TaskCustomField.CUSTOM_11, repModel.getCustom11());
task.setCustomAttribute(TaskCustomField.CUSTOM_12, repModel.getCustom12());
task.setCustomAttribute(TaskCustomField.CUSTOM_13, repModel.getCustom13());
task.setCustomAttribute(TaskCustomField.CUSTOM_14, repModel.getCustom14());
task.setCustomAttribute(TaskCustomField.CUSTOM_15, repModel.getCustom15());
task.setCustomAttribute(TaskCustomField.CUSTOM_16, repModel.getCustom16());
task.setCustomField(TaskCustomField.CUSTOM_1, repModel.getCustom1());
task.setCustomField(TaskCustomField.CUSTOM_2, repModel.getCustom2());
task.setCustomField(TaskCustomField.CUSTOM_3, repModel.getCustom3());
task.setCustomField(TaskCustomField.CUSTOM_4, repModel.getCustom4());
task.setCustomField(TaskCustomField.CUSTOM_5, repModel.getCustom5());
task.setCustomField(TaskCustomField.CUSTOM_6, repModel.getCustom6());
task.setCustomField(TaskCustomField.CUSTOM_7, repModel.getCustom7());
task.setCustomField(TaskCustomField.CUSTOM_8, repModel.getCustom8());
task.setCustomField(TaskCustomField.CUSTOM_9, repModel.getCustom9());
task.setCustomField(TaskCustomField.CUSTOM_10, repModel.getCustom10());
task.setCustomField(TaskCustomField.CUSTOM_11, repModel.getCustom11());
task.setCustomField(TaskCustomField.CUSTOM_12, repModel.getCustom12());
task.setCustomField(TaskCustomField.CUSTOM_13, repModel.getCustom13());
task.setCustomField(TaskCustomField.CUSTOM_14, repModel.getCustom14());
task.setCustomField(TaskCustomField.CUSTOM_15, repModel.getCustom15());
task.setCustomField(TaskCustomField.CUSTOM_16, repModel.getCustom16());
task.setAttachments(
repModel.getAttachments().stream()
.map(attachmentAssembler::toEntityModel)

View File

@ -85,22 +85,22 @@ public class TaskSummaryRepresentationModelAssembler
taskSummary.getAttachmentSummaries().stream()
.map(attachmentAssembler::toModel)
.collect(Collectors.toList()));
repModel.setCustom1(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_1));
repModel.setCustom2(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_2));
repModel.setCustom3(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_3));
repModel.setCustom4(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_4));
repModel.setCustom5(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_5));
repModel.setCustom6(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_6));
repModel.setCustom7(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_7));
repModel.setCustom8(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_8));
repModel.setCustom9(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_9));
repModel.setCustom10(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_10));
repModel.setCustom11(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_11));
repModel.setCustom12(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_12));
repModel.setCustom13(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_13));
repModel.setCustom14(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_14));
repModel.setCustom15(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_15));
repModel.setCustom16(taskSummary.getCustomAttribute(TaskCustomField.CUSTOM_16));
repModel.setCustom1(taskSummary.getCustomField(TaskCustomField.CUSTOM_1));
repModel.setCustom2(taskSummary.getCustomField(TaskCustomField.CUSTOM_2));
repModel.setCustom3(taskSummary.getCustomField(TaskCustomField.CUSTOM_3));
repModel.setCustom4(taskSummary.getCustomField(TaskCustomField.CUSTOM_4));
repModel.setCustom5(taskSummary.getCustomField(TaskCustomField.CUSTOM_5));
repModel.setCustom6(taskSummary.getCustomField(TaskCustomField.CUSTOM_6));
repModel.setCustom7(taskSummary.getCustomField(TaskCustomField.CUSTOM_7));
repModel.setCustom8(taskSummary.getCustomField(TaskCustomField.CUSTOM_8));
repModel.setCustom9(taskSummary.getCustomField(TaskCustomField.CUSTOM_9));
repModel.setCustom10(taskSummary.getCustomField(TaskCustomField.CUSTOM_10));
repModel.setCustom11(taskSummary.getCustomField(TaskCustomField.CUSTOM_11));
repModel.setCustom12(taskSummary.getCustomField(TaskCustomField.CUSTOM_12));
repModel.setCustom13(taskSummary.getCustomField(TaskCustomField.CUSTOM_13));
repModel.setCustom14(taskSummary.getCustomField(TaskCustomField.CUSTOM_14));
repModel.setCustom15(taskSummary.getCustomField(TaskCustomField.CUSTOM_15));
repModel.setCustom16(taskSummary.getCustomField(TaskCustomField.CUSTOM_16));
return repModel;
}

View File

@ -45,10 +45,10 @@ public class WorkbasketRepresentationModelAssembler
repModel.setDescription(workbasket.getDescription());
repModel.setOwner(workbasket.getOwner());
repModel.setMarkedForDeletion(workbasket.isMarkedForDeletion());
repModel.setCustom1(workbasket.getCustomAttribute(WorkbasketCustomField.CUSTOM_1));
repModel.setCustom2(workbasket.getCustomAttribute(WorkbasketCustomField.CUSTOM_2));
repModel.setCustom3(workbasket.getCustomAttribute(WorkbasketCustomField.CUSTOM_3));
repModel.setCustom4(workbasket.getCustomAttribute(WorkbasketCustomField.CUSTOM_4));
repModel.setCustom1(workbasket.getCustomField(WorkbasketCustomField.CUSTOM_1));
repModel.setCustom2(workbasket.getCustomField(WorkbasketCustomField.CUSTOM_2));
repModel.setCustom3(workbasket.getCustomField(WorkbasketCustomField.CUSTOM_3));
repModel.setCustom4(workbasket.getCustomField(WorkbasketCustomField.CUSTOM_4));
repModel.setOrgLevel1(workbasket.getOrgLevel1());
repModel.setOrgLevel2(workbasket.getOrgLevel2());
repModel.setOrgLevel3(workbasket.getOrgLevel3());

View File

@ -51,10 +51,10 @@ public class WorkbasketSummaryRepresentationModelAssembler
repModel.setDescription(workbasketSummary.getDescription());
repModel.setOwner(workbasketSummary.getOwner());
repModel.setMarkedForDeletion(workbasketSummary.isMarkedForDeletion());
repModel.setCustom1(workbasketSummary.getCustomAttribute(WorkbasketCustomField.CUSTOM_1));
repModel.setCustom2(workbasketSummary.getCustomAttribute(WorkbasketCustomField.CUSTOM_2));
repModel.setCustom3(workbasketSummary.getCustomAttribute(WorkbasketCustomField.CUSTOM_3));
repModel.setCustom4(workbasketSummary.getCustomAttribute(WorkbasketCustomField.CUSTOM_4));
repModel.setCustom1(workbasketSummary.getCustomField(WorkbasketCustomField.CUSTOM_1));
repModel.setCustom2(workbasketSummary.getCustomField(WorkbasketCustomField.CUSTOM_2));
repModel.setCustom3(workbasketSummary.getCustomField(WorkbasketCustomField.CUSTOM_3));
repModel.setCustom4(workbasketSummary.getCustomField(WorkbasketCustomField.CUSTOM_4));
repModel.setOrgLevel1(workbasketSummary.getOrgLevel1());
repModel.setOrgLevel2(workbasketSummary.getOrgLevel2());
repModel.setOrgLevel3(workbasketSummary.getOrgLevel3());

View File

@ -39,14 +39,14 @@ class ClassificationRepresentationModelAssemblerTest {
classification.setCategory("ABC");
classification.setName("Classification 1");
classification.setIsValidInDomain(true);
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_1, "Custom1");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_2, "Custom2");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_3, "Custom3");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_4, "Custom4");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_5, "Custom5");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_6, "Custom6");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_7, "Custom7");
classification.setCustomAttribute(ClassificationCustomField.CUSTOM_8, "Custom8");
classification.setCustomField(ClassificationCustomField.CUSTOM_1, "Custom1");
classification.setCustomField(ClassificationCustomField.CUSTOM_2, "Custom2");
classification.setCustomField(ClassificationCustomField.CUSTOM_3, "Custom3");
classification.setCustomField(ClassificationCustomField.CUSTOM_4, "Custom4");
classification.setCustomField(ClassificationCustomField.CUSTOM_5, "Custom5");
classification.setCustomField(ClassificationCustomField.CUSTOM_6, "Custom6");
classification.setCustomField(ClassificationCustomField.CUSTOM_7, "Custom7");
classification.setCustomField(ClassificationCustomField.CUSTOM_8, "Custom8");
classification.setParentId("2");
classification.setParentKey("parentKey");
classification.setPriority(2);

View File

@ -141,14 +141,14 @@ class ClassificationSummaryRepresentationModelAssemblerTest {
assertThat(entity.getPriority()).isEqualTo(repModel.getPriority());
assertThat(entity.getServiceLevel()).isEqualTo(repModel.getServiceLevel());
assertThat(entity.getType()).isEqualTo(repModel.getType());
assertThat(entity.getCustomAttribute(CUSTOM_1)).isEqualTo(repModel.getCustom1());
assertThat(entity.getCustomAttribute(CUSTOM_2)).isEqualTo(repModel.getCustom2());
assertThat(entity.getCustomAttribute(CUSTOM_3)).isEqualTo(repModel.getCustom3());
assertThat(entity.getCustomAttribute(CUSTOM_4)).isEqualTo(repModel.getCustom4());
assertThat(entity.getCustomAttribute(CUSTOM_5)).isEqualTo(repModel.getCustom5());
assertThat(entity.getCustomAttribute(CUSTOM_6)).isEqualTo(repModel.getCustom6());
assertThat(entity.getCustomAttribute(CUSTOM_7)).isEqualTo(repModel.getCustom7());
assertThat(entity.getCustomAttribute(CUSTOM_8)).isEqualTo(repModel.getCustom8());
assertThat(entity.getCustomField(CUSTOM_1)).isEqualTo(repModel.getCustom1());
assertThat(entity.getCustomField(CUSTOM_2)).isEqualTo(repModel.getCustom2());
assertThat(entity.getCustomField(CUSTOM_3)).isEqualTo(repModel.getCustom3());
assertThat(entity.getCustomField(CUSTOM_4)).isEqualTo(repModel.getCustom4());
assertThat(entity.getCustomField(CUSTOM_5)).isEqualTo(repModel.getCustom5());
assertThat(entity.getCustomField(CUSTOM_6)).isEqualTo(repModel.getCustom6());
assertThat(entity.getCustomField(CUSTOM_7)).isEqualTo(repModel.getCustom7());
assertThat(entity.getCustomField(CUSTOM_8)).isEqualTo(repModel.getCustom8());
}
private void testLinks(ClassificationSummaryRepresentationModel repModel) {}

View File

@ -189,22 +189,22 @@ class TaskRepresentationModelAssemblerTest {
task.setCustomAttributeMap(Map.of("abc", "def"));
task.setCallbackInfo(Map.of("ghi", "jkl"));
task.setAttachments(List.of(attachment));
task.setCustomAttribute(TaskCustomField.CUSTOM_1, "custom1");
task.setCustomAttribute(TaskCustomField.CUSTOM_2, "custom2");
task.setCustomAttribute(TaskCustomField.CUSTOM_3, "custom3");
task.setCustomAttribute(TaskCustomField.CUSTOM_4, "custom4");
task.setCustomAttribute(TaskCustomField.CUSTOM_5, "custom5");
task.setCustomAttribute(TaskCustomField.CUSTOM_6, "custom6");
task.setCustomAttribute(TaskCustomField.CUSTOM_7, "custom7");
task.setCustomAttribute(TaskCustomField.CUSTOM_8, "custom8");
task.setCustomAttribute(TaskCustomField.CUSTOM_9, "custom9");
task.setCustomAttribute(TaskCustomField.CUSTOM_10, "custom10");
task.setCustomAttribute(TaskCustomField.CUSTOM_11, "custom11");
task.setCustomAttribute(TaskCustomField.CUSTOM_12, "custom12");
task.setCustomAttribute(TaskCustomField.CUSTOM_13, "custom13");
task.setCustomAttribute(TaskCustomField.CUSTOM_14, "custom14");
task.setCustomAttribute(TaskCustomField.CUSTOM_15, "custom15");
task.setCustomAttribute(TaskCustomField.CUSTOM_16, "custom16");
task.setCustomField(TaskCustomField.CUSTOM_1, "custom1");
task.setCustomField(TaskCustomField.CUSTOM_2, "custom2");
task.setCustomField(TaskCustomField.CUSTOM_3, "custom3");
task.setCustomField(TaskCustomField.CUSTOM_4, "custom4");
task.setCustomField(TaskCustomField.CUSTOM_5, "custom5");
task.setCustomField(TaskCustomField.CUSTOM_6, "custom6");
task.setCustomField(TaskCustomField.CUSTOM_7, "custom7");
task.setCustomField(TaskCustomField.CUSTOM_8, "custom8");
task.setCustomField(TaskCustomField.CUSTOM_9, "custom9");
task.setCustomField(TaskCustomField.CUSTOM_10, "custom10");
task.setCustomField(TaskCustomField.CUSTOM_11, "custom11");
task.setCustomField(TaskCustomField.CUSTOM_12, "custom12");
task.setCustomField(TaskCustomField.CUSTOM_13, "custom13");
task.setCustomField(TaskCustomField.CUSTOM_14, "custom14");
task.setCustomField(TaskCustomField.CUSTOM_15, "custom15");
task.setCustomField(TaskCustomField.CUSTOM_16, "custom16");
// when
TaskRepresentationModel repModel = assembler.toModel(task);
// then

View File

@ -312,22 +312,22 @@ class TaskSummaryRepresentationModelAssemblerTest {
taskSummary.getPrimaryObjRef(), repModel.getPrimaryObjRef());
assertThat(taskSummary.isRead()).isEqualTo(repModel.isRead());
assertThat(taskSummary.isTransferred()).isEqualTo(repModel.isTransferred());
assertThat(taskSummary.getCustomAttribute(CUSTOM_1)).isEqualTo(repModel.getCustom1());
assertThat(taskSummary.getCustomAttribute(CUSTOM_2)).isEqualTo(repModel.getCustom2());
assertThat(taskSummary.getCustomAttribute(CUSTOM_3)).isEqualTo(repModel.getCustom3());
assertThat(taskSummary.getCustomAttribute(CUSTOM_4)).isEqualTo(repModel.getCustom4());
assertThat(taskSummary.getCustomAttribute(CUSTOM_5)).isEqualTo(repModel.getCustom5());
assertThat(taskSummary.getCustomAttribute(CUSTOM_6)).isEqualTo(repModel.getCustom6());
assertThat(taskSummary.getCustomAttribute(CUSTOM_7)).isEqualTo(repModel.getCustom7());
assertThat(taskSummary.getCustomAttribute(CUSTOM_8)).isEqualTo(repModel.getCustom8());
assertThat(taskSummary.getCustomAttribute(CUSTOM_9)).isEqualTo(repModel.getCustom9());
assertThat(taskSummary.getCustomAttribute(CUSTOM_10)).isEqualTo(repModel.getCustom10());
assertThat(taskSummary.getCustomAttribute(CUSTOM_11)).isEqualTo(repModel.getCustom11());
assertThat(taskSummary.getCustomAttribute(CUSTOM_12)).isEqualTo(repModel.getCustom12());
assertThat(taskSummary.getCustomAttribute(CUSTOM_13)).isEqualTo(repModel.getCustom13());
assertThat(taskSummary.getCustomAttribute(CUSTOM_14)).isEqualTo(repModel.getCustom14());
assertThat(taskSummary.getCustomAttribute(CUSTOM_15)).isEqualTo(repModel.getCustom15());
assertThat(taskSummary.getCustomAttribute(CUSTOM_16)).isEqualTo(repModel.getCustom16());
assertThat(taskSummary.getCustomField(CUSTOM_1)).isEqualTo(repModel.getCustom1());
assertThat(taskSummary.getCustomField(CUSTOM_2)).isEqualTo(repModel.getCustom2());
assertThat(taskSummary.getCustomField(CUSTOM_3)).isEqualTo(repModel.getCustom3());
assertThat(taskSummary.getCustomField(CUSTOM_4)).isEqualTo(repModel.getCustom4());
assertThat(taskSummary.getCustomField(CUSTOM_5)).isEqualTo(repModel.getCustom5());
assertThat(taskSummary.getCustomField(CUSTOM_6)).isEqualTo(repModel.getCustom6());
assertThat(taskSummary.getCustomField(CUSTOM_7)).isEqualTo(repModel.getCustom7());
assertThat(taskSummary.getCustomField(CUSTOM_8)).isEqualTo(repModel.getCustom8());
assertThat(taskSummary.getCustomField(CUSTOM_9)).isEqualTo(repModel.getCustom9());
assertThat(taskSummary.getCustomField(CUSTOM_10)).isEqualTo(repModel.getCustom10());
assertThat(taskSummary.getCustomField(CUSTOM_11)).isEqualTo(repModel.getCustom11());
assertThat(taskSummary.getCustomField(CUSTOM_12)).isEqualTo(repModel.getCustom12());
assertThat(taskSummary.getCustomField(CUSTOM_13)).isEqualTo(repModel.getCustom13());
assertThat(taskSummary.getCustomField(CUSTOM_14)).isEqualTo(repModel.getCustom14());
assertThat(taskSummary.getCustomField(CUSTOM_15)).isEqualTo(repModel.getCustom15());
assertThat(taskSummary.getCustomField(CUSTOM_16)).isEqualTo(repModel.getCustom16());
testEqualityAttachments(
taskSummary.getAttachmentSummaries(), repModel.getAttachmentSummaries());
}

View File

@ -97,10 +97,10 @@ class WorkbasketRepresentationModelAssemblerTest {
workbasket.setOrgLevel3("Org3");
workbasket.setOrgLevel4("Org4");
workbasket.setDescription("A test workbasket");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_1, "1");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_2, "2");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_3, "3");
workbasket.setCustomAttribute(WorkbasketCustomField.CUSTOM_4, "4");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_1, "1");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_2, "2");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_3, "3");
workbasket.setCustomField(WorkbasketCustomField.CUSTOM_4, "4");
workbasket.setOwner("Lars");
workbasket.setCreated(Instant.parse("2010-01-01T12:00:00Z"));
workbasket.setModified(Instant.parse("2010-01-01T12:00:00Z"));

View File

@ -117,10 +117,10 @@ class WorkbasketSummaryRepresentationModelAssemblerTest {
assertThat(summary.getId()).isEqualTo(repModel.getWorkbasketId());
assertThat(summary.getKey()).isEqualTo(repModel.getKey());
assertThat(summary.getName()).isEqualTo(repModel.getName());
assertThat(summary.getCustomAttribute(CUSTOM_1)).isEqualTo(repModel.getCustom1());
assertThat(summary.getCustomAttribute(CUSTOM_2)).isEqualTo(repModel.getCustom2());
assertThat(summary.getCustomAttribute(CUSTOM_3)).isEqualTo(repModel.getCustom3());
assertThat(summary.getCustomAttribute(CUSTOM_4)).isEqualTo(repModel.getCustom4());
assertThat(summary.getCustomField(CUSTOM_1)).isEqualTo(repModel.getCustom1());
assertThat(summary.getCustomField(CUSTOM_2)).isEqualTo(repModel.getCustom2());
assertThat(summary.getCustomField(CUSTOM_3)).isEqualTo(repModel.getCustom3());
assertThat(summary.getCustomField(CUSTOM_4)).isEqualTo(repModel.getCustom4());
assertThat(summary.getOrgLevel1()).isEqualTo(repModel.getOrgLevel1());
assertThat(summary.getOrgLevel2()).isEqualTo(repModel.getOrgLevel2());
assertThat(summary.getOrgLevel3()).isEqualTo(repModel.getOrgLevel3());