org.xiruss.repository.client.importers
Class ImportHelper

java.lang.Object
  extended by org.xiruss.repository.client.importers.ImportHelper

public class ImportHelper
extends java.lang.Object

Provides methods that provide generic business logic for importing storage objects and directories into a XIRUSS repository.


Constructor Summary
ImportHelper()
           
 
Method Summary
static Version importCompoundDoc(Repository rep, java.io.File compoundDocumentRootFile, Branch branch, User user, java.lang.String docKey, java.lang.String docName)
          Import a compound document into the repository.
static Version importCompoundDoc(Repository rep, java.io.File compoundDocumentRootFile, Branch branch, User user, java.lang.String docKey, java.lang.String docName, SourceToVersionMap so2verMap)
          Import a compound document into the repository, using a storage-object-to-version map to correlate new storage objects to existing previous versions.
static Version importCompoundDoc(Repository rep, java.io.File compoundDocumentRootFile, Branch branch, User user, java.lang.String docKey, java.lang.String docName, SourceToVersionMap so2verMap, Importer importer)
          Import a compound document into the repository, using a storage-object-to-version map to correlate new storage objects to existing previous versions.
static Version importCompoundDoc(Repository rep, java.net.URL dirUrl, Branch branch, User user, java.lang.String docKey, java.lang.String docName)
          Imports a compound document that is an HTTP-accessible directory (i.e., some part of a Web site).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportHelper

public ImportHelper()
Method Detail

importCompoundDoc

public static Version importCompoundDoc(Repository rep,
                                        java.io.File compoundDocumentRootFile,
                                        Branch branch,
                                        User user,
                                        java.lang.String docKey,
                                        java.lang.String docName)
                                 throws ImporterException,
                                        VersionCommitException,
                                        NoSuchPolicyTypeException,
                                        NoSuchDependencyTypeException,
                                        RepositoryException,
                                        VersionMutationException
Import a compound document into the repository.

Parameters:
cd1File - The file to import. Currently expected to be an XML document.
br - The branch to import to.
user - The user who is doing the import.
rootKey - The string key for the compound document root.
so2verMap - Map of storage objects to be imported to existing versions to be set as previous versions of the newly-created versions. Does not need to account for all files to be imported can list storage objects that are not to be imported.
Returns:
The version object that is the imported compound document root.
Throws:
ImporterException
VersionCommitException
NoSuchPolicyTypeException
NoSuchDependencyTypeException
RepositoryException
VersionMutationException

importCompoundDoc

public static Version importCompoundDoc(Repository rep,
                                        java.io.File compoundDocumentRootFile,
                                        Branch branch,
                                        User user,
                                        java.lang.String docKey,
                                        java.lang.String docName,
                                        SourceToVersionMap so2verMap)
                                 throws ImporterException,
                                        NoSuchPolicyTypeException,
                                        NoSuchDependencyTypeException,
                                        RepositoryException,
                                        VersionMutationException,
                                        VersionCommitException
Import a compound document into the repository, using a storage-object-to-version map to correlate new storage objects to existing previous versions.

Parameters:
cdRootFile - The compound document root to be imported. May be a file with no dependencies to other files (that is, a compound document of exactly one member).
br - The branch to import to.
user - The user who is doing the import.
rootKey - The string key for the compound document root.
so2verMap - Map of storage objects to be imported to existing versions to be set as previous versions of the newly-created versions. Does not need to account for all files to be imported can list storage objects that are not to be imported.
Returns:
The version object that is the imported compound document root.
Throws:
ImporterException
NoSuchPolicyTypeException
NoSuchDependencyTypeException
RepositoryException
VersionMutationException
VersionCommitException

importCompoundDoc

public static Version importCompoundDoc(Repository rep,
                                        java.io.File compoundDocumentRootFile,
                                        Branch branch,
                                        User user,
                                        java.lang.String docKey,
                                        java.lang.String docName,
                                        SourceToVersionMap so2verMap,
                                        Importer importer)
                                 throws ImporterException,
                                        NoSuchPolicyTypeException,
                                        NoSuchDependencyTypeException,
                                        RepositoryException,
                                        VersionMutationException,
                                        VersionCommitException
Import a compound document into the repository, using a storage-object-to-version map to correlate new storage objects to existing previous versions.

Parameters:
cdRootFile - The compound document root to be imported. May be a file with no dependencies to other files (that is, a compound document of exactly one member).
br - The branch to import to.
user - The user who is doing the import.
rootKey - The string key for the compound document root.
so2verMap - Map of storage objects to be imported to existing versions to be set as previous versions of the newly-created versions. Does not need to account for all files to be imported can list storage objects that are not to be imported.
importer - The importer implementation to use
Returns:
The version object that is the imported compound document root.
Throws:
ImporterException
NoSuchPolicyTypeException
NoSuchDependencyTypeException
RepositoryException
VersionMutationException
VersionCommitException

importCompoundDoc

public static Version importCompoundDoc(Repository rep,
                                        java.net.URL dirUrl,
                                        Branch branch,
                                        User user,
                                        java.lang.String docKey,
                                        java.lang.String docName)
                                 throws VersionMutationException,
                                        RepositoryException,
                                        ImporterException,
                                        VersionCommitException,
                                        NoSuchPolicyTypeException,
                                        NoSuchDependencyTypeException
Imports a compound document that is an HTTP-accessible directory (i.e., some part of a Web site).

Parameters:
dirUrl -
br -
user -
docKey -
docName -
Throws:
VersionMutationException
RepositoryException
ImporterException
VersionCommitException
NoSuchPolicyTypeException
NoSuchDependencyTypeException