Available commands in the document spaces module

view command

This flow allows to browse the document space : folders, categories, documents.
The objects could be as well definition objects (administrative objects) as dynamic objects (documents).

The managed objects :

  • ILibrary
    • IFolder
      • IFile
    • ICategory
      • IFile

Tree structure logic in the request flows

In your queries, you can define the structure (tree or not) of what you request.
For example, you may wish to obtain:

  • All document spaces
  • All folders in a space
  • All files in a folder.
  • A whole tree of files and folder under a folder.

All these requests are possible with the same flow.
Indeed, it's you who will define the structure of your definition objects.

Warning: the tree must be respected in the declaration of "definitions"

Scopes tag

Scopes tags allows to reduce the search area.

View URL

   http://myvdocserver/vdoc/navigation/flow?module=library&cmd=view&_AuthenticationKey=...

Request flow

Parameter Description
labels (default: true) Allows to get the wording associated to retrieved elements.
maxlevel (default: 0) If the parameter is not specified, only elements in scope are retrieved. If the parameter is defined with a value, all elements, up to that level, are retrieved . If the parameter is set to -1, all sub-elements (starting from the scope, if we have one) are retrieved.
attachments (default: false) With this setting, VDoc will book a download for the file associated to documents and send you back in the response flow a GUID. This GUID will then be used with the command "download" of the "io" module.

View command examples for the library module

This list is not exhaustive as there are of course many possible combinations by modifying the structure of definitions and scopes.

Retrieve all document spaces
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
   <header>
      <definition class="com.axemble.vdoc.sdk.interfaces.ILibrary" />
   </header>
</view>
Retrieve all documents in a folder (directly in the folder)
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
   <header>
      <scopes>
         <folder protocol-uri="uri://vdoc/fileCenterFolder/031-000000-001" />
      </scopes>
      <definition class="com.axemble.vdoc.sdk.interfaces.IFile" />
   </header>
</view>
Retrieve all records and documents (full path) in a given space
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/vdoc/view">
        <header>
                <scopes>
                        <library protocol-uri="uri://vdoc/datastore/032-000000-000" />
                </scopes>
                <configuration>
                        <param name="maxlevel" value="-1" />
                </configuration>
                <definition class="com.axemble.vdoc.sdk.interfaces.IFolder" >
                        <definition class="com.axemble.vdoc.sdk.interfaces.IFile" />
                </definition>
        </header>
</view>

Response flow

In response, the flow will send you a tree structure related to your request. If we take the previous example flow "Retrieve all records and documents", here's what VDoc could return as answer.

<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/library/view">
        <header />
        <body>
                <folder id="3412884092616705" name="Dossier 1" protocol-uri="uri://vdoc/fileCenterFolder/031-000000-001">
                        <folder id="3412884092616707" name="Sous-dossier 1" protocol-uri="uri://vdoc/fileCenterFolder/031-000000-003"/>
                        <resource id="3623990325149696" reference="2011-12-15_120803.png" protocol-uri="uri://vdoc/document/037-000000-000" description="" creator="sysadmin" editor="sysadmin" created-date="2011-12-19T16:14:28.603Z" modified-date="2011-12-19T16:14:29.617Z"/>
                        <resource id="3623990325182464" reference="SchemaFluxSDK.png" protocol-uri="uri://vdoc/document/037-000001-000" description="sqdds" creator="sysadmin" editor="sysadmin" created-date="2011-12-22T11:13:46.640Z" modified-date="2011-12-22T11:13:47.843Z"/>
                </folder>
                <folder id="3412884092616706" name="Dossier 2" protocol-uri="uri://vdoc/fileCenterFolder/031-000000-002">
                        <resource id="3623990325149700" reference="Mon bien beau document" protocol-uri="uri://vdoc/document/037-000000-004" description="Et ben oui, il est joli mon document !" creator="sysadmin" editor="sysadmin" created-date="2011-12-19T16:27:40.967Z" modified-date="2011-12-19T16:27:41.027Z"/>
                </folder>
        </body>
</view>

get command

This flow allows to retrieve object informations from the element ID (the URI protocol)

The managed objects:

  • ILibrary
  • IFolder
  • IFile

    We do not manage the ICategory by now because this object does not carry any information.

Get URL

   http://myvdocserver/vdoc/navigation/flow?module=library&cmd=get&_AuthenticationKey=...

Request flow

Parameter Description
labels (default: true) Allows to get the wordings associated to the retrieved document.
attachmentsContent (default: true) It allows to retrieve a Base64 encoded file in the flow. If this parameter is set to "false", a download reservation will be made and a GUID will be provided (to used in the download command of the IO module).

Some examples of get command in the library module

Example 1: Using ILibrary

<?xml version="1.0" encoding="UTF-8"?>
<get xmlns:d1="http://www.axemble.com/vdoc/library">
    <body>
        <element class="com.axemble.vdoc.sdk.interfaces.ILibrary">
            <header protocol-uri="resource:/filecenter/datastore/042-000006-006" />
        </ element>
    </body>
</get>

Example 2: Using IFolder

<?xml version="1.0" encoding="UTF-8"?>
<get xmlns:d1="http://www.axemble.com/vdoc/folder">
    <body>
        <element class="com.axemble.vdoc.sdk.interfaces.IFolder">
            <header protocol-uri="resource:/filecenter/folder/042-000006-006" />
        </element>
    </body>
</get>

Example 3: Using IFile

<?xml version="1.0" encoding="UTF-8"?>
<get xmlns:d1="http://www.axemble.com/vdoc/file">
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFile">
            <header protocol-uri="resource:/filecenter/document/042-000006-006" />
        </resource>
    </body>
</get>

Response flow

The response flow will depend on your request.

The following example shows how to get detail informations about a document, which is the most common case.

  <resource xmlns:d1="http://www.axemble.com/portal/document" class="com.axemble.vdoc.sdk.interfaces.IFile">
    <header id="3623990325182464" reference="SchemaFluxSDK.png" protocol-uri="uri://vdoc/document/037-000001-000" description="un rexte" 
                                 creator="sysadmin" editor="sysadmin" created-date="2011-12-22T11:13:46.640Z" modified-date="2011-12-22T11:13:47.843Z" checked-out-by="">
        <library id="3448068464705536" name="ProjectSpace" protocol-uri="uri://vdoc/datastore/032-000000-000"/>
        <folder id="3412884092616705" name="Folder ABC" protocol-uri="uri://vdoc/fileCenterFolder/031-000000-001"/>
        <resource-definition id="3518437208883200" name="type-1"/>
        <attachments>
            <file>
                <content name="SchemaFluxSDK.png" size="22150" uri="/action/WebdriveActionEvent/oid/037-000001-000/fname/SchemaFluxSDK.png" guid="-3v4gx6c7l61liyyarnq545"/>
            </file>
        </attachments>
    </header>
    <history/>
    <body/>
</resource>

For more informations about the available data types, please refer to VDoc data types in SDK flows.

create command

This flow will allow us to create new objects in FileCenter.

The managed objects:

  • IFolder
  • IFile

We have to send all the required informations for the creation of these elements.

To create a folder will be easy since few informations will be needed. But to create a new document, it will be a little more complex, in fact,
the creation of a document involves:

  • To upload a new file (with the upload command of the IO module).
  • Retrieving a GUID returned by the upload.
  • A call of a create flow with the GUID so that the uploaded file be attached to the new document.

Scope notion

Obviously, VDoc must know where it must create the new element: at the root, in a specified folder, etc.

Create URL

    http://myvdocserver/vdoc/navigation/flow?module=library&cmd=create&_AuthenticationKey=...    

Request flow

The configuration of the request flow is quite different between creating a document or folder.

Create a folder
<?xml version="1.0" encoding="UTF-8"?>
<create>
    <header />
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFolder">
            <header name="My new folder" description="Example of folder remotely created" >
                <library protocol-uri="uri://vdoc/datastore/032-000000-000" />
            </header>
        </resource>
    </body>
</create>
Create a document

Here we must initially perform an upload file upload control via the IO module. This exchange allows us to retrieve a GUID that can be submitted after as in the example below.

Simple create
<?xml version="1.0" encoding="UTF-8"?>
<create>
    <header />
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFile">
            <header reference="Nice document" description="So, it's not beautiful !" >
                <library protocol-uri="uri://vdoc/datastore/032-000000-000" />
                <attachments>
                    <file>
                        <content name="success.jpg" guid="51uwn8btdqa9e5u16gpbvj" />
                    </file>
                </attachments>
            </header>
            <body>
            </body>
        </resource>
    </body>
</create>
Creating an attached document to a document type

In this case, we will be able to submit in addition:

  • The type of the associated document (IResourceDefinition).
  • The attributes values associated with this type.
<?xml version="1.0" encoding="UTF-8"?>
<create>
    <header />
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFile">
            <header reference="FileType1" description="Such a beautiful document !" >
                <library protocol-uri="uri://vdoc/datastore/032-000000-000" />
                <resource-definition name="type-1" />
                <attachments>
                    <file>
                        <content name="FileType1.xml" guid="-3v4gx6c7l61liyyarnq542" />
                    </file>
                </attachments>
            </header>
            <body>
                <string name="attr01" value="Value of an attribute" />
            </body>
        </resource>
    </body>
</create>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors.

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Folder created [ProjetcsSpace.MyNewFolder]." detail="uri://vdoc/fileCenterFolder/031-000003-000"/>

update command

This flow will allow update of existing elements in the document spaces. The updates can apply to folders (name, description) and to documents (new attributes or file upload).

Update URL

    http://myvdocserver/vdoc/navigation/flow?module=library&cmd=update&_AuthenticationKey=...

Request flow

The only difference compared to the create command will be at the level of the header:
you will have to provide the URI protocol of the element that you wish to edit.

Folder update example
<?xml version="1.0" encoding="UTF-8"?>
<update>
    <header />
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFolder">
            <header reference="My modified folder" protocol-uri="uri://vdoc/fileCenterFolder/031-000003-000" />
        </resource>
    </body>
</update>
Document update example
<?xml version="1.0" encoding="UTF-8"?>
<update>
    <header />
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFile">
            <header protocol-uri="uri://vdoc/document/037-000003-003" >
                <library protocol-uri="uri://vdoc/datastore/032-000000-000" />
                <resource-definition name="type-1" />
            </header>
            <body>
                <string name="attr01" value="value of the modified attribute" />
            </body>
        </resource>
    </body>
</update>

Response flow

This response flow has the same format as the response flow of the create command.

delete command

This flow is very simple to use, but it must be used very carefully.
This flow allows to remove an existing item in the document space: documents, folders.
In the case of documentary publication, we use a recycle bin; thus, it will be possible to configure between permanently delete the item or just temporarily delete the item (default setting) .

The managed objects:

  • IFolder
  • IFile

Delete URL

    http://myvdocserver/vdoc/navigation/flow?module=library&cmd=delete&_AuthenticationKey=...

Request flow

The syntax for the request flow is simple. You just need to forward the URI protocol of the item to delete.

parameter Description Mandatory
deleteFromTrash (Default: false) If this is true, the item will also be deleted from the trash (permanently deleted without possibility to recover). false
Delete a folder
<?xml version="1.0" encoding="UTF-8"?>
<delete>
    <header />
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFolder">
            <header protocol-uri="uri://vdoc/fileCenterFolder/031-000003-000" deleteFromTrash="true" />
        </resource>
    </body>
</delete>
Delete a file
<?xml version="1.0" encoding="UTF-8"?>
<delete>
    <header />
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFile">
            <header protocol-uri="uri://vdoc/document/037-000000-000" />
        </resource>
    </body>
</delete>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors.

move command

This flow will help to move an item to another folder. We can either move a document or a whole folder.

The managed objects:

  • IFolder
  • IFile

Move URL

    http://myvdocserver/vdoc/navigation/flow?module=library&cmd=move&_AuthenticationKey=...

Request flow

The syntax of the request flow is relatively simple, you need to pass:

  • The URI protocol of the element to be moved.
  • The URI protocol of the element where the element will be moved : a folder or document space.
Move a document
<?xml version="1.0" encoding="UTF-8"?>
<move>
    <header />
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFile">
            <header protocol-uri="uri://vdoc/document/SourceFileURI" >
                <library protocol-uri="uri://vdoc/document/TargetDocumentURI" />
            </header>
        </resource>
    </body>
</move>
Move a folder
<?xml version="1.0" encoding="UTF-8"?>
<move>
    <header />
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFolder">
            <header protocol-uri="uri://vdoc/folder/sourceFolderURI" >
                <folder protocol-uri="uri://vdoc/folder/targetFolderURI" />
            </header>
        </resource>
    </body>
</move>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors.

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element moved[ElementName]." detail="protocol-uri" />

checkout command

This flow is very simple to use; it allows to lock a document in the document spaces.

The managed object:

  • IFile

Checkout URL

    http://myvdocserver/vdoc/navigation/flow?module=library&cmd=checkout&_AuthenticationKey=...

Request flow

The syntax for this request flow is simple; You just need to forward the URI protocol of the document to lock.

<?xml version="1.0" encoding="UTF-8"?>
<checkout>
    <header />
    <body>
        <resource>
            <header protocol-uri="uri://vdoc/document/037-000000-000" />
        </resource>
    </body>
</checkout>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors.

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element checked out[ElementName]." detail="protocol-uri" />

undocheckout command

This flow is simple to use; it allows to cancel a lock put on a document in the document spaces.

The managed object:

  • IFile

Undocheckout URL

    http://myvdocserver/vdoc/navigation/flow?module=library&cmd=undocheckout&_AuthenticationKey=...

Request flow

The request syntax is simple, you just need to forward the URI protocol of the document to unlock.

<?xml version="1.0" encoding="UTF-8"?>
<undocheckout>
    <header />
    <body>
        <resource>
            <header protocol-uri="uri://vdoc/document/037-000000-000" />
        </resource>
    </body>
</undocheckout>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors.

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element undo checked out[ElementName]." detail="protocol-uri" />

checkin command

This flow is simple to use and it allows to commit an edited document in the document spaces.

The check-in will of course be preceded:

  • of a new upload.
  • of an update with the new GUID assignment for the new file

    The managed object:

  • IFile

Checkin URL

    http://myvdocserver/vdoc/navigation/flow?module=library&cmd=checkin&_AuthenticationKey=...

Request flow

The request syntax is really simple, you just need to forward the URI protocol of the document to checkin.

 <?xml version="1.0" encoding="UTF-8"?>
<checkin>
    <header />
    <body>
        <resource>
            <header protocol-uri="uri://vdoc/document/037-000000-000" />
        </resource>
    </body>
</checkin>

Response flow

The response flow will be a standard XML that will indicate either the success of the operation or any errors.

<?xml version="1.0" encoding="UTF-8"?>
<response status="success" message="Element check in[ElementName]." detail="protocol-uri" />
 +-----------