org.objectweb.dsrg.sofa.repository
Class RepositoryCloner

java.lang.Object
  extended by org.objectweb.dsrg.sofa.repository.RepositoryCloner

public class RepositoryCloner
extends java.lang.Object

Class used for cloning repository.


Constructor Summary
RepositoryCloner(java.lang.String url)
          Initialize cloner with source repository configuration loaded from default and destination repository cloner loaded from url.
 
Method Summary
 void clone(java.lang.String uris, boolean seekDeps, boolean dryRun)
          Clones source repository into destination repository.
 void cloneEntity(java.lang.String name, java.lang.String oldVersion, java.lang.String newVersion)
          Creates a copy of VersionedEntity in source repository with specified new version.
static void main(java.lang.String[] args)
          Standard entry point of cloner.
 void mergeEntity(java.lang.String name, java.lang.String version)
          Merges specified VersionedEntity back to the source repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryCloner

public RepositoryCloner(java.lang.String url)
                 throws java.io.IOException
Initialize cloner with source repository configuration loaded from default and destination repository cloner loaded from url.

Parameters:
url - Destination repository configuration file.
Throws:
java.io.IOException
Method Detail

main

public static void main(java.lang.String[] args)
Standard entry point of cloner.

Parameters:
args - Three arguments must be on input. Otherwise info si printed to error log.

mergeEntity

public void mergeEntity(java.lang.String name,
                        java.lang.String version)
                 throws RepositoryClonerException
Merges specified VersionedEntity back to the source repository.

Parameters:
name - Name of VersionedEntity
version - String representation of Version of VersionedEntity
Throws:
RepositoryClonerException

cloneEntity

public void cloneEntity(java.lang.String name,
                        java.lang.String oldVersion,
                        java.lang.String newVersion)
                 throws RepositoryClonerException
Creates a copy of VersionedEntity in source repository with specified new version.

Parameters:
name - Name of VersionedEntity
oldVersion - Version of VersionedEntity in source repository
newVersion - Version of copy of VersionedEntity in destination repository
Throws:
RepositoryClonerException

clone

public void clone(java.lang.String uris,
                  boolean seekDeps,
                  boolean dryRun)
           throws RepositoryClonerException
Clones source repository into destination repository. Parts can be specified by uris with wildcards "*" like packages in Java.

Parameters:
uris - VersionedEntities with name and version suiting to these URIs are cloned
seekDeps - Seek dependencies hierarchically?
dryRun - Don't clone anything, only print, what should be cloned.
Throws:
RepositoryClonerException