Class CasetivityDocumentService
java.lang.Object
com.ssgllc.fish.service.util.published.CasetivityDocumentService
Service class for handling document-related operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.ssgllc.fish.dms.service.dto.CasetivityDmsDocDTO
getCasetivityDocument
(String entityType, String entityId, String anyBlobField, String documentId) Retrieves a Casetivity document based on the specified entity and document identifiers.com.ssgllc.fish.document.GeneratedDoc
mergePdfDocuments
(String entityType1, String entityId1, String anyBlobField1, String documentId1, String entityType2, String entityId2, String anyBlobField2, String documentId2, String mergedDocumentName) Merges two PDF documents retrieved using the provided entity and document identifiers.com.ssgllc.fish.document.GeneratedDoc
mergePdfDocuments
(List<com.ssgllc.fish.dms.service.dto.CasetivityDmsDocDTO> documentsToMerge, String mergedDocumentName) Merges a list of PDF documents into a single PDF document.
-
Constructor Details
-
CasetivityDocumentService
public CasetivityDocumentService()
-
-
Method Details
-
mergePdfDocuments
public com.ssgllc.fish.document.GeneratedDoc mergePdfDocuments(String entityType1, String entityId1, String anyBlobField1, String documentId1, String entityType2, String entityId2, String anyBlobField2, String documentId2, String mergedDocumentName) Merges two PDF documents retrieved using the provided entity and document identifiers.- Parameters:
entityType1
- The entity type for the first document.entityId1
- The entity ID for the first document.anyBlobField1
- The anyblob field name for the first document.documentId1
- The document ID for the first document.entityType2
- The entity type for the second document.entityId2
- The entity ID for the second document.anyBlobField2
- The anyblob field name for the second document.documentId2
- The document ID for the second document.mergedDocumentName
- The name for the merged document; if null or blank, a timestamped name will be used.- Returns:
- A
GeneratedDoc
representing the merged document, or null if the merge fails.
Groovy example:
def doc = casetivityDocumentService.mergePdfDocuments("Document", "entity1", "file", "docId1", "Document", "entity2", "file", "docId2", "mergedDoc.pdf")
return doc
Returns:
AGeneratedDoc
object containing the merged PDF document data.
-
mergePdfDocuments
public com.ssgllc.fish.document.GeneratedDoc mergePdfDocuments(List<com.ssgllc.fish.dms.service.dto.CasetivityDmsDocDTO> documentsToMerge, String mergedDocumentName) Merges a list of PDF documents into a single PDF document.- Parameters:
documentsToMerge
- The list of documents to merge. Must not be null or empty.mergedDocumentName
- The name for the merged document; if null or blank, a timestamped name will be used.- Returns:
- A
GeneratedDoc
representing the merged document, or null if the merge fails. - Throws:
IllegalArgumentException
- ifdocumentsToMerge
is null.
Groovy example:
def doc1 = casetivityDocumentService.getCasetivityDocument("Document", "entity1", "file", "docId1")
def doc2 = casetivityDocumentService.getCasetivityDocument("Document", "entity2", "file", "docId2")
def mergedDoc = casetivityDocumentService.mergePdfDocuments([doc1, doc2], "mergedDocument.pdf")
return mergedDoc
Returns:
AGeneratedDoc
object containing the merged PDF document data.
-
getCasetivityDocument
public com.ssgllc.fish.dms.service.dto.CasetivityDmsDocDTO getCasetivityDocument(String entityType, String entityId, String anyBlobField, String documentId) Retrieves a Casetivity document based on the specified entity and document identifiers.- Parameters:
entityType
- The type of the entity to which the document belongs.entityId
- The ID of the entity associated with the document.anyBlobField
- The name of the anyblob field representing the document's storage field.documentId
- The unique identifier of the document to retrieve.- Returns:
- A
CasetivityDmsDocDTO
object representing the retrieved document.
Groovy example:
return casetivityDocumentService.getCasetivityDocument("Document", "c0a80013-413c-16f4-8193-b9521c990001", "file", "46588ced-0913-47c1-84d6-83907a29224a")
Returns:
ACasetivityDmsDocDTO
containing the document data.
-