You are here

Import strategy

There are several import strategies that can be used to import module data.

If you know the UUID(s) of the spaces/files you are importing, you can choose from a number of import strategies.

If you are using XML, you will have to manually add a sys:node-uuid tag to that node. (Generated ACP files automatically contain the UUIDs.)



You can add the following: CREATE_NEW, CREATE_NEW_WITH_UUID, REMOVE_EXISTING, REPLACE_EXISTING, UPDATE_EXISTING, THROW_ON_COLLISION (org.alfresco.service.cmr.view.ImporterBinding.UUID_BINDING). This can be added globally for entire bean, or per bootstrap view.

Global for the entire bean:

    <bean id="myModule.bootstrap" 
      <property name="uuidBinding">

Per BootstrapView:

      <property name="bootstrapViews">
            <prop key="uuidBinding">UPDATE_EXISTING</prop>
            <prop key="path">/${spaces.company_home.childname}/${spaces.dictionary.childname}</prop>
            <prop key="location">alfresco/module/yourmodule/bootstrap/myimport.acp</prop>

Space Names Reference

The following are the substitution tokens that can be used for bootstrapping purposes. These tokens can be redefined in the configuration files if needed. workspace://SpacesStore
spaces.company_home.childname Company Home
spaces.guest_home.childname Guest Home
spaces.dictionary.childname Data Dictionary
spaces.templates.childname Space Templates
spaces.templates.content.childname Content Templates Email Templates
spaces.templates.rss.childname RSS Templates
spaces.savedsearches.childname Saved Searches
spaces.scripts.childname Scripts
spaces.wcm.childname WCM
spaces.wcm_content_forms.childname Web Forms
spaces.content_forms.childname Web Forms
spaces.user_homes.childname User Homes