When developing applications, you start with a stage of analysis-design that allows modeling the structure of the database that you application will use.
So why not do something similar when developing applications on Alfresco ECM?. What makes Alfresco ECM a powerful tool is the ability to do content modeling. If you do not that, would not make much sense to use Alfresco ECM and instead should use any file-system such as WebDAV, FTP, NFS, etc. The content model in Alfresco ECM allows us to identify types of documents, properties and their relationships existing in our organization/business. This post will explain how to modeling the content that our type of organization/business requires and also explains how to deploy it on an installation of Alfresco ECM.

I. XML definition files

Create the following files:

1. intix-model-context.xml

This is Spring file configuration for the new content model.

[sourcecode language=”xml” gutter=”true” wraplines=”false”]

<!DOCTYPE beans PUBLIC ‘-//SPRING//DTD BEAN//EN’ ‘http://www.springframework.org/dtd/spring-beans.dtd’>

alfresco/extension/intixModel.xml

[/sourcecode]

2. intixModel.xml

This xml file contains our custom model.

[sourcecode language=”xml” gutter=”true” wraplines=”false”]

INTIX.info Content Model Roger Carhuatocto 1.0 Foo Project Bar Project Acme Project INTIX.info Document cm:content INTIX.info Related Documents false true </source> ix:doc false true cm:generalclassifiable INTIX.info Legal Document ix:doc INTIX.info Folder Document cm:folder INTIX.info Documents Related to Folder false true </source> ix:doc false true INTIX.info Marketing Document ix:doc d:text true

[/sourcecode]

3. web-client-config-custom.xml

This configuration file enables Alfresco Explore/Web Client to load the new content model in the Alfresco UI.

[sourcecode language=”xml” gutter=”true” wraplines=”false”]

[/sourcecode]

II. Deploy the content model

1. Stop Alfresco. 2. Copy intix-model-context.xml to ${ALFRESCO_HOME}\tomcat\shared\classes\alfresco\extension 3. Copy intixModel.xml to ${ALFRESCO_HOME}\tomcat\shared\classes\alfresco\extension 4. At this point, you will still not actually can not “see” the new custom model on the Alfresco UI (Alfresco Explorer/Web Client).
For that, you will need to set up the property dialogs for each of the content types. Then, copy web-client-config-custom.xml to ${ALFRESCO_HOME}\tomcat\shared\classes\alfresco\extension 5. Start Alfresco. 6. Verify successfully deployment of new content model by browsing on Alfresco Explorer/Web Client.

[caption id=”” align=”alignnone” width=”432” caption=”Step 1 - Upload a new type of content”]Step 1 - Upload a new type of content[/caption]

[caption id=”” align=”alignnone” width=”350” caption=”Step 2 - Modify properties (metadata) of new uploaded content”]Step 2 - Modify properties (metadata) of new uploaded content[/caption]

[caption id=”” align=”alignnone” width=”463” caption=”Step 3 - Modify properties of new type content”]Step 3 - Modify properties of new type content[/caption] 7. End.