TSK-397: removed unnecessary classification key from attachment.

This commit is contained in:
Holger Hagen 2018-04-09 17:07:23 +02:00 committed by BerndBreier
parent 3408371d6e
commit 1d05470aff
2 changed files with 8 additions and 11 deletions

View File

@ -19,7 +19,6 @@ public class AttachmentImpl implements Attachment {
private String taskId;
private Instant created;
private Instant modified;
private String classificationKey;
private ClassificationSummary classificationSummary;
private ObjectReference objectReference;
private String channel;
@ -142,7 +141,6 @@ public class AttachmentImpl implements Attachment {
final int prime = 31;
int result = 1;
result = prime * result + ((channel == null) ? 0 : channel.hashCode());
result = prime * result + ((classificationKey == null) ? 0 : classificationKey.hashCode());
result = prime * result + ((classificationSummary == null) ? 0 : classificationSummary.hashCode());
result = prime * result + ((created == null) ? 0 : created.hashCode());
result = prime * result + ((customAttributes == null) ? 0 : customAttributes.hashCode());
@ -173,13 +171,6 @@ public class AttachmentImpl implements Attachment {
} else if (!channel.equals(other.channel)) {
return false;
}
if (classificationKey == null) {
if (other.classificationKey != null) {
return false;
}
} else if (!classificationKey.equals(other.classificationKey)) {
return false;
}
if (classificationSummary == null) {
if (other.classificationSummary != null) {
return false;
@ -250,8 +241,6 @@ public class AttachmentImpl implements Attachment {
builder.append(created);
builder.append(", modified=");
builder.append(modified);
builder.append(", classificationKey=");
builder.append(classificationKey);
builder.append(", classificationSummary=");
builder.append(classificationSummary);
builder.append(", objectReference=");

View File

@ -202,6 +202,14 @@ public class CreateTaskAccTest extends AbstractAccTest {
assertNotNull(readTask.getAttachments().get(0).getModified());
assertEquals(readTask.getAttachments().get(0).getCreated(), readTask.getAttachments().get(0).getModified());
assertNotNull(readTask.getAttachments().get(0).getClassificationSummary());
assertNotNull(readTask.getAttachments().get(0).getClassificationSummary().getId());
assertNotNull(readTask.getAttachments().get(0).getClassificationSummary().getKey());
assertNotNull(readTask.getAttachments().get(0).getClassificationSummary().getType());
assertNotNull(readTask.getAttachments().get(0).getClassificationSummary().getCategory());
assertNotNull(readTask.getAttachments().get(0).getClassificationSummary().getDomain());
assertNotNull(readTask.getAttachments().get(0).getClassificationSummary().getServiceLevel());
assertNotNull(readTask.getAttachments().get(0).getReceived());
assertNotNull(readTask.getAttachments().get(0).getChannel());
assertNotNull(readTask.getAttachments().get(0).getObjectReference());
// verify that the map is correctly retrieved from the database
Map<String, String> customAttributesFromDb = readTask.getAttachments().get(0).getCustomAttributes();