|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.directives.JavaMigratorDirective
Alters a table to redeclare a column as not null if it is not already.
>JavaMigrator className="..."/<
Component | Description | Required | Parameterizable |
---|---|---|---|
Attribute className |
the fully qualified class name of a class
implementing com.ptc.windchill.upgrade.directives.Migrator
|
yes | no |
wt.mypackage.MyMigrator
.
<JavaMigrator className="wt.mypackage.MyMigrator"/>
Field Summary | |
static String |
CLASS_NAME_ATTRIBUTE_NAME
|
private String |
className_
|
static String |
MIGRATOR_VERBOSE
|
Constructor Summary | |
JavaMigratorDirective()
Create an instance with empty table name and column name. |
Method Summary | |
void |
asDomOn(Element element)
|
void |
execute(DirectiveServices directive_services)
Instantiates and executes the Migrator specified in the attribute class . |
private String |
getDirectiveName()
The name of the directive. |
void |
initializeFromDom(Element element)
Reads from DOMs formatted as described in the class documentation above. |
private Object |
instantiateMigrator()
Creates an instance of the migrator specified in the attribute class . |
private Class |
loadClass()
Loads the class specified in the attribute class . |
void |
setClassName(String class_name)
Sets the class name of the migrator to run. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String CLASS_NAME_ATTRIBUTE_NAME
public static final String MIGRATOR_VERBOSE
private String className_
Constructor Detail |
public JavaMigratorDirective()
Method Detail |
public void setClassName(String class_name) throws ParseException
ParseException
public void asDomOn(Element element)
asDomOn
in interface UpdateDirective
public void initializeFromDom(Element element) throws DirectiveIOException
initializeFromDom
in interface UpdateDirective
DirectiveIOException
- if one(or both)of the attributes is missing or if it is written as a parameterized attribute and contains a syntax errorpublic void execute(DirectiveServices directive_services) throws DirectiveExecutionException
class
.
execute
in interface UpdateDirective
DirectiveExecutionException
- if the class cannot be found, is not actually a Migrator, the instance cannot created due to visibility issues or because the class is abstract or an interface, or the migrator fails or returns a false return valueJavaMigrator
private Object instantiateMigrator() throws DirectiveExecutionException
class
.
DirectiveExecutionException
- if the class cannot be found, is not actually a Migrator, or the instance cannot created due to visibility issues or because the class is abstract or an interfaceprivate Class loadClass() throws DirectiveExecutionException
class
.
DirectiveExecutionException
- if the class cannot be foundprivate String getDirectiveName()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |