Create new document type in Alfresco

Alfresco have many options to extend their document management system and one of them is to create a new document type as seen in the picture below. The new document is a Whitepaper, but we could have added other document types like a functional specification, meeting minutes, risk matrix and whatever that tingles our needs.

All documents that are uploaded or created in alfresco is by default marked as “content”, a generic term that can encompass everything. To create a document type is an easy way of setting documents apart/a way of categorizing and structuring the content itself. A developer can add certain functionality/behavior to a document type like a doc type having certain metadata connected to it, workflow (review, acceptance, publish), add versioning, that certain people shall be notified of changes or add permission so that only specific people can create and edit the document. One can add advanced search capabilities like searching for a specific document type.


So, down to the gritty details. First one have to define the document type (custom content model) (config/extension/model/whitepaper.xml):

<?xml version="1.0" encoding="UTF-8"?>

<!-- Definition of new Model -->
<model name="mb:mybusiness.whitepaper.model" xmlns="">
    <description>My business Whitepaper</description>
    <author>Helene Klungvik</author>

		Imports are required to allow references to definitions in other
		<!-- Import Alfresco System Definitions -->
		<import uri="" prefix="sys"/>
		<!-- Import Alfresco Dictionary Definitions -->
		<import uri="" prefix="d" />
		<!-- Import Alfresco Content Domain Model Definitions -->
		<import uri="" prefix="cm" />

		<namespace uri="mybusiness.whitepaper.model" prefix="mb" />

		<type name="mb:doc">


Then create a spring bean that imports the whitepaper model (config/alfresco/extension/module-context.xml):

<?xml version="1.0" encoding="UTF-8"?>
    Document   : module-context.xml
    Created on : March 11, 2009, 10:00 AM
    Author     : Helene Klungvik
        Define a new document type for whitepapers

    <bean id="mybusiness.dictionaryBootstrap"
        parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">

And that’s it.

About Haridasi

integrity - the state of being whole, entire, or undiminished.
This entry was posted in Technology and tagged . Bookmark the permalink.

6 Responses to Create new document type in Alfresco

Leave a Reply

Your email address will not be published. Required fields are marked *