TSK-1148 Application-Entry-Point in ClassificationSummaryResource

This commit is contained in:
Jörg Heffner 2020-03-02 16:07:55 +01:00
parent ebd2098434
commit 349d24d7b8
6 changed files with 62 additions and 14 deletions

View File

@ -70,6 +70,13 @@ public interface ClassificationSummary {
*/
String getServiceLevel();
/**
* Gets the application entry point of the parent classification.
*
* @return the application entry point
*/
String getApplicationEntryPoint();
/**
* Gets the priority of the classification.
*

View File

@ -63,6 +63,7 @@ public interface ClassificationQueryMapper {
@Result(property = "serviceLevel", column = "SERVICE_LEVEL"),
@Result(property = "parentId", column = "PARENT_ID"),
@Result(property = "parentKey", column = "PARENT_KEY"),
@Result(property = "applicationEntryPoint", column = "APPLICATION_ENTRY_POINT"),
@Result(property = "custom1", column = "CUSTOM_1"),
@Result(property = "custom2", column = "CUSTOM_2"),
@Result(property = "custom3", column = "CUSTOM_3"),

View File

@ -13,7 +13,6 @@ public class ClassificationImpl extends ClassificationSummaryImpl implements Cla
private Instant created;
private Instant modified;
private String description;
private String applicationEntryPoint;
public ClassificationImpl() {}
@ -104,6 +103,7 @@ public class ClassificationImpl extends ClassificationSummaryImpl implements Cla
summary.setParentKey(this.parentKey);
summary.setPriority(this.priority);
summary.setServiceLevel(this.serviceLevel);
summary.setApplicationEntryPoint(this.applicationEntryPoint);
summary.setCustom1(custom1);
summary.setCustom2(custom2);
summary.setCustom3(custom3);
@ -122,7 +122,7 @@ public class ClassificationImpl extends ClassificationSummaryImpl implements Cla
@Override
public int hashCode() {
return Objects.hash(
super.hashCode(), isValidInDomain, created, modified, description, applicationEntryPoint);
super.hashCode(), isValidInDomain, created, modified, description);
}
@Override
@ -140,8 +140,7 @@ public class ClassificationImpl extends ClassificationSummaryImpl implements Cla
return Objects.equals(isValidInDomain, other.isValidInDomain)
&& Objects.equals(created, other.created)
&& Objects.equals(modified, other.modified)
&& Objects.equals(description, other.description)
&& Objects.equals(applicationEntryPoint, other.applicationEntryPoint);
&& Objects.equals(description, other.description);
}
@Override

View File

@ -8,15 +8,16 @@ import pro.taskana.classification.api.models.ClassificationSummary;
public class ClassificationSummaryImpl implements ClassificationSummary {
protected String id;
protected String key;
protected String applicationEntryPoint;
protected String category;
protected String type;
protected String domain;
protected String key;
protected String name;
protected String parentId;
protected String parentKey;
protected int priority;
protected String serviceLevel; // PddDThhHmmM
protected String type;
protected String custom1;
protected String custom2;
protected String custom3;
@ -101,6 +102,11 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
return serviceLevel;
}
@Override
public String getApplicationEntryPoint() {
return this.applicationEntryPoint;
}
@Override
public int getPriority() {
return priority;
@ -182,6 +188,10 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
this.custom8 = custom8;
}
public void setApplicationEntryPoint(String applicationEntryPoint) {
this.applicationEntryPoint = applicationEntryPoint;
}
public void setServiceLevel(String serviceLevel) {
this.serviceLevel = serviceLevel;
}
@ -198,6 +208,7 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
public int hashCode() {
return Objects.hash(
id,
applicationEntryPoint,
key,
category,
type,
@ -233,6 +244,7 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
}
return priority == other.priority
&& Objects.equals(id, other.id)
&& Objects.equals(applicationEntryPoint, other.applicationEntryPoint)
&& Objects.equals(key, other.key)
&& Objects.equals(category, other.category)
&& Objects.equals(type, other.type)
@ -255,6 +267,8 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
public String toString() {
return "ClassificationSummaryImpl [id="
+ id
+ "applicationEntryPoint="
+ applicationEntryPoint
+ ", key="
+ key
+ ", category="

View File

@ -8,14 +8,16 @@ import pro.taskana.classification.api.models.ClassificationSummary;
public class ClassificationSummaryResource extends ResourceSupport {
private String classificationId;
private String applicationEntryPoint;
private String category;
private String domain;
private String key;
private String name;
private String parentId;
private String parentKey;
private String category;
private String type;
private String domain;
private String name;
private int priority;
private String serviceLevel;
private String type;
private String custom1;
private String custom2;
private String custom3;
@ -29,14 +31,16 @@ public class ClassificationSummaryResource extends ResourceSupport {
public ClassificationSummaryResource(ClassificationSummary classification) {
classificationId = classification.getId();
applicationEntryPoint = classification.getApplicationEntryPoint();
category = classification.getCategory();
domain = classification.getDomain();
key = classification.getKey();
name = classification.getName();
parentId = classification.getParentId();
parentKey = classification.getParentKey();
category = classification.getCategory();
type = classification.getType();
domain = classification.getDomain();
name = classification.getName();
priority = classification.getPriority();
serviceLevel = classification.getServiceLevel();
type = classification.getType();
custom1 = classification.getCustom1();
custom2 = classification.getCustom2();
custom3 = classification.getCustom3();
@ -119,6 +123,22 @@ public class ClassificationSummaryResource extends ResourceSupport {
this.priority = priority;
}
public String getApplicationEntryPoint() {
return applicationEntryPoint;
}
public void setApplicationEntryPoint(String applicationEntryPoint) {
this.applicationEntryPoint = applicationEntryPoint;
}
public String getServiceLevel() {
return serviceLevel;
}
public void setServiceLevel(String serviceLevel) {
this.serviceLevel = serviceLevel;
}
public String getCustom1() {
return custom1;
}
@ -202,6 +222,10 @@ public class ClassificationSummaryResource extends ResourceSupport {
+ this.name
+ "priority= "
+ this.priority
+ "serviceLevel="
+ this.serviceLevel
+ "applicationEntryPoint="
+ this.applicationEntryPoint
+ "]";
}
}

View File

@ -96,5 +96,8 @@ class ClassificationSummaryAssemblerTest {
assertThat(resource.getParentKey()).isEqualTo(classificationSummary.getParentKey());
assertThat(resource.getType()).isEqualTo(classificationSummary.getType());
assertThat(resource.getPriority()).isEqualTo(classificationSummary.getPriority());
assertThat(resource.getApplicationEntryPoint())
.isEqualTo(classificationSummary.getApplicationEntryPoint());
assertThat(resource.getServiceLevel()).isEqualTo(classificationSummary.getServiceLevel());
}
}