Create custom media gallery object typesCreate your own photo and video object types to customize the information provided with each media gallery file. This is optional.
Before you beginTo create custom media gallery object types, create XML documents to define them. Then 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 Work 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:<cmis:localNamespace>http://www.ibm.com/xmlns/prod/sn/cmis/socialmedia</cmis:localNamespace>
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:<cmis:propertyStringDefinition> <cmis:id>751f89d5-068f-45c4-8e79-8ceb709feae2</cmis:id> <cmis:localName>mediaphotolocation</cmis:localName> <cmis:localNamespace>http://www.ibm.com/xmlns/prod/sn/cmis/logicaltypes</cmis:localNamespace> ...
Note: Users with media galleries must not switch from using an object type for photos, to then using it for videos.
ProcedureTo 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:
- 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>
- <admin_user_id> is the user name of a person in the Administrator role on the IBM WAS.
- <admin_password> is the password of the WAS administrator.
- <SOAP_CONNECTOR_ADDRESS Port> is the SOAP port for the WAS. 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 WAS Integrated Solution Console. To look up the SOAP port number, perform the following steps:
- Open the WAS Integrated Solution Console for the deployment manager, and then select System Administration -> dmgr.
- 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
- Start the Files Jython script interpreter using the following command:
- Run the following command to import the object type definition document:
where <path_filename> is the path and filename of the XML definition document.
- Run the following command to check that the new object type was imported. The command returns a list of all object types:
- Restart the Files application.
- If your definition adds new properties, add property labels and descriptions to the CMIS language property file. See Add photo and video property labels and descriptions.
- Add custom fields to display the new properties. See Including custom fields with photos and videos.
ResultsCommunity owners can select the object type when they add media gallery widgets to their communities. See Add a media gallery to your community.
Sample media gallery object types
Use these samples as a template for your own custom object type definitions.
Add labels to media gallery fields
After creating fields for your custom media gallery object types, create labels for each field.
Create fields for custom media gallery object types
Add fields to contain information about custom object type media gallery photos and videos. After creating fields, create labels for each field.
Setting custom media gallery object types as default selections
Set custom photo and video object types as the object types selected by default when a user adds a media gallery to their community.
Parent topicConfigure media galleries
Starting the wsadmin client
Add a media gallery to your community
Work with CMIS API object types
September 19, 2011 9:58:44 AM
Sep 19, 2011 9:58:44 AM 3 Aug 29, 2011 2:32:39 PM 2 Aug 29, 2011 2:31:08 PM 1