AnsweredAssumed Answered

Extending Alfresco with AMP

Question asked by christian_wenz on Aug 31, 2012
Latest reply on Apr 8, 2013 by fliot
Hi to everybody,

I try to extend my repository with an AMP. So I created a new project with maven using the archetype "maven-alfresco-extension-archetype". In the first step I added a new model and some entries in the "share-config-custom.xml" in order to display the new types of the model. I put the new files (model and config) in "<modulId>\src\main\config\model" and "<modulId>\src\main\config\ui". After that I edited the "bootstrap-context.xml" and added these lines:

  <bean id="ppi.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
    <property name="models">
      <list>
          <value>alfresco/module/myalfresco2/model/ppiModel.xml</value>
      </list>
    </property>      
  </bean>

  <bean id="ppi.ConfigBootstrap" class="org.alfresco.web.config.WebClientConfigBootstrap" init-method="init">
    <property name="configs">
      <list>
        <value>classpath:alfresco/module/myalfresco2/ui/share-config-custom.xml</value>
      </list>
    </property>
  </bean>

Accordingly I added an import-statement in the module-context.xml file. After creating the amp file without errors I applied this to the alfresco war file. Looking in the log file I found the message: Installed module found in distribution: myalfresco2
So everything seems to be ok. But unfortunately I could not change the type of any document to my new type. I could not see the new aspects. In the db could not find the new namespace. So I assume that I made something wrong. Before I tested the model and the share-config-custom.xml by putting them to the shared-folder in the tomcat dir. Could anybody help me with that problem?

Outcomes