public interface IAnnotation
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PDF_MIMETYPE
The mimetype for content that is a PDF.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
checkinAnnotations(java.lang.String ticket,
java.lang.String userDisplayName,
java.lang.String objectId,
byte[] content,
long lastModified)
Checks in and saves the non-readonly annotations from an offline PDF under the given logged in user
|
VideoScreenshot |
createVideoScreenshot(java.lang.String ticket,
java.lang.String videoObjId,
int screenshotTimeMillis)
Creates a screenshot from a video given a time
Note that taking screenshots past 25 days is not supported
|
void |
deleteAnnotations(java.lang.String ticket,
java.lang.String objectId,
java.lang.String ownerName,
java.lang.String differentUser)
Deletes the annotation object related to the provided objectId for the provided user.
|
void |
getAnnotatedPDF(java.lang.String ticket,
java.lang.String objectId,
java.util.List<java.lang.String> annotators,
java.lang.String username,
boolean forOfflineAnnotation,
boolean forPrint,
long lastModified,
boolean isCollection,
java.io.OutputStream output)
Streams a PDF object with all annotations embedded inside to the given output stream.
|
java.util.List<Annotation> |
getAnnotations(java.lang.String ticket,
java.lang.String objectId,
java.util.List<java.lang.String> annotators,
long lastModified,
boolean excludeEmbeddedAnnotations)
Pulls all of the annotations for the given id, does not modify the annotation contents in any way.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAnnotations(java.lang.String ticket,
java.lang.String objectId,
long lastModified,
boolean excludeEmbeddedAnnotations)
Pulls all of the annotations for the given id, does not modify the annotation contents in any way.
|
byte[] |
getAttachedDocContent(java.lang.String ticket,
java.lang.String objectId,
long lastModified,
java.lang.String attachedDocName)
Returns content of an attached document for an object.
|
java.util.List<PDFAttachedDoc> |
getAttachedDocs(java.lang.String ticket,
java.lang.String objectId,
long lastModified)
Retrieves a list of all attached documents contained in an object having a pdf rendition.
|
java.util.List<PDFBookmark> |
getBookmarks(java.lang.String ticket,
java.lang.String objectId,
long lastModified)
Parses the bookmarks contained in an object having a pdf rendition.
|
DocumentInfo |
getDocumentInfo(java.lang.String ticket,
java.lang.String objectId,
long lastModified,
java.lang.String forceViewer,
java.lang.Integer numOfPageDimensionsToFetch,
java.lang.Integer docSizeLoadLimitBytes)
Populates the document information for the passed in document objectId.
|
java.util.Map<java.lang.String,java.lang.Object> |
getEmbeddedAnnotations(java.lang.String ticket,
java.lang.String objectId,
long lastModified,
boolean parseFileData)
Gets only the embedded annotations off of the document.
|
java.io.ByteArrayOutputStream |
getExcelAnnotationSummary(java.lang.String ticket,
java.lang.String objectId,
java.lang.String dateFormat,
Annotation[] annotationMaps)
Returns a summary of the annotation on a given object in a printable (.xls) format.
|
java.lang.String |
getExternalAnnotationUrl(java.lang.String ticket,
java.lang.String legacyId)
A method for use with OA as a Service that will attempt to return an annotation URL based on a legacy ID.
|
byte[] |
getFileAttachmentAnnotationContent(java.lang.String ticket,
java.lang.String objectId,
long lastModified,
boolean isEmbedded,
java.lang.String annotationName)
Returns content of a file attachment annotation document for an object.
|
java.util.List<java.util.List<TSGInternalLink>> |
getInternalLinks(java.lang.String ticket,
java.lang.String objectId,
int startPage,
int numPages,
long lastModified)
Returns the internal links that are on a PDF document.
|
Page[] |
getPageDimensions(java.lang.String ticket,
Page[] pages,
boolean isCollection)
Determines the height and width of an array of Pages
|
Page |
getPageDimensions(java.lang.String ticket,
java.lang.String pageId,
Page page,
java.lang.String fileExtension,
long lastModifiedDate)
Determines the height and width of a Page
|
java.io.ByteArrayOutputStream |
getPDFAnnotationSummary(java.lang.String ticket,
java.lang.String objectId,
java.lang.String dateFormat,
java.util.List<Annotation> annotationMaps)
Returns a summary of the annotation on a given object in a printable (.pdf) format.
|
java.util.Map<java.lang.String,java.lang.Object> |
getPdfMetadata(java.lang.String ticket,
java.lang.String objectId,
int startPage,
int numPages,
long lastModified)
Returns the internal links that are on a PDF document.
|
PostSectionedPage[] |
getProcessedPages(java.lang.String ticket,
java.lang.String objectId,
int startPage,
int numPages,
long lastModified)
Parses an object's PDF rendition and returns a page object that contains data representations of rectangles
surrounding sections, rows and words.
|
java.util.List<RedactionSuggestion> |
getRedactionSuggestions(java.lang.String ticket,
java.lang.String objectId,
long lastModified,
int numPages)
Returns a list of suggested redactions and their locations which have been detected in the document.
|
Annotation |
getSingleAnnotation(java.lang.String ticket,
java.lang.String objectId,
long lastModified,
boolean isEmbedded,
java.lang.String annotationName)
Pulls the specific annotation from the annotations on the document based on the annotationName.
|
java.util.Map<java.lang.Integer,VideoScreenshot> |
getVideoScreenshots(java.lang.String ticket,
java.lang.String videoObjId)
Gets all video screenshots for a video
|
java.util.Map<java.lang.String,java.lang.Object> |
getWordMapsAndTextLinks(java.lang.String ticket,
java.lang.String objectId,
int startPage,
int numPages,
long lastModified)
Parses an object's PDF rendition and returns an array of indexes (word maps) that can be used to search on
the given range of pages.
|
java.util.List<Annotation> |
getXFDFAndFDFAnnotations(java.lang.String ticket,
java.lang.String objectId,
long lastModified,
boolean parseFileData)
Gets only the annotations from the xfdf and/or fdf
|
java.lang.String |
ingestDocForExternalReview(java.lang.String ticket,
java.lang.String legacyId,
java.lang.String type,
java.lang.String parentId,
java.util.Map<java.lang.String,java.lang.Object> properties,
org.springframework.web.multipart.MultipartFile mpFile)
A method for use with OA as a Service that will query the legacyId of a document to see if it already exists in the repository, and return the docId for the match.
|
boolean |
isAnnotated(java.lang.String ticket,
java.lang.String objectId)
Returns true if the document contains annotations, false otherwise.
|
void |
saveAnnotations(java.lang.String ticket,
java.lang.String objectId,
java.util.List<Annotation> annotations,
java.lang.String differentUser,
long lastModified)
Saves the provided annotations, processing them differenly dependent on whether or not the process must be runAsAdmin
|
void |
saveSignatures(java.lang.String ticket,
java.lang.String objectId,
Signature[] signatures)
Saves the provided signatures, permanently modifying the provided document.
|
static final java.lang.String PDF_MIMETYPE
java.util.Map<java.lang.String,java.lang.Object> getAnnotations(java.lang.String ticket, java.lang.String objectId, long lastModified, boolean excludeEmbeddedAnnotations)
ticket
- a valid OC ticket.objectId
- the objectId of the document to get annotations for.lastModified
- the last modified timestamp of the document.excludeEmbeddedAnnotations
- a boolean to determine whether or not PDF content needs to be retrieved.java.util.List<Annotation> getAnnotations(java.lang.String ticket, java.lang.String objectId, java.util.List<java.lang.String> annotators, long lastModified, boolean excludeEmbeddedAnnotations)
ticket
- a valid OC ticket.objectId
- the objectId of the document to get annotations for.annotators
- a list of the annotators that you want to get the annotations oflastModified
- the last modified timestamp of the document.excludeEmbeddedAnnotations
- a boolean to determine whether or not PDF content needs to be retrieved.Annotation getSingleAnnotation(java.lang.String ticket, java.lang.String objectId, long lastModified, boolean isEmbedded, java.lang.String annotationName)
ticket
- a valid OC ticket.objectId
- the objectId of the document to get annotations for.lastModified
- the last modified timestamp of the document.isEmbedded
- the attribute on the annotation that says if it embedded or notjava.util.Map<java.lang.String,java.lang.Object> getEmbeddedAnnotations(java.lang.String ticket, java.lang.String objectId, long lastModified, boolean parseFileData)
ticket
- a valid OC ticket.objectId
- the objectId of the document to get annotations for.lastModified
- the last modified timestamp of the document.parseFileData
- a boolean determining if file data should be parsed.java.util.List<Annotation> getXFDFAndFDFAnnotations(java.lang.String ticket, java.lang.String objectId, long lastModified, boolean parseFileData)
ticket
- a valid OC ticket.objectId
- the objectId of the document to get annotations for.lastModified
- the last modified timestamp of the document.parseFileData
- a boolean determining if file data should be parsed.void saveAnnotations(java.lang.String ticket, java.lang.String objectId, java.util.List<Annotation> annotations, java.lang.String differentUser, long lastModified)
ticket
- a valid OC ticket.objectId
- the objectId of the document to save annotations for.annotations
- a list of annotations to save on the document.differentUser
- "true" if this action is being performed by a user other than the one who's associated with the annotation array.lastModified
- The timestamp this object was last modified (used for caching purposes).VideoScreenshot createVideoScreenshot(java.lang.String ticket, java.lang.String videoObjId, int screenshotTimeMillis)
ticket
- a valid OC ticket.videoObjId
- the objectId of the video.screenshotTimeMillis
- the start time of the video in millisecondsjava.util.Map<java.lang.Integer,VideoScreenshot> getVideoScreenshots(java.lang.String ticket, java.lang.String videoObjId)
ticket
- a valid OC ticket.videoObjId
- of the video.void saveSignatures(java.lang.String ticket, java.lang.String objectId, Signature[] signatures)
ticket
- A valid OC ticket.objectId
- The objectId of the document to save signatures for.signatures
- An array of signatures to save on the document.void deleteAnnotations(java.lang.String ticket, java.lang.String objectId, java.lang.String ownerName, java.lang.String differentUser)
ticket
- a valid OC ticket.objectId
- the objectId of the document to delete the user's annotation object.ownerName
- the display name of the user to delete the annotation object.differentUser
- "true" if this action is being performed by a user other than the one specified by ownerNameDocumentInfo getDocumentInfo(java.lang.String ticket, java.lang.String objectId, long lastModified, java.lang.String forceViewer, java.lang.Integer numOfPageDimensionsToFetch, java.lang.Integer docSizeLoadLimitBytes)
ticket
- a valid OC ticket.objectId
- the objectId of the document to fetch the info for.lastModified
- the last modified timestamp of the document.forceViewer
- which viewer the requested document must use, or blank if viewer is to be fetched normally.numOfPageDimensionsToFetch
- how many pages to get height and width values for in a collection. If not passed in then will get all page dimensionsdocSizeLoadLimitBytes
- if document size is larger than this number don't return document info. Saves excessive load times/calls.void getAnnotatedPDF(java.lang.String ticket, java.lang.String objectId, java.util.List<java.lang.String> annotators, java.lang.String username, boolean forOfflineAnnotation, boolean forPrint, long lastModified, boolean isCollection, java.io.OutputStream output)
ticket
- a valid OC ticket.objectId
- the objectId of the document to get the annotated PDF for.annotators
- a list of the annotators that you want to get the annotations ofusername
- the username of the user that is downloading the annotated PDF. This is used to color the annotations appropriately if
enhancedColorMode is not turned on.forOfflineAnnotation
- True will result in the annotations being read-only in the downloaded PDF, annotations will be burned-in normally otherwise.forPrint
- True if the document is meant to immediately print when displayed in a browser. False otherwise.lastModified
- the last modified timestamp of the document.isCollection
- whether or not we're fetching a concatenated pdf for a collection NOTE - Annotations are not supported for collectionsoutput
- the OutputStream
to stream the PDF contents tojava.util.Map<java.lang.String,java.lang.Object> checkinAnnotations(java.lang.String ticket, java.lang.String userDisplayName, java.lang.String objectId, byte[] content, long lastModified)
ticket
- a valid OC ticket.userDisplayName
- the current user's display nameobjectId
- the objectId of the document to get the annotated PDF for.content
- the byte[] containing the uploaded file's contentlastModified
- The timestamp this object was last modified (used for caching purposes).
NOTE: Remove userDisplayName param when the functionality is put in place that allows for the
userDisplayName to be retrieved from the passed in ticketboolean isAnnotated(java.lang.String ticket, java.lang.String objectId)
ticket
- a valid OC ticket.objectId
- the objectId of the document to check if it has annotations or not.PostSectionedPage[] getProcessedPages(java.lang.String ticket, java.lang.String objectId, int startPage, int numPages, long lastModified)
ticket
- a valid OC ticketobjectId
- the id of the PDF object to create section, row and word boxes for.startPage
- the first page number to generate the section, row and word boxes for.numPages
- the number of pages to fetch in a batchlastModified
- the timestamp this object was last modified (used for caching key generator).java.io.ByteArrayOutputStream getExcelAnnotationSummary(java.lang.String ticket, java.lang.String objectId, java.lang.String dateFormat, Annotation[] annotationMaps)
ticket
- A valid OC ticket.objectId
- The id of the PDF object that we're getting a summary for.dateFormat
- A string representing how the dates in the summary should be formatted.annotationMaps
- A list of annotation objects describing the annotations on our pdf.java.io.ByteArrayOutputStream getPDFAnnotationSummary(java.lang.String ticket, java.lang.String objectId, java.lang.String dateFormat, java.util.List<Annotation> annotationMaps)
ticket
- A valid OC ticket.objectId
- The id of the PDF object that we're getting a summary for.dateFormat
- A string representing how the dates in the summary should be formatted.annotationMaps
- A list of annotation objects describing the annotations on our pdf.java.util.Map<java.lang.String,java.lang.Object> getWordMapsAndTextLinks(java.lang.String ticket, java.lang.String objectId, int startPage, int numPages, long lastModified) throws java.io.IOException
ticket
- A valid OC ticket.objectId
- The id of the PDF object to create word maps for.startPage
- The first page to create word maps for.numPages
- The number of pages to generate maps for.lastModified
- The timestamp this object was last modified (used for caching key generator).java.io.IOException
- When it cannot properly close the PDF document.java.util.List<PDFBookmark> getBookmarks(java.lang.String ticket, java.lang.String objectId, long lastModified)
ticket
- A valid OC ticket.objectId
- The id of the PDF object to get bookmarks for.lastModified
- The timestamp this object was last modified (used for caching purposes).java.util.List<PDFAttachedDoc> getAttachedDocs(java.lang.String ticket, java.lang.String objectId, long lastModified)
ticket
- A valid OC ticket.objectId
- The id of the PDF object to get attached documents for.lastModified
- The timestamp this object was last modified (used for caching purposes).byte[] getAttachedDocContent(java.lang.String ticket, java.lang.String objectId, long lastModified, java.lang.String attachedDocName)
paramTicket
- A valid OC ticket.objectId
- The objectId of the PDF object to get attached document info for.lastModified
- The timestamp this object was last modified (used for caching purposes).attachedDocName
- The name of the attached document.resp
- The HttpServletResponse
object to write the result of generating the PDF attached document to.byte[] getFileAttachmentAnnotationContent(java.lang.String ticket, java.lang.String objectId, long lastModified, boolean isEmbedded, java.lang.String annotationName)
ticket
- A valid OC ticket.objectId
- The objectId of the PDF object to get attached document info for.lastModified
- The timestamp this object was last modified (used for caching purposes).isEmbedded
- The attribute on the annotation that says if it embedded or notannotationName
- The name of the annotation that acts as a unique identifier.java.util.List<java.util.List<TSGInternalLink>> getInternalLinks(java.lang.String ticket, java.lang.String objectId, int startPage, int numPages, long lastModified)
ticket
- A valid OC ticket.objectId
- The id of the PDF object to retrieve the internal links for.startPage
- The first page to retrieve internal links for.numPages
- The number of pages to retrieve internal linsk for for.lastModified
- The timestamp this object was last modified (used for caching key generator).java.io.IOException
- When it cannot properly close the PDF document.java.util.Map<java.lang.String,java.lang.Object> getPdfMetadata(java.lang.String ticket, java.lang.String objectId, int startPage, int numPages, long lastModified)
ticket
- A valid OC ticket.objectId
- The id of the PDF object to retrieve the internal links for.startPage
- The first page to retrieve internal links for.numPages
- The number of pages to retrieve internal linsk for for.lastModified
- The timestamp this object was last modified (used for caching key generator).java.io.IOException
- When it cannot properly close the PDF document.java.util.List<RedactionSuggestion> getRedactionSuggestions(java.lang.String ticket, java.lang.String objectId, long lastModified, int numPages) throws java.io.IOException
ticket
- A valid OC ticket.objectId
- The objectId of the PDF object to create suggested redactions for.lastModified
- The timestamp this object was last modified (used for caching purposes).cookieTicket
- The ticket for the session from the cookie.java.io.IOException
java.lang.String ingestDocForExternalReview(java.lang.String ticket, java.lang.String legacyId, java.lang.String type, java.lang.String parentId, java.util.Map<java.lang.String,java.lang.Object> properties, org.springframework.web.multipart.MultipartFile mpFile) throws java.io.IOException
ticket
- - A valid OC ticket.legacyId
- - The legacy id of the object we want to upload to or access from the repository.type
- - The Document type to use for the newly created external review document.parentId
- - The objectId for the parent folder or object that the external review document will be placed in.properties
- - A map of additional properties to be placed on the newly uploaded external review document.mpFile
- - The a file object with content and file properties of the newly uploaded document.java.io.IOException
java.lang.String getExternalAnnotationUrl(java.lang.String ticket, java.lang.String legacyId) throws OCRuntimeException
ticket
- A valid OC ticket.legacyId
- - The legacy id of the object we want to access from the repository.OCRuntimeException
Page getPageDimensions(java.lang.String ticket, java.lang.String pageId, Page page, java.lang.String fileExtension, long lastModifiedDate) throws java.lang.Exception
ticket
- a valid OC ticket.objectId
- the objectId of the document to get the information for.page
- The page object that should be completed. Other info might already be present.fileExtension
- The pages file extensionlastModified
- the last modified timestamp of the document we're getting the information for.java.lang.Exception
Page[] getPageDimensions(java.lang.String ticket, Page[] pages, boolean isCollection) throws java.io.IOException
ticket
- a valid OC ticket.pages
- The array of pages to find dimensions forisCollection
- Indicates if the Page array is from a collection or a pdfjava.io.IOException