Create your own photo and video object types to customize the information provided with each media gallery file. This is optional.
Before you begin
To create custom media gallery object types, you must create XML documents to define them. Then you must copy those files to the server that Files is installed on, and import them using a command.
Object types are defined in XML according to the Content Management Interoperability Services (CMIS) standard. Detailed documentation for the CMIS standard can be found at the Oasis CMIS web site
See Sample media gallery object types
for samples of photo and video object type definitions you can use as templates for your custom object types. See Working with CMIS API object types
for details on creating custom object types.
Things to remember when creating object types:
- The object type definitions must use the following name space:
- Name object types in the localName element clearly so that community owners know what object types to pick when adding media gallery widgets to their communities. For example, the default photo object type provided with IBM® Connections has a localName value of mediaphoto, which makes clear that it is an object type for photographs. If you created an object type based on the default photo object type that displayed information for professional photographers, you might name it professionalphoto.
- To assign new logical types to a property, add the logical type as the value of the localName element, and add http://www.ibm.com/xmlns/prod/sn/cmis/logicaltypes as the value of the localNamespace element. For example, the default photo object type looks like this:
Users with media galleries must not switch from using an object type for photos, to then using it for videos.
To import new object types, perform the following steps.
- Start the wsadmin client by completing the following steps:
- On the system Files is installed on, open a command prompt, and then change to the following directory:
is the WebSphere
® Application Server installation directory and <files_profile_root>
is the Files profile directory.
- Enter the following command to start the wsadmin client:
- AIX or Linux:
./wsadmin.sh -lang jython -user <admin_user_id> -password <admin_password> -port <SOAP_CONNECTOR_ADDRESS Port>
- Microsoft Windows:
wsadmin -lang jython -user <admin_user_id> -password <admin_password> -port <SOAP_CONNECTOR_ADDRESS Port>
Start the Files Jython script interpreter using the following command:
- <admin_user_id> is the user name of a person in the Administrator role on the IBM WebSphere Application Server.
- <admin_password> is the password of the WebSphere Application Server administrator.
- <SOAP_CONNECTOR_ADDRESS Port> is the SOAP port for the WebSphere Application Server. The default value of the SOAP port is 8879. If you are using the default port value, you do not need to specify this parameter. If you are not using the default and you do not know the port number, you can look up its value in the WebSphere Application Server Integrated Solution Console. To look up the SOAP port number, perform the following steps:
- Open the WebSphere Application Server Integrated Solution Console for the deployment manager, and then select System Administration -> Deployment Manager.
- In the Additional properties section expand Ports, and then look for the SOAP_CONNECTOR_ADDRESS port entry to find the port number.
- AIX or Linux:
./wsadmin.sh -lang jython -username primaryAdmin -password p@assword -port 8879
- Microsoft Windows:
wsadmin -lang jython -username primaryAdmin -password p@assword -port 8879
Run the following command to import the object type definition document:
Run the following command to check that the new object type was imported. The command returns a list of all object types:
is the path and filename of the XML definition document.
Restart the Files application.
If your definition adds new properties, add property labels and descriptions to the CMIS language property file. See Adding photo and video property labels and descriptions.
Add custom fields to display the new properties. See Including custom fields with photos and videos.
Community owners can select the object type when they add media gallery widgets to their communities. See Adding a media gallery to your community
Parent topic: Configuring media galleries
Starting the wsadmin client
Adding a media gallery to your community
Working with CMIS API object types