Work with CMIS API object types 

Define custom object types as extensions of snx:file.

Custom types are imported and exported using the IBM WAS wsadmin client. These commands are extensions of the Files administrative commands. After starting the client, the Files administrative commands are accessed by issuing:

execfile("filesAdmin.py")


Custom object typed Definitions

Custom object type definitions are described in an XML document that conforms to the CMIS object type syntax.

Single-value properties


Multivalue properties

Translatable strings

Sample object type definition


Import object type

The Files application must be restarted after an object type has been imported before the new object type can be accessed and used by the system. The command to import an object type is:

FilesObjectTypeService.importType("objectType.xml")

Where objectType.xml is the path and name to an XML file containing the object type definition.


Export object type

The command to export an object type is:

FilesObjectTypeService.exportType("objectType.xml", "f0d01111-9b21-4dd8-b8be-8825631cb84b")

Where objectType.xml is the path and name of the file that will be written containing the XML definition of the exported object type.

The parameter f0d01111-9b21-4dd8-b8be-8825631cb84b is the ID of the object type to be exported. In this example, this value is the ID of the sample photo type described above.


Delete object type

The Files application must be restarted after an object type has been deleted. An object type can only be deleted if there are not any files of that type. Before deleting the object type make sure to delete all files of that type including emptying the trash. The command to delete an object type is:

FilesObjectTypeService.deleteType("f0d01111-9b21-4dd8-b8be-8825631cb84b")

Where f0d01111-9b21-4dd8-b8be-8825631cb84b is the ID of the object type to be deleted.

In this example, this value is the ID of the sample photo type described above.


Browse object types

This command lists the custom object types that have been previously imported. The command to browse the defined object types is:

FilesObjectTypeService.browseTypes()


Parent topic

Administer Files


Related tasks


Customize product strings
Create fields for custom media gallery object types

+

Search Tips   |   Advanced Search