Skip to main content
Functions accessible via 'documentService'
Updated over a month ago

1

applyActivityLocks

Signature: applyActivityLocks(int docVo.getRevisionId(), int ActivityId, int TaskType)

Description: To apply activity locks to document

Returns: ---

2

assignVisibility

Signature: assignVisibility(DocumentVO documentVO, Map<String, List<String>> assignVisibilityMap)

Description: To assign visibility for users, roles and distribution groups only.

Returns: ---

3

callExternalAPI

Signature: callExternalAPI(HashMap<Object, Object> apiCallParameters)

Description: To call any web service with the customized parameters.

Returns: Map<String, String> apiResponse

apiResponse.get(IGroovyConstant.DATA) - This will give you response of API in String format
apiResponse.get(IGroovyConstant.STATUS) - This will give you API call response status like 200

4

createPackageAndTransfer

Signature: createPackageAndTransfer(HashMap options, String metadata Json/Xml, String metadataFileType)

Description: To create package of different files of Asite platform to transfer the created package to external location.

Returns: ---

5

createPlaceholders

Signature: createPlaceHolders(Map documentDetails)

Description: To create placeholder in current folder.

Returns: ---

6

distributeFile

Signature: distributeFile(HashMap distributeFileMap)

Description: To distribute files based on user's email, role, organization or distribution group.

Returns: ---

7

getAttachmentDetails

Signature: getAttachmentDetails()

Description: To get details of file attached with revision.

Returns: List of DocAttachmentVO

8

getAttachmentDetailsWithChecksum

Signature: getAttachmentDetailsWithChecksum(DocAttachmentVO)

Description: To get details of attached file with revision along with SHA-1 checksum. Here SHA-1 is a type of file checksum calculation.

Returns: List of DocAttachmentVO

9

getCustomAttributeValue

Signature: getCustomAttributeValue(DocumentVO documentVO,String attributeName)

Description: To get value of custom attribute.

Returns: [String] - To get specific value of custom attribute in DocumentVO.

10

getDocsByCustomAttribute

Signature: getDocsByCustomAttribute(String customAttrName, String customAttrValue, String FolderPath, HashMap <String, String> revDetailsOptions)

Description: To get list of DocumentVO which matches with provided custom attribute name and values in given folderpath.

Returns: HashMap - List of documents based on custom attributes, if any

11

getDocumentDetails

Signature: getDocumentDetails()

Description: To get values of all basic attributes of revision / document.

Returns: DocumentVO

12

getDocumentDetails

Signature: getDocumentDetails(HashMap<Object, Object> optionMap)

Description: To get values of all basic and custom attributes based on provided optionMap.

Returns: DocumentVO

13

getDocumentsByDocRefs

Signature: getDocumentsByDocRefs(Set<String> docRefSet, String folderPath, HashMap mapRevDetailsOptions);

Description: To get details of existing revisions by Docef and Folder Path

Returns: Map<String,DocumentVO> Response Map will have documentRef#revisionId as key and DocumentVO as its value. Please refer sample script for more details.

14

getFolderPath

Signature: getFolderPath(document DocumentVO);

Description: To get folder path of given document

Returns: String folder path. Please refer sample script for more details.

15

getStaticDataOfQRCode

Signature: getStaticDataOfQRCode(DocumentVO document)

Description: To get static data of QR code.

Returns: QRCodeStaticDataVO

16

getUsersEmailIdByGroupOrRole

Signature: getUsersEmailIdByGroupOrRole(Map<String, List<String>> inputDataMap)

Description: To get user's email address.

Returns: Map<String, Map<String, List<String>>> - Email id of users in provided distribution group or role.

17

isDocRefExist

Signature: isDocRefExist(String docRef, RevisionDetailsOption.PROJECT_LEVEL_UNIQUE)

Description: To check whether the given document reference already exists in any folder of the selected project.

Returns: true / false

18

setDynamicDistribution

Signature: setDynamicDistribution(Map<String, DynamicDistributionVO> userTaskDistributionList,int recipientDataType)

Description: To save dynamic distribution list to be used in the User Task node of Visual Workflow..

Returns: ---

19

toJson

Signature: toJSON(DocumentVO docVo, String Template_URL)

Description: To convert DocumentVO to JSON string, user can apply template as well.

Returns: [String] - JSON format of provided DocumentVO and template

20

toXml

Signature: toXML(DocumentVO docVo, String Template_URL)

Description: To convert DocumentVO to XML string, user can apply template as well.

Returns: [String] - XML format of provided DocumentVO and template

21

updateDocument

Signature: updateDocument(DocumentContext)

Description: To update attributes of revision [revision, docTitle, revisionNotes]. This method should be used in a groovy script which is configured with POST mode trigger only. (This is a deprecated function. For enhanced options, please use 'updateDocuments' function.)

Returns: ---

22

updateDocuments

Signature: updateDocuments(ArrayList<DocumentVO> documentList)

Description: To update attributes of revision [revision, docTitle, revisionNotes, DocRef, PurposeOfIssue, Private, CustomAttribute]. This method should be used in a groovy script which is configured with POST mode trigger only.

Returns: ---

23

updateDocuments

Signature: updateDocuments(ArrayList<DocumentVO> documentList, HashMap<Object, Object> optionDataMap)

Description: To update attributes of revision with apply timezone [revision, docTitle, revisionNotes, DocRef, PurposeOfIssue, Private, CustomAttribute]. This method should be used in a groovy script which is configured with POST mode trigger only.

Returns: ---

24

updateFileStatus

Signature: updateFileStatus(String status)

Description: To update document status.

Returns: ---

25

writeAdoddleAttributesToFilePropertyAttributes

Signature: writeAdoddleAttributesToFilePropertyAttributes(HashMap<String,String> attributeMapping)

Description: To write Asite platform attributes values in file content property values. Supported for .docx file format only.

Returns: ---



Did this answer your question?