Attach to an existing topic
Your application can create an attachment to an existing topic. The topic
argument in the attachTopic
method contains the identifier of the
topic. Set the id field of the topicContext
argument to the ID of the topic to attach to.
The attachmentInput
argument has the name, extension,
attachment type, and optional properties of the attachment. The dataHandler
field is a W3C MTOM (Message Transmission Optimization Mechanism) type to
stream data.
The attachment types are:
- IMAGE—A ZIP file with a series of JPG, JPEG, PNG, or GIF images,
optional *.txt files, and optional
notes.txt
files. If a text file other thannotes*.txt
contains a comma-separated list, each item is rendered on a separate line. - FILE—Any file, such as a PDF file.
- TABLE—An XML representation of a table. An example is a case series table. See XML attachment tables for the XML definition.
- URL—A URL address in the form
http[s]://xxx[:port][/yyy.zzz]
, with a maximum length of 2000 characters. - NOTE—A text note, with a maximum length of 2000 characters.
Typically, your application writes an IMAGE or TABLE attachment to a
temporary file, streams the file using the attachTopic
,
attachNewTopic
, or attachAction
method,
and then deletes the file. A .NET client calls the
streamFileAttachment
method first, and then calls the
attachTopic
, attachNewTopic
, or
attachAction
method.
void attachTopic(TopicsServiceContext topicsServiceContext,
TopicContext topicContext, AttachmentInput attachmentInput)
throws InvalidArgumentException, TopicsServiceException;
To create an attachment to an existing topic:
- AttachmentInput value object
The attachment input value object includes the following fields.
Parent topic: Methods