AnsweredAssumed Answered

Import space with module

Question asked by major_king on Apr 10, 2008
Latest reply on Apr 28, 2008 by major_king
Hello everybody,

now i've spend a lot of time to import/create a new space during the insatlling-process of a custom module, but now all my ideas are gone. I studied the "Basic Sample AMP" from the SDK and the RecordsMananagement-AMP. The Module will be installed and started successful. But when i look into the web client, there is no new space :(
Perhaps anybody can post a little example or find the error in my files:

module-context.xml
<beans>
   
    <import resource="classpath:alfresco/module/repocon/context/service-context.xml" />
    <import resource="classpath:alfresco/module/repocon/context/bootstrap-context.xml" />
   
    <bean id="org_alfresco_module_repocon_configbootstrap" class="org.alfresco.web.config.WebClientConfigBootstrap" init-method="init">
       <property name="configs">
          <value>classpath:alfresc/module/repocon/ui/web-client-config.xml</value>
       </property>
    </bean>
   
</beans>

bootstrap-context.xml
<beans>

   <!– Registration of new models –>
   <!– <bean id="repocon.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
      <property name="models">
         <list>
            <value>alfresco/module/repocon/model/repoconModel.xml</value>
         </list>
      </property>
   </bean>  –>

   <!– Bootstrap –>
   <bean id="repocon.bootstrapSpaces" class="org.alfresco.repo.module.ImporterModuleComponent" parent="module.baseComponent">
      <property name="moduleId" value="repocon" />
      <property name="name" value="repocon.bootstrapSpaces" />
      <property name="description" value="Initial data requirements" />
      <property name="sinceVersion" value="1.0" />
      <property name="appliesFromVersion" value="1.0" />
      <!– Data properties –>
      <property name="importer" ref="spacesBootstrap"/>
      <property name="bootstrapViews">
         <list>
            <props>
               <prop key="path">/${spaces.company_home.childname}</prop>
               <prop key="location">alfresco/module/repocon/bootstrap/repocon_space.xml</prop>
            </props>
         </list>
      </property>
   </bean>

</beans>

repocon_space.xml
<?xml version="1.0" encoding="UTF-8"?>
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
  <view:metadata>
    <view:exportBy>admin</view:exportBy>
    <view:exportDate>2008-04-10T13:58:09.440+02:00</view:exportDate>
    <view:exporterVersion>2.9.0 (C_dev 813)</view:exporterVersion>
    <view:exportOf>/app:company_home/cm:Repositpry_x0020_Connector</view:exportOf>
  </view:metadata>
  <cm:folder xmlns="" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:rc="http://www.alfresco.org/model/repocon/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:emailserver="http://www.alfresco.org/model/emailserver/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:ia="com.infoaxon.alfresco.calendar" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:wcm="http://www.alfresco.org/model/wcmmodel/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:custom="custom.model" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:module="http://www.alfresco.org/system/modules/1.0" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:blg="http://www.alfresco.org/model/blogintegration/1.0" xmlns:alf="http://www.alfresco.org" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:bpm="http://www.alfresco.org/model/bpm/1.0" xmlns:wca="http://www.alfresco.org/model/wcmappmodel/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:reg="http://www.alfresco.org/system/registry/1.0" xmlns:wcmwf="http://www.alfresco.org/model/wcmworkflow/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:wf="http://www.alfresco.org/model/workflow/1.0" view:childName="cm:alfrescoAmp">
    <view:aspects>
      <sys:referenceable></sys:referenceable>
      <cm:auditable></cm:auditable>
      <app:uifacets></app:uifacets>
    </view:aspects>
    <view:properties>
      <app:icon>space-icon-default</app:icon>
      <cm:name>alfrescoAmp</cm:name>
      <sys:node-dbid>459</sys:node-dbid>
      <sys:store-identifier>SpacesStore</sys:store-identifier>
      <cm:title></cm:title>
      <sys:node-uuid>4a1c5e26-06f5-11dd-bcd6-89760061912f</sys:node-uuid>
      <cm:modified>2008-04-10T13:57:27.158+02:00</cm:modified>
      <cm:created>2008-04-10T13:57:27.143+02:00</cm:created>
      <sys:store-protocol>workspace</sys:store-protocol>
      <cm:creator>admin</cm:creator>
      <cm:description></cm:description>
      <cm:modifier>admin</cm:modifier>
    </view:properties>
  </cm:folder>
  <cm:folder xmlns="" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:rc="http://www.alfresco.org/model/repocon/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:emailserver="http://www.alfresco.org/model/emailserver/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:ia="com.infoaxon.alfresco.calendar" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:wcm="http://www.alfresco.org/model/wcmmodel/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:custom="custom.model" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:module="http://www.alfresco.org/system/modules/1.0" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:blg="http://www.alfresco.org/model/blogintegration/1.0" xmlns:alf="http://www.alfresco.org" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:bpm="http://www.alfresco.org/model/bpm/1.0" xmlns:wca="http://www.alfresco.org/model/wcmappmodel/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:reg="http://www.alfresco.org/system/registry/1.0" xmlns:wcmwf="http://www.alfresco.org/model/wcmworkflow/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:wf="http://www.alfresco.org/model/workflow/1.0" view:childName="cm:salernoTmp">
    <view:aspects>
      <sys:referenceable></sys:referenceable>
      <cm:auditable></cm:auditable>
      <app:uifacets></app:uifacets>
    </view:aspects>
    <view:properties>
      <app:icon>space-icon-default</app:icon>
      <cm:name>salernoTmp</cm:name>
      <sys:node-dbid>460</sys:node-dbid>
      <sys:store-identifier>SpacesStore</sys:store-identifier>
      <cm:title></cm:title>
      <sys:node-uuid>51188ba9-06f5-11dd-bcd6-89760061912f</sys:node-uuid>
      <cm:modified>2008-04-10T13:57:38.877+02:00</cm:modified>
      <cm:created>2008-04-10T13:57:38.861+02:00</cm:created>
      <sys:store-protocol>workspace</sys:store-protocol>
      <cm:creator>admin</cm:creator>
      <cm:description></cm:description>
      <cm:modifier>admin</cm:modifier>
    </view:properties>
  </cm:folder>
</view:view>

Thank's a lot for helping.

Best Regards,
Christian

Outcomes