Search in sources :

Example 1 with ImporterBootstrap

use of org.alfresco.repo.importer.ImporterBootstrap in project acs-community-packaging by Alfresco.

the class Application method getRSSTemplatesFolderName.

/**
 * Returns the RSS Templates folder name
 *
 * @param context The spring context
 * @return The RSS folder name
 */
private static String getRSSTemplatesFolderName(WebApplicationContext context) {
    if (rssTemplatesFolderName == null) {
        ImporterBootstrap bootstrap = (ImporterBootstrap) context.getBean(BEAN_IMPORTER_BOOTSTRAP);
        Properties configuration = bootstrap.getConfiguration();
        rssTemplatesFolderName = configuration.getProperty("spaces.templates.rss.childname");
    }
    return rssTemplatesFolderName;
}
Also used : Properties(java.util.Properties) ImporterBootstrap(org.alfresco.repo.importer.ImporterBootstrap)

Example 2 with ImporterBootstrap

use of org.alfresco.repo.importer.ImporterBootstrap in project acs-community-packaging by Alfresco.

the class Application method getSavedSearchesFolderName.

/**
 * Returns the Saved Searches folder name
 *
 * @param context The spring context
 * @return The saved searches folder name
 */
private static String getSavedSearchesFolderName(WebApplicationContext context) {
    if (savedSearchesFolderName == null) {
        ImporterBootstrap bootstrap = (ImporterBootstrap) context.getBean(BEAN_IMPORTER_BOOTSTRAP);
        Properties configuration = bootstrap.getConfiguration();
        savedSearchesFolderName = configuration.getProperty("spaces.savedsearches.childname");
    }
    return savedSearchesFolderName;
}
Also used : Properties(java.util.Properties) ImporterBootstrap(org.alfresco.repo.importer.ImporterBootstrap)

Example 3 with ImporterBootstrap

use of org.alfresco.repo.importer.ImporterBootstrap in project acs-community-packaging by Alfresco.

the class Application method getSpaceTemplatesFolderName.

/**
 * Returns the Space Templates folder name
 *
 * @param context The spring context
 * @return The templates folder name
 */
private static String getSpaceTemplatesFolderName(WebApplicationContext context) {
    if (spaceTemplatesFolderName == null) {
        ImporterBootstrap bootstrap = (ImporterBootstrap) context.getBean(BEAN_IMPORTER_BOOTSTRAP);
        Properties configuration = bootstrap.getConfiguration();
        spaceTemplatesFolderName = configuration.getProperty("spaces.templates.childname");
    }
    return spaceTemplatesFolderName;
}
Also used : Properties(java.util.Properties) ImporterBootstrap(org.alfresco.repo.importer.ImporterBootstrap)

Example 4 with ImporterBootstrap

use of org.alfresco.repo.importer.ImporterBootstrap in project alfresco-repository by Alfresco.

the class MultiTAdminServiceImpl method importBootstrapUserTenantStore.

private void importBootstrapUserTenantStore(String tenantDomain, File directorySource) {
    // Import Bootstrap (restore) Tenant-Specific User Store
    Properties bootstrapView = new Properties();
    bootstrapView.put("path", "/");
    bootstrapView.put("location", directorySource.getPath() + "/" + tenantDomain + "_users.acp");
    List<Properties> bootstrapViews = new ArrayList<Properties>(1);
    bootstrapViews.add(bootstrapView);
    ImporterBootstrap userImporterBootstrap = (ImporterBootstrap) ctx.getBean("userBootstrap");
    userImporterBootstrap.setBootstrapViews(bootstrapViews);
    bootstrapUserTenantStore(userImporterBootstrap, tenantDomain, null);
}
Also used : ArrayList(java.util.ArrayList) Properties(java.util.Properties) ImporterBootstrap(org.alfresco.repo.importer.ImporterBootstrap)

Example 5 with ImporterBootstrap

use of org.alfresco.repo.importer.ImporterBootstrap in project alfresco-repository by Alfresco.

the class MultiTAdminServiceImpl method importBootstrapSpacesTenantStore.

private void importBootstrapSpacesTenantStore(String tenantDomain, File directorySource) {
    // Import Bootstrap (restore) Tenant-Specific Spaces Store
    Properties bootstrapView = new Properties();
    bootstrapView.put("path", "/");
    bootstrapView.put("location", directorySource.getPath() + "/" + tenantDomain + "_spaces.acp");
    bootstrapView.put("uuidBinding", "UPDATE_EXISTING");
    List<Properties> bootstrapViews = new ArrayList<Properties>(1);
    bootstrapViews.add(bootstrapView);
    ImporterBootstrap spacesImporterBootstrap = (ImporterBootstrap) ctx.getBean("spacesBootstrap");
    spacesImporterBootstrap.setBootstrapViews(bootstrapViews);
    spacesImporterBootstrap.setUseExistingStore(true);
    bootstrapSpacesTenantStore(spacesImporterBootstrap, tenantDomain);
}
Also used : ArrayList(java.util.ArrayList) Properties(java.util.Properties) ImporterBootstrap(org.alfresco.repo.importer.ImporterBootstrap)

Aggregations

ImporterBootstrap (org.alfresco.repo.importer.ImporterBootstrap)20 Properties (java.util.Properties)18 ArrayList (java.util.ArrayList)7 AlfrescoRuntimeException (org.alfresco.error.AlfrescoRuntimeException)2 SQLException (java.sql.SQLException)1 RetryingTransactionCallback (org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback)1 WorkflowDeployer (org.alfresco.repo.workflow.WorkflowDeployer)1 SiteInfo (org.alfresco.service.cmr.site.SiteInfo)1 Descriptor (org.alfresco.service.descriptor.Descriptor)1