|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.directives.dataload.LoadDataFile
Alters a table to populate it with necessary data. The LoadDatFile directive has three attributes delimChar, mapFile, and dataFile.
<LoadDataFile mapFile="path +file name" dataFile="path + file name"> The attribute delimChar is optional. If this value is not included it is assumed that the value is a comma. The attribute mapFile is optional. If the attribute is not included it is assumed it is using the map file all the other load files use which is, csvmapfile.txt file. The only attribute that is required is dataFile. The directive needs to know what file it is loading. Also, the path to file is necessary. If it is not included it assumes the file is under WT_HOME. The directive LoadDataFile could have four different looks to it, they are:Example Usages:
1.<LoadDataFile delimChar="~" mapFile="..." dataFile="...."/>2.<LoadDataFile mapFile="..." dataFile="..."/>3.<LoadDataFile dataFile="...."/>4.<LoadDataFile delimChar="~" dataFile="...."/>
Supported API: false
Extendable: false
Nested Class Summary | |
private class |
LoadDataFile.DataOutputter
Encapsulates the conditional writing of the data records to the data file. |
Field Summary | |
private static Object |
creationLock__
|
static String |
DATA_FILE_TO_LOAD
|
private String |
dataFilesPath_
|
private static String |
DEFAULT_DELIMITER_ATTR_VALUE
|
private static String |
DEFAULT_MAP_FILE
|
private String |
delimiter_
|
static String |
DELIMITER_ATTR_NAME
|
static String |
MAP_FILE
|
private String |
mapFilesPath_
|
private String |
user_
|
private WTProperties |
wtProperties_
|
Constructor Summary | |
LoadDataFile()
Create an instance with no data. |
Method Summary | |
void |
asDomOn(Element element)
|
void |
execute(DirectiveServices directive_services)
Executes the inner class DataOutputter. |
private String |
getDirectiveName()
The name of the directive. |
void |
initializeFromDom(Element element)
Reads from DOMs formatted as described in the class documentation above. |
private String |
modifyLoadFilePath(String relative_path)
|
void |
run()
|
private String |
userLoggedIn()
Stores the login name |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String DELIMITER_ATTR_NAME
private static final String DEFAULT_DELIMITER_ATTR_VALUE
private static final String DEFAULT_MAP_FILE
public static final String DATA_FILE_TO_LOAD
public static final String MAP_FILE
private WTProperties wtProperties_
private String delimiter_
private String mapFilesPath_
private String dataFilesPath_
private String user_
private static Object creationLock__
Constructor Detail |
public LoadDataFile()
Method Detail |
private String userLoggedIn()
public void run()
public void asDomOn(Element element)
asDomOn
in interface UpdateDirective
public void initializeFromDom(Element element)
initializeFromDom
in interface UpdateDirective
private String getDirectiveName()
public void execute(DirectiveServices directive_services) throws DirectiveExecutionException
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 valueprivate String modifyLoadFilePath(String relative_path)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |