<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Helene &#187; alfresco</title>
	<atom:link href="http://klungvik.com/index.php/tag/alfresco/feed/" rel="self" type="application/rss+xml" />
	<link>http://klungvik.com</link>
	<description>Site of wonder (my personal sandbox)</description>
	<lastBuildDate>Wed, 21 Jul 2010 14:52:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>New job, new life</title>
		<link>http://klungvik.com/index.php/2009/new-job-new-life/</link>
		<comments>http://klungvik.com/index.php/2009/new-job-new-life/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 12:58:36 +0000</pubDate>
		<dc:creator>Helene Klungvik</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[alfresco]]></category>

		<guid isPermaLink="false">http://klungvik.com/?p=758</guid>
		<description><![CDATA[A couple of weeks ago, I started working at a new company (sorry, I will no more work on Alfresco for those that comes here for that information) and I&#8217;m settling in nicely. My colleagues are very easy to talk with, the chatting just flows effortlessly and I love it. It&#8217;s so important to work [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago, I started working at a new company (sorry, I will no more work on Alfresco for those that comes here for that information) and I&#8217;m settling in nicely. My colleagues are very easy to talk with, the chatting just flows effortlessly and I love it. It&#8217;s so important to work with people where the communication works, especially now when I&#8217;m working in a small IT department where we will work closely together all the time. </p>
<p>I got a new laptop (Thinkpad W500), and I could choose my own operating system on it (or as my department manager said, quite accurately: I would probably have done whatever I wanted anyway). That resulted in putting ubuntu on it, and I have enjoyed getting ubuntu to talk to Windows Active directory, setting up the mail towards exchange, getting access to the shared folders, set up citrix client. It has been surprisingly easy. The only downside have been that editing documents in sharepoint using firefox doesn&#8217;t work (even though MS claim cross-browser support). </p>
<p>So far I really like the new workplace. I even got my own office, which I haven&#8217;t had in a long time. I can look outside, see the weather and the trees. Some of the fun part is watching all the trailers that come here to load and unload goods. Sometimes (everyday) there are so many trailers at the same time, that there is space issues. One bad part though &#8211; my butt hurt! I have to take a 10-minute bicycle ride to get to the office, and I have to dress for the weather. It&#8217;s going to be interesting to see how I&#8217;m going to like it when the winter sets in and the snow piles up. </p>
<p>I had an extended vacation (3 months) before I started at the new job. The time seemed to just flow for the most part, but in the end I was ready to start working again. I used to go to the city, find a cafè and enjoy a mocha everyday. I used to sit there alone, looking at people and reading self-development books. I really loved those moments, and I received so much inspiration (also called juice) making the days fly by. I always had things to do.</p>
<p>Now, when I get back from work I can&#8217;t seem to get back to that inspiration. Setting up Linux, learning a new job have given me inspiration on work, but I don&#8217;t extend it to my spare time (I don&#8217;t want to be too much on the computer during my spare time). Enjoying a mocha and reading self-development books at home doesn&#8217;t work since I started working. I have to figure out a new way to get my &#8220;juice&#8221; after work. I still haven&#8217;t been able to figure out what it takes, but I have some suspicion I have to use more time on my spiritual activities. That have worked before. May be that means that the inspiration I get is different from when I work opposed to when I have a vacation. </p>
]]></content:encoded>
			<wfw:commentRss>http://klungvik.com/index.php/2009/new-job-new-life/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Alfresco and CIFS troubleshooting on Ubuntu</title>
		<link>http://klungvik.com/index.php/2009/alfresco-and-cifs-troubleshooting-on-ubuntu/</link>
		<comments>http://klungvik.com/index.php/2009/alfresco-and-cifs-troubleshooting-on-ubuntu/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 13:21:43 +0000</pubDate>
		<dc:creator>Helene Klungvik</dc:creator>
				<category><![CDATA[IT & Programming]]></category>
		<category><![CDATA[alfresco]]></category>

		<guid isPermaLink="false">http://klungvik.com/?p=555</guid>
		<description><![CDATA[When installing Alfresco on an Ubuntu machine, CIFS doesn&#8217;t work out of the box. First question: is Samba installed? sudo apt-get install samba smbfs The configuration files for file-server setups: $ALFRESCO_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/file-servers.xml $ALFRESCO_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/file-servers.properties Uncomment these lines in file-servers.xml (though to make sure this is permanent &#8211; create file-servers-custom.xml): &#60;tcpipSMB port="1445" ipv6="${cifs.ipv6}" platforms="linux,solaris,macosx"/&#62; &#60;netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" [...]]]></description>
			<content:encoded><![CDATA[<p>When installing Alfresco on an Ubuntu machine, CIFS doesn&#8217;t work out of the box.<br />
First question: is Samba installed?<br />
<code>sudo apt-get install samba smbfs</code></p>
<p>The configuration files for file-server setups:<br />
$ALFRESCO_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/file-servers.xml<br />
$ALFRESCO_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/file-servers.properties </p>
<p>Uncomment these lines in file-servers.xml (though to make sure this is permanent &#8211; create file-servers-custom.xml):<br />
<code>      &lt;tcpipSMB port="1445" ipv6="${cifs.ipv6}" platforms="linux,solaris,macosx"/&gt;<br />
      &lt;netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/&gt;</code></p>
<p>Set iptable rules:<br />
<code>sudo su<br />
echo 1 &gt; /proc/sys/net/ipv4/ip_forward<br />
modprobe iptable_nat<br />
iptables -F<br />
iptables -t nat -F<br />
iptables -P INPUT ACCEPT<br />
iptables -P FORWARD ACCEPT<br />
iptables -P OUTPUT ACCEPT<br />
iptables -t nat -A PREROUTING -p tcp --dport 445 -j REDIRECT --to-ports 1445<br />
iptables -t nat -A PREROUTING -p tcp --dport 139 -j REDIRECT --to-ports 1139<br />
iptables -t nat -A PREROUTING -p udp --dport 137 -j REDIRECT --to-ports 1137<br />
iptables -t nat -A PREROUTING -p udp --dport 138 -j REDIRECT --to-ports 1138</code></p>
<p>Check iptable rules:<br />
<code>sudo iptables -t nat -L</code></p>
<p><strong>Troubleshooting options:</strong><br />
To check what ports are listened to:<br />
<code>netstat -a</code><br />
Look for:<br />
<code>tcp6       0      0 [::]:1445               [::]:*                  LISTEN<br />
tcp6       0      0 [::]:1139               [::]:*                  LISTEN</code></p>
<p>To see who listens at what port:<br />
<code>$ sudo lsof -i :1139 -n<br />
COMMAND   PID     USER   FD   TYPE DEVICE SIZE NODE NAME<br />
java    11881 alfresco  296u  IPv6  60400       TCP *:1139 (LISTEN)</code></p>
<p>Another way to check if the port is listened to:<br />
<code>$ telnet localhost 1139<br />
Trying 127.0.0.1...<br />
Connected to localhost.<br />
Escape character is '^]'.</code></p>
<p>Resources:<br />
<a href="http://wiki.alfresco.com/wiki/File_Server_Configuration">http://wiki.alfresco.com/wiki/File_Server_Configuration</a><br />
<a href="http://wiki.alfresco.com/wiki/CIFS_linux">CIFS Linux</a><br />
<a href="http://wiki.alfresco.com/wiki/Troubleshooting">http://wiki.alfresco.com/wiki/Troubleshooting</a><br />
<a href="http://forums.alfresco.com/en/viewtopic.php?t=938">CIFS Troubleshooting</a></p>
]]></content:encoded>
			<wfw:commentRss>http://klungvik.com/index.php/2009/alfresco-and-cifs-troubleshooting-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to create an Alfresco Module Package (AMP)</title>
		<link>http://klungvik.com/index.php/2009/how-to-create-an-alfresco-module-package-amp/</link>
		<comments>http://klungvik.com/index.php/2009/how-to-create-an-alfresco-module-package-amp/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 14:02:04 +0000</pubDate>
		<dc:creator>Helene Klungvik</dc:creator>
				<category><![CDATA[IT & Programming]]></category>
		<category><![CDATA[alfresco]]></category>

		<guid isPermaLink="false">http://klungvik.com/?p=513</guid>
		<description><![CDATA[In this post I will set up the basic settings to create an Alfresco Module Package (AMP). Ant needs to be installed to make this work. This creates a skeleton AMP module that does nothing except being a module. So the first step is to create a new project in your favorite IDE. In the [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I will set up the basic settings to create an Alfresco Module Package (AMP). <a href="http://ant.apache.org/">Ant</a> needs to be installed to make this work. This creates a skeleton AMP module that does nothing except being a module. So the first step is to create a new project in your favorite IDE.</p>
<p>In the <a href="http://wiki.alfresco.com/wiki/Alfresco_SDK">Alfresco SDK</a> there are some great examples, and one of them is named SDK Basic AMP. <a href="http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module#Structuring_your_Project">AMP&#8217;s have a specific directory structure that it&#8217;s wise to use</a>. When deploying AMP&#8217;s the Module Management Tool (mmt) maps the files to specific locations in the alfresco tree. This can be a bit <a href="http://klungvik.com/index.php/2009/alfresco-the-first-lessons-learned/">confusing when dealing with configuration files</a> and if the SDK samples have solved a problem in a specific way, it&#8217;s wise to just follow that road.</p>
<p>1. Create a module.properties file containing these lines:<br />
<code># Skeleton AMP Module<br />
module.id=skeleton<br />
module.title=Skeleton<br />
module.description=Add a skeleton amp to Alfresco<br />
module.version=1.0</code></p>
<p>This file contain module information and is to be located in the root of the amp. Usually the file is located in the IDE at config/alfresco/module/modulename/module.properties. <strong>(IDE)</strong> config/alfresco maps to <strong>alfresco_dir</strong>/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/.</p>
<p>2. Create a config/alfresco/module/skeleton/module.context file:<br />
<code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;<br />
&lt;!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'&gt;</p>
<p>&lt;beans&gt;<br />
&lt;/beans&gt;<br />
</code> </p>
<p>This is where one puts bean initializations, bootstrap resource bundles, adds webclient configuration files etc. when needed.</p>
<p>3. Place class files (if you have any) in source/java/my/namespace/*.java</p>
<p>4. Sample build.xml for ant:<br />
<code >&lt;?xml version="1.0"?&gt;</p>
<p>&lt;project name="Skeleton" default="deploy-war" basedir="."&gt;<br />
    &lt;!-- Project directories, REPLACE WITH YOUR SETTINGS --&gt;<br />
    &lt;property name="project.dir" value="."/&gt;<br />
    &lt;property name="build.dir" value="${project.dir}/build"/&gt;<br />
    &lt;property name="jar.file" value="${build.dir}/lib/skeleton.jar" /&gt;<br />
    &lt;property name="amp.file" value="${build.dir}/dist/skeleton.amp"/&gt;<br />
    &lt;property name="tomcat.dir" value="/opt/Alfresco/tomcat" /&gt;<br />
    &lt;property name="war.file" value="${tomcat.dir}/webapps/alfresco.war"/&gt;<br />
    &lt;property name="lib.dir" value="/opt/alfresco-sdk2.9/lib/server" /&gt;</p>
<p>    &lt;!-- Path to essential libraries --&gt;<br />
    &lt;path id="class.path"&gt;<br />
        &lt;dirset dir="${build.dir}" /&gt;<br />
        &lt;fileset dir="${lib.dir}" includes="**/*.jar"/&gt;<br />
    &lt;/path&gt;</p>
<p>    &lt;!-- Creates a build directory where the amp and jar files will be located --&gt;<br />
    &lt;target name="mkdirs"&gt;<br />
        &lt;mkdir dir="${build.dir}/dist" /&gt;<br />
        &lt;mkdir dir="${build.dir}/lib" /&gt;<br />
    &lt;/target&gt;</p>
<p>     &lt;target name="package-jar" depends="compile"&gt;<br />
        &lt;delete file="${jar.file}" /&gt;</p>
<p>	&lt;jar destfile="${jar.file}"&gt;<br />
		&lt;fileset dir="${build.dir}" includes="**/faces-config.xml, **/*.class" /&gt;<br />
	&lt;/jar&gt;<br />
     &lt;/target&gt;</p>
<p>    &lt;target name="package-amp" depends="mkdirs, package-jar" description="Packages the amp"&gt;<br />
         &lt;zip destfile="${amp.file}"&gt;<br />
             &lt;fileset dir="${project.dir}/build" includes="lib/*.jar" /&gt;<br />
             &lt;fileset dir="${project.dir}" includes="module.properties" /&gt;<br />
             &lt;fileset dir="${project.dir}" includes="config/**/*.*" /&gt;<br />
        &lt;/zip&gt;<br />
    &lt;/target&gt;</p>
<p>    &lt;!-- Use when checking what deployment of an AMP will do without actually committing the deployment --&gt;<br />
    &lt;target name="preview-install"&gt;<br />
        &lt;echo&gt;Preview installation of AMP&lt;/echo&gt;<br />
         &lt;java dir="." fork="true" classname="org.alfresco.repo.module.tool.ModuleManagementTool"&gt;<br />
            &lt;classpath refid="class.path" /&gt;<br />
            &lt;arg line="install ${amp.file} ${war.file} -preview -force -verbose"/&gt;<br />
        &lt;/java&gt;<br />
    &lt;/target&gt;</p>
<p>     &lt;!-- Deploys the war to Alfresco --&gt;<br />
     &lt;target name="deploy-war" depends="package-amp"&gt;<br />
         &lt;java dir="." fork="true" classname="org.alfresco.repo.module.tool.ModuleManagementTool"&gt;<br />
            &lt;classpath refid="class.path" /&gt;<br />
            &lt;arg line="install ${amp.file} ${war.file} -force -verbose"/&gt;<br />
        &lt;/java&gt;<br />
    &lt;/target&gt;</p>
<p>&lt;/project&gt;</code></p>
<p>An AMP file is a zipped archive, so if you would like to know the content of the amp then:<br />
<code>unzip skeleton.amp</code></p>
<p>To view the content of a jar file:<br />
<code>jar -tvf skeleton.jar</code></p>
<p><a href='http://klungvik.com/wp-content/uploads/2009/04/ampsample.tar.gz'>SDK Basic AMP example</a> &#8211; This is the basic AMP taken from the SDK. </p>
<p>Resources:<br />
<a href="http://wiki.alfresco.com/wiki/Developer_Guide#Alfresco_Module_Packages">Alfresco Module Packages</a><br />
<a href="http://wiki.alfresco.com/wiki/Alfresco_SDK">Alfresco SDK</a><br />
<a href="http://wiki.alfresco.com/wiki/Module_Management_Tool">http://wiki.alfresco.com/wiki/Module_Management_Tool</a></p>
]]></content:encoded>
			<wfw:commentRss>http://klungvik.com/index.php/2009/how-to-create-an-alfresco-module-package-amp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfresco: The first lessons learned</title>
		<link>http://klungvik.com/index.php/2009/alfresco-the-first-lessons-learned/</link>
		<comments>http://klungvik.com/index.php/2009/alfresco-the-first-lessons-learned/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 06:04:50 +0000</pubDate>
		<dc:creator>Helene Klungvik</dc:creator>
				<category><![CDATA[IT & Programming]]></category>
		<category><![CDATA[alfresco]]></category>

		<guid isPermaLink="false">http://klungvik.com/?p=521</guid>
		<description><![CDATA[The last couple of weeks I have learned some lessons the hard way. 1. When doing changes to faces-config(-custom).xml, put it in a jar-file. This is stated in Developing an Alfresco Module, but it&#8217;s very easy to forget because so many places one can read about extending Alfresco using faces-config-custom.xml. There are two options for [...]]]></description>
			<content:encoded><![CDATA[<p>The last couple of weeks I have learned some lessons the hard way. </p>
<p><strong>1. When doing changes to faces-config(-custom).xml, put it in a jar-file.</strong><br />
This is stated in <a href="http://wiki.alfresco.com/wiki/Developing_an_Alfresco_Module#Adding_a_custom_faces-config.xml">Developing an Alfresco Module</a>, but it&#8217;s very easy to forget because so many places one can read about <a href="http://wiki.alfresco.com/wiki/Packaging_And_Deploying_Extensions#JSF_configuration_files">extending Alfresco using faces-config-custom.xml</a>.</p>
<p>There are two options for making changes to faces-config:<br />
- Add a faces-config-custom.xml in the AMP.<br />
In an IDE it would typically ble places in web/WEB-INF/faces-config-custom.xml. When deploying the amp to Alfresco, it doesn&#8217;t overwrite the WEB-INF/faces-config-custom.xml on the server as one would expect, it&#8217;s as if the changes were never made. In reality Alfresco does some magic, and the changes are available in alfresco, but not in any extensions you have made. So if you try to create a managed bean and access it from within alfresco jsp-files, life is good. But in most cases, extending Alfresco is the best way to go and then the managed bean is suddenly not available. Therefore the next choice is the best way.</p>
<p>- Add faces-config.xml to the jar-file.<br />
Yes, no need for a faces-config-custom.xml here, and the declarations are available all over alfresco, including any third-party extensions. Inside the jar the file is located at META-INF/faces-config.xml. </p>
<p>Alfresco is simply a bit touchy when dealing with faces-config files.</p>
<p><strong>2. Use (unique) IDs on faces components no matter what</strong><br />
I came up in the situation that I had one jsp that only contained two lines:<br />
<code>&lt;%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %&gt;<br />
&lt;r:webScript  scriptUrl="/service/mwsearch" /&gt;</code></p>
<p>With just two lines to maintain, one would think it would be difficult to make mistakes&#8230; Wrong! It doesn&#8217;t matter that even the<a href="http://dev.alfresco.com/resource/docs/taglib/web-client/r/webScript.html"> taglib documentation state that id isn&#8217;t required</a>, because it&#8217;s simply not true. ID&#8217;s are required unless you want erratic behaviour &#8211; IllegalStateExceptions (like seen below) that occurs at random, but will definitly stop the show:</p>
<p>javax.faces.FacesException: java.lang.IllegalStateException: Client-id : _idJsp13 is duplicated in the faces tree. Component : browse:_idJsp13, path: {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /jsp/browse/browse.jsp][Class: javax.faces.component.html.HtmlForm,Id: browse][Class: org.alfresco.web.ui.common.component.UIPanel,Id: spaces-panel][Class: org.alfresco.web.ui.common.component.data.UIRichList,Id: spacesList][Class: org.alfresco.web.ui.common.component.data.UIColumn,Id: col1][Class: org.alfresco.web.ui.common.component.UIActionLink,Id: col1-act1][Class: javax.faces.component.UIParameter,Id: _idJsp13]}</p>
<p><strong>3. Any files in the AMP will override files in the Data Dictionary</strong><br />
I had a webscript where I needed to make an url configurable. Now, configurations can be added in a modulename.get.config.xml <a href="http://wiki.alfresco.com/wiki/Web_Scripts#Web_Script_Configuration">as stated in the documentation</a>. I removed the file from my AMP, and added the file in Alfresco DM &#8211;> Company Home &#8211;> Data Dictionary &#8211;> Web Scripts Extentions &#8211;> Modulefolder &#8211;> modulename.get.config.xml. And voila, my Freemarker templates caught on the config changes after a restart of Alfresco.</p>
<p>Hopefully this will have saved at least one person from hours of frustration.</p>
]]></content:encoded>
			<wfw:commentRss>http://klungvik.com/index.php/2009/alfresco-the-first-lessons-learned/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Developer options for extending Alfresco</title>
		<link>http://klungvik.com/index.php/2009/options-for-extending-alfresco/</link>
		<comments>http://klungvik.com/index.php/2009/options-for-extending-alfresco/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 12:39:24 +0000</pubDate>
		<dc:creator>Helene Klungvik</dc:creator>
				<category><![CDATA[IT & Programming]]></category>
		<category><![CDATA[alfresco]]></category>

		<guid isPermaLink="false">http://klungvik.com/?p=491</guid>
		<description><![CDATA[There are three ways of extending Alfresco: Put the code in the webapp folder (alfresco/tomcat/webapps/alfresco) Put the code in the alfresco repository Create an AMP file and add it to alfresco.war There are different benefits and drawbacks to each method: Put the code in the webapp folder It&#8217;s an easy way to quickly test the [...]]]></description>
			<content:encoded><![CDATA[<p>There are three ways of extending Alfresco:</p>
<ol>
<li>Put the code in the webapp folder (alfresco/tomcat/webapps/alfresco) </li>
<li>Put the code in the alfresco repository</li>
<li>Create an AMP file and add it to alfresco.war</li>
</ol>
<p>There are different benefits and drawbacks to each method:</p>
<p><strong>Put the code in the webapp folder</strong><br />
It&#8217;s an easy way to quickly test the changes one have made, but the moment the war-file is reloaded by tomcat, the added files and changes are lost. </p>
<p><strong>Put the code in the alfresco repository</strong><br />
When logging into Alfresco Explorer as Admin, one get access to the Data Dictionary space located within Company Home. The data dictionary contains code used by Alfresco users like email and Freemarker templates which notifies users of an invitation to a space, RSS feeds, searches, scripts, web scripts and space templates. The data dictionary space can be used to create our own custom actions on documents, spaces etc. </p>
<p>This option is an easy way for most users to create their own actions and test them out without restarting Alfresco, but can be a bit of a hassle when one need to change the script, upload it and test it out.  </p>
<p><strong>Create an AMP (Alfresco Module Package) file and add it to alfresco.war</strong><br />
This is the recommended way for creating modules in Alfresco. Creating a package makes the deployment of modules easy, but when tomcat notices the alfresco war-file has changed then Alfresco is reloaded and all users are kicked out of their session. The bad part is that it usually takes about a minute to reload alfresco on a development machine. One minute for every change&#8230; well, it does hurt sometimes.</p>
<p>Another thing that hurts.. when writing this there are no way of uninstalling an amp. The way of uninstalling a module is to revert to the alfresco.war file that was saved as backup before installing the amp. So, if one installs other modules afterwards, then one have to revert to the backup war-file, then install all the other modules again&#8230;. Ridiculous! AND &#8211; after removing a module from alfresco, one get a nice warning text in the log about Alfresco not being able to find the module. I really hope Alfresco will add uninstall functionality in the near future to its <a href="http://wiki.alfresco.com/wiki/Module_Management_Tool">Module Management Tool</a> that installs the amps.</p>
<p>The good/bad part (you decide) is that once the amp is deployed, alfresco has reloaded and installed the module, one can edit the deployed files and alfresco *should* (add some grain of salt here) recognize changes made without any restart/reload. But then suddenly we are back into option number one.</p>
]]></content:encoded>
			<wfw:commentRss>http://klungvik.com/index.php/2009/options-for-extending-alfresco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create new document type in Alfresco</title>
		<link>http://klungvik.com/index.php/2009/create-new-document-type-in-alfresco/</link>
		<comments>http://klungvik.com/index.php/2009/create-new-document-type-in-alfresco/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 09:05:04 +0000</pubDate>
		<dc:creator>Helene Klungvik</dc:creator>
				<category><![CDATA[IT & Programming]]></category>
		<category><![CDATA[alfresco]]></category>

		<guid isPermaLink="false">http://klungvik.com/?p=445</guid>
		<description><![CDATA[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. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.alfresco.com/">Alfresco</a> 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.</p>
<p>All documents that are uploaded or created in alfresco is by default marked as &#8220;content&#8221;, 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. </p>
<p><img class="aligncenter size-full wp-image-450" title="screenshot_003" src="http://klungvik.com/wp-content/uploads/2009/03/screenshot_003.png" alt="screenshot_003" width="854" height="548" /></p>
<p>So, down to the gritty details. First one have to define the document type (custom content model) (config/extension/model/whitepaper.xml):</p>
<pre><code >
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;!-- Definition of new Model --&gt;
&lt;model name="mb:mybusiness.whitepaper.model" xmlns="http://www.alfresco.org/model/dictionary/1.0"&gt;
    &lt;description&gt;My business Whitepaper&lt;/description&gt;
    &lt;author&gt;Helene Klungvik&lt;/author&gt;
    &lt;version&gt;1.0&lt;/version&gt;

    &lt;!--
		Imports are required to allow references to definitions in other
		models
	--&gt;
	&lt;imports&gt;
		&lt;!-- Import Alfresco System Definitions --&gt;
		&lt;import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/&gt;
		&lt;!-- Import Alfresco Dictionary Definitions --&gt;
		&lt;import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" /&gt;
		&lt;!-- Import Alfresco Content Domain Model Definitions --&gt;
		&lt;import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" /&gt;
	&lt;/imports&gt;

	&lt;namespaces&gt;
		&lt;namespace uri="mybusiness.whitepaper.model" prefix="mb" /&gt;
	&lt;/namespaces&gt;

    &lt;types&gt;
		&lt;type name="mb:doc"&gt;
			&lt;title&gt;Whitepaper&lt;/title&gt;
			&lt;parent&gt;cm:content&lt;/parent&gt;
		&lt;/type&gt;
   &lt;/types&gt;

&lt;/model&gt;
</code></pre>
<p>Then create a spring bean that imports the whitepaper model (config/alfresco/extension/module-context.xml):</p>
<pre><code >&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'&gt;
&lt;!--
    Document   : module-context.xml
    Created on : March 11, 2009, 10:00 AM
    Author     : Helene Klungvik
    Description:
        Define a new document type for whitepapers
--&gt;

&lt;beans&gt;
    &lt;bean id="mybusiness.dictionaryBootstrap"
        parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap"&gt;
        &lt;property name="models"&gt;
            &lt;list&gt;
                &lt;value&gt;alfresco/extension/model/rwhitepaper.xml&lt;/value&gt;
            &lt;/list&gt;
        &lt;/property&gt;
    &lt;/bean&gt;
&lt;/beans&gt;</code></pre>
<p>And that&#8217;s it. </p>
]]></content:encoded>
			<wfw:commentRss>http://klungvik.com/index.php/2009/create-new-document-type-in-alfresco/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
