All Operations That Change the State of an Object MUST Use HTTP POST. Since This Binding

All Operations That Change the State of an Object MUST Use HTTP POST. Since This Binding

<p>POST Data</p><p>All operations that change the state of an object MUST use HTTP POST. Since this binding is optimized for use in browser applications, the format of the transferred data is aligned to the capabilities of HTML forms and described here in HTML terms.</p><p>The submission method (HTML form attribute “method”) MUST be “POST”. The encoding type (HTML form attribute “enctype”) MUST be either "application/x-www- form-urlencoded" or "multipart/form-data" if no content stream is attached to the form. The encoding type MUST be “multipart/form-data” if a content stream is attached to the form data.</p><p>The names of the controls within the form are defined by the patterns in the following sections. All control names are case-insensitive as defined by the HTML specification. Control names MUST be unique within a form. If the control value of an optional parameter is set to an empty string (“”) the default value MUST be used.</p><p>A client MAY add controls to a form that are not defined by CMIS if the control names don’t conflict with the patterns described below.</p><p>CMIS Action A client MUST include a control named “cmisaction” that indicates the operation that should be performed. See section 1.4.3 for valid control values.</p><p>Example:</p><p><input name="cmisaction" type="hidden" value="createDocument" /></p><p>Structured and Array Parameters Some CMIS operations require structured parameters and arrays of values. HTML forms don’t support that.</p><p>In order to overcome this gap, some CMIS operation parameters are split into multiple controls in a form. </p><p>For example, a CMIS property is split into a control that holds the property id and another control that hold property value. The association between the two controls is done by convention. The entirety of all properties is made up of an array of these property controls.</p><p>Names of controls that are part of an array end with “[<index>]” where <index> is a positive integer. Arrays MUST always start with the index 0 and MUST be gapless.</p><p>An array of three properties looks like this in a HTML form:</p><p><input name="propertyId[0]" type="hidden" value="cmis:name" /> <input name="propertyValue[0]" type="text" value="my document" /></p><p><input name="propertyId[1]" type="hidden" value="cmis:objectTypeId" /> <input name="propertyValue[1]" type="hidden" value="my:firstObjectType" /></p><p><input name="propertyId[2]" type="hidden" value="my:intProperty" /> <input name="propertyValue[2]" type="text" value="42" /></p><p>If a client sends invalid, incomplete or inconsistent data the repository SHOULD return an invalidArgument error.</p><p>CMIS Controls This sections lists all controls used by CMIS operations.</p><p>Ids</p><p>Object id: Control name: “objectId” Control value: Object id</p><p>Example:</p><p><input name="objectId" type="hidden" value="1234-abcd-5678" /></p><p>Folder id: Control name: “folderId” Control value: Folder id</p><p>Example:</p><p><input name="folderId" type="hidden" value="1234-abcd-5678" /></p><p>Source folder id: Control name: “sourceFolderId” Control value: Folder id</p><p>Example:</p><p><input name="sourceFolderId" type="hidden" value="1234-abcd-5678" /></p><p>Target folder id: Control name: “targetFolderId” Control value: Folder id</p><p>Example:</p><p><input name="targetFolderId" type="hidden" value="1234-abcd-5678" /> Single-value Property A single-value property is made up of a “propertyId” control and a “propertyValue” control with the same <propIndex>. If the property should be unset the “propertyValue” control MUST NOT be present. <propIndex> does not imply any order.</p><p>Property Id: Control name: “propertyId[<propIndex>]” Control value: Property id</p><p>Property value: Control name: “propertyValue[<propIndex>]” Control value: Property value</p><p>Example:</p><p><input name="propertyId[0]" type="hidden" value="my:firstname" /> <input name="propertyValue[0]" type="text" value="John" /></p><p><input name="propertyId[1]" type="hidden" value="my:lastname" /> <input name="propertyValue[1]" type="text" value="Smith" /></p><p>Multi-value Property A multi-value property is made up a “propertyId” control and a series of “propertyValue” controls with the same <propIndex>. If the property should be unset no “propertyValue” control MUST be present. <propIndex> does not imply any order, but <seqIndex> defines the order of the values.</p><p>Property Id: Control name: “propertyId[<propIndex>]” Control value: Property id</p><p>Property values: Control name: “propertyValue[<propIndex>][<seqIndex>]” Control value: Property value at position <seqIndex></p><p>Example:</p><p><input name="propertyId[0]" type="hidden" value="my:countries" /> <input name="propertyValue[0][0]" type="text" value="Germany" /> <input name="propertyValue[0][1]" type="text" value="United States" /> <input name="propertyValue[0][2]" type="text" value="France" /> <input name="propertyValue[0][3]" type="text" value="United Kingdom" /></p><p><input name="propertyId[1]" type="hidden" value="my:colors" /> <input name="propertyValue[1][0]" type="text" value="red" /> <input name="propertyValue[1][1]" type="text" value="green" /> <input name="propertyValue[1][2]" type="text" value="blue" /> ACEs to add An ACE that should be added is made up of an “addACEPrincipal” control and zero or more “addACEPermission” controls with the same <addACEIndex>. <addACEIndex> and <permIndex> don’t imply any order.</p><p>Principal: Control name: “addACEPrincipal[<addACEIndexs>]” Control value: Principal id</p><p>Permission: Control name: “addACEPermission[<addACEIndex>][<permIndex>]” Control value: Permission id</p><p>Example:</p><p><input name="addACEPrincipal[0]" type="hidden" value="john" /> <input name="addACEPermission[0][0]" type="hidden" value="cmis:read" /> <input name="addACEPermission[0][1]" type="hidden" value="perm:publish" /></p><p><input name="addACEPrincipal[1]" type="hidden" value="mary" /> <input name="addACEPermission[1][0]" type="hidden" value="cmis:all" /></p><p>ACEs to remove An ACE that should be removed is made up of a “removeACEPrincipal” control and zero or more “removeACEPermission” controls with the same <removeACEIndex>. <removeACEIndex> and <permIndex> don’t imply any order.</p><p>Principal: Control name: “removeACEPrincipal[<removeACEIndex>]” Control value: Principal id</p><p>Permission: Control name: “removeACEPermission[<removeACEIndex>][<permIndex>]” Control value: Permission id</p><p>Example:</p><p><input name="removeACEPrincipal[0]" type="hidden" value="tom" /> <input name="removeACEPermission[0][0]" type="hidden" value="cmis:write" /> <input name="removeACEPermission[0][1]" type="hidden" value="perm:publish" /></p><p><input name="removeACEPrincipal[1]" type="hidden" value="bob" /> <input name="removeACEPermission[1][0]" type="hidden" value="perm:forward" /></p><p>ACL propagation</p><p>ACL propagation: Control name: “ACLPropagation” Control value: ACL propagation enum ("objectonly", "propagate", "repositorydetermined")</p><p>Example: <input name="ACLPropagation" type="hidden" value="propagate" /></p><p>Policies A policy list is made up of a series of “policy” controls. <policyIndex> does not imply any order.</p><p>Policy: Control name: “policy[<policyIndex>]” Control value: Policy id</p><p>Example:</p><p><input name=" policy[0]" type="hidden" value="1111-aaaa-2222" /> <input name=" policy[1]" type="hidden" value="3333-bbbb-4444" /> <input name=" policy[2]" type="hidden" value="5555-cccc-6666" /></p><p>Change Token</p><p>Change token: Control name: “changeToken” Control value: Change token If the change token is set to an empty string (“”) then it MUST be treated as it is not set</p><p>Example:</p><p><input name="changeToken" type="hidden" value="8923653942" /></p><p>Versioning state</p><p>Versioning State: Control name: “versioningState” Control value: Versioning state enum ("none", "major", "minor", "checkedout")</p><p>Example:</p><p><input name=" versioningState" type="hidden" value="major" /></p><p>Checkin Comment</p><p>Checkin comment: Control name: “checkinComment” Control value: Checkin comment</p><p>Example:</p><p><input name="checkinComment" type="text" value="My comment" /> Query</p><p>Statement: Control name: “statement” Control value: CMIS query statement</p><p>Search all versions: Control name: “searchAllVersions” Control value: boolean (“true”, “false”) </p><p>Include relationships: Control name: “includeRelationships” Control value: includeRelationships enum ("none", "source" ,"target", "both")</p><p>Rendition filter: Control name: “renditionFilter” Control value: rendition filter</p><p>Include allowable actions: Control name: “includeAllowableActions” Control value: boolean (“true”, “false”) </p><p>Max items: Control name: “maxItems” Control value: non-negative integer </p><p>Skip count: Control name: “skipCount” Control value: non-negative integer </p><p>Example:</p><p><input name="statement" type="text" value="SELECT * FROM cmis:document" /> <input name="searchAllVersions" type="hidden" value="false" /> <input name="includeRelationships" type="hidden" value="none" /> <input name="renditionFilter" type="hidden" value="cmis:none" /> <input name="includeAllowableActions" type="hidden" value="false" /> <input name="maxItems" type="hidden" value="100" /> <input name="skipCount" type="hidden" value="0" /></p><p>Content A file select control SHOULD be used to attach content.</p><p>Content: Control name: “content” Control value: none Control type: “file”</p><p>Example: <input name="content" type="file" /></p><p>Control values</p><p>Since control values are strings, all other data types have to be serialized to strings. The same rules that apply to the serialization to JSON apply here.</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    7 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us