*
* @param info
* @return document
*/
public IDocument create(DocumentInfo info) {
AbstractDocument doc = null;
if (Type.ATTACHMENT == info.getType()) {
if (ContentType.FILE == info.getContentType()) {
doc = new FileAttachmentDocument(info);
}
} else if (Type.LINKED == info.getType()) {
if (ContentType.FILE == info.getContentType()) {
doc = new FileLinkedDocument(info);
} else if (ContentType.WEB == info.getContentType()) {
doc = new WebLinkedDocument(info);
}
}
if (doc != null) {
doc.setSource(source);
}
return doc;
}