org.xiruss.repository.client.importers
Class ImporterBase

java.lang.Object
  extended by org.xiruss.repository.client.importers.ImporterBase
All Implemented Interfaces:
Importer

public class ImporterBase
extends java.lang.Object
implements Importer

Superclass for Xiruss-T importer implementations.


Field Summary
static java.lang.String DEFAULT_RESOLUTION_POLICY_TYPE
           
(package private) static org.apache.log4j.Logger logger
           
 
Constructor Summary
ImporterBase()
           
 
Method Summary
protected  void constructCompoundDocumentBos(java.lang.String docKey, java.lang.String docName, java.io.File startingDoc, BoundedObjectSet bos, SourceToVersionMap so2verMap)
          Construct a new bounded object set.
 void createBosOnSnapshot(BoundedObjectSet bos, Branch branch, MutableSnapshot snapshot)
          Given a fully-populated bounded object set, create a new snapshot with versions for each BOS member.
 Version doCompoundDocumentImport(java.io.File compoundDocRoot, Branch branch, MutableSnapshot snapshot, User user, java.lang.String cdMemberKey, java.lang.String cdMemberName, SourceToVersionMap so2verMap)
          Process in the input document to calculate its BOS, then create resources and initial versions for each BOS member.
 Version doCompoundDocumentImport(java.net.URL rootSoUrl, Branch branch, User user, java.lang.String docKey, java.lang.String docName, java.lang.Object object)
          Imports a compound document rooted at a URL-accessible location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RESOLUTION_POLICY_TYPE

public static java.lang.String DEFAULT_RESOLUTION_POLICY_TYPE

logger

static org.apache.log4j.Logger logger
Constructor Detail

ImporterBase

public ImporterBase()
Method Detail

doCompoundDocumentImport

public Version doCompoundDocumentImport(java.io.File compoundDocRoot,
                                        Branch branch,
                                        MutableSnapshot snapshot,
                                        User user,
                                        java.lang.String cdMemberKey,
                                        java.lang.String cdMemberName,
                                        SourceToVersionMap so2verMap)
                                 throws ImporterException,
                                        VersionCommitException,
                                        NoSuchPolicyTypeException,
                                        NoSuchDependencyTypeException,
                                        RepositoryException,
                                        VersionMutationException
Process in the input document to calculate its BOS, then create resources and initial versions for each BOS member. For each member, establish a dependency relationship from it to its child members.

Specified by:
doCompoundDocumentImport in interface Importer
Parameters:
compoundDocRoot - The file system file that is the root of a compound document to be imported.
branch - The SnapCM branch the compound document is to be imported onto.
user - The user who is performing the import. Will be set as the owner and creator of the all the newly-created resources, versions, and storage objects.
cdName - The name to use in the repository for the compound document.
Returns:
The version created as the root of the compound document.
Throws:
ImporterException
VersionCommitException
NoSuchPolicyTypeException
NoSuchDependencyTypeException
RepositoryException
VersionMutationException

createBosOnSnapshot

public void createBosOnSnapshot(BoundedObjectSet bos,
                                Branch branch,
                                MutableSnapshot snapshot)
                         throws NoSuchPolicyTypeException,
                                NoSuchDependencyTypeException,
                                RepositoryException,
                                VersionMutationException,
                                DomException,
                                java.io.IOException,
                                ImporterException,
                                SnapCMException
Given a fully-populated bounded object set, create a new snapshot with versions for each BOS member. Then create dependency relationships among the BOS members reflecting the BOS tree.

Specified by:
createBosOnSnapshot in interface Importer
Parameters:
bos - Bounded object set
branch - The branch to create the new snapshot on.
Throws:
VersionException
SnapshotException
NoSuchPolicyTypeException
NoSuchDependencyTypeException
RepositoryException
VersionMutationException
DomException
java.io.IOException
ImporterException
SnapCMException

constructCompoundDocumentBos

protected void constructCompoundDocumentBos(java.lang.String docKey,
                                            java.lang.String docName,
                                            java.io.File startingDoc,
                                            BoundedObjectSet bos,
                                            SourceToVersionMap so2verMap)
                                     throws ImporterException,
                                            BosException,
                                            BosCycleException
Construct a new bounded object set. This form is only called for the initial construction. All recursive calls use the other form, where a parent member is specified.

Parameters:
docKey -
startingDoc -
bos -
fsm -
Throws:
ImporterException
BosException
BosCycleException

doCompoundDocumentImport

public Version doCompoundDocumentImport(java.net.URL rootSoUrl,
                                        Branch branch,
                                        User user,
                                        java.lang.String docKey,
                                        java.lang.String docName,
                                        java.lang.Object object)
Description copied from interface: Importer
Imports a compound document rooted at a URL-accessible location.

Specified by:
doCompoundDocumentImport in interface Importer
Returns: