mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4150 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4151 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4155 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4157 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4188 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4190 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4201 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4204 . Included: Complete moving around of Records Management code and config: 4151, 4156, 4157, 4189, 4190 1.3RC2 upgrade path support: 4204 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4205 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,6 +25,7 @@ import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Properties;
|
||||
@@ -82,6 +83,7 @@ public class ImporterBootstrap extends AbstractLifecycleBean
|
||||
private NodeService nodeService;
|
||||
private ImporterService importerService;
|
||||
private List<Properties> bootstrapViews;
|
||||
private List<Properties> extensionBootstrapViews;
|
||||
private StoreRef storeRef = null;
|
||||
private List<String> mustNotExistStoreUrls = null;
|
||||
private Properties configuration = null;
|
||||
@@ -175,6 +177,20 @@ public class ImporterBootstrap extends AbstractLifecycleBean
|
||||
this.bootstrapViews = bootstrapViews;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the bootstrap views
|
||||
*
|
||||
* @param bootstrapViews
|
||||
*/
|
||||
public void addBootstrapViews(List<Properties> bootstrapViews)
|
||||
{
|
||||
if (this.extensionBootstrapViews == null)
|
||||
{
|
||||
this.extensionBootstrapViews = new ArrayList<Properties>();
|
||||
}
|
||||
this.extensionBootstrapViews.addAll(bootstrapViews);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Store Ref to bootstrap into
|
||||
*
|
||||
@@ -347,6 +363,12 @@ public class ImporterBootstrap extends AbstractLifecycleBean
|
||||
// bootstrap the store contents
|
||||
if (bootstrapViews != null)
|
||||
{
|
||||
// add-in any extended views
|
||||
if (extensionBootstrapViews != null)
|
||||
{
|
||||
bootstrapViews.addAll(extensionBootstrapViews);
|
||||
}
|
||||
|
||||
for (Properties bootstrapView : bootstrapViews)
|
||||
{
|
||||
String view = bootstrapView.getProperty(VIEW_LOCATION_VIEW);
|
||||
|
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2005 Alfresco, Inc.
|
||||
*
|
||||
* Licensed under the Mozilla Public License version 1.1
|
||||
* with a permitted attribution clause. You may obtain a
|
||||
* copy of the License at
|
||||
*
|
||||
* http://www.alfresco.org/legal/license.txt
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
* either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the
|
||||
* License.
|
||||
*/
|
||||
package org.alfresco.repo.importer;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
/**
|
||||
* Collection of views to import
|
||||
*
|
||||
* @author David Caruana
|
||||
*/
|
||||
public class ImporterBootstrapViews implements InitializingBean
|
||||
{
|
||||
// Dependencies
|
||||
private ImporterBootstrap importer;
|
||||
private List<Properties> bootstrapViews;
|
||||
|
||||
|
||||
/**
|
||||
* Sets the importer
|
||||
*
|
||||
* @param importer
|
||||
*/
|
||||
public void setImporter(ImporterBootstrap importer)
|
||||
{
|
||||
this.importer = importer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the bootstrap views
|
||||
*
|
||||
* @param bootstrapViews
|
||||
*/
|
||||
public void setBootstrapViews(List<Properties> bootstrapViews)
|
||||
{
|
||||
this.bootstrapViews = bootstrapViews;
|
||||
}
|
||||
|
||||
|
||||
public void afterPropertiesSet() throws Exception
|
||||
{
|
||||
importer.addBootstrapViews(bootstrapViews);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user