I needed to create a data model for a client who wanted to use LC Content Services for storing documents and some meta-data attached to those documents. It took me awhile to figure out my way around LC Content Services Module so I decided to share what I learned with those who are about to pull their hair out trying to find clear documentation on how to create a custom data model and use it in LiveCycle.

Well, in my case, I had to create a custom model with a bunch of properties that can be retrieved within LiveCycle.  I found out that Alfresco Module Package (AMP) files are used in order to extend repository in LC Content Services.

I have attached a sample AMP file which you can modify and use in your own applications by following the steps given below;

1. module.properties

This is the first file that you will see after extracting the content of the AMP package. Locate the line where you put “moduleid” and then replace it with the name of the folder within \config\alfresco\module\ folder.

2. yourmodelnameModel.xml

The XML file that ends with the word “model”, located in config\alfresco\extension should be named same as the “moduleid” which we defined in the previous step.

First, set the moduleid in the namespace node and then replace the prefix value with your own.

Also, don’t forget to change all the prefix values used in name attributes within the whole XML file.

3. custom-metadata-extractors-context.xml

Replace the model filename with the one you used in your xml model file; and then replace the prefix definitions and keywords located in the “mappingProperties” section.

4. yourmodulename_strings.properties

You’ll find this file in the “\config\alfresco\messages\” folder. This is a simple text file which allows you to set the label values of your properties displayed in LC Content Space.

5. module-context.xml

This xml file is located in the \config\alfresco\module\yourmodulename\ folder. Change the name of the xml file in the  section that has the “resource” configuration.

6. yourmodelname-service-context.xml

This file can be found in the \config\alfresco\module\yourmodulename\context folder.

Change the list values of “configs”, “resourcebundles” and “model” properties accordingly.

7. web-client-config-yourmodulename.xml

This is the xml file in which you define what to be shown in the “More Options” panel in your content space. You can also match properties defined earlier in Step 2 with the “display-label-ids” that will be used when the aspect is applied.

The format of an AMP file is similar to that of a ZIP file. Basically, an AMP file is a collection of XML, image, CSS etc. You can extract the content of an AMP package using WinRAR. However, I couldn’t create a brand new AMP file just by compressing the content files using WinRAR. LiveCycle fails to deploy AMP packages created by WinRAR. I was in a little bit of a hurry so I found a sample AMP package, opened it with WinRAR and replaced the files with the ones I created. It worked like a charm! Once your AMP package is deployed successfully, you can see your model from workbench in the aspects list.

Working with custom aspects in LC Content Services

Working with custom aspects in LC Content Services

Deploying AMP packages to LC Content Services is a whole another subject matter which will take more than one post to explain, so I’m not going to touch on it here.

Below is the link which contains all the steps to deploy an AMP file to LiveCycle Content Services;

http://www.drflex.eu/2008/10/extending-adobe-document-management-with-even-more-functionality/

Post this to Twitter

Relevant Posts:
  • Display PDF in Flex client
  • Event Driven SOA with LiveCycle ES
  • Content Services client
  • Monitoring business data with Adobe LiveCycle BAM ES2
  • Adobe’s Reply on: Spark Form Components and Android Keyboard Problem