mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4329 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4331 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4332 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4339 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4653 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -259,6 +259,13 @@ public class RoutingContentServiceTest extends TestCase
|
||||
// check the indexing doesn't spank everthing
|
||||
txn.commit();
|
||||
txn = null;
|
||||
|
||||
// cleanup
|
||||
txn = getUserTransaction();
|
||||
txn.begin();
|
||||
nodeService.deleteNode(contentNodeRef);
|
||||
txn.commit();
|
||||
txn = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -49,16 +49,19 @@ public class PdfBoxMetadataExtracter extends AbstractMetadataExtracter
|
||||
is = reader.getContentInputStream();
|
||||
// stream the document in
|
||||
pdf = PDDocument.load(is);
|
||||
// Scoop out the metadata
|
||||
PDDocumentInformation docInfo = pdf.getDocumentInformation();
|
||||
|
||||
trimPut(ContentModel.PROP_AUTHOR, docInfo.getAuthor(), destination);
|
||||
trimPut(ContentModel.PROP_TITLE, docInfo.getTitle(), destination);
|
||||
trimPut(ContentModel.PROP_DESCRIPTION, docInfo.getSubject(), destination);
|
||||
|
||||
Calendar created = docInfo.getCreationDate();
|
||||
if (created != null)
|
||||
destination.put(ContentModel.PROP_CREATED, created.getTime());
|
||||
if (!pdf.isEncrypted())
|
||||
{
|
||||
// Scoop out the metadata
|
||||
PDDocumentInformation docInfo = pdf.getDocumentInformation();
|
||||
|
||||
trimPut(ContentModel.PROP_AUTHOR, docInfo.getAuthor(), destination);
|
||||
trimPut(ContentModel.PROP_TITLE, docInfo.getTitle(), destination);
|
||||
trimPut(ContentModel.PROP_DESCRIPTION, docInfo.getSubject(), destination);
|
||||
|
||||
Calendar created = docInfo.getCreationDate();
|
||||
if (created != null)
|
||||
destination.put(ContentModel.PROP_CREATED, created.getTime());
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Reference in New Issue
Block a user