diff options
author | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-02-17 07:00:09 +0100 |
---|---|---|
committer | Thomas Lenz <tlenz@iaik.tugraz.at> | 2016-02-17 07:00:09 +0100 |
commit | 07c6114a266a67abd404bac8703c1a17e035d69d (patch) | |
tree | 893d8a4873566b2bf3d4dc8d35d02e636a9d38cd /DocumentService/src/eu/stork/documentservice/model/TempDocumentModel.java | |
parent | 274a85e53fa8c06a869f2bb3a7bd24300ee9b3fd (diff) | |
download | moa-id-spss-07c6114a266a67abd404bac8703c1a17e035d69d.tar.gz moa-id-spss-07c6114a266a67abd404bac8703c1a17e035d69d.tar.bz2 moa-id-spss-07c6114a266a67abd404bac8703c1a17e035d69d.zip |
remove STORK code --> MOA-ID >= 3.2 only supports eIDAS protocol
Diffstat (limited to 'DocumentService/src/eu/stork/documentservice/model/TempDocumentModel.java')
-rw-r--r-- | DocumentService/src/eu/stork/documentservice/model/TempDocumentModel.java | 118 |
1 files changed, 0 insertions, 118 deletions
diff --git a/DocumentService/src/eu/stork/documentservice/model/TempDocumentModel.java b/DocumentService/src/eu/stork/documentservice/model/TempDocumentModel.java deleted file mode 100644 index 7c28cc0f7..000000000 --- a/DocumentService/src/eu/stork/documentservice/model/TempDocumentModel.java +++ /dev/null @@ -1,118 +0,0 @@ -package eu.stork.documentservice.model; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Date; - -import eu.stork.documentservice.exceptions.ModelException; - -public class TempDocumentModel { - private String docid; - private byte[] document; - private String spid; - private String mimetype; - private String reicevercert; - private String enckey; - private String enciv; - private Date created; - private Date fetched; - private Date deleted; - - public String getDocid() { - return docid; - } - public void setDocid(String docid) { - this.docid = docid; - } - public byte[] getDocument() { - return document; - } - public void setDocument(byte[] document) { - this.document = document; - } - public String getSpid() { - return spid; - } - public void setSpid(String spid) { - this.spid = spid; - } - public String getMimetype() { - return mimetype; - } - public void setMimetype(String mimetype) { - this.mimetype = mimetype; - } - - public String getReicevercert() { - return reicevercert; - } - public void setReicevercert(String reicevercert) { - this.reicevercert = reicevercert; - } - public String getEnckey() { - return enckey; - } - public void setEnckey(String enckey) { - this.enckey = enckey; - } - public String getEnciv() { - return enciv; - } - public void setEnciv(String enciv) { - this.enciv = enciv; - } - public Date getCreated() { - return created; - } - public void setCreated(Date created) { - this.created = created; - } - public Date getFetched() { - return fetched; - } - public void setFetched(Date fetched) { - this.fetched = fetched; - } - public Date getDeleted() { - return deleted; - } - public void setDeleted(Date deleted) { - this.deleted = deleted; - } - - public InputStream getDataStream() - { - if (this.document != null) - return new ByteArrayInputStream(this.document); - else - return null; - } - - public void setDataStream(InputStream stream) throws ModelException - { - try { - this.document = new byte[stream.available()]; - stream.read(this.document); - } catch (IOException e) { - throw new ModelException("Unable to parse stream.", e); - } - } - - public void insertValidate() throws ModelException - { - if (this.docid == null || this.docid.isEmpty()) - throw new ModelException("Document ID is null or empty"); - if (this.document == null) - throw new ModelException("Document is null"); - if (this.spid == null || this.spid.isEmpty()) - throw new ModelException("SPId is null or empty."); - } - - public void updateValidate() throws ModelException - { - this.insertValidate(); - if (this.created == null) - throw new ModelException("Created is null"); - } -} |