Library 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

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

  • 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.

Note

The tree must be respected in the declaration of “definitions”.

Scopes tags allows to reduce the search area.

URL

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

Request flow

Here are several possible examples. This list is not exhaustive since there are of course a large number of possible combinations by modifying the structure of the definitions and the scopes.

Parameter Description Mandatory
labels Default true.
Allows to get the wording associated to retrieved elements.
No
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. No
attachments Default false.
With this setting, Process 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. No

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 Process 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>

Since Process15.5, the libraries carry the information of the organization to which they are attached :

<?xml version="1.0" encoding="UTF-8"?>
<view xmlns:vw1="http://www.axemble.com/library/view">
    <header login="sysadmin"/>
    <body>
        <library id="3448068464705536" name="EspaceDocumentaire"
                 protocol-uri="uril://vdoc/datastore/DefaultOrganization/EspaceDocumentaire"
                 organization-name="DefaultOrganization" organization-label="Organisation par défaut"
                 organization-protocol-uri="uril://vdoc/organization/DefaultOrganization"/>
    </body>
</view>

“get” command

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

The managed objects:

  • ILibrary
  • IFolder
  • IFile
Info

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

URL

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

Request flow

The request syntax is simple, you just need to forward the URI protocol and possibly additional options.

|Parameter|Description|Mandatory| |labels|Default true.
Allows to get the wordings associated to the retrieved document.|No| |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).|No|

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="uri://vdoc/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="uri://vdoc/fileCenterFolder/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="uri://vdoc/document/037-000000-000"/>
        </resource>
    </body>
</get>

Response flow

The response flow will depend on your request. The following example shows how to get detail information 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="EspaceProjets" protocol-uri="uri://vdoc/datastore/032-000000-000"/>
        <folder id="3412884092616705" name="Dossier 1" 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>
Info

If there was a document attached to a document type, the associated IResourceDefinition and all attribute values of that document type (in the body node) would be visible. Regarding the syntax of the different data types in the body, refer to the page “Data types”.

Since Process15.5, the libraries carry the information of the organization to which they are attached :

<?xml version="1.0" encoding="UTF-8"?>
<element xmlns:d1="http://www.axemble.com/portal/datastore" class="com.axemble.vdoc.sdk.interfaces.ILibrary">
    <header class="com.axemble.vdoc.sdk.flow.commands.impl.library.base.beans.input.Header" id="3448068464705536"
            name="EspaceDocumentaireOMS" protocol-uri="uri://vdoc/datastore/032-000000-000"
            parent-protocol-uri="uril://vdoc/organization/DefaultOrganization" max-file-size="10240000"
            max-size="5242880" alert-size="0" forbidden-extensions="exe;pif;vbs" current-size="165129"
            largest-file-size="0" external-id="0" number-of-elements="5"/>
</element>

“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 information for the creation of these elements.

To create a folder will be easy since few information will be needed. But to create a new document it will be a little more complex, 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 created flow with the GUID so that the uploaded file be attached to the new document

It is necessary to know in which structure the new element must be created: at the root of the document space or in an identified folder.

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="Mon nouveau dossier" description="Un exemple de dossier créé à distance">
                <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:

  • To the root :
      <?xml version="1.0" encoding="UTF-8"?>
      <create>
       <header />
       <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFile">
         <header reference="Mon bien beau document" description="Et ben oui, il est joli mon document !" >
          <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>
  • In a folder :
      <?xml version="1.0" encoding="UTF-8"?>
      <create>
       <header />
       <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFile">
         <header reference="Mon bien beau document" description="Et ben oui, il est joli mon document !" >
          <folder protocol-uri="uri://vdoc/fileCenterFolder/031-000004-004" />
          <attachments>
           <file>
            <content name="success.jpg" guid="51uwn8btdqa9e5u16gpbvj" />
           </file>
          </attachments>
         </header>
         <body>
         </body>
        </resource>
       </body>
      </create>
  • Attached document to a document type:
    • In this case, we will be able to submit in addition the type of the associated document (IResourceDefinition) and 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="Et ben oui, il est joli mon 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="Valeur d'un attrib" />
      	<float name="attr02" value="valeur numérique" />
      	<collection name="attr03">
      	 <string value="Valeur une" />
      	 <string value="Valeur deux" />
      	</collection>
         </body>
        </resource>
       </body>

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 [EspaceProjets.Mon nouveau dossier]."
          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).

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

<?xml version="1.0" encoding="UTF-8"?>
<update>
    <header/>
    <body>
        <resource class="com.axemble.vdoc.sdk.interfaces.IFolder">
            <header reference="Mon dossier modifié" protocol-uri="uri://vdoc/fileCenterFolder/031-000003-000"/>
        </resource>
    </body>
</update>

Document update

<?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="Valeur d'un attrib modifié"/>
            </body>
        </resource>
    </body>
</update>
{
  "update": {
    "body": {
      "resource": {
        "class": "com.axemble.vdoc.sdk.interfaces.IFile",
        "body": {
        },
        "header": {
          "reference": "myFileReference",
          "protocol-uri": "uri://vdoc/document/037-000001-001",
          "attachments": {
            "file": {
              "content": {
                "name": "myFileName.png",
                "guid": "-3llkwocqzq1n7ngilu1h2m"
              }
            }
          }
        }
      }
    }
  }
}

For updating the attachment of a file from an uploaded file for which we have the guid, the name attribute is mandatory.

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 because it allows to remove an existing Process object.

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

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).
No

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:

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

“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

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="" >
				<library protocol-uri="" />
			</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="" >
				<folder protocol-uri="" />
			</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.

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.

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.

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" />

Sources :