Package com.technia.dsx.threedspace.doc
Class DocumentHelper
java.lang.Object
com.technia.dsx.threedspace.doc.DocumentHelper
Some helper methods that will
- Since:
- 2022-06-17
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
download
(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, String fileId, Path destinationFile) static Url
establishFCSCheckinTicket
(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, String store, String policy) Establishes a FCS checkin ticket for the given document idstatic UrlAndFileName
establishFCSCheckoutTicket
(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, String fileId, boolean checkout) static void
uploadFileVersion
(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, String fileId, Path localFile, String checkinFileName, String checkinComments, boolean keepLocked) Creates a new version of an existing file.static void
uploadNew
(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, Path localFile, String checkinFileName, String checkinComments) Uploads the local file as a new file into the given Document object.
-
Method Details
-
download
public static void download(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, String fileId, Path destinationFile) throws IOException - Throws:
IOException
-
uploadNew
public static void uploadNew(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, Path localFile, String checkinFileName, String checkinComments) throws IOException Uploads the local file as a new file into the given Document object.- Parameters:
documentService
- The document servicesession
- The current tenant sessiondocumentId
- The ID of the document to upload the file to (REQUIRED)localFile
- The local file to checkin (REQUIRED)checkinFileName
- If you wish to use another name for the file than the local file name, specify here (OPTIONAL)checkinComments
- Checkin comments (OPTIONAL)- Throws:
IOException
- Upon any IO errors
-
uploadFileVersion
public static void uploadFileVersion(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, String fileId, Path localFile, String checkinFileName, String checkinComments, boolean keepLocked) throws IOException Creates a new version of an existing file.
If you know the ID of the file to be revised, supply the
fileId
argument.If you omit the fileId, then the file to be revised will be queried for by checking the current files on the document object.
- Parameters:
documentService
- The document servicesession
- The current tenant sessiondocumentId
- The ID of the document to upload the file to (REQUIRED)fileId
- If known, the ID of the file to be revised. (OPTIONAL)localFile
- The local file to checkin (REQUIRED)checkinFileName
- If you wish to use another name for the file than the local file name, specify here (OPTIONAL)checkinComments
- Checkin comments (OPTIONAL)keepLocked
- True to keep the file locked- Throws:
IOException
- Upon any IO errors
-
establishFCSCheckinTicket
public static Url establishFCSCheckinTicket(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, String store, String policy) throws IOException Establishes a FCS checkin ticket for the given document id- Parameters:
documentService
- Theservice
to usesession
- Thesession
The current sessiondocumentId
- The document id (REQUIRED)store
- Override store (NULL allowed)policy
- Override policy (NULL allowed)- Returns:
- Throws:
IOException
-
establishFCSCheckoutTicket
public static UrlAndFileName establishFCSCheckoutTicket(DocumentService documentService, com.technia.dsx.common.TenantSession session, String documentId, String fileId, boolean checkout) throws IOException - Throws:
IOException
-