mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Full Repository Export / Import Support - first checkpoint
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2591 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -171,14 +171,26 @@ public interface Exporter
|
||||
public void startValueCollection(NodeRef nodeRef, QName property);
|
||||
|
||||
/**
|
||||
* Export single valued property
|
||||
* Export property value
|
||||
*
|
||||
* @param nodeRef the node reference
|
||||
* @param property the property name
|
||||
* @param value the value
|
||||
* @param index value index (or -1, if not part of multi-valued collection)
|
||||
*/
|
||||
public void value(NodeRef nodeRef, QName property, Object value);
|
||||
public void value(NodeRef nodeRef, QName property, Object value, int index);
|
||||
|
||||
/**
|
||||
* Export content stream property value
|
||||
*
|
||||
* @param nodeRef the node reference
|
||||
* @param property the property name
|
||||
* @param content the content stream
|
||||
* @param contentData content descriptor
|
||||
* @param index value index (or -1, if not part of multi-valued collection)
|
||||
*/
|
||||
public void content(NodeRef nodeRef, QName property, InputStream content, ContentData contentData, int index);
|
||||
|
||||
/**
|
||||
* Export end of value collection
|
||||
*
|
||||
@@ -187,16 +199,6 @@ public interface Exporter
|
||||
*/
|
||||
public void endValueCollection(NodeRef nodeRef, QName property);
|
||||
|
||||
/**
|
||||
* Export content stream property
|
||||
*
|
||||
* @param nodeRef the node reference
|
||||
* @param property the property name
|
||||
* @param content the content stream
|
||||
* @param contentData content descriptor
|
||||
*/
|
||||
public void content(NodeRef nodeRef, QName property, InputStream content, ContentData contentData);
|
||||
|
||||
/**
|
||||
* Start export of associations
|
||||
*
|
||||
|
@@ -16,6 +16,8 @@
|
||||
*/
|
||||
package org.alfresco.service.cmr.view;
|
||||
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
|
||||
/**
|
||||
* Encapsulation of Import binding parameters
|
||||
@@ -30,7 +32,7 @@ public interface ImporterBinding
|
||||
*/
|
||||
public enum UUID_BINDING
|
||||
{
|
||||
CREATE_NEW, REMOVE_EXISTING, REPLACE_EXISTING, UPDATE_EXISTING, THROW_ON_COLLISION
|
||||
CREATE_NEW, CREATE_NEW_WITH_UUID, REMOVE_EXISTING, REPLACE_EXISTING, UPDATE_EXISTING, THROW_ON_COLLISION
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -56,4 +58,11 @@ public interface ImporterBinding
|
||||
*/
|
||||
public String getValue(String key);
|
||||
|
||||
/**
|
||||
* Gets the list of content model classes to exclude from import
|
||||
*
|
||||
* @return list of model class qnames to exclude (return null to indicate use of default list)
|
||||
*/
|
||||
public QName[] getExcludedClasses();
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* 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.service.cmr.view;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
|
||||
|
||||
/**
|
||||
* Repository Export Service
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public interface RepositoryExporterService
|
||||
{
|
||||
|
||||
/**
|
||||
* Export complete Repository.
|
||||
*
|
||||
* Each store is exported to its own temporary .acp file
|
||||
*
|
||||
* @param packageName package name prefix for export .acp files
|
||||
* @return list of temporary export files
|
||||
*/
|
||||
public FileExportHandle[] export(String packageName);
|
||||
|
||||
/**
|
||||
* Export complete Repository.
|
||||
*
|
||||
* Each store is exported to a file held in the Repository.
|
||||
*
|
||||
* @param repositoryDestination location within Repository to hold .acp files
|
||||
* @param packageName package name prefix for export .acp files
|
||||
* @return list of repository held export files
|
||||
*/
|
||||
public RepositoryExportHandle[] export(NodeRef repositoryDestination, String packageName);
|
||||
|
||||
/**
|
||||
* Export complete Repository.
|
||||
*
|
||||
* @param directoryDestination location within File System to hold .acp files
|
||||
* @param packageName package name prefix for export .acp files
|
||||
* @return list of export files
|
||||
*/
|
||||
public FileExportHandle[] export(File directoryDestination, String packageName);
|
||||
|
||||
|
||||
/**
|
||||
* General Export Handle
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public class ExportHandle
|
||||
{
|
||||
public StoreRef storeRef;
|
||||
public String packageName;
|
||||
}
|
||||
|
||||
/**
|
||||
* File Exort Handle
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public class FileExportHandle extends ExportHandle
|
||||
{
|
||||
public File exportFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Repository File Export Handle
|
||||
*
|
||||
* @author davidc
|
||||
*/
|
||||
public class RepositoryExportHandle extends ExportHandle
|
||||
{
|
||||
public NodeRef exportFile;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user