Search in sources :

Example 1 with Document

use of com.autentia.tnt.businessobject.Document in project TNTConcept by autentia.

the class ActivityBean method createDocument.

public String createDocument() {
    Document doc = new Document();
    HashSet<DocumentCategory> categories = new HashSet<DocumentCategory>();
    categories.add(externalActivity.getDocumentCategory());
    doc.setCategories(categories);
    doc.setOwnerId(externalActivity.getOwnerId());
    doc.setDepartmentId(externalActivity.getDepartmentId());
    doc.setCreationDate(new Date());
    // docVersion.setCreationDate(new Date());
    // docVersion.setOwnerId(externalActivity.getOwnerId());
    // docVersion.setDepartmentId(externalActivity.getDepartmentId());
    // docVersion.setDocument(doc);
    // docVersion.setVersion(EXT_ACT_DOC_VERSION);
    // 
    // if (doc.getVersions() == null) {
    // doc.setVersions(new HashSet<DocumentVersion>());
    // }
    // 
    // doc.getVersions().add(docVersion);
    documents.add(doc);
    return null;
}
Also used : Document(com.autentia.tnt.businessobject.Document) DocumentCategory(com.autentia.tnt.businessobject.DocumentCategory) Date(java.util.Date) LocalDate(java.time.LocalDate) HashSet(java.util.HashSet)

Aggregations

Document (com.autentia.tnt.businessobject.Document)1 DocumentCategory (com.autentia.tnt.businessobject.DocumentCategory)1 LocalDate (java.time.LocalDate)1 Date (java.util.Date)1 HashSet (java.util.HashSet)1