|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.4.0) E10663-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.rules.tools.migrator.MigrateRuleRepository
public class MigrateRuleRepository
Migrate an SDK1 format repository to a SDK2 format repository.
The conversion process relies on the use of Map (from which SDK1 classes are descended) to retrieve the instance data for a SDK1 class instance. Migration, with some special exceptions, copies the key - value pairs from the SDK1 object to an SDK2 object.
P Code to desribe conversion
//create a Migrateer instance
RepositoryMigrateer conv = new MigrateRuleRepository();
//set the output buffer
conv.setOutLog(somewriter-instance)
//set input repository (SDK1 format)
conv.setOriginLocation( String-file-repo-file-and-path )
conv.setOriginType(MigrateRuleRepository.FILE_REPO);
conv.setOriginDictionaryName(MigrateRuleRepository.MIGRATE_ALL)
conv.setOriginVersionName(MigrateRuleRepository.MIGRATE_ALL);
conv.setDestinationLocation( string-directory-path )
//the output pkg and dictionary will be created from the origin
//version and dictionary by mkDefaultPackageName()
try {
conv.migrate()
String results = conv.getTotalStats()
display results;
}
catch (MigrationException e)
{
display exception;
display some-writer-instance;
}
The SDK1 dictionary name is used for the SDK2 dictionary name and the SDK1 version name is used as part of the SDK2 package name.
SDK1 SDK2 dictionary name ---> dictionary name version name ---> package name := version name + "." + dictionary name
The SDK2 package name and dictionary name will form the directory structure for SDK2 File dictionaries.
Migration may operate on a single SDK1 dictionary/version from a repository. In such a case the OriginDictionaryName and OriginVersionName must be set to a specifidc dictionary/version pair.
If greater program control is required, the getDictionaryNames()
and getVersionNames()
methods return a list of the names and versions found in a SDK1 repository. These names may be used to set the origin properties and migrateSingleDictionary() may be invoked to migrate a single dictionary/version.
Field Summary | |
---|---|
static java.lang.String |
FILE An xml file containing a dictionary. |
static java.lang.String |
FILE_REPO Indicates an Oracle Business Rules file based repository. |
static java.lang.String |
MIGRATE_ALL Value used to indicate all. |
static java.lang.String |
WEBDAV_REPO An Oracle Business Rules WebDav based repository. |
Constructor Summary | |
---|---|
MigrateRuleRepository() Migrates an SDK1 Oracle Rules Repository to SDK2 format. |
Method Summary | |
---|---|
java.lang.String |
getDestinationDictionaryName() return the destination dictionary name property. |
java.lang.String |
getDestinationLocation() return the destination location String. |
java.lang.String |
getDestinationPackageName() return the destination package name property. |
java.lang.String |
getDestinationType() Deprecated. |
java.lang.String |
getImportedClasspath() return the imported classpath String. |
java.lang.String |
getOriginDictionaryName() return the orgin dictionary name. |
java.lang.String |
getOriginLocation() return the origin location String. |
java.lang.String |
getOriginPassword() returns the specified WebDav passwd. |
java.lang.String |
getOriginPasswordSource() returns the specified WebDav passwd source file |
java.lang.String |
getOriginProxyHost() returns the specified WebDav proxyhost. |
java.lang.String |
getOriginProxyPassword() returns the specified proxy password. |
java.lang.String |
getOriginProxyPort() returns the specified WebDav proxyport. |
java.lang.String |
getOriginProxyUserid() returns the specified WebDav proxy userid. |
java.lang.String |
getOriginType() return the type of origin repository |
java.lang.String |
getOriginUserid() returns the specified WebDav userid. |
java.lang.String |
getOriginVersionName() return the origin version name |
java.io.Writer |
getOutLog() |
java.lang.String |
getTotalStats() Return a String with the numbers of each type of first class object migrateed. |
java.lang.String |
getXSDLocation() return the imported xsds String. |
java.lang.String |
getXSDOutputDir() return the imported xsds String. |
boolean |
isLogWithStackTrace() Gets the boolean property that controls if logging should log the stack trace of an exception. |
static void |
main(java.lang.String[] args) Migration of a repository may be invoked by main. |
void |
migrate() |
void |
migrateSingleDictionary() Deprecated. |
java.lang.String |
mkDefaultPackageName(java.lang.String verName, java.lang.String dictName) Create a package name for SDK2 dictionaries. |
static oracle.rules.sdk.dictionary.RuleDictionary |
openDict(oracle.rules.sdk.repository.RuleRepository repo, java.lang.String dictName, java.lang.String verName) open load the origin SDK1 version dictionary. |
void |
setDestinationDictionaryName(java.lang.String odictName) set the dictionary name for destination dictionary If this is not set (null) then the dictionary name from the origin dictionary will be used. |
void |
setDestinationLocation(java.lang.String loc) set the String with the location of the destination Repository. |
void |
setDestinationPackageName(java.lang.String opkg) set the destination package name. |
void |
setDestinationType(java.lang.String otype) Deprecated. |
void |
setExecuteRL(boolean b) Sets the boolean property that controls if the migrated dictionary should generate and execute RL as part of validation |
void |
setImportedClasspath(java.lang.String loc) set the String with the location of the classes in the the Datamodel. |
void |
setLogWithStackTrace(boolean b) Sets the boolean property that controls if logging should log the stack trace of an exception. |
void |
setOriginDictionaryName(java.lang.String odictName) set the dictionary name for origin dictionary. |
void |
setOriginLocation(java.lang.String loc) set the String with the location of the origin repository. |
void |
setOriginPassword(java.lang.String passw) set the WebDav password. |
void |
setOriginPasswordSource(java.lang.String passw) set the WebDav password source file |
void |
setOriginProxyHost(java.lang.String proxyhost) set the WebDav proxy host |
void |
setOriginProxyPassword(java.lang.String passw) set the WebDav proxy password. |
void |
setOriginProxyPort(java.lang.String proxyport) set the WebDav proxy port |
void |
setOriginProxyUserid(java.lang.String uid) set the WebDav Proxy userid |
void |
setOriginType(java.lang.String otype) set the String denoting origin repository type. |
void |
setOriginUserid(java.lang.String uid) set the WebDav userid |
void |
setOriginVersionName(java.lang.String over) set the origin version name. if this is MigrateRuleRepository.MIGRATE_ALL and dictionary name is MigrateRuleRepository.MIGRATE_ALL , all versions and all dictionaries will be migrateed. |
void |
setOutLog(java.io.Writer tw) Set the output message Writer. |
void |
setXSDLocation(java.lang.String loc) set the String with the location of the XSDs in the the Datamodel. |
void |
setXSDOutputDir(java.lang.String loc) set the String with the location of the XSDs in the the Datamodel. |
boolean |
shouldExecuteRL() Gets the boolean property that controls if the migrated dictionary should generate and execute RL as part of validation |
static java.lang.String |
usageAll() return usage for migrating all dicitonaries in a origin repository |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FILE_REPO
public static final java.lang.String WEBDAV_REPO
public static final java.lang.String FILE
public static final java.lang.String MIGRATE_ALL
Constructor Detail |
---|
public MigrateRuleRepository()
Method Detail |
---|
public void setOutLog(java.io.Writer tw)
tw
- a Writer instance to receive errors, warnings, and progress messagespublic java.io.Writer getOutLog()
public void setExecuteRL(boolean b)
b
- a boolean value, true means RL will be generated and executed false is it will not.public boolean shouldExecuteRL()
public void setLogWithStackTrace(boolean b)
b
- true means the stack trace will be logged, false means it will notpublic boolean isLogWithStackTrace()
public java.lang.String getTotalStats()
public void setOriginLocation(java.lang.String loc)
m_originType
property.public java.lang.String getOriginLocation()
public void setImportedClasspath(java.lang.String loc)
m_originType
property.public java.lang.String getImportedClasspath()
public void setXSDLocation(java.lang.String loc)
m_originType
property.public java.lang.String getXSDLocation()
public void setXSDOutputDir(java.lang.String loc)
m_originType
property.public java.lang.String getXSDOutputDir()
public void setOriginType(java.lang.String otype)
MigrateRuleRepository.FILE_REPO
or MigrateRuleRepository.WEBDAV_REPO
.public java.lang.String getOriginType()
public void setOriginDictionaryName(java.lang.String odictName)
MigrateRuleRepository.MIGRATE_ALL
all dictionaries in the origin repository will be migrateed.public java.lang.String getOriginDictionaryName()
public void setOriginVersionName(java.lang.String over)
MigrateRuleRepository.MIGRATE_ALL
and dictionary name is MigrateRuleRepository.MIGRATE_ALL
, all versions and all dictionaries will be migrateed.public java.lang.String getOriginVersionName()
public void setDestinationLocation(java.lang.String loc)
MigrateRuleRepository.FILE_REPO
this must be an SDK2 repository file.public java.lang.String getDestinationLocation()
@Deprecated
public void setDestinationType(java.lang.String otype)
@Deprecated
public java.lang.String getDestinationType()
public void setDestinationDictionaryName(java.lang.String odictName)
public java.lang.String getDestinationDictionaryName()
public void setDestinationPackageName(java.lang.String opkg)
mkDefauiltPackageName()
public java.lang.String getDestinationPackageName()
public void setOriginPasswordSource(java.lang.String passw)
passw
- a string with password used to login to the WebDav serverpublic java.lang.String getOriginPasswordSource()
public void setOriginUserid(java.lang.String uid)
uid
- a string with userid used to login to the WebDav serverpublic java.lang.String getOriginUserid()
public void setOriginPassword(java.lang.String passw)
passw
- a string with password used to login to the WebDav serverpublic java.lang.String getOriginPassword()
public void setOriginProxyHost(java.lang.String proxyhost)
proxyhost
- a string with proxy host required to contact to the WebDav server containing the origin repository. This is only required if the migration must contact the WebDav server through a proxy.public java.lang.String getOriginProxyHost()
public void setOriginProxyPort(java.lang.String proxyport)
proxyport
- a string with proxy port to login to the WebDav server. This only required if the WebDav based repository must be contacted via a proxy server.public java.lang.String getOriginProxyPort()
public void setOriginProxyUserid(java.lang.String uid)
uid
- a string with userid used to login to the proxy server specified in ProxyHost. This is only required if the proxy server is specified that requires authentication.public java.lang.String getOriginProxyUserid()
public void setOriginProxyPassword(java.lang.String passw)
passw
- a string with password required to login to specified proxy server. If no proxy server is in use or the specified proxy server does not use authentication, then this property is not necessary.public java.lang.String getOriginProxyPassword()
public static oracle.rules.sdk.dictionary.RuleDictionary openDict(oracle.rules.sdk.repository.RuleRepository repo, java.lang.String dictName, java.lang.String verName) throws MigrationException
MigrationException
- when the dicitonary/version can not be loadedpublic static java.lang.String usageAll()
public java.lang.String mkDefaultPackageName(java.lang.String verName, java.lang.String dictName)
dictName
- String containing a dictionary nameverName
- String containing aversion namepublic static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
@Deprecated
public void migrateSingleDictionary()
throws MigrationException
MigrationException
public void migrate() throws MigrationException
MigrationException
|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.4.0) E10663-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |