TSK-579: Add parent key and custom attributes to classification(summary)

This commit is contained in:
Konstantin Kläger 2018-06-19 14:49:44 +02:00 committed by Holger Hagen
parent 13f0e0d8c7
commit bb46ab9850
24 changed files with 1027 additions and 317 deletions

View File

@ -32,6 +32,21 @@ public interface Classification {
*/
void setParentId(String parentId);
/**
* Used to get the key of the parent classification.
*
* @return key of the parent classification or null if there is no parent.
*/
String getParentKey();
/**
* Set/Change a reference to the current parent classification via key. EMPTY if there is no parent.
*
* @param parentKey
* The key of the parent classification.
*/
void setParentKey(String parentKey);
/**
* @return category of this classification.
*/

View File

@ -32,6 +32,15 @@ public interface ClassificationQuery extends BaseQuery<ClassificationSummary> {
*/
ClassificationQuery parentIdIn(String... parentId);
/**
* Add your parentKeys to your query.
*
* @param parentKey
* as an array of Strings
* @return the query
*/
ClassificationQuery parentKeyIn(String... parentKey);
/**
* Add your category to your query.
*
@ -323,6 +332,16 @@ public interface ClassificationQuery extends BaseQuery<ClassificationSummary> {
*/
ClassificationQuery orderByParentId(SortDirection sortDirection);
/**
* Sort the query result by the parent classification key.
*
* @param sortDirection
* Determines whether the result is sorted in ascending or descending order. If sortDirection is null,
* the result is sorted in ascending order
* @return the query
*/
ClassificationQuery orderByParentKey(SortDirection sortDirection);
/**
* Sort the query result by category.
*

View File

@ -55,6 +55,13 @@ public interface ClassificationSummary {
*/
String getParentId();
/**
* Gets the key of the parent classification.
*
* @return parentKey
*/
String getParentKey();
/**
* Gets the service level of the parent classification. It is a String in ISO-8601 duration format. See the parse()
* method of {@code Duration} for details.
@ -64,9 +71,130 @@ public interface ClassificationSummary {
String getServiceLevel();
/**
* Gets the priority of the lassification.
* Gets the priority of the classification.
*
* @return the priority
*/
int getPriority();
/**
* Get the 1. custom-attribute.
*
* @return custom1
*/
String getCustom1();
/**
* Set/Change the 1. custom-attribute.
*
* @param custom1
* the first custom attribute
*/
void setCustom1(String custom1);
/**
* Get the 2. custom-attribute.
*
* @return custom2
*/
String getCustom2();
/**
* Set/Change the 2. custom-attribute.
*
* @param custom2
* the second custom attribute
*/
void setCustom2(String custom2);
/**
* Get the 3. custom-attribute.
*
* @return custom3
*/
String getCustom3();
/**
* Set/Change the 3. custom-attribute.
*
* @param custom3
* the third custom attribute
*/
void setCustom3(String custom3);
/**
* Get the 4. custom-attribute.
*
* @return custom4
*/
String getCustom4();
/**
* Set/Change the 4. custom-attribute.
*
* @param custom4
* the fourth custom attribute
*/
void setCustom4(String custom4);
/**
* Get the 5. custom-attribute.
*
* @return custom5
*/
String getCustom5();
/**
* Set/Change the 5. custom-attribute.
*
* @param custom5
* the fifth custom attribute
*/
void setCustom5(String custom5);
/**
* Get the 6. custom-attribute.
*
* @return custom6
*/
String getCustom6();
/**
* Set/Change the 6. custom-attribute.
*
* @param custom6
* the sixth custom attribute
*/
void setCustom6(String custom6);
/**
* Get the 7. custom-attribute.
*
* @return custom7
*/
String getCustom7();
/**
* Set/Change the 7. custom-attribute.
*
* @param custom7
* the seventh custom attribute
*/
void setCustom7(String custom7);
/**
* Get the 8. custom-attribute.
*
* @return custom8
*/
String getCustom8();
/**
* Set/Change the 8. custom-attribute.
*
* @param custom8
* the eight custom attribute
*/
void setCustom8(String custom8);
}

View File

@ -13,6 +13,7 @@ public class ClassificationImpl implements Classification {
private String id;
private String key;
private String parentId;
private String parentKey;
private String category;
private String type;
private String domain;
@ -64,6 +65,16 @@ public class ClassificationImpl implements Classification {
this.parentId = parentId;
}
@Override
public String getParentKey() {
return parentKey;
}
@Override
public void setParentKey(String parentKey) {
this.parentKey = parentKey;
}
@Override
public String getType() {
return type;
@ -260,8 +271,17 @@ public class ClassificationImpl implements Classification {
summary.setName(this.name);
summary.setType(this.type);
summary.setParentId(this.parentId);
summary.setParentKey(this.parentKey);
summary.setPriority(this.priority);
summary.setServiceLevel(this.serviceLevel);
summary.setCustom1(custom1);
summary.setCustom2(custom2);
summary.setCustom3(custom3);
summary.setCustom4(custom4);
summary.setCustom5(custom5);
summary.setCustom6(custom6);
summary.setCustom7(custom7);
summary.setCustom8(custom8);
return summary;
}
@ -274,6 +294,8 @@ public class ClassificationImpl implements Classification {
builder.append(key);
builder.append(", parentId=");
builder.append(parentId);
builder.append(", parentKey=");
builder.append(parentKey);
builder.append(", category=");
builder.append(category);
builder.append(", type=");
@ -339,6 +361,7 @@ public class ClassificationImpl implements Classification {
result = prime * result + ((modified == null) ? 0 : modified.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((parentId == null) ? 0 : parentId.hashCode());
result = prime * result + ((parentKey == null) ? 0 : parentKey.hashCode());
result = prime * result + priority;
result = prime * result + ((serviceLevel == null) ? 0 : serviceLevel.hashCode());
result = prime * result + ((type == null) ? 0 : type.hashCode());
@ -490,6 +513,13 @@ public class ClassificationImpl implements Classification {
} else if (!parentId.equals(other.parentId)) {
return false;
}
if (parentKey == null) {
if (other.parentKey != null) {
return false;
}
} else if (!parentKey.equals(other.parentKey)) {
return false;
}
if (priority != other.priority) {
return false;
}

View File

@ -32,6 +32,7 @@ public class ClassificationQueryImpl implements ClassificationQuery {
private String[] key;
private String[] idIn;
private String[] parentId;
private String[] parentKey;
private String[] category;
private String[] type;
private String[] domain;
@ -87,6 +88,12 @@ public class ClassificationQueryImpl implements ClassificationQuery {
return this;
}
@Override
public ClassificationQuery parentKeyIn(String... parentKey) {
this.parentKey = parentKey;
return this;
}
@Override
public ClassificationQuery categoryIn(String... category) {
this.category = category;
@ -287,6 +294,11 @@ public class ClassificationQueryImpl implements ClassificationQuery {
return addOrderCriteria("PARENT_ID", sortDirection);
}
@Override
public ClassificationQuery orderByParentKey(SortDirection sortDirection) {
return addOrderCriteria("PARENT_KEY", sortDirection);
}
@Override
public ClassificationQuery orderByCategory(SortDirection sortDirection) {
return addOrderCriteria("CATEGORY", sortDirection);
@ -474,6 +486,10 @@ public class ClassificationQueryImpl implements ClassificationQuery {
return parentId;
}
public String[] getparentKey() {
return parentKey;
}
public String[] getCategory() {
return category;
}
@ -609,6 +625,8 @@ public class ClassificationQueryImpl implements ClassificationQuery {
builder.append(Arrays.toString(idIn));
builder.append(", parentId=");
builder.append(Arrays.toString(parentId));
builder.append(", parentKey=");
builder.append(Arrays.toString(parentKey));
builder.append(", category=");
builder.append(Arrays.toString(category));
builder.append(", type=");

View File

@ -79,6 +79,9 @@ public class ClassificationServiceImpl implements ClassificationService {
if (classificationImpl.getParentId() != null && !classificationImpl.getParentId().isEmpty()) {
this.getClassification(classificationImpl.getParentId());
}
if (classificationImpl.getParentKey() != null && !classificationImpl.getParentKey().isEmpty()) {
this.getClassification(classificationImpl.getParentKey(), classificationImpl.getDomain());
}
classificationMapper.insert(classificationImpl);
LOGGER.debug("Method createClassification created classification {}.", classificationImpl);
@ -177,6 +180,14 @@ public class ClassificationServiceImpl implements ClassificationService {
this.getClassification(classificationImpl.getParentId());
}
}
// Check if parentKey changed and object does exist
if (!oldClassification.getParentKey().equals(classificationImpl.getParentKey())) {
if (classificationImpl.getParentKey() != null && !classificationImpl.getParentKey().isEmpty()) {
this.getClassification(classificationImpl.getParentKey(), classificationImpl.getDomain());
}
}
classificationMapper.update(classificationImpl);
boolean priorityChanged = oldClassification.getPriority() != classification.getPriority();
@ -247,6 +258,10 @@ public class ClassificationServiceImpl implements ClassificationService {
classification.setParentId("");
}
if (classification.getParentKey() == null) {
classification.setParentKey("");
}
if (classification.getType() != null
&& !taskanaEngine.getConfiguration().getClassificationTypes().contains(classification.getType())) {
throw new InvalidArgumentException("Given classification type " + classification.getType()

View File

@ -14,8 +14,17 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
private String domain;
private String name;
private String parentId;
private String parentKey;
private int priority;
private String serviceLevel; // PddDThhHmmM
private String custom1;
private String custom2;
private String custom3;
private String custom4;
private String custom5;
private String custom6;
private String custom7;
private String custom8;
@Override
public int getPriority() {
@ -101,6 +110,95 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
this.parentId = parentId;
}
@Override
public String getParentKey() {
return parentKey;
}
public void setParentKey(String parentKey) {
this.parentKey = parentKey;
}
@Override
public String getCustom1() {
return custom1;
}
@Override
public void setCustom1(String custom1) {
this.custom1 = custom1;
}
@Override
public String getCustom2() {
return custom2;
}
@Override
public void setCustom2(String custom2) {
this.custom2 = custom2;
}
@Override
public String getCustom3() {
return custom3;
}
@Override
public void setCustom3(String custom3) {
this.custom3 = custom3;
}
@Override
public String getCustom4() {
return custom4;
}
@Override
public void setCustom4(String custom4) {
this.custom4 = custom4;
}
@Override
public String getCustom5() {
return custom5;
}
@Override
public void setCustom5(String custom5) {
this.custom5 = custom5;
}
@Override
public String getCustom6() {
return custom6;
}
@Override
public void setCustom6(String custom6) {
this.custom6 = custom6;
}
@Override
public String getCustom7() {
return custom7;
}
@Override
public void setCustom7(String custom7) {
this.custom7 = custom7;
}
@Override
public String getCustom8() {
return custom8;
}
@Override
public void setCustom8(String custom8) {
this.custom8 = custom8;
}
@Override
public int hashCode() {
final int prime = 31;
@ -111,7 +209,16 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
result = prime * result + ((key == null) ? 0 : key.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((parentId == null) ? 0 : parentId.hashCode());
result = prime * result + ((parentKey == null) ? 0 : parentKey.hashCode());
result = prime * result + ((type == null) ? 0 : type.hashCode());
result = prime * result + ((custom1 == null) ? 0 : custom1.hashCode());
result = prime * result + ((custom2 == null) ? 0 : custom2.hashCode());
result = prime * result + ((custom3 == null) ? 0 : custom3.hashCode());
result = prime * result + ((custom4 == null) ? 0 : custom4.hashCode());
result = prime * result + ((custom5 == null) ? 0 : custom5.hashCode());
result = prime * result + ((custom6 == null) ? 0 : custom6.hashCode());
result = prime * result + ((custom7 == null) ? 0 : custom7.hashCode());
result = prime * result + ((custom8 == null) ? 0 : custom8.hashCode());
return result;
}
@ -169,6 +276,13 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
} else if (!parentId.equals(other.parentId)) {
return false;
}
if (parentKey == null) {
if (other.parentKey != null) {
return false;
}
} else if (!parentKey.equals(other.parentKey)) {
return false;
}
if (type == null) {
if (other.type != null) {
return false;
@ -176,6 +290,62 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
} else if (!type.equals(other.type)) {
return false;
}
if (custom1 == null) {
if (other.custom1 != null) {
return false;
}
} else if (!custom1.equals(other.custom1)) {
return false;
}
if (custom2 == null) {
if (other.custom2 != null) {
return false;
}
} else if (!custom2.equals(other.custom2)) {
return false;
}
if (custom3 == null) {
if (other.custom3 != null) {
return false;
}
} else if (!custom3.equals(other.custom3)) {
return false;
}
if (custom4 == null) {
if (other.custom4 != null) {
return false;
}
} else if (!custom4.equals(other.custom4)) {
return false;
}
if (custom5 == null) {
if (other.custom5 != null) {
return false;
}
} else if (!custom5.equals(other.custom5)) {
return false;
}
if (custom6 == null) {
if (other.custom6 != null) {
return false;
}
} else if (!custom6.equals(other.custom6)) {
return false;
}
if (custom7 == null) {
if (other.custom7 != null) {
return false;
}
} else if (!custom7.equals(other.custom7)) {
return false;
}
if (custom8 == null) {
if (other.custom8 != null) {
return false;
}
} else if (!custom8.equals(other.custom8)) {
return false;
}
return true;
}
@ -196,10 +366,28 @@ public class ClassificationSummaryImpl implements ClassificationSummary {
builder.append(name);
builder.append(", parentId=");
builder.append(parentId);
builder.append(", parentKey=");
builder.append(parentKey);
builder.append(", priority=");
builder.append(priority);
builder.append(", serviceLevel=");
builder.append(serviceLevel);
builder.append(", custom1=");
builder.append(custom1);
builder.append(", custom2=");
builder.append(custom2);
builder.append(", custom3=");
builder.append(custom3);
builder.append(", custom4=");
builder.append(custom4);
builder.append(", custom5=");
builder.append(custom5);
builder.append(", custom6=");
builder.append(custom6);
builder.append(", custom7=");
builder.append(custom7);
builder.append(", custom8=");
builder.append(custom8);
builder.append("]");
return builder.toString();
}

View File

@ -18,7 +18,7 @@ import pro.taskana.impl.ClassificationSummaryImpl;
*/
public interface ClassificationMapper {
@Select("<script> SELECT ID, KEY, PARENT_ID, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 "
@Select("<script> SELECT ID, KEY, PARENT_ID, PARENT_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 "
+ "FROM TASKANA.CLASSIFICATION "
+ "WHERE KEY = #{key}"
+ "AND DOMAIN = #{domain}"
@ -27,6 +27,7 @@ public interface ClassificationMapper {
@Results({@Result(property = "id", column = "ID"),
@Result(property = "key", column = "KEY"),
@Result(property = "parentId", column = "PARENT_ID"),
@Result(property = "parentKey", column = "PARENT_KEY"),
@Result(property = "category", column = "CATEGORY"),
@Result(property = "type", column = "TYPE"),
@Result(property = "domain", column = "DOMAIN"),
@ -48,7 +49,7 @@ public interface ClassificationMapper {
@Result(property = "custom8", column = "CUSTOM_8")})
ClassificationImpl findByKeyAndDomain(@Param("key") String key, @Param("domain") String domain);
@Select("<script>SELECT ID, KEY, PARENT_ID, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 "
@Select("<script>SELECT ID, KEY, PARENT_ID, PARENT_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 "
+ "FROM TASKANA.CLASSIFICATION "
+ "WHERE ID = #{id}"
+ "<if test=\"_databaseId == 'db2'\">with UR </if> "
@ -56,6 +57,7 @@ public interface ClassificationMapper {
@Results({@Result(property = "id", column = "ID"),
@Result(property = "key", column = "KEY"),
@Result(property = "parentId", column = "PARENT_ID"),
@Result(property = "parentKey", column = "PARENT_KEY"),
@Result(property = "category", column = "CATEGORY"),
@Result(property = "type", column = "TYPE"),
@Result(property = "domain", column = "DOMAIN"),
@ -77,11 +79,11 @@ public interface ClassificationMapper {
@Result(property = "custom8", column = "CUSTOM_8")})
ClassificationImpl findById(@Param("id") String id);
@Insert("INSERT INTO TASKANA.CLASSIFICATION (ID, KEY, PARENT_ID, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8) VALUES (#{classification.id}, #{classification.key}, #{classification.parentId}, #{classification.category}, #{classification.type}, #{classification.domain}, #{classification.isValidInDomain}, #{classification.created}, #{classification.modified}, #{classification.name}, #{classification.description}, #{classification.priority}, #{classification.serviceLevel}, #{classification.applicationEntryPoint}, #{classification.custom1}, #{classification.custom2}, #{classification.custom3}, #{classification.custom4}, #{classification.custom5}, #{classification.custom6}, #{classification.custom7}, #{classification.custom8})")
@Insert("INSERT INTO TASKANA.CLASSIFICATION (ID, KEY, PARENT_ID, PARENT_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8) VALUES (#{classification.id}, #{classification.key}, #{classification.parentId}, #{classification.parentKey}, #{classification.category}, #{classification.type}, #{classification.domain}, #{classification.isValidInDomain}, #{classification.created}, #{classification.modified}, #{classification.name}, #{classification.description}, #{classification.priority}, #{classification.serviceLevel}, #{classification.applicationEntryPoint}, #{classification.custom1}, #{classification.custom2}, #{classification.custom3}, #{classification.custom4}, #{classification.custom5}, #{classification.custom6}, #{classification.custom7}, #{classification.custom8})")
void insert(@Param("classification") ClassificationImpl classification);
@Update(
value = "UPDATE TASKANA.CLASSIFICATION SET KEY = #{classification.key}, PARENT_ID = #{classification.parentId}, CATEGORY = #{classification.category}, TYPE = #{classification.type}, MODIFIED = #{classification.modified}, NAME = #{classification.name}, DESCRIPTION = #{classification.description}, PRIORITY = #{classification.priority}, SERVICE_LEVEL = #{classification.serviceLevel}, DOMAIN = #{classification.domain}, VALID_IN_DOMAIN = #{classification.isValidInDomain}, APPLICATION_ENTRY_POINT = #{classification.applicationEntryPoint}, CUSTOM_1 = #{classification.custom1}, CUSTOM_2 = #{classification.custom2}, CUSTOM_3 = #{classification.custom3}, CUSTOM_4 = #{classification.custom4}, CUSTOM_5 = #{classification.custom5}, CUSTOM_6 = #{classification.custom6}, CUSTOM_7 = #{classification.custom7}, CUSTOM_8 = #{classification.custom8} WHERE ID = #{classification.id}")
value = "UPDATE TASKANA.CLASSIFICATION SET KEY = #{classification.key}, PARENT_ID = #{classification.parentId}, PARENT_KEY = #{classification.parentKey}, CATEGORY = #{classification.category}, TYPE = #{classification.type}, MODIFIED = #{classification.modified}, NAME = #{classification.name}, DESCRIPTION = #{classification.description}, PRIORITY = #{classification.priority}, SERVICE_LEVEL = #{classification.serviceLevel}, DOMAIN = #{classification.domain}, VALID_IN_DOMAIN = #{classification.isValidInDomain}, APPLICATION_ENTRY_POINT = #{classification.applicationEntryPoint}, CUSTOM_1 = #{classification.custom1}, CUSTOM_2 = #{classification.custom2}, CUSTOM_3 = #{classification.custom3}, CUSTOM_4 = #{classification.custom4}, CUSTOM_5 = #{classification.custom5}, CUSTOM_6 = #{classification.custom6}, CUSTOM_7 = #{classification.custom7}, CUSTOM_8 = #{classification.custom8} WHERE ID = #{classification.id}")
void update(@Param("classification") ClassificationImpl classification);
@Delete("DELETE FROM TASKANA.CLASSIFICATION "
@ -89,7 +91,7 @@ public interface ClassificationMapper {
void deleteClassification(@Param("classificationId") String classificationId);
@Select("<script>"
+ "SELECT ID, KEY, CATEGORY, TYPE, DOMAIN, NAME, PARENT_ID "
+ "SELECT ID, KEY, CATEGORY, TYPE, DOMAIN, NAME, PARENT_ID, PARENT_KEY "
+ "FROM TASKANA.CLASSIFICATION "
+ "WHERE KEY = #{key} "
+ "AND DOMAIN = #{domain}"
@ -102,7 +104,8 @@ public interface ClassificationMapper {
@Result(property = "type", column = "TYPE"),
@Result(property = "domain", column = "DOMAIN"),
@Result(property = "name", column = "NAME"),
@Result(property = "parentId", column = "PARENT_ID")})
@Result(property = "parentId", column = "PARENT_ID"),
@Result(property = "parentKey", column = "PARENT_KEY")})
List<ClassificationSummaryImpl> getAllClassificationsWithKey(@Param("key") String key,
@Param("domain") String domain);

View File

@ -270,12 +270,13 @@ public interface QueryMapper {
@Result(property = "custom16", column = "CUSTOM_16")})
List<TaskSummaryImpl> queryTaskSummaries(TaskQueryImpl taskQuery);
@Select("<script>SELECT ID, KEY, PARENT_ID, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 "
@Select("<script>SELECT ID, KEY, PARENT_ID, PARENT_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1, CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 "
+ "FROM TASKANA.CLASSIFICATION "
+ "<where>"
+ "<if test='key != null'>AND KEY IN(<foreach item='item' collection='key' separator=',' >#{item}</foreach>)</if> "
+ "<if test='idIn != null'>AND ID IN(<foreach item='item' collection='idIn' separator=',' >#{item}</foreach>)</if> "
+ "<if test='parentId != null'>AND PARENT_ID IN(<foreach item='item' collection='parentId' separator=',' >#{item}</foreach>)</if> "
+ "<if test='parentKey != null'>AND PARENT_KEY IN(<foreach item='item' collection='parentKey' separator=',' >#{item}</foreach>)</if> "
+ "<if test='category != null'>AND CATEGORY IN(<foreach item='item' collection='category' separator=',' >#{item}</foreach>)</if> "
+ "<if test='type != null'>AND TYPE IN(<foreach item='item' collection='type' separator=',' >#{item}</foreach>)</if> "
+ "<if test='domain != null'>AND DOMAIN IN(<foreach item='item' collection='domain' separator=',' >#{item}</foreach>)</if> "
@ -318,7 +319,16 @@ public interface QueryMapper {
@Result(property = "name", column = "NAME"),
@Result(property = "priority", column = "PRIORITY"),
@Result(property = "serviceLevel", column = "SERVICE_LEVEL"),
@Result(property = "parentId", column = "PARENT_ID")})
@Result(property = "parentId", column = "PARENT_ID"),
@Result(property = "parentKey", column = "PARENT_KEY"),
@Result(property = "custom1", column = "CUSTOM_1"),
@Result(property = "custom2", column = "CUSTOM_2"),
@Result(property = "custom3", column = "CUSTOM_3"),
@Result(property = "custom4", column = "CUSTOM_4"),
@Result(property = "custom5", column = "CUSTOM_5"),
@Result(property = "custom6", column = "CUSTOM_6"),
@Result(property = "custom7", column = "CUSTOM_7"),
@Result(property = "custom8", column = "CUSTOM_8")})
List<ClassificationSummaryImpl> queryClassificationSummaries(ClassificationQueryImpl classificationQuery);
@Select("<script>SELECT ID, COMPANY, SYSTEM, SYSTEM_INSTANCE, TYPE, VALUE "
@ -658,6 +668,7 @@ public interface QueryMapper {
+ "<if test='key != null'>AND KEY IN(<foreach item='item' collection='key' separator=',' >#{item}</foreach>)</if> "
+ "<if test='idIn != null'>AND ID IN(<foreach item='item' collection='idIn' separator=',' >#{item}</foreach>)</if> "
+ "<if test='parentId != null'>AND PARENT_ID IN(<foreach item='item' collection='parentId' separator=',' >#{item}</foreach>)</if> "
+ "<if test='parentKey != null'>AND PARENT_KEY IN(<foreach item='item' collection='parentKey' separator=',' >#{item}</foreach>)</if> "
+ "<if test='category != null'>AND CATEGORY IN(<foreach item='item' collection='category' separator=',' >#{item}</foreach>)</if> "
+ "<if test='type != null'>AND TYPE IN(<foreach item='item' collection='type' separator=',' >#{item}</foreach>)</if> "
+ "<if test='domain != null'>AND DOMAIN IN(<foreach item='item' collection='domain' separator=',' >#{item}</foreach>)</if> "
@ -890,6 +901,7 @@ public interface QueryMapper {
+ "<if test='key != null'>AND KEY IN(<foreach item='item' collection='key' separator=',' >#{item}</foreach>)</if> "
+ "<if test='idIn != null'>AND ID IN(<foreach item='item' collection='idIn' separator=',' >#{item}</foreach>)</if> "
+ "<if test='parentId != null'>AND PARENT_ID IN(<foreach item='item' collection='parentId' separator=',' >#{item}</foreach>)</if> "
+ "<if test='parentKey != null'>AND PARENT_KEY IN(<foreach item='item' collection='parentKey' separator=',' >#{item}</foreach>)</if> "
+ "<if test='category != null'>AND CATEGORY IN(<foreach item='item' collection='category' separator=',' >#{item}</foreach>)</if> "
+ "<if test='type != null'>AND TYPE IN(<foreach item='item' collection='type' separator=',' >#{item}</foreach>)</if> "
+ "<if test='domain != null'>AND DOMAIN IN(<foreach item='item' collection='domain' separator=',' >#{item}</foreach>)</if> "

View File

@ -9,7 +9,7 @@
"CUSTOM_3", "CUSTOM_2", "CUSTOM_1", "APPLICATION_ENTRY_POINT",
"SERVICE_LEVEL", "PRIORITY", "DESCRIPTION", "NAME",
"CREATED", "VALID_IN_DOMAIN", "DOMAIN", "TYPE", "CATEGORY",
"PARENT_ID", "KEY") ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
"PARENT_KEY", "PARENT_ID", "KEY") ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
COMMIT WORK ;
-- index[2], 3,646MB
CREATE INDEX "DB2ADMIN"."IDX1805212018000" ON "TASKANA "."TASK"
@ -23,7 +23,7 @@
"CUSTOM_5" ASC, "CUSTOM_4" ASC, "CUSTOM_3" ASC, "CUSTOM_2"
ASC, "APPLICATION_ENTRY_POINT" ASC, "SERVICE_LEVEL"
ASC, "PRIORITY" ASC, "DESCRIPTION" ASC, "NAME" ASC,
"CREATED" ASC, "VALID_IN_DOMAIN" ASC, "PARENT_ID"
"CREATED" ASC, "VALID_IN_DOMAIN" ASC, "PARENT_KEY" ASC, "PARENT_ID"
ASC, "KEY" ASC, "ID" ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
COMMIT WORK ;
-- index[4], 0,126MB
@ -53,7 +53,7 @@
"CUSTOM_5", "CUSTOM_4", "CUSTOM_3", "CUSTOM_2", "CUSTOM_1",
"APPLICATION_ENTRY_POINT", "SERVICE_LEVEL", "PRIORITY",
"DESCRIPTION", "NAME", "CREATED", "VALID_IN_DOMAIN",
"TYPE", "CATEGORY", "PARENT_ID", "ID") ALLOW REVERSE
"TYPE", "CATEGORY", "PARENT_KEY", "PARENT_ID", "ID") ALLOW REVERSE
SCANS COLLECT SAMPLED DETAILED STATISTICS;
COMMIT WORK ;
-- index[9], 1,056MB
@ -78,7 +78,7 @@
"CUSTOM_3", "CUSTOM_2", "CUSTOM_1", "APPLICATION_ENTRY_POINT",
"SERVICE_LEVEL", "PRIORITY", "DESCRIPTION", "NAME",
"MODIFIED", "CREATED", "VALID_IN_DOMAIN", "DOMAIN",
"TYPE", "CATEGORY", "PARENT_ID", "KEY") ALLOW REVERSE
"TYPE", "CATEGORY", "PARENT_KEY", "PARENT_ID", "KEY") ALLOW REVERSE
SCANS COLLECT SAMPLED DETAILED STATISTICS;
COMMIT WORK ;
-- index[12], 0,325MB

View File

@ -11,6 +11,7 @@ CREATE TABLE TASKANA.CLASSIFICATION(
ID CHAR(40) NOT NULL,
KEY VARCHAR(32) NOT NULL,
PARENT_ID VARCHAR(40) NOT NULL,
PARENT_KEY VARCHAR(32) NOT NULL,
CATEGORY VARCHAR(32),
TYPE VARCHAR(32),
DOMAIN VARCHAR(255) NOT NULL,

View File

@ -10,6 +10,7 @@ CREATE TABLE TASKANA.CLASSIFICATION(
ID CHAR(40) NOT NULL,
KEY VARCHAR(32) NOT NULL,
PARENT_ID VARCHAR(40) NOT NULL,
PARENT_KEY VARCHAR(32) NOT NULL,
CATEGORY VARCHAR(32),
TYPE VARCHAR(32),
DOMAIN VARCHAR(255) NOT NULL,

View File

@ -173,7 +173,7 @@ public class CreateClassificationAccTest extends AbstractAccTest {
userName = "teamlead_1",
groupNames = {"group_1", "businessadmin"})
@Test(expected = ClassificationNotFoundException.class)
public void testCreateClassificationWithInvalidParent()
public void testCreateClassificationWithInvalidParentId()
throws ClassificationAlreadyExistException, NotAuthorizedException, ClassificationNotFoundException,
DomainNotFoundException, InvalidArgumentException {
Classification classification = classificationService.newClassification("Key5", "", "TASK");
@ -181,4 +181,16 @@ public class CreateClassificationAccTest extends AbstractAccTest {
classification = classificationService.createClassification(classification);
}
@WithAccessId(
userName = "teamlead_1",
groupNames = {"group_1", "businessadmin"})
@Test(expected = ClassificationNotFoundException.class)
public void testCreateClassificationWithInvalidParentKey()
throws ClassificationAlreadyExistException, NotAuthorizedException, ClassificationNotFoundException,
DomainNotFoundException, InvalidArgumentException {
Classification classification = classificationService.newClassification("Key5", "", "TASK");
classification.setParentKey("KEY WHICH CANT BE FOUND");
classification = classificationService.createClassification(classification);
}
}

View File

@ -126,7 +126,7 @@ public class QueryClassificationAccTest extends AbstractAccTest {
}
@Test
public void testGetClassificationsWithParentKey() {
public void testGetClassificationsWithParentId() {
ClassificationService classificationService = taskanaEngine.getClassificationService();
List<ClassificationSummary> classifications = classificationService.createClassificationQuery()
.keyIn("A12", "A13")
@ -148,6 +148,28 @@ public class QueryClassificationAccTest extends AbstractAccTest {
assertEquals(2, classifications.size());
}
@Test
public void testGetClassificationsWithParentKey() {
ClassificationService classificationService = taskanaEngine.getClassificationService();
List<ClassificationSummary> classifications = classificationService.createClassificationQuery()
.keyIn("A12", "A13")
.categoryIn("EXTERNAL", "MANUAL")
.parentKeyIn("L10000")
.list();
assertNotNull(classifications);
assertEquals(1, classifications.size());
classifications = classificationService.createClassificationQuery()
.keyIn("A12", "A13")
.categoryIn("EXTERNAL", "MANUAL", "AUTOMATIC")
.parentKeyIn("L10000", "T2100", "T6310")
.domainIn("DOMAIN_A")
.list();
assertNotNull(classifications);
assertEquals(2, classifications.size());
}
@Test
public void testGetClassificationsWithCustom1() {
ClassificationService classificationService = taskanaEngine.getClassificationService();

View File

@ -72,6 +72,7 @@ public class UpdateClassificationAccTest extends AbstractAccTest {
classification.setIsValidInDomain(false);
classification.setName(newName);
classification.setParentId("CLI:100000000000000000000000000000000004");
classification.setParentKey("L11010");
classification.setPriority(1000);
classification.setServiceLevel("P2DT3H4M");
@ -173,7 +174,7 @@ public class UpdateClassificationAccTest extends AbstractAccTest {
userName = "teamlead_1",
groupNames = {"group_1", "businessadmin"})
@Test(expected = ClassificationNotFoundException.class)
public void testUpdateClassificationParentToInvalid()
public void testUpdateClassificationParentIdToInvalid()
throws NotAuthorizedException, ClassificationNotFoundException,
ConcurrencyException, InvalidArgumentException {
ClassificationService classificationService = taskanaEngine.getClassificationService();
@ -182,6 +183,19 @@ public class UpdateClassificationAccTest extends AbstractAccTest {
classification = classificationService.updateClassification(classification);
}
@WithAccessId(
userName = "teamlead_1",
groupNames = {"group_1", "businessadmin"})
@Test(expected = ClassificationNotFoundException.class)
public void testUpdateClassificationParentKeyToInvalid()
throws NotAuthorizedException, ClassificationNotFoundException,
ConcurrencyException, InvalidArgumentException {
ClassificationService classificationService = taskanaEngine.getClassificationService();
Classification classification = classificationService.getClassification("T2100", "DOMAIN_A");
classification.setParentKey("KEY WHICH CANT BE FOUND");
classification = classificationService.updateClassification(classification);
}
@WithAccessId(
userName = "dummy",
groupNames = {"admin"})

View File

@ -85,7 +85,7 @@ public class ClassificationServiceImplTest {
}
@Test(expected = ClassificationNotFoundException.class)
public void testCreateClassificationParentNotExisting()
public void testCreateClassificationParentIdNotExisting()
throws ClassificationAlreadyExistException, ClassificationNotFoundException, NotAuthorizedException,
DomainNotFoundException, InvalidArgumentException {
Classification classification = createDummyClassification(null);
@ -111,6 +111,36 @@ public class ClassificationServiceImplTest {
}
}
@Test(expected = ClassificationNotFoundException.class)
public void testCreateClassificationParentKeyNotExisting()
throws ClassificationAlreadyExistException, ClassificationNotFoundException, NotAuthorizedException,
DomainNotFoundException, InvalidArgumentException {
Classification classification = createDummyClassification(null);
classification.setParentKey("NOT EXISTING KEY");
doReturn(null).when(classificationMapperMock).findByKeyAndDomain(classification.getKey(),
classification.getDomain());
doReturn(null).when(classificationMapperMock).findByKeyAndDomain(classification.getParentKey(),
classification.getDomain());
doReturn(true).when(taskanaEngineImplMock).domainExists(any());
try {
cutSpy.createClassification(classification);
} catch (ClassificationNotFoundException e) {
verify(taskanaEngineImplMock, times(1)).checkRoleMembership(any());
verify(taskanaEngineImplMock, times(2)).openConnection();
verify(classificationMapperMock, times(1)).findByKeyAndDomain(classification.getKey(),
classification.getDomain());
verify(classificationMapperMock, times(1)).findByKeyAndDomain(classification.getParentKey(),
classification.getDomain());
verify(classificationMapperMock, times(1)).findByKeyAndDomain(classification.getParentKey(), "");
verify(cutSpy, times(1)).getClassification(classification.getParentKey(), classification.getDomain());
verify(taskanaEngineImplMock, times(2)).returnConnection();
verify(taskanaEngineImplMock, times(1)).domainExists(any());
verifyNoMoreInteractions(classificationMapperMock, taskanaEngineImplMock, classificationQueryImplMock);
throw e;
}
}
@Test
public void testCreateClassificationInOwnDomainButExistingInRoot()
throws ClassificationAlreadyExistException, ClassificationNotFoundException, InterruptedException,
@ -214,7 +244,7 @@ public class ClassificationServiceImplTest {
}
@Test(expected = ClassificationNotFoundException.class)
public void testUpdateClassificationParentNotExisting()
public void testUpdateClassificationParentIdNotExisting()
throws ClassificationNotFoundException, NotAuthorizedException,
ConcurrencyException, InvalidArgumentException {
Instant now = Instant.now();
@ -244,6 +274,41 @@ public class ClassificationServiceImplTest {
}
}
@Test(expected = ClassificationNotFoundException.class)
public void testUpdateClassificationParentKeyNotExisting()
throws ClassificationNotFoundException, NotAuthorizedException,
ConcurrencyException, InvalidArgumentException {
Instant now = Instant.now();
ClassificationImpl oldClassification = (ClassificationImpl) createDummyClassification();
oldClassification.setParentKey("SOME KEY");
oldClassification.setCreated(now);
oldClassification.setModified(now);
Classification classification = createDummyClassification();
classification.setParentKey("DIFFERENT KEY - FOR CHECKING PARENT");
((ClassificationImpl) classification).setCreated(oldClassification.getCreated());
((ClassificationImpl) classification).setModified(oldClassification.getModified());
doReturn(oldClassification).when(cutSpy).getClassification(classification.getKey(), classification.getDomain());
doReturn(null).when(classificationMapperMock).findByKeyAndDomain(classification.getParentKey(),
classification.getDomain());
try {
cutSpy.updateClassification(classification);
} catch (ClassificationNotFoundException e) {
verify(taskanaEngineImplMock, times(1)).checkRoleMembership(any());
verify(taskanaEngineImplMock, times(2)).openConnection();
verify(cutSpy, times(1)).getClassification(classification.getKey(),
classification.getDomain());
verify(cutSpy, times(1)).getClassification(classification.getParentKey(),
classification.getDomain());
verify(classificationMapperMock, times(1)).findByKeyAndDomain(classification.getParentKey(),
classification.getDomain());
verify(classificationMapperMock, times(1)).findByKeyAndDomain(classification.getParentKey(), "");
verify(taskanaEngineImplMock, times(2)).returnConnection();
verifyNoMoreInteractions(classificationMapperMock, taskanaEngineImplMock, classificationQueryImplMock);
throw e;
}
}
@Test
public void testGetClassificationFromDomain() throws ClassificationNotFoundException {
Classification expectedClassification = createDummyClassification();
@ -326,6 +391,7 @@ public class ClassificationServiceImplTest {
classificationImpl.setId(id);
classificationImpl.setKey("ABC111");
classificationImpl.setParentId("");
classificationImpl.setParentKey("");
return classificationImpl;
}
}

View File

@ -14,6 +14,7 @@ public class TestClassificationQuery implements ClassificationQuery {
private List<ClassificationSummaryImpl> classifications;
private String[] parentId;
private String[] parentKey;
private String description;
public TestClassificationQuery(List<ClassificationSummaryImpl> classifications) {
@ -36,6 +37,12 @@ public class TestClassificationQuery implements ClassificationQuery {
return this;
}
@Override
public ClassificationQuery parentKeyIn(String... parentKey) {
this.parentKey = parentKey;
return this;
}
@Override
public ClassificationQuery categoryIn(String... category) {
return this;
@ -213,6 +220,11 @@ public class TestClassificationQuery implements ClassificationQuery {
return this;
}
@Override
public ClassificationQuery orderByParentKey(SortDirection sortDirection) {
return this;
}
@Override
public ClassificationQuery orderByCategory(SortDirection sortDirection) {
return this;

View File

@ -1,45 +1,45 @@
-- ID, KEY, PARENT_ID, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1 - 8
-- ID, KEY, PARENT_ID, PARENT_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1 - 8
-- ROOT CLASSIFICATIONS
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000001', 'L10000', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 999, 'PT5H', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000002', 'L10303', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P2D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000003', 'L1050', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P3D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000004', 'L11010', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikänderung', 'Dynamikänderung', 7, 'P4D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000005', 'L110102', 'CLI:000000000000000000000000000000000004', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung', 'Dynamik-Ablehnung', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000006', 'L110105', 'CLI:000000000000000000000000000000000004', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ausschluss', 'Dynamik-Ausschluss', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000007', 'L110107', 'CLI:000000000000000000000000000000000004', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P6D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000008', 'L12010', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gewährung-Policendarlehen', 'Gewährung-Policendarlehen', 8, 'P7D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000009', 'L140101', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 9, 'P8D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000010', 'T2100', '', 'MANUAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P10D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000011', 'T6310', '', 'AUTOMATIC', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P11D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', 'EXTERNAL', 'DOCUMENT', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000017', 'L1060', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:300000000000000000000000000000000017', 'L3060', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000001', 'L10000', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 999, 'PT5H', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000002', 'L10303', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P2D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000003', 'L1050', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P3D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000004', 'L11010', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikänderung', 'Dynamikänderung', 7, 'P4D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000005', 'L110102', 'CLI:000000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung', 'Dynamik-Ablehnung', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000006', 'L110105', 'CLI:000000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ausschluss', 'Dynamik-Ausschluss', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000007', 'L110107', 'CLI:000000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P6D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000008', 'L12010', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gewährung-Policendarlehen', 'Gewährung-Policendarlehen', 8, 'P7D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000009', 'L140101', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 9, 'P8D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000010', 'T2100', '', '', 'MANUAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P10D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000011', 'T6310', '', '', 'AUTOMATIC', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P11D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', '', 'EXTERNAL', 'DOCUMENT', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:300000000000000000000000000000000017', 'L3060', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
-- DOMAIN_A CLASSIFICATIONS
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000002', 'L10303', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 101, 'PT7H', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000003', 'L1050', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P13D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000004', 'L11010', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikänderung', 'Dynamikänderung', 1, 'P14D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000005', 'L110102', 'CLI:100000000000000000000000000000000004', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung', 'Dynamik-Ablehnung', 5, 'P15D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000006', 'L110105', 'CLI:100000000000000000000000000000000004', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ausschluss', 'Dynamik-Ausschluss', 5, 'P16D', '', 'VNR,RVNR,KOLVNR', 'TEXT_2', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000007', 'L110107', 'CLI:100000000000000000000000000000000004', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000008', 'L12010', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gewährung-Policendarlehen', 'Gewährung-Policendarlehen', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000009', 'L140101', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000010', 'T2100', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000011', 'T6310', '', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', 'EXTERNAL', 'DOCUMENT', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000014', 'L10000', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'BUZ-Leistungsfall', 'BUZ-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', 'VNR', 'VNR', 'VNR', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000016', 'T2000', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin', 'T-Vertragstermin', 1, 'P1D', '', 'VNR,KOLVNR,RVNR', 'CUSTOM_2', 'Custom_3', 'custom_4', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000017', 'L1060', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:400000000000000000000000000000000017', 'L3060', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000002', 'L10303', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 101, 'PT7H', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000003', 'L1050', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P13D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000004', 'L11010', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikänderung', 'Dynamikänderung', 1, 'P14D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000005', 'L110102', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung', 'Dynamik-Ablehnung', 5, 'P15D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000006', 'L110105', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ausschluss', 'Dynamik-Ausschluss', 5, 'P16D', '', 'VNR,RVNR,KOLVNR', 'TEXT_2', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000007', 'L110107', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000008', 'L12010', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gewährung-Policendarlehen', 'Gewährung-Policendarlehen', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000009', 'L140101', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000010', 'T2100', '', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000011', 'T6310', '', '', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', '', 'EXTERNAL', 'DOCUMENT', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000014', 'L10000', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'BUZ-Leistungsfall', 'BUZ-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', 'VNR', 'VNR', 'VNR', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000016', 'T2000', '', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin', 'T-Vertragstermin', 1, 'P1D', '', 'VNR,KOLVNR,RVNR', 'CUSTOM_2', 'Custom_3', 'custom_4', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:400000000000000000000000000000000017', 'L3060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
-- DOMAIN_B CLASSIFICATIONS
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000015', 'T2100', '', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 22, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000017', 'L1060', '', 'EXTERNAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000015', 'T2100', '', '', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 22, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
-- WITH PARENT CLASSIFICATIONS (MIXED DOMAIN) ---
-- DOMAIN_A
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000001', 'A12', 'CLI:100000000000000000000000000000000014', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000002', 'A13', 'CLI:100000000000000000000000000000000011', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P1D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000001', 'A12', 'CLI:100000000000000000000000000000000014', 'L10000', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000002', 'A13', 'CLI:100000000000000000000000000000000011', 'T6310', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P1D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
-- DOMAIN_B
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000003', 'A12', 'CLI:100000000000000000000000000000000015', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000004', 'T21001', 'CLI:100000000000000000000000000000000015', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P1D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000003', 'A12', 'CLI:100000000000000000000000000000000015', 'L19001', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000004', 'T21001', 'CLI:100000000000000000000000000000000015', 'L19001', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P1D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');

View File

@ -4,16 +4,16 @@ INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:000000000000000000000000000000000002
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:000000000000000000000000000000000003', 'USER_1_3', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 1 KSC 3', 'MONITOR_TEST_DOMAIN', 'PERSONAL', 'Monitor Test Postkorb 3', 'John' , '' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.WORKBASKET VALUES ('WBI:000000000000000000000000000000000004', 'USER_1_4', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'PPK User 1 KSC 4', 'MONITOR_TEST_DOMAIN', 'PERSONAL', 'Monitor Test Postkorb 4', 'John' , '' , '' , '' , '' , '' , '' , '' , '' );
-- CLASSIFICATION TABLE (ID , KEY , PARENT_ID , CATEGORY , TYPE , DOMAIN , VALID_IN_DOMAIN, CREATED , MODIFIED ,NAME , DESCRIPTION , PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1 , CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000001', 'L10000', '' , 'EXTERN' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall' , 'OLD-Leistungsfall' , 3 , 'P1D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000002', 'L20000', 'CLI:000000000000000000000000000000000001' , 'EXTERN' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll' , 'Beratungsprotokoll', 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR, ANR', '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000003', 'L30000', 'CLI:000000000000000000000000000000000001' , 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf' , 'Widerruf' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000004', 'L40000', 'CLI:000000000000000000000000000000000001' , 'MANUAL' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikaenderung' , 'Dynamikaenderung' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000005', 'L50000', 'CLI:000000000000000000000000000000000001' , 'EXTERN' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung' , 'Dynamik-Ablehnung' , 5 , 'P5D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000006', 'L11000', '' , 'Anhang' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Anhang 1' , 'Anhang 1' , 3 , 'P1D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000007', 'L22000', '' , 'Anhang' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Anhang 2' , 'Anhang 2' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR, ANR', '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000008', 'L33000', '' , 'Anhang' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Anhang 3' , 'Anhang 3' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR, ANR', '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000009', 'L99000', '' , 'Anhang' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Anhang 9' , 'Anhang 9' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR, ANR', '' , '' , '' , '' , '' , '' , '' );
-- CLASSIFICATION TABLE (ID , KEY , PARENT_ID , PARENT_KEY, CATEGORY , TYPE , DOMAIN , VALID_IN_DOMAIN, CREATED , MODIFIED ,NAME , DESCRIPTION , PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1 , CUSTOM_2, CUSTOM_3, CUSTOM_4, CUSTOM_5, CUSTOM_6, CUSTOM_7, CUSTOM_8 );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000001', 'L10000', '' , '' , 'EXTERN' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall' , 'OLD-Leistungsfall' , 3 , 'P1D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000002', 'L20000', 'CLI:000000000000000000000000000000000001' , 'L10000', 'EXTERN' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll' , 'Beratungsprotokoll', 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR, ANR', '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000003', 'L30000', 'CLI:000000000000000000000000000000000001' , 'L10000', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf' , 'Widerruf' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000004', 'L40000', 'CLI:000000000000000000000000000000000001' , 'L10000', 'MANUAL' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikaenderung' , 'Dynamikaenderung' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000005', 'L50000', 'CLI:000000000000000000000000000000000001' , 'L10000', 'EXTERN' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung' , 'Dynamik-Ablehnung' , 5 , 'P5D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000006', 'L11000', '' , '' , 'Anhang' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Anhang 1' , 'Anhang 1' , 3 , 'P1D' , '' , 'VNR,RVNR,KOLVNR' , '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000007', 'L22000', '' , '' , 'Anhang' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Anhang 2' , 'Anhang 2' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR, ANR', '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000008', 'L33000', '' , '' , 'Anhang' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Anhang 3' , 'Anhang 3' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR, ANR', '' , '' , '' , '' , '' , '' , '' );
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000009', 'L99000', '' , '' , 'Anhang' , 'TASK', 'DOMAIN_A', TRUE , CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Anhang 9' , 'Anhang 9' , 1 , 'P1D' , '' , 'VNR,RVNR,KOLVNR, ANR', '' , '' , '' , '' , '' , '' , '' );
-- ATTACHMENT TABLE (ID , TASK_ID , CREATED , MODIFIED , CLASSIFICATION_KEY,CLASSIFICATION_ID , REF_COMPANY, REF_SYSTEM, REF_INSTANCE, REF_TYPE, REF_VALUE, CHANNEL, RECEIVED , CUSTOM_ATTRIBUTES );
INSERT INTO TASKANA.ATTACHMENT VALUES('ATT:000000000000000000000000000000000001', 'TKI:000000000000000000000000000000000001', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'L11000' ,'CLI:000000000000000000000000000000000006', '' , '' , '' , '' , '' , '' , CURRENT_TIMESTAMP, null );

View File

@ -1,45 +1,45 @@
-- ID, KEY, PARENT_ID, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1 - 8
-- ID, KEY, PARENT_ID, PARENT_KEY, CATEGORY, TYPE, DOMAIN, VALID_IN_DOMAIN, CREATED, MODIFIED, NAME, DESCRIPTION, PRIORITY, SERVICE_LEVEL, APPLICATION_ENTRY_POINT, CUSTOM_1 - 8
-- ROOT CLASSIFICATIONS
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000001', 'L10000', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 999, 'PT5H', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000002', 'L10303', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P2D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000003', 'L1050', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P3D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000004', 'L11010', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikänderung', 'Dynamikänderung', 7, 'P4D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000005', 'L110102', 'CLI:000000000000000000000000000000000004', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung', 'Dynamik-Ablehnung', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000006', 'L110105', 'CLI:000000000000000000000000000000000004', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ausschluss', 'Dynamik-Ausschluss', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000007', 'L110107', 'CLI:000000000000000000000000000000000004', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P6D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000008', 'L12010', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gewährung-Policendarlehen', 'Gewährung-Policendarlehen', 8, 'P7D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000009', 'L140101', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 9, 'P8D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000010', 'T2100', '', 'MANUAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P10D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000011', 'T6310', '', 'AUTOMATIC', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P11D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', 'EXTERNAL', 'DOCUMENT', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000017', 'L1060', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:300000000000000000000000000000000017', 'L3060', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000001', 'L10000', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 999, 'PT5H', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000002', 'L10303', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P2D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000003', 'L1050', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P3D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000004', 'L11010', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikänderung', 'Dynamikänderung', 7, 'P4D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000005', 'L110102', 'CLI:000000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung', 'Dynamik-Ablehnung', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000006', 'L110105', 'CLI:000000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ausschluss', 'Dynamik-Ausschluss', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000007', 'L110107', 'CLI:000000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P6D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000008', 'L12010', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gewährung-Policendarlehen', 'Gewährung-Policendarlehen', 8, 'P7D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000009', 'L140101', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 9, 'P8D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000010', 'T2100', '', '', 'MANUAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P10D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000011', 'T6310', '', '', 'AUTOMATIC', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P11D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', '', 'EXTERNAL', 'DOCUMENT', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:000000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:300000000000000000000000000000000017', 'L3060', '', '', 'EXTERNAL', 'TASK', '', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
-- DOMAIN_A CLASSIFICATIONS
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000002', 'L10303', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 101, 'PT7H', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000003', 'L1050', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P13D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000004', 'L11010', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikänderung', 'Dynamikänderung', 1, 'P14D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000005', 'L110102', 'CLI:100000000000000000000000000000000004', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung', 'Dynamik-Ablehnung', 5, 'P15D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000006', 'L110105', 'CLI:100000000000000000000000000000000004', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ausschluss', 'Dynamik-Ausschluss', 5, 'P16D', '', 'VNR,RVNR,KOLVNR', 'TEXT_2', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000007', 'L110107', 'CLI:100000000000000000000000000000000004', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000008', 'L12010', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gewährung-Policendarlehen', 'Gewährung-Policendarlehen', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000009', 'L140101', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000010', 'T2100', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000011', 'T6310', '', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', 'EXTERNAL', 'DOCUMENT', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000014', 'L10000', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'BUZ-Leistungsfall', 'BUZ-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', 'VNR', 'VNR', 'VNR', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000016', 'T2000', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin', 'T-Vertragstermin', 1, 'P1D', '', 'VNR,KOLVNR,RVNR', 'CUSTOM_2', 'Custom_3', 'custom_4', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000017', 'L1060', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:400000000000000000000000000000000017', 'L3060', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000002', 'L10303', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 101, 'PT7H', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000003', 'L1050', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P13D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000004', 'L11010', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamikänderung', 'Dynamikänderung', 1, 'P14D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000005', 'L110102', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ablehnung', 'Dynamik-Ablehnung', 5, 'P15D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000006', 'L110105', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Ausschluss', 'Dynamik-Ausschluss', 5, 'P16D', '', 'VNR,RVNR,KOLVNR', 'TEXT_2', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000007', 'L110107', 'CLI:100000000000000000000000000000000004', 'L11010', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Dynamik-Einschluss/Änd.', 'Dynamik-Einschluss/Änd.', 5, 'P5D', '', 'VNR,RVNR,KOLVNR', 'TEXT_1', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000008', 'L12010', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Gewährung-Policendarlehen', 'Gewährung-Policendarlehen', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000009', 'L140101', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Zustimmungserklärung', 'Zustimmungserklärung', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000010', 'T2100', '', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000011', 'T6310', '', '', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-GUK Honorarrechnung erstellen', 'Generali Unterstützungskasse Honorar wird fällig', 2, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000013', 'DOCTYPE_DEFAULT', '', '', 'EXTERNAL', 'DOCUMENT', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'EP allgemein', 'EP allgemein', 99, 'P2000D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000014', 'L10000', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'BUZ-Leistungsfall', 'BUZ-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', 'VNR', 'VNR', 'VNR', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000016', 'T2000', '', '', 'MANUAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin', 'T-Vertragstermin', 1, 'P1D', '', 'VNR,KOLVNR,RVNR', 'CUSTOM_2', 'Custom_3', 'custom_4', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:100000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:400000000000000000000000000000000017', 'L3060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_A', FALSE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
-- DOMAIN_B CLASSIFICATIONS
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000015', 'T2100', '', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 22, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000017', 'L1060', '', 'EXTERNAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000015', 'T2100', '', '', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'T-Vertragstermin VERA', 'T-Vertragstermin VERA', 22, 'P2D', '', 'VNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000017', 'L1060', '', '', 'EXTERNAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf neu', 'Widerruf neu', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
-- WITH PARENT CLASSIFICATIONS (MIXED DOMAIN) ---
-- DOMAIN_A
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000001', 'A12', 'CLI:100000000000000000000000000000000014', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000002', 'A13', 'CLI:100000000000000000000000000000000011', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P1D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000001', 'A12', 'CLI:100000000000000000000000000000000014', 'L10000', 'EXTERNAL', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'OLD-Leistungsfall', 'OLD-Leistungsfall', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000002', 'A13', 'CLI:100000000000000000000000000000000011', 'T6310', 'AUTOMATIC', 'TASK', 'DOMAIN_A', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P1D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
-- DOMAIN_B
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000003', 'A12', 'CLI:100000000000000000000000000000000015', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000004', 'T21001', 'CLI:100000000000000000000000000000000015', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P1D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000003', 'A12', 'CLI:100000000000000000000000000000000015', 'L19001', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Widerruf', 'Widerruf', 1, 'P1D', '', 'VNR,RVNR,KOLVNR', '', '', '', '', '', '', '');
INSERT INTO TASKANA.CLASSIFICATION VALUES('CLI:200000000000000000000000000000000004', 'T21001', 'CLI:100000000000000000000000000000000015', 'L19001', 'MANUAL', 'TASK', 'DOMAIN_B', TRUE, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 'Beratungsprotokoll', 'Beratungsprotokoll', 1, 'P1D', '', 'VNR,RVNR,KOLVNR, ANR', '', '', '', '', '', '', '');

View File

@ -1,5 +1,23 @@
package pro.taskana.doc.api;
import static org.junit.Assert.assertEquals;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessResponse;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint;
import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWithPath;
import static org.springframework.restdocs.payload.PayloadDocumentation.requestFields;
import static org.springframework.restdocs.payload.PayloadDocumentation.responseFields;
import static org.springframework.restdocs.payload.PayloadDocumentation.subsectionWithPath;
import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@ -18,71 +36,67 @@ import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import pro.taskana.rest.RestConfiguration;
import static org.junit.Assert.assertEquals;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint;
import static org.springframework.restdocs.payload.PayloadDocumentation.*;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessResponse;
import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import pro.taskana.rest.RestConfiguration;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = RestConfiguration.class, webEnvironment = WebEnvironment.RANDOM_PORT)
public class ClassificationControllerRestDocumentation {
@LocalServerPort
int port;
@Rule
public JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation();
@Autowired
private WebApplicationContext context;
private MockMvc mockMvc;
private HashMap<String, String> classificationFieldDescriptionsMap = new HashMap<String, String>();
private FieldDescriptor[] allClassificationsFieldDescriptors;
private FieldDescriptor[] classificationFieldDescriptors;
private FieldDescriptor[] classificationSubsetFieldDescriptors;
private FieldDescriptor[] createClassificationFieldDescriptors;
@Before
public void setUp() {
document("{methodName}",
preprocessRequest(prettyPrint()),
preprocessResponse(prettyPrint()));
preprocessRequest(prettyPrint()),
preprocessResponse(prettyPrint()));
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
.apply(springSecurity())
.apply(documentationConfiguration(this.restDocumentation)
.operationPreprocessors()
.withResponseDefaults(prettyPrint())
.withRequestDefaults(prettyPrint()))
.build();
.apply(springSecurity())
.apply(documentationConfiguration(this.restDocumentation)
.operationPreprocessors()
.withResponseDefaults(prettyPrint())
.withRequestDefaults(prettyPrint()))
.build();
classificationFieldDescriptionsMap.put("classificationId", "Unique Id");
classificationFieldDescriptionsMap.put("key", "The key of the classification. This is typically an externally known code or abbreviation of the classification");
classificationFieldDescriptionsMap.put("parentId", "The parent classification. Empty string (\"\") if this is a root classification.");
classificationFieldDescriptionsMap.put("category", "The category of the classification (MANUAL, EXTERNAL, AUTOMATIC, PROCESS)");
classificationFieldDescriptionsMap.put("key",
"The key of the classification. This is typically an externally known code or abbreviation of the classification");
classificationFieldDescriptionsMap.put("parentId",
"The id of the parent classification. Empty string (\"\") if this is a root classification.");
classificationFieldDescriptionsMap.put("parentKey",
"The key of the parent classification. Empty string (\"\") if this is a root classification.");
classificationFieldDescriptionsMap.put("category",
"The category of the classification (MANUAL, EXTERNAL, AUTOMATIC, PROCESS)");
classificationFieldDescriptionsMap.put("type", "The type of classification (TASK, DOCUMENT)");
classificationFieldDescriptionsMap.put("domain", "The domain for which this classification is specified");
classificationFieldDescriptionsMap.put("isValidInDomain", "True, if this classification to objects in this domain");
classificationFieldDescriptionsMap.put("isValidInDomain",
"True, if this classification to objects in this domain");
classificationFieldDescriptionsMap.put("created", "The creation timestamp of the classification in the system");
classificationFieldDescriptionsMap.put("modified", "The timestamp of the last modification date");
classificationFieldDescriptionsMap.put("name", "The name of the classification");
classificationFieldDescriptionsMap.put("description", "The description of the classification");
classificationFieldDescriptionsMap.put("priority", "The priority of the classification");
classificationFieldDescriptionsMap.put("serviceLevel", "The service level of the classification. This is stated according to ISO 8601");
classificationFieldDescriptionsMap.put("applicationEntryPoint", "The logical name of the entry point, the task list application should redirect to work on a task of this classification");
classificationFieldDescriptionsMap.put("serviceLevel",
"The service level of the classification. This is stated according to ISO 8601");
classificationFieldDescriptionsMap.put("applicationEntryPoint",
"The logical name of the entry point, the task list application should redirect to work on a task of this classification");
classificationFieldDescriptionsMap.put("custom1", "A custom property with name \"1\"");
classificationFieldDescriptionsMap.put("custom2", "A custom property with name \"2\"");
classificationFieldDescriptionsMap.put("custom3", "A custom property with name \"3\"");
@ -94,150 +108,194 @@ public class ClassificationControllerRestDocumentation {
classificationFieldDescriptionsMap.put("validInDomain", "");
classificationFieldDescriptionsMap.put("_links.getAllClassifications.href", "Link to all classifications");
classificationFieldDescriptionsMap.put("_links.getAllClassifications.templated", "");
allClassificationsFieldDescriptors = new FieldDescriptor[] {
subsectionWithPath("_embedded.classificationSummaryResourceList").description("An Array of <<classification-subset, Classification-Subsets>>"),
fieldWithPath("_links.self.href").ignored(),
fieldWithPath("page").ignored()
};
subsectionWithPath("_embedded.classificationSummaryResourceList")
.description("An Array of <<classification-subset, Classification-Subsets>>"),
fieldWithPath("_links.self.href").ignored(),
fieldWithPath("page").ignored()
};
classificationFieldDescriptors = new FieldDescriptor[] {
fieldWithPath("classificationId").description(classificationFieldDescriptionsMap.get("classificationId")),
fieldWithPath("key").description(classificationFieldDescriptionsMap.get("key")),
fieldWithPath("parentId").description(classificationFieldDescriptionsMap.get("parentId")),
fieldWithPath("category").description(classificationFieldDescriptionsMap.get("category")),
fieldWithPath("type").description(classificationFieldDescriptionsMap.get("type")),
fieldWithPath("domain").description(classificationFieldDescriptionsMap.get("domain")),
fieldWithPath("isValidInDomain").description(classificationFieldDescriptionsMap.get("isValidInDomain")),
fieldWithPath("created").description(classificationFieldDescriptionsMap.get("created")),
fieldWithPath("modified").description(classificationFieldDescriptionsMap.get("modified")),
fieldWithPath("name").description(classificationFieldDescriptionsMap.get("name")),
fieldWithPath("description").description(classificationFieldDescriptionsMap.get("description")),
fieldWithPath("priority").description(classificationFieldDescriptionsMap.get("priority")),
fieldWithPath("serviceLevel").description(classificationFieldDescriptionsMap.get("serviceLevel")),
fieldWithPath("applicationEntryPoint").description(classificationFieldDescriptionsMap.get("applicationEntryPoint")),
fieldWithPath("custom1").description(classificationFieldDescriptionsMap.get("custom1")),
fieldWithPath("custom2").description(classificationFieldDescriptionsMap.get("custom2")),
fieldWithPath("custom3").description(classificationFieldDescriptionsMap.get("custom3")),
fieldWithPath("custom4").description(classificationFieldDescriptionsMap.get("custom4")),
fieldWithPath("custom5").description(classificationFieldDescriptionsMap.get("custom5")),
fieldWithPath("custom6").description(classificationFieldDescriptionsMap.get("custom6")),
fieldWithPath("custom7").description(classificationFieldDescriptionsMap.get("custom7")),
fieldWithPath("custom8").description(classificationFieldDescriptionsMap.get("custom8")),
fieldWithPath("validInDomain").description(classificationFieldDescriptionsMap.get("validInDomain")),
fieldWithPath("_links.self.href").ignored()
fieldWithPath("classificationId").description(classificationFieldDescriptionsMap.get("classificationId")),
fieldWithPath("key").description(classificationFieldDescriptionsMap.get("key")),
fieldWithPath("parentId").description(classificationFieldDescriptionsMap.get("parentId")),
fieldWithPath("parentKey").description(classificationFieldDescriptionsMap.get("parentKey")),
fieldWithPath("category").description(classificationFieldDescriptionsMap.get("category")),
fieldWithPath("type").description(classificationFieldDescriptionsMap.get("type")),
fieldWithPath("domain").description(classificationFieldDescriptionsMap.get("domain")),
fieldWithPath("isValidInDomain").description(classificationFieldDescriptionsMap.get("isValidInDomain")),
fieldWithPath("created").description(classificationFieldDescriptionsMap.get("created")),
fieldWithPath("modified").description(classificationFieldDescriptionsMap.get("modified")),
fieldWithPath("name").description(classificationFieldDescriptionsMap.get("name")),
fieldWithPath("description").description(classificationFieldDescriptionsMap.get("description")),
fieldWithPath("priority").description(classificationFieldDescriptionsMap.get("priority")),
fieldWithPath("serviceLevel").description(classificationFieldDescriptionsMap.get("serviceLevel")),
fieldWithPath("applicationEntryPoint")
.description(classificationFieldDescriptionsMap.get("applicationEntryPoint")),
fieldWithPath("custom1").description(classificationFieldDescriptionsMap.get("custom1")),
fieldWithPath("custom2").description(classificationFieldDescriptionsMap.get("custom2")),
fieldWithPath("custom3").description(classificationFieldDescriptionsMap.get("custom3")),
fieldWithPath("custom4").description(classificationFieldDescriptionsMap.get("custom4")),
fieldWithPath("custom5").description(classificationFieldDescriptionsMap.get("custom5")),
fieldWithPath("custom6").description(classificationFieldDescriptionsMap.get("custom6")),
fieldWithPath("custom7").description(classificationFieldDescriptionsMap.get("custom7")),
fieldWithPath("custom8").description(classificationFieldDescriptionsMap.get("custom8")),
fieldWithPath("validInDomain").description(classificationFieldDescriptionsMap.get("validInDomain")),
fieldWithPath("_links.self.href").ignored()
};
classificationSubsetFieldDescriptors = new FieldDescriptor[] {
fieldWithPath("classificationId").description(classificationFieldDescriptionsMap.get("classificationId")),
fieldWithPath("key").description(classificationFieldDescriptionsMap.get("key")),
fieldWithPath("parentId").description(classificationFieldDescriptionsMap.get("parentId")),
fieldWithPath("category").description(classificationFieldDescriptionsMap.get("category")),
fieldWithPath("type").description(classificationFieldDescriptionsMap.get("type")),
fieldWithPath("domain").description(classificationFieldDescriptionsMap.get("domain")),
fieldWithPath("isValidInDomain").ignored(),
fieldWithPath("created").ignored(),
fieldWithPath("modified").ignored(),
fieldWithPath("name").description(classificationFieldDescriptionsMap.get("name")),
fieldWithPath("description").ignored(),
fieldWithPath("priority").description(classificationFieldDescriptionsMap.get("priority")),
fieldWithPath("serviceLevel").ignored(),
fieldWithPath("applicationEntryPoint").ignored(),
fieldWithPath("custom1").ignored(),
fieldWithPath("custom2").ignored(),
fieldWithPath("custom3").ignored(),
fieldWithPath("custom4").ignored(),
fieldWithPath("custom5").ignored(),
fieldWithPath("custom6").ignored(),
fieldWithPath("custom7").ignored(),
fieldWithPath("custom8").ignored(),
fieldWithPath("validInDomain").ignored(),
fieldWithPath("_links.self.href").ignored()
fieldWithPath("classificationId").description(classificationFieldDescriptionsMap.get("classificationId")),
fieldWithPath("key").description(classificationFieldDescriptionsMap.get("key")),
fieldWithPath("parentId").description(classificationFieldDescriptionsMap.get("parentId")),
fieldWithPath("parentKey").description(classificationFieldDescriptionsMap.get("parentKey")),
fieldWithPath("category").description(classificationFieldDescriptionsMap.get("category")),
fieldWithPath("type").description(classificationFieldDescriptionsMap.get("type")),
fieldWithPath("domain").description(classificationFieldDescriptionsMap.get("domain")),
fieldWithPath("isValidInDomain").ignored(),
fieldWithPath("created").ignored(),
fieldWithPath("modified").ignored(),
fieldWithPath("name").description(classificationFieldDescriptionsMap.get("name")),
fieldWithPath("description").ignored(),
fieldWithPath("priority").description(classificationFieldDescriptionsMap.get("priority")),
fieldWithPath("serviceLevel").ignored(),
fieldWithPath("applicationEntryPoint").ignored(),
fieldWithPath("custom1").ignored(),
fieldWithPath("custom2").ignored(),
fieldWithPath("custom3").ignored(),
fieldWithPath("custom4").ignored(),
fieldWithPath("custom5").ignored(),
fieldWithPath("custom6").ignored(),
fieldWithPath("custom7").ignored(),
fieldWithPath("custom8").ignored(),
fieldWithPath("validInDomain").ignored(),
fieldWithPath("_links.self.href").ignored()
};
createClassificationFieldDescriptors = new FieldDescriptor[] {
fieldWithPath("category").type("String").description("The category of the classification (MANUAL, EXTERNAL, AUTOMATIC, PROCESS)").optional(),
fieldWithPath("domain").description("The domain for which this classification is specified"),
fieldWithPath("key").description("The key of the classification. This is typically an externally known code or abbreviation of the classification"),
fieldWithPath("name").type("String").description("The name of the classification").optional(),
fieldWithPath("type").type("String").description("The type of classification (TASK, DOCUMENT)").optional(),
fieldWithPath("parentId").type("String").description(classificationFieldDescriptionsMap.get("parentId")).optional(),
fieldWithPath("isValidInDomain").type("Boolean").description(classificationFieldDescriptionsMap.get("isValidInDomain")).optional(),
fieldWithPath("created").type("String").description(classificationFieldDescriptionsMap.get("created")).optional(),
fieldWithPath("modified").type("String").description(classificationFieldDescriptionsMap.get("modified")).optional(),
fieldWithPath("description").type("String").description(classificationFieldDescriptionsMap.get("description")).optional(),
fieldWithPath("priority").type("Number").description(classificationFieldDescriptionsMap.get("priority")).optional(),
fieldWithPath("serviceLevel").type("String").description(classificationFieldDescriptionsMap.get("serviceLevel")).optional(),
fieldWithPath("applicationEntryPoint").type("String").description(classificationFieldDescriptionsMap.get("applicationEntryPoint")).optional(),
fieldWithPath("custom1").type("String").description(classificationFieldDescriptionsMap.get("custom1")).optional(),
fieldWithPath("custom2").type("String").description(classificationFieldDescriptionsMap.get("custom2")).optional(),
fieldWithPath("custom3").type("String").description(classificationFieldDescriptionsMap.get("custom3")).optional(),
fieldWithPath("custom4").type("String").description(classificationFieldDescriptionsMap.get("custom4")).optional(),
fieldWithPath("custom5").type("String").description(classificationFieldDescriptionsMap.get("custom5")).optional(),
fieldWithPath("custom6").type("String").description(classificationFieldDescriptionsMap.get("custom6")).optional(),
fieldWithPath("custom7").type("String").description(classificationFieldDescriptionsMap.get("custom7")).optional(),
fieldWithPath("custom8").type("String").description(classificationFieldDescriptionsMap.get("custom8")).optional(),
fieldWithPath("validInDomain").type("Boolean").description(classificationFieldDescriptionsMap.get("validInDomain")).optional(),
};
fieldWithPath("category").type("String")
.description("The category of the classification (MANUAL, EXTERNAL, AUTOMATIC, PROCESS)")
.optional(),
fieldWithPath("domain").description("The domain for which this classification is specified"),
fieldWithPath("key").description(
"The key of the classification. This is typically an externally known code or abbreviation of the classification"),
fieldWithPath("name").type("String").description("The name of the classification").optional(),
fieldWithPath("type").type("String").description("The type of classification (TASK, DOCUMENT)").optional(),
fieldWithPath("parentId").type("String")
.description(classificationFieldDescriptionsMap.get("parentId"))
.optional(),
fieldWithPath("parentKey").type("String")
.description(classificationFieldDescriptionsMap.get("parentKey"))
.optional(),
fieldWithPath("isValidInDomain").type("Boolean")
.description(classificationFieldDescriptionsMap.get("isValidInDomain"))
.optional(),
fieldWithPath("created").type("String")
.description(classificationFieldDescriptionsMap.get("created"))
.optional(),
fieldWithPath("modified").type("String")
.description(classificationFieldDescriptionsMap.get("modified"))
.optional(),
fieldWithPath("description").type("String")
.description(classificationFieldDescriptionsMap.get("description"))
.optional(),
fieldWithPath("priority").type("Number")
.description(classificationFieldDescriptionsMap.get("priority"))
.optional(),
fieldWithPath("serviceLevel").type("String")
.description(classificationFieldDescriptionsMap.get("serviceLevel"))
.optional(),
fieldWithPath("applicationEntryPoint").type("String")
.description(classificationFieldDescriptionsMap.get("applicationEntryPoint"))
.optional(),
fieldWithPath("custom1").type("String")
.description(classificationFieldDescriptionsMap.get("custom1"))
.optional(),
fieldWithPath("custom2").type("String")
.description(classificationFieldDescriptionsMap.get("custom2"))
.optional(),
fieldWithPath("custom3").type("String")
.description(classificationFieldDescriptionsMap.get("custom3"))
.optional(),
fieldWithPath("custom4").type("String")
.description(classificationFieldDescriptionsMap.get("custom4"))
.optional(),
fieldWithPath("custom5").type("String")
.description(classificationFieldDescriptionsMap.get("custom5"))
.optional(),
fieldWithPath("custom6").type("String")
.description(classificationFieldDescriptionsMap.get("custom6"))
.optional(),
fieldWithPath("custom7").type("String")
.description(classificationFieldDescriptionsMap.get("custom7"))
.optional(),
fieldWithPath("custom8").type("String")
.description(classificationFieldDescriptionsMap.get("custom8"))
.optional(),
fieldWithPath("validInDomain").type("Boolean")
.description(classificationFieldDescriptionsMap.get("validInDomain"))
.optional(),
};
}
@Test
public void getAllClassificationsDocTest() throws Exception {
this.mockMvc.perform(RestDocumentationRequestBuilders
.get("http://127.0.0.1:" + port + "/v1/classifications?domain=DOMAIN_B")
.accept("application/hal+json")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("GetAllClassificationsDocTest",
responseFields(allClassificationsFieldDescriptors)));
.get("http://127.0.0.1:" + port + "/v1/classifications?domain=DOMAIN_B")
.accept("application/hal+json")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("GetAllClassificationsDocTest",
responseFields(allClassificationsFieldDescriptors)));
}
@Test
public void getSpecificClassificationDocTest() throws Exception {
this.mockMvc.perform(RestDocumentationRequestBuilders
.get("http://127.0.0.1:" + port + "/v1/classifications/CLI:100000000000000000000000000000000009")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("GetSpecificClassificationDocTest",
.get("http://127.0.0.1:" + port + "/v1/classifications/CLI:100000000000000000000000000000000009")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("GetSpecificClassificationDocTest",
responseFields(classificationFieldDescriptors)));
}
@Test
public void classificationSubsetDocTest() throws Exception {
this.mockMvc.perform(RestDocumentationRequestBuilders
.get("http://127.0.0.1:" + port + "/v1/classifications/CLI:100000000000000000000000000000000009")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("ClassificationSubset",
.get("http://127.0.0.1:" + port + "/v1/classifications/CLI:100000000000000000000000000000000009")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("ClassificationSubset",
responseFields(classificationSubsetFieldDescriptors)));
}
@Test
public void createAndDeleteClassificationDocTest() throws Exception {
MvcResult result = this.mockMvc.perform(RestDocumentationRequestBuilders
.post("http://127.0.0.1:" + port + "/v1/classifications")
.contentType("application/hal+json")
.content("{\"key\":\"Key0815casdgdgh\", \"domain\":\"DOMAIN_B\"}")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isCreated())
.andDo(MockMvcRestDocumentation.document("CreateClassificationDocTest",
.post("http://127.0.0.1:" + port + "/v1/classifications")
.contentType("application/hal+json")
.content("{\"key\":\"Key0815casdgdgh\", \"domain\":\"DOMAIN_B\"}")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isCreated())
.andDo(MockMvcRestDocumentation.document("CreateClassificationDocTest",
requestFields(createClassificationFieldDescriptors),
responseFields(classificationFieldDescriptors)))
.andReturn();
.andReturn();
String newId = result.getResponse().getContentAsString().substring(21, 61);
this.mockMvc.perform(RestDocumentationRequestBuilders
.delete("http://127.0.0.1:" + port + "/v1/classifications/" + newId)
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isNoContent())
.andDo(MockMvcRestDocumentation.document("DeleteClassificationDocTest"));
.delete("http://127.0.0.1:" + port + "/v1/classifications/" + newId)
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isNoContent())
.andDo(MockMvcRestDocumentation.document("DeleteClassificationDocTest"));
}
@Test
public void updateClassificationDocTest() throws Exception {
URL url = new URL("http://127.0.0.1:" + port + "/v1/classifications/CLI:100000000000000000000000000000000009");
@ -257,14 +315,14 @@ public class ClassificationControllerRestDocumentation {
con.disconnect();
String originalTask = content.toString();
String modifiedTask = new String(originalTask.toString());
this.mockMvc.perform(RestDocumentationRequestBuilders
.put("http://127.0.0.1:" + port + "/v1/classifications/CLI:100000000000000000000000000000000009")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x")
.contentType("application/json")
.content(modifiedTask))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("UpdateClassificationDocTest",
.put("http://127.0.0.1:" + port + "/v1/classifications/CLI:100000000000000000000000000000000009")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x")
.contentType("application/json")
.content(modifiedTask))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("UpdateClassificationDocTest",
requestFields(classificationFieldDescriptors),
responseFields(classificationFieldDescriptors)));
}

View File

@ -1,5 +1,16 @@
package pro.taskana.doc.api;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessResponse;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint;
import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWithPath;
import static org.springframework.restdocs.payload.PayloadDocumentation.responseFields;
import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity;
import java.util.HashMap;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@ -17,92 +28,85 @@ import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
import pro.taskana.rest.RestConfiguration;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.documentationConfiguration;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.prettyPrint;
import static org.springframework.restdocs.payload.PayloadDocumentation.*;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessRequest;
import static org.springframework.restdocs.operation.preprocess.Preprocessors.preprocessResponse;
import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.*;
import java.util.HashMap;
import pro.taskana.rest.RestConfiguration;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = RestConfiguration.class, webEnvironment = WebEnvironment.RANDOM_PORT)
public class CommonRestDocumentation {
@LocalServerPort
int port;
@Rule
public JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation();
@Autowired
private WebApplicationContext context;
private MockMvc mockMvc;
private HashMap<String, String> selfLinkFieldDescriptionsMap = new HashMap<String, String>();
private FieldDescriptor[] selfLinkFieldDescriptors;
@Before
public void setUp() {
document("{methodName}",
preprocessRequest(prettyPrint()),
preprocessResponse(prettyPrint()));
preprocessRequest(prettyPrint()),
preprocessResponse(prettyPrint()));
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context)
.apply(springSecurity())
.apply(documentationConfiguration(this.restDocumentation)
.operationPreprocessors()
.withResponseDefaults(prettyPrint())
.withRequestDefaults(prettyPrint()))
.build();
.apply(springSecurity())
.apply(documentationConfiguration(this.restDocumentation)
.operationPreprocessors()
.withResponseDefaults(prettyPrint())
.withRequestDefaults(prettyPrint()))
.build();
selfLinkFieldDescriptionsMap.put("_links", "Links section");
selfLinkFieldDescriptionsMap.put("_links.self", "Link to self");
selfLinkFieldDescriptionsMap.put("_links.self.href", "Link to instance");
selfLinkFieldDescriptors = new FieldDescriptor[] {
fieldWithPath("classificationId").ignored(),
fieldWithPath("key").ignored(),
fieldWithPath("parentId").ignored(),
fieldWithPath("category").ignored(),
fieldWithPath("type").ignored(),
fieldWithPath("domain").ignored(),
fieldWithPath("isValidInDomain").ignored(),
fieldWithPath("created").ignored(),
fieldWithPath("modified").ignored(),
fieldWithPath("name").ignored(),
fieldWithPath("description").ignored(),
fieldWithPath("priority").ignored(),
fieldWithPath("serviceLevel").ignored(),
fieldWithPath("applicationEntryPoint").ignored(),
fieldWithPath("custom1").ignored(),
fieldWithPath("custom2").ignored(),
fieldWithPath("custom3").ignored(),
fieldWithPath("custom4").ignored(),
fieldWithPath("custom5").ignored(),
fieldWithPath("custom6").ignored(),
fieldWithPath("custom7").ignored(),
fieldWithPath("custom8").ignored(),
fieldWithPath("validInDomain").ignored(),
fieldWithPath("_links").description(selfLinkFieldDescriptionsMap.get("_links")),
fieldWithPath("_links.self").description(selfLinkFieldDescriptionsMap.get("_links.self")),
fieldWithPath("_links.self.href").description(selfLinkFieldDescriptionsMap.get("_links.self.href"))
fieldWithPath("classificationId").ignored(),
fieldWithPath("key").ignored(),
fieldWithPath("parentId").ignored(),
fieldWithPath("parentKey").ignored(),
fieldWithPath("category").ignored(),
fieldWithPath("type").ignored(),
fieldWithPath("domain").ignored(),
fieldWithPath("isValidInDomain").ignored(),
fieldWithPath("created").ignored(),
fieldWithPath("modified").ignored(),
fieldWithPath("name").ignored(),
fieldWithPath("description").ignored(),
fieldWithPath("priority").ignored(),
fieldWithPath("serviceLevel").ignored(),
fieldWithPath("applicationEntryPoint").ignored(),
fieldWithPath("custom1").ignored(),
fieldWithPath("custom2").ignored(),
fieldWithPath("custom3").ignored(),
fieldWithPath("custom4").ignored(),
fieldWithPath("custom5").ignored(),
fieldWithPath("custom6").ignored(),
fieldWithPath("custom7").ignored(),
fieldWithPath("custom8").ignored(),
fieldWithPath("validInDomain").ignored(),
fieldWithPath("_links").description(selfLinkFieldDescriptionsMap.get("_links")),
fieldWithPath("_links.self").description(selfLinkFieldDescriptionsMap.get("_links.self")),
fieldWithPath("_links.self.href").description(selfLinkFieldDescriptionsMap.get("_links.self.href"))
};
}
@Test
public void commonFieldsDocTest() throws Exception {
this.mockMvc.perform(RestDocumentationRequestBuilders
.get("http://127.0.0.1:" + port + "/v1/classifications/CLI:100000000000000000000000000000000009")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("CommonFields",
.get("http://127.0.0.1:" + port + "/v1/classifications/CLI:100000000000000000000000000000000009")
.header("Authorization", "Basic dGVhbWxlYWRfMTp0ZWFtbGVhZF8x"))
.andExpect(MockMvcResultMatchers.status().isOk())
.andDo(MockMvcRestDocumentation.document("CommonFields",
responseFields(selfLinkFieldDescriptors)));
}
}

View File

@ -10,6 +10,7 @@ public class ClassificationResource extends ResourceSupport {
public String classificationId;
public String key;
public String parentId;
public String parentKey;
public String category;
public String type;
public String domain;
@ -58,6 +59,14 @@ public class ClassificationResource extends ResourceSupport {
this.parentId = parentId;
}
public String getParentKey() {
return parentId;
}
public void setParentKey(String parentKey) {
this.parentKey = parentKey;
}
public String getCategory() {
return category;
}
@ -215,6 +224,8 @@ public class ClassificationResource extends ResourceSupport {
builder.append(key);
builder.append(", parentId=");
builder.append(parentId);
builder.append(", parentKey=");
builder.append(parentKey);
builder.append(", category=");
builder.append(category);
builder.append(", type=");

View File

@ -10,11 +10,20 @@ public class ClassificationSummaryResource extends ResourceSupport {
public String classificationId;
public String key;
public String parentId;
public String parentKey;
public String category;
public String type;
public String domain;
public String name;
public int priority;
public String custom1;
public String custom2;
public String custom3;
public String custom4;
public String custom5;
public String custom6;
public String custom7;
public String custom8;
public String getClassificationId() {
return classificationId;
@ -40,6 +49,14 @@ public class ClassificationSummaryResource extends ResourceSupport {
this.parentId = parentId;
}
public String getParentKey() {
return parentKey;
}
public void setParentKey(String parentKey) {
this.parentKey = parentKey;
}
public String getCategory() {
return category;
}
@ -80,4 +97,68 @@ public class ClassificationSummaryResource extends ResourceSupport {
this.priority = priority;
}
public String getCustom1() {
return custom1;
}
public void setCustom1(String custom1) {
this.custom1 = custom1;
}
public String getCustom2() {
return custom2;
}
public void setCustom2(String custom2) {
this.custom2 = custom2;
}
public String getCustom3() {
return custom3;
}
public void setCustom3(String custom3) {
this.custom3 = custom3;
}
public String getCustom4() {
return custom4;
}
public void setCustom4(String custom4) {
this.custom4 = custom4;
}
public String getCustom5() {
return custom5;
}
public void setCustom5(String custom5) {
this.custom5 = custom5;
}
public String getCustom6() {
return custom6;
}
public void setCustom6(String custom6) {
this.custom6 = custom6;
}
public String getCustom7() {
return custom7;
}
public void setCustom7(String custom7) {
this.custom7 = custom7;
}
public String getCustom8() {
return custom8;
}
public void setCustom8(String custom8) {
this.custom8 = custom8;
}
}