Commit 33ea2193 authored by Majeed's avatar Majeed

additional CDA status rejected

parent ef6cbf76
......@@ -9,7 +9,8 @@ public class CDAStatus {
public enum Status{
Created,
Updated
Updated,
Rejected
}
public CDAStatus(CDASummary summary, Status status){
......@@ -23,6 +24,9 @@ public class CDAStatus {
public static CDAStatus updated(CDASummary summary){
return new CDAStatus(summary, Status.Updated);
}
public static CDAStatus rejected(String documentId) {
return new CDAStatus(new DocumentIdSummary(documentId), Status.Rejected);
}
public Date getLastModified(){
return summary.getLastModified();
......
package org.aktin.cda;
import java.util.Date;
public class DocumentIdSummary implements CDASummary {
private String documentId;
public DocumentIdSummary(String documentId) {
this.documentId = documentId;
}
@Override
public String getDocumentId() {
return documentId;
}
@Override
public Date getLastModified() {
return null;
}
@Override
public Date getCreated() {
return null;
}
@Override
public String getVersion() {
return null;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment