// // Notebook feature and WikiItem are deprecated as of 7.0.0. Briefcase // and Documents are still supported and they can be used to store // versioned rich text content as WikiItem. // // Documents are stored in the mailbox of the requestor. The access to // the Documents will be determined by ACL of the folder the Notes are // stored. By default Documents are accesible to the account holder only, thus // private. Documents can be shared (via changing the ACL of the Folder // that contains Document) to other users, group, or to everyone. // // // General Document sync strategy // // Zimbra Documents are server side file storage. It is possible to // set up a sync client between Zimbra and another type of file storage // mechanism, such as cloud or files on a disk. The sync client should // use the sync protocol described in sync.txt. For Document sync, the // following approach can be made. // // - the Documents are stored in Folders with view set to document. // although the server can store mix of item in any given folder, it is // generally assumed the folders are also typed. // // - Downloading Document should use the REST interface for the Document. // http://{server}/home/{username}/Briefcase/{filename} // by name // http://{server}/home/[~]{username}/?id={item-id} // by id // // - Creating and updating Document can be done in two different ways. // // first way is to use FileUploadServlet to upload the document, // then calling SaveDocumentRequest using upload-id returned from // FileUploadServlet. // // alternatively REST interface can be used to create or update // existing Document by name by sending PUT request to the // same REST URL used for downloading the Document. Using the REST // interface has somewhat limited capability as the description cannot be // added, and the Document cannot be renamed in the same request. // // // Create / Update // // A Document represents a file. A file can be created by uploading to // FileUploadServlet. Or it can refer to an attachment of an existing message. // // Documents are versioned. The server maintains the metadata of each version, // such as by who and when the version was edited, and the fragment. // // When updating an existing Document, the client must supply the id of // Document, and the last known version of the document in 'ver' attribute. // This is used to prevent blindly overwriting someone else's change made // between the update. The update will succeed only when the last known // version supplied by the client matches the current version of the item // identified by item-id. // // Saving a new document, as opposed to adding a revision of existing document, // should leave the id and ver fields empty in the request. Then the server // checks and see if the named document already exists, if so returns an error. // // The request should contain either element or element, but // not both. When is used, the document should be first uploaded to // FileUploadServlet, and then use the upload-id from the FileUploadResponse. // When is used, the document is retrieved from an existing message in // the mailbox, identified by the msg-id and part-id. The content of the // document can be inlined in element. The content can come from // another document / revision specified in sub element. [] [] [{inlined-document-content-string}] [] {flags} = any of the flags specified in soap.txt, with the addition of "t", which specifies that the document is a note. // // Example // // - Saving a new document // // REQUEST: // // // // // // // // RESPONSE: // // // // // // // - Updating an existing document // // REQUEST: // // // // // // // // RESPONSE: // // // // // // // // Search // The contents and the filename of the Documents are indexed. // Use the existing Search API with "types" set to "document". // // Get // through the rest URL: // http://{server}/home/{username}/Briefcase/{filename} // by name // http://{server}/home/[~]{username}/?id={item-id} // by id // // // ListDocumentRevisions // // returns {num} number of revisions starting from {version} of the requested // document. {num} defaults to 1. {version} defaults to the current version. // [ ... fragment ... ]+ []* Documents that have multiple revisions have the flag "/", which indicates that the document is versioned. // // DiffDocument // // performs line by line diff of two revisions of a Document or WikiItem, // then returns a list of containing the result. Sections of text // that are identical to both versions are indicated with disp="common". // For each conflict the chunk will show disp="first", disp="second" or both. // // // v3: // line 1
// line 2
// line 3
// line 4
// line 5
//
// // v4: // line 1
// line 2
// line 3.6
// line 4
// line 5
//
// // REQUEST: // ------------- // // // // // RESPONSE: // -------------- // // line 1<br> // line 2<br> // line 3<br> // line 3.6<br> // line 4<br> // line 5<br> // <br> // // ... text ... +