Customization of model and share in Alfresco 5.2

Showing results for 
Search instead for 
Did you mean: 
Established Member

Customization of model and share in Alfresco 5.2

Brief background:

Our product stores (manages) its own documents in a content repository. Alfresco is one of the content repositories we integrate with, in addition to Documentum, Sharepoint, Oracle IPM, Hyland, etc.

We have our custom model for our documents. This custom model usually extends a type in the content repository. This custom model type will have its own set of (meta-data) properties.

In Alfresco, our model extends from cm:content. And we have our (meta-data) properties in an aspect. And our model type has this aspect as a mandatory one.

Past - Earlier work

Earlier we had Alfresco versions 5.0 and 5.1. In these versions, to create a custom model and package it to Alfresco Repo and Alfresco Share, I used the Jeff Potts notes [Working With Custom Content Types in Alfresco]. This article starts from 4 years old. With this, I created two AMP files: mymodel-repo.amp and mymodel-share.amp. Then, I copied these AMP files to folder: <ALFRESCO_HOME>/amps. 
Then I ran the <ALFRESCO_HOME>/bin/apply_amps.bat to deploy this AMP into your Alfresco web application.

Now - Current

We are going with (or upgrading to) Alfresco version 5.2. 

On top of this, I would be making some additions to our custom model (like adding two new properties). 

I believe in version 5.2, I found that we can directly create/make the model from UI itself. This link [Content Modelling with Model Manager] has instructions to do this.

Though it does not matter now, I do not know if this model manager was available in versions earlier than 5.2.

Then I was not sure, if I can now create our custom model using this model manager UI, and then give the changes to (the repo and share) to our product clients to deploy (like we did through AMP packages).

With version 5.2, should or could I still use the AMP packaging method (the earlier way)?

I read here and there that there is a JAR way of packaging as opposed to AMP way of packaging. Is this applicable to this situation?

Or, in other words, in Alfresco version 5.2, what is the best approach to create and deploy custom model, along with its related share UI changes, to the clients of our product?

Could you please guide me?

Gnanasekaran Sakthivel
1 Reply
Established Member

Re: Custom model in Alfresco 5.2

It looks like Jeff Potts material online has been updated recently. I am using this now.

I had many troubles like maven repository issues, while using Alfresco SDK 3.0. I had to turn off my mirror in the maven settings, and reload every dependency from online every time. 

However, with this mirror turned off in maven, I could not run the inbuilt tomcat, because it takes more than 30 minutes to start, after downloading all the maven dependencies. Ridiculous!

At some point, I have to read up on the maven settings, etc. to deal with this problem. 

For now, I am not running the internal tomcat.

I was able to create the AMP file for repository. It is working good. Through the program, I was able to add documents with our custom aspects, etc.

Now I am working on the Share tier AMP preparation. Lots of configuration details in preparing the share-config-custom.xml. I would like to learn more about the following things like selectone.ftl control. 

<control template="/org/alfresco/components/form/controls/selectone.ftl">

<control-param name="options">image/gif|GIF Image,image/jpeg|JPEG Image,image/png|PNG Image</control-param>


Also, where would I find documentation on other attributes in these tags...

<show id="cm:title" force="true" />

Also, what other datatype formats are there, like date.ftl?

<field set="effectivity" id="cm:from">

<control template="/org/alfresco/components/form/controls/date.ftl">

<control-param name="showTime">false</control-param>


After spending a lot of time online, it is hard to find a good material on Alfresco Share configuration. I have not found any material that is written in the recent years. Almost all of them dates back to 5 years old.

Let us see.

I will try to find some material online. May be I do not know how to search. If you know, please share with me. It will be a great help.

Gnanasekaran Sakthivel