|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.load.LoadContent
Used to load file and URL content into ContentHolders such as documents and parts for test or demo data in Windchill. Methods in this class are defined for use by the load package inside of the map file (wt.home.loadFile.csvmapfile.txt). These methods were written to be called by the load package using introspection not by a user interface.
Field Summary | |
private static String |
CURRENT_AGG_KEY
|
private static String |
CURRENT_CH_KEY
|
private static String |
CURRENT_ROLE_KEY
|
private static String |
DEFAULT_DIR_KEY
|
private static String |
DEFAULT_DIRECTORY
|
private static String |
DEFAULT_URL_KEY
|
private static String |
LOAD_FILE_DIR
|
private static String |
WT_HOME
|
Constructor Summary | |
LoadContent()
|
Method Summary | |
static boolean |
createAggregate(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Add aggregate to the cached content holder object, and cache the aggregate. |
static boolean |
createAggregateFile(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Add file content to the cached aggregate for the cached content holder object. |
static boolean |
createAggregateURL(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Add URL content to the cached aggregate for the cached content holder object. |
static boolean |
createContentFile(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Add file content to the cached content holder object. |
private static boolean |
createContentFile(Hashtable nv,
Hashtable cmd_line,
Vector return_objects,
boolean replace)
Add file content to the cached content holder object. |
static boolean |
createContentURL(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Add URL content to the cached content holder object. |
private static URLData |
createOrReuseURLData(ContentHolder contentHolder,
String role)
If primary content for the content holder already exist, reuse it to avoid creating multiple primary content; otherwise create a new URLData for it. |
static boolean |
createPrimary(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Add the primary piece of content for a document. |
static boolean |
replaceContentFile(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Add file content to the cached content holder object. |
static boolean |
setDefaultDirectory(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Create a default directory to load content from. |
static boolean |
setDefaultURL(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Create a default URL to load content from. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String WT_HOME
private static final String LOAD_FILE_DIR
private static final String DEFAULT_DIRECTORY
private static String CURRENT_CH_KEY
private static String CURRENT_AGG_KEY
private static String CURRENT_ROLE_KEY
private static String DEFAULT_DIR_KEY
private static String DEFAULT_URL_KEY
Constructor Detail |
public LoadContent()
Method Detail |
public static boolean setDefaultDirectory(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/value pair for the default directory.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.public static boolean setDefaultURL(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/value pair for the default URL.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.public static boolean createPrimary(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/value pairs for data pertaining to adding the content object.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.public static boolean createContentURL(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/value pairs for data pertaining to adding the content object.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.private static URLData createOrReuseURLData(ContentHolder contentHolder, String role) throws WTException, PropertyVetoException
WTException
PropertyVetoException
public static boolean createContentFile(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/value pairs for data pertaining to adding the content object.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.public static boolean replaceContentFile(Hashtable nv, Hashtable cmd_line, Vector return_objects)
This method will first try to find an existing file attached to the content holder that already has that name. If it does then it will replace that file with this new one. If no match is found then the file is added to the content holder. This method will only work on the create document methods that do not remove all content after the create. The original create documents do by default remove all of the content so this method used with them will always create and never find anything to replace. The csv tags that will work with this method are DocumentRetainContent and BeginWTDocumentRetainContent/EndWTDocumentRetainContent.
nv
- Name/value pairs for data pertaining to adding the content object.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.private static boolean createContentFile(Hashtable nv, Hashtable cmd_line, Vector return_objects, boolean replace)
nv
- Name/value pairs for data pertaining to adding the content object.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.replace
- flag that if it is true the code should try to replace existing
secondary content when the filenames are the same.public static boolean createAggregate(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/value pairs for data pertaining to adding the content object.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.public static boolean createAggregateFile(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/value pairs for data pertaining to adding the content object.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.public static boolean createAggregateURL(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/value pairs for data pertaining to adding the content object.cmd_line
- command line argument that can be substituted into the load data.return_objects
- Object(s) created by this method used by
wt.load.StandardLoadService
for user feedback messages.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |