|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.part.LoadPart
Creates and persists part objects based on input from a comma seperated value
(csv) file. Method names and parameters are defined in csvmapfile.txt.
wt.load.StandardLoadService.load
reads records from a .csv file
and passes the fields in a hashtable to methods defined in this class.
The load methods use a wt.load.StandardLoadService cache to cache
part masters and part version objects to improve performance of creating
assemblies and updating attrbiutes.
The load methods use wt.doc.LoadDoc to retrieve documents, taking advantage
of its internal caching.
Supported API: true
Extendable: false
StandardLoadService
,
LoadValue
,
LoadDoc
Field Summary | |
private static String |
CURRENT_CONTENT_HOLDER
|
private static String |
CURRENT_PART
|
private static String |
DEFAULT_VIEW_PREF_KEY
|
private static String |
DEFAULT_VIEW_PREF_NODE
|
private static int |
DESCRIBES_LINK
|
private static String |
DIRSEP
|
private static double |
DTOR
|
private static String |
PART_CACHE_KEY
|
private static String |
PART_MASTER_CACHE_KEY
|
private static String |
PART_PREVIOUS_USER
|
private static ResourceBundle |
rb
|
private static int |
REFERENCE_LINK
|
private static String |
REPHELPER_CLASS
|
private static String |
REPHELPER_METHOD
|
private static String |
RESOURCE
|
private static String |
TYPEDEF
|
private static int |
UNKNOWN_LINK
|
static boolean |
VERBOSE
Flag to control vervbose debugging output during part loading. |
private static String |
WTHOME
|
Constructor Summary | |
LoadPart()
|
Method Summary | |
static boolean |
addPartToAssembly(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "AssemblyAdd" directive in the csv load file. |
private static boolean |
addPartToAssembly(Hashtable nv,
Hashtable cmd_line,
Vector return_objects,
boolean cached_only,
boolean occurrenced)
|
static boolean |
addPartToAssemblyLoad(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "AssemblyAddLoad" directive in the csv load file. |
static boolean |
addPartToOccurrencedAssembly(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "OccurrenceAssemblyAdd" directive in the csv load file. |
static boolean |
addPartToOccurrencedAssemblyLoad(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "OccurrenceAssemblyAddLoad" directive in the csv load file. |
private static WTPart |
applyConstructionTimeAttributes(WTPart part,
Hashtable nv,
Hashtable cmd_line)
|
private static WTPart |
applyHardAttributes(WTPart part,
Hashtable nv,
Hashtable cmd_line)
|
static boolean |
assignUserToProduct(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "ProductUser" directive in the csv load file. |
static boolean |
beginCreateOrUpdateWTPart(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "BeginCreateOrUpdateWTPart" directive in the csv load file. |
static boolean |
beginCreateWTPart(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "csvBeginWTPart" directive in the XML load file. |
static boolean |
beginWTPM(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "BeginWTPM" directive in the csv load file. |
private static WTPartMaster |
cacheMaster(WTPartMaster master)
|
static boolean |
cachePart(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
|
private static WTPart |
cachePart(WTPart part)
|
private static WTPart |
constructPart(Hashtable nv,
Hashtable cmd_line)
Constructs a part (cached). |
static boolean |
createNewViewVersion(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "NewViewVersion" directive in the csv load file. |
static boolean |
createPart(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "csvPart" directive in the XML load file. |
static boolean |
createPartDocDescribes(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "PartDocDescribes" directive in the csv load file. |
static boolean |
createPartDocLink(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Adds documents to parts for PLMLink. |
private static boolean |
createPartDocLink(Hashtable nv,
Hashtable cmd_line,
Vector return_objects,
int type,
boolean cached_only)
|
static boolean |
createPartDocReference(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "PartDocReference" directive in the csv load file. |
static boolean |
createPartDocReferenceLoadOld(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Deprecated. |
static boolean |
createPartDocReferenceOld(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Deprecated. |
private static boolean |
createPartObject(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
|
static boolean |
createPartRepresentation(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "PartRepresentation" directive in the csv load file. |
private static boolean |
createPartRepresentation(Hashtable nv,
Hashtable cmd_line,
Vector return_objects,
int type,
boolean cached_only)
|
static boolean |
createPartRepresentationLoad(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "PartRepresentationLoad" directive in the csv load file. |
static boolean |
createProduct(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Deprecated. As of release 8.0 replaced by createPart |
static boolean |
createProductContainer(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
|
private static boolean |
createProductEffectivity(Hashtable nv,
Hashtable cmd_line,
Vector return_objects,
String effType)
|
static boolean |
createProductLotNumberEffectivity(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
|
static boolean |
createProductSerialNumberEffectivity(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
|
static boolean |
endCreateOrUpdateWTPart(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "EndCreateOrUpdateWTPart" directive in the csv load file. |
static boolean |
endCreateWTPart(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "EndWTPart" directive in the csv load file. |
static boolean |
endWTPM(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "EndWTPM" directive in the csv load file. |
private static boolean |
getBooleanValue(String name,
Hashtable nv,
Hashtable cmd_line,
boolean required,
boolean defaultValue)
|
private static WTPartMaster |
getCachedMaster()
|
private static WTPartMaster |
getCachedMaster(String number)
|
private static WTPart |
getCachedPart()
|
private static WTPart |
getCachedPart(String number)
|
private static WTPart |
getCachedPart(String number,
String version)
|
private static WTPart |
getCachedPart(String number,
String version,
String iteration)
|
private static WTPart |
getCachedPart(String number,
String version,
String iteration,
String view)
|
static Workable |
getCheckOutObject(Workable workable)
check a workable out. |
private static String |
getDisplayInfo(Hashtable nv,
Hashtable cmd_line)
|
private static javax.vecmath.Matrix4d |
getLocationMatrix(String location)
|
private static WTPartMaster |
getMaster()
|
private static WTPartMaster |
getMaster(String number)
|
private static String |
getMasterCacheKey(String number)
|
private static javax.vecmath.Matrix4d |
getMatrix4dFromLocation(double ax,
double ay,
double az,
double x,
double y,
double z,
double scale)
|
private static WTPart |
getPart()
|
private static WTPart |
getPart(String number,
String version,
String iteration,
String view)
|
private static String |
getPartCacheKey(String number,
String version,
String iteration,
String view)
|
private static String |
getRefFromObject(Persistable obj)
|
static String |
getValue(Hashtable nv,
String name,
boolean required)
|
private static String |
getValue(String name,
Hashtable nv,
Hashtable cmd_line,
boolean required)
|
private static String[] |
getValues(String name,
Hashtable nv,
Hashtable cmd_line,
boolean required)
|
static boolean |
isCheckoutAllowed(Workable workable)
See if checkout is allowed. |
private static boolean |
isNewVersion(WTPart part,
String version)
|
static boolean |
isUndoCheckoutAllowed(Workable workable)
See if undo-checkout is allowed. |
private static Boolean |
loadRepresentation(String directory,
String poid,
boolean republishable,
String repName,
String repDesc,
boolean repDefault,
boolean createThumbnail,
boolean storeEDZ,
Vector options)
|
private static PDMLinkProduct |
lookupProduct(String name,
WTContainerRef containerRef)
|
private static String[] |
parseTeamTemplate(Hashtable nv,
Hashtable cmd_line)
|
private static boolean |
publishPartObject(Hashtable nv,
Hashtable cmd_line)
|
static boolean |
removePartFromAssembly(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "AssemblyRemove" directive in the csv load file. |
private static boolean |
removePartFromAssembly(Hashtable nv,
Hashtable cmd_line,
Vector return_objects,
boolean cached_only)
|
static boolean |
removePartFromAssemblyLoad(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "AssemblyRemoveLoad" directive in the csv load file. |
private static void |
resetUser()
|
private static void |
setContainer(WTContained the_contained,
WTContainerRef containerRef)
|
private static void |
setFolder(WTContainerRef containerRef,
FolderEntry the_folder_entry,
String folderpath)
|
private static void |
setIteration(Iterated the_iterated,
String iteration)
|
private static void |
setLifeCycle(WTContainerRef containerRef,
LifeCycleManaged the_lifecycle_managed,
String lctemplate)
|
private static void |
setName(WTPart the_part,
String name)
|
private static void |
setNumber(WTPart the_part,
String number)
|
private static void |
setPartType(WTPart the_part,
String type)
|
static boolean |
setSiteDefaultView(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "SiteViewPreference" directive in the csv load file. |
private static void |
setSource(WTPart the_part,
String source)
|
private static void |
setState(LifeCycleManaged the_lifecycle_managed,
String state)
|
private static void |
setTeamTemplate(WTContainerRef containerRef,
TeamManaged the_team_managed,
String teamTemplate,
String domain)
|
private static void |
setType(Typed the_typed,
String subtypedef)
|
private static void |
setUser(Hashtable nv,
Hashtable cmd_line)
|
static boolean |
setUserDefaultView(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
Processes the "ViewPreference" directive in the csv load file. |
private static void |
setVersion(Versioned the_versioned,
String version)
|
private static void |
setView(WTPart the_part,
String viewName)
|
private static boolean |
updatePartObject(Hashtable nv,
Hashtable cmd_line,
Vector return_objects)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String CURRENT_CONTENT_HOLDER
private static final String PART_CACHE_KEY
private static final String PART_MASTER_CACHE_KEY
private static final String PART_PREVIOUS_USER
private static String CURRENT_PART
private static String RESOURCE
private static final int REFERENCE_LINK
private static final int DESCRIBES_LINK
private static final int UNKNOWN_LINK
private static ResourceBundle rb
private static final String TYPEDEF
private static final String DEFAULT_VIEW_PREF_NODE
private static final String DEFAULT_VIEW_PREF_KEY
public static final boolean VERBOSE
wt.properties
file entry
wt.part.load.verbose
The default value is false
.
private static final String WTHOME
private static final String DIRSEP
private static final String REPHELPER_CLASS
private static final String REPHELPER_METHOD
private static final double DTOR
Constructor Detail |
public LoadPart()
Method Detail |
public static boolean createPart(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Establishes the part as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.
This format cannot add Soft Attributes(IBA). For that see beginCreateWTPart
.
When using @see wt.load.LoadFromFile to load parts, end items and serial numbered parts, use the following XML format:
<csvPart handler="wt.part.LoadPart.createPart" > | |||
<csvuser> | created by user | </csvuser> | |
<csvpartName> | part name | </csvpartName> | |
<csvpartNumber> | part number | </csvpartNumber> | |
<csvtype> | assembly mode | </csvtype> | |
<csvsource> | source | </csvsource> | |
<csvfolder> | folder | </csvfolder> | |
<csvlifecycle> | lifecycle | </csvlifecycle> | |
<csvview> | view | </csvview> | |
<csvteamTemplate> | team template | </csvteamTemplate> | |
<csvlifecyclestate> | lifecycle state | </csvlifecyclestate> | |
<csvtypedef> | typedef | </csvtypedef> | |
<csvversion> | version | </csvversion> | |
<csviteration> | iteration | </csviteration> | |
<csvparentContainerPath> | parent container path | </csvparentContainerPath> | |
</csvPart> |
created by user | This tag allows a user other than the user loading the file to be used as the creator of this part. |
part name | Name of the part. |
part number | Number of the part. |
assembly mode |
The assembly mode for the part. Choose one of the following:
|
source | The source of the part. i.e. make, buy |
folder | The full path to the folder. i.e. /Default/Design |
lifecycle | The lifecycle that the part will be created under. i.e. Basic |
view | The view that the part will be created under. i.e. Design, Manufacturing This value is optional. Leave this value blank for serial numbered parts. |
team template | The team template that the part will be created under. This value is optional. |
lifecycle state | The lifecycle state that the part will be created under. This value is optional. |
typedef |
This contains the identifier string of a @see com.ptc.core.meta.common.TypeIdentifier . i.e. wt.part.WTPart|com.mycompany.SoftPart2 This would create a soft typed part. This currently supports the following modeled types:
This currently does not handle custom modeled types. If there is a need for one of these, then a custom loader needs to be created. |
version | The version of the part. This value is optional. |
iteration | The version of the part. This value is optional. |
parent container path | The parent container path that the part will be created under. This value is optional. |
Supports versioning which allows a part to be created at a specified version and iteration. Multiple part versions imply an "order". I.E. subsequent bulk load runs can "fill in the gaps", but it does so by attaching to the latest iteration of the previous version. If a newer iteration is added to the previous version, the new version will attached to the new latest iteration. For example: Load set 1 (E.1, A.1, C.2) will result in (A.1, C.2, E.1). The predecssors of: C.2 is A.1, E.1 is C.2. Load set 2 (B.1, A.2., C.1, C.3) will result in (A.1, A.2, B.1, C.1, C.2, C.3, E.1). The predecessors of: B.1 is A.2, C.1 is B.1, E.1 is C.3. Any new version/iterations added will continue to change the predessor links to the new latest iteration of the previous version.
Versioning does support gaps in the ordering.
Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)
When loading versions out of sequence and loading relationships to those parts there are a few things that you should understand while ordering your data.
1. Relationships are copied forward from what is identified as the predecessor to the new version. So in an ordered case if you create part 1 A.1 that has references or a describe relationship to doc 2. Then you revise to get part 1 B.1, it will have the relationships of A.1 copied to it so it will have the relationship to doc 2 as well.
2. Relationships are not copied forward if they are created after the new version has already been created. For example if part 1 A.1 and B.1 are created and then part A.1 has a relationship created to doc 2, part 1 B.1 will not have the relationship to doc 2 copied to it. You must explicitely create that relationship if you want it created.
3. Relationships from predecessors are not cumulative. This is really just a further clarification of the first point. Relationships are only copied from the one identified predecessor and not the accumulation of predecessors. So if you create part 1 B.1 that is related to doc 2, create part 1 A.1 that is related to doc 3 and then create part 1 C.1 it will inherit the relationship to doc 2 only.
These are just a few pointers to loading versions and relationships out of sequence. There are other scenarios given these basic rules that can also be imagined. So order the creation of versions/iterations and relationship very carefully to get the results that you intend.
Supported API: true
Extendable: false
nv
- Name/Value pairs of part attributes.cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.
true | success |
false | failure |
public static boolean createProduct(Hashtable nv, Hashtable cmd_line, Vector return_objects)
createPart
createPart
method with the following exception.
If the <csvtypedef> tag is empty, then the <csvtypedef> tag defaults to @see wt.part.WTProduct and creates an End Item.
nv
- Name/Value pairs of part attributes.cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.
true | success |
false | failure |
public static boolean beginCreateWTPart(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Establishes the part as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.
When using @see wt.load.LoadFromFile to load parts, end items and serial numbered parts, use the following XML format:
<csvBeginWTPart handler="wt.part.LoadPart.beginCreateWTPart" > | |||
<csvuser> | created by user | </csvuser> | |
<csvpartName> | part name | </csvpartName> | |
<csvpartNumber> | part number | </csvpartNumber> | |
<csvtype> | assembly mode | </csvtype> | |
<csvsource> | source | </csvsource> | |
<csvfolder> | folder | </csvfolder> | |
<csvlifecycle> | lifecycle | </csvlifecycle> | |
<csvview> | view | </csvview> | |
<csvteamTemplate> | team template | </csvteamTemplate> | |
<csvlifecyclestate> | lifecycle state | </csvlifecyclestate> | |
<csvtypedef> | typedef | </csvtypedef> | |
<csvversion> | version | </csvversion> | |
<csviteration> | iteration | </csviteration> | |
<csvparentContainerPath> | parent container path | </csvparentContainerPath> | |
</csvBeginWTPart > | |||
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" > | |||
... | |||
</csvIBAValue > | |||
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" > | |||
... | |||
</csvIBAValue > | |||
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" > | |||
... | |||
</csvIBAValue > | |||
<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" > | |||
... | |||
</csvIBAValue > | |||
<csvEndWTPart handler="wt.part.LoadPart.endCreateWTPart" > | |||
... | |||
</csvEndWTPart > |
created by user | This tag allows a user other than the user loading the file to be used as the creator of this part. |
part name | Name of the part. |
part number | Number of the part. |
assembly mode |
The assembly mode for the part. Choose one of the following:
|
source | The source of the part. i.e. make, buy |
folder | The full path to the folder. i.e. /Default/Design |
lifecycle | The lifecycle that the part will be created under. i.e. Basic |
view | The view that the part will be created under. i.e. Design, Manufacturing This value is optional. Leave this value blank for serial numbered parts. |
team template | The team template that the part will be created under. This value is optional. |
lifecycle state | The lifecycle state that the part will be created under. This value is optional. |
typedef |
This contains the identifier string of a @see com.ptc.core.meta.common.TypeIdentifier . i.e. wt.part.WTPart|com.mycompany.SoftPart2 This would create a soft typed part. This currently supports the following modeled types:
This currently does not handle custom modeled types. If there is a need for one of these, then a custom loader needs to be created. |
version | The version of the part. This value is optional. |
iteration | The version of the part. This value is optional. |
parent container path | The parent container path that the part will be created under. This value is optional. |
Supports versioning which allows a part to be created at a specified version and iteration. Multiple part versions imply an "order". I.E. subsequent bulk load runs can "fill in the gaps", but it does so by attaching to the latest iteration of the previous version. If a newer iteration is added to the previous version, the new version will attached to the new latest iteration. For example: Load set 1 (E.1, A.1, C.2) will result in (A.1, C.2, E.1). The predecssors of: C.2 is A.1, E.1 is C.2. Load set 2 (B.1, A.2., C.1, C.3) will result in (A.1, A.2, B.1, C.1, C.2, C.3, E.1). The predecessors of: B.1 is A.2, C.1 is B.1, E.1 is C.3. Any new version/iterations added will continue to change the predessor links to the new latest iteration of the previous version.
Versioning does support gaps in the ordering.
Examples of valid versioning are: (A.1,A.3,B.2,B.5,E.4,E.5)
When loading versions out of sequence and loading relationships to those parts there are a few things that you should understand while ordering your data.
1. Relationships are copied forward from what is identified as the predecessor to the new version. So in an ordered case if you create part 1 A.1 that has references or a describe relationship to doc 2. Then you revise to get part 1 B.1, it will have the relationships of A.1 copied to it so it will have the relationship to doc 2 as well.
2. Relationships are not copied forward if they are created after the new version has already been created. For example if part 1 A.1 and B.1 are created and then part A.1 has a relationship created to doc 2, part 1 B.1 will not have the relationship to doc 2 copied to it. You must explicitely create that relationship if you want it created.
3. Relationships from predecessors are not cumulative. This is really just a further clarification of the first point. Relationships are only copied from the one identified predecessor and not the accumulation of predecessors. So if you create part 1 B.1 that is related to doc 2, create part 1 A.1 that is related to doc 3 and then create part 1 C.1 it will inherit the relationship to doc 2 only.
These are just a few pointers to loading versions and relationships out of sequence. There are other scenarios given these basic rules that can also be imagined. So order the creation of versions/iterations and relationship very carefully to get the results that you intend.
Supported API: true
Extendable: false
nv
- Name/Value pairs of part attributes.cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.
true | success |
false | failure |
public static boolean endCreateWTPart(Hashtable nv, Hashtable cmd_line, Vector return_objects)
IBAValue
load file lines with the part, applies the default attribute values
associated with the specified type definition, persists the part, checks it back in,
and caches it in the loader's memory.
Establishes the part as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.
nv
- not usedcmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.beginCreateWTPart(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean beginCreateOrUpdateWTPart(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Identical to beginCreateWTPart except in that "BeginCreateOrUpdateWTPart" directive does not support specification of 'version' or 'iteration'. The BeginCreateOrUpdateWTPart directive should not be used. It is maintain here in order to support legacy load files.
Creates a part object, persists it in the database, and caches it in the loader's memory.
Subsequent IBAValue
load file lines may be used to associate
soft attribute values with the part. These values will not
be persisted until a "EndWTPart" load file line is processed.
Establishes the part as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.
A typical sequence using this directive might be
BeginCreateOrUpdateWTPart,part-name,part-number,...
IBAValue,definition1,value1,...
IBAValue,definition2,value2,...
EndCreateOrUpdateWTPart
ContentFile,...
PartDocReference,...
nv
- Hashtable containing tokens parsed from the csv load file
The attributes are as follows: (arguments in <> are optional)
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.endCreateOrUpdateWTPart(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean endCreateOrUpdateWTPart(Hashtable nv, Hashtable cmd_line, Vector return_objects)
IBAValue
load file lines with the part, applies the default attribute values
associated with the specified type definition, persists the part, checks it back in,
and caches it in the loader's memory.
Identical to endCreateWTPart. The EndCreateOrUpdateWTPart directive should not be used. It is maintain here in order to support legacy load files.
Establishes the part as the CURRENT_CONTENT_HOLDER for use by "ContentFile" lines.
nv
- not usedcmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.beginCreateOrUpdateWTPart(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
,
endCreateWTPart(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean beginWTPM(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Hashtable containing tokens parsed from the csv load file
The attributes are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.endWTPM(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean endWTPM(Hashtable nv, Hashtable cmd_line, Vector return_objects)
IBAValue
load file lines with
the cached part master, persists the part master, and caches it in the loader's memory.
nv
- not usedcmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.beginWTPM(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean addPartToAssembly(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Fails if both parts are not in loader's cache.
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.addPartToAssemblyLoad(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean addPartToAssemblyLoad(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Does not assume either part is in loader's cache.
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.addPartToAssembly(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean createPartDocReference(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Optionally checks for parts with versions. Checks cache for part, queries database if not found. If partNumber is not supplied, uses most recently cached part. Checks cache for document, queries database if not found. If docNumber is not supplied, uses most recently cached document. If part and doc exist, creates a document reference link for the part.
nv
- Name/Value pairs of arguments.
The arguments are as follows: (arguments in <> are optional)
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.createPartDocDescribes(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean createPartDocDescribes(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Optionally checks for parts with versions. Checks cache for part, queries database if not found. If partNumber is not supplied, uses most recently cached part. Optionally checks for documents with versions. Checks cache for document, queries database if not found. If docNumber is not supplied, uses most recently cached document. If part and doc exist, creates a document describes link for the part.
nv
- Name/Value pairs of arguments.
The arguments are as follows: (arguments in <> are optional)
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.createPartDocReference(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
,
LoadDoc
public static boolean createPartDocLink(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Optionally checks for parts with versions. Checks cache for part, queries database if not found. If partNumber is not supplied, uses most recently cached part. Optionally checks for documents with versions. Checks cache for document, queries database if not found. If docNumber is not supplied, uses most recently cached document. If part and doc exist, creates either a document reference link or a document describes link for the part, depending on the soft type of the document.
nv
- Name/Value pairs of arguments.
The arguments are as follows: (arguments in <> are optional)
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.LoadDoc
public static boolean createPartRepresentationLoad(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Does not assume either part is in loader's cache.
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.public static boolean createPartRepresentation(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.public static boolean removePartFromAssembly(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.public static boolean removePartFromAssemblyLoad(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Does not assume either part is in loader's cache.
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.public static boolean addPartToOccurrencedAssembly(Hashtable nv, Hashtable cmd_line, Vector return_objects)
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.addPartToAssembly(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean addPartToOccurrencedAssemblyLoad(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Does not assume either part is in loader's cache.
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.addPartToAssembly(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
public static boolean createPartDocReferenceOld(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Uses most recently cached part. Checks cache for document, queries database if not found. If docNumber is not supplied, uses most recently cached document. If part and doc exist, creates a document reference link for the part.
Kept around for old loaders. (Does not support versioning.)
nv
- Name/Value pair containing the document reference name, docName.
The arguments are as follows: (arguments in <> are optional)
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.createPartDocReference(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
,
LoadDoc
public static boolean createPartDocReferenceLoadOld(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Checks cache for part, fails if not found. If partNumber is not supplied, uses most recently cached part. Checks cache for document, queries database if not found. If docNumber is not supplied, uses most recently cached document. If part and doc exist, creates a document reference link for the part.
Kept around for old loaders. (Does not support versioning.)
nv
- Name/Value pair containing the document reference name, docName.
The arguments are as follows: (arguments in <> are optional)
cmd_line
- not used with CounterPart bulk data loaderreturn_objects
- Vector
of the object(s) created by this method.
Used by wt.load.StandardLoadService
for accurate user feedback messages.createPartDocReference(java.util.Hashtable, java.util.Hashtable, java.util.Vector)
,
LoadDoc
public static boolean assignUserToProduct(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Assumes user, product and role exists.
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
not usedpublic static boolean setUserDefaultView(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Assumes user, and view exists.
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
not usedpublic static boolean setSiteDefaultView(Hashtable nv, Hashtable cmd_line, Vector return_objects)
Assumes user, and view exists.
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
not usedpublic static String getValue(Hashtable nv, String name, boolean required) throws WTException
WTException
public static boolean isCheckoutAllowed(Workable workable) throws LockException, WTException
workable
- Workable
LockException
WTException
public static boolean isUndoCheckoutAllowed(Workable workable)
workable
- Workable
public static Workable getCheckOutObject(Workable workable) throws LockException, WTException
workable
- workable
LockException
WTException
private static boolean createPartObject(Hashtable nv, Hashtable cmd_line, Vector return_objects)
private static String getDisplayInfo(Hashtable nv, Hashtable cmd_line)
private static boolean updatePartObject(Hashtable nv, Hashtable cmd_line, Vector return_objects)
private static boolean publishPartObject(Hashtable nv, Hashtable cmd_line)
private static boolean addPartToAssembly(Hashtable nv, Hashtable cmd_line, Vector return_objects, boolean cached_only, boolean occurrenced)
private static boolean createPartDocLink(Hashtable nv, Hashtable cmd_line, Vector return_objects, int type, boolean cached_only)
private static boolean removePartFromAssembly(Hashtable nv, Hashtable cmd_line, Vector return_objects, boolean cached_only)
public static boolean createNewViewVersion(Hashtable nv, Hashtable cmd_line, Vector return_objects) throws WTException
nv
- Name/Value pairs of arguments.
The arguments are as follows:
cmd_line
- command line argument that can contain supplemental load datareturn_objects
- Vector
of the object(s) created by this method.
WTException
private static boolean createPartRepresentation(Hashtable nv, Hashtable cmd_line, Vector return_objects, int type, boolean cached_only)
public static boolean cachePart(Hashtable nv, Hashtable cmd_line, Vector return_objects)
private static Boolean loadRepresentation(String directory, String poid, boolean republishable, String repName, String repDesc, boolean repDefault, boolean createThumbnail, boolean storeEDZ, Vector options)
private static String getRefFromObject(Persistable obj)
private static javax.vecmath.Matrix4d getLocationMatrix(String location)
private static javax.vecmath.Matrix4d getMatrix4dFromLocation(double ax, double ay, double az, double x, double y, double z, double scale)
private static WTPart constructPart(Hashtable nv, Hashtable cmd_line) throws WTException
Constructs a new part if a part with the supplied part number does not exist. Otherwise if a version is supplied, then it constructs a new version of the existing part if the supplied version does not exist. Otherwise it constructs a new iteration of the supplied version. Otherwise constructs a new iteration of the latest version.
WTException
private static boolean isNewVersion(WTPart part, String version) throws WTException
WTException
private static WTPart getPart() throws WTException
WTException
private static WTPart getPart(String number, String version, String iteration, String view) throws WTException
WTException
private static WTPartMaster getMaster() throws WTException
WTException
private static WTPartMaster getMaster(String number) throws WTException
WTException
private static WTPart getCachedPart() throws WTException
WTException
private static WTPart getCachedPart(String number) throws WTException
WTException
private static WTPart getCachedPart(String number, String version) throws WTException
WTException
private static WTPart getCachedPart(String number, String version, String iteration) throws WTException
WTException
private static WTPart getCachedPart(String number, String version, String iteration, String view) throws WTException
WTException
private static String getPartCacheKey(String number, String version, String iteration, String view) throws WTException
WTException
private static WTPart cachePart(WTPart part) throws WTException
WTException
private static WTPartMaster getCachedMaster() throws WTException
WTException
private static WTPartMaster getCachedMaster(String number) throws WTException
WTException
private static String getMasterCacheKey(String number) throws WTException
WTException
private static WTPartMaster cacheMaster(WTPartMaster master) throws WTException
WTException
private static WTPart applyHardAttributes(WTPart part, Hashtable nv, Hashtable cmd_line) throws WTException
WTException
private static WTPart applyConstructionTimeAttributes(WTPart part, Hashtable nv, Hashtable cmd_line) throws WTException
WTException
private static void setName(WTPart the_part, String name) throws WTException
WTException
private static void setNumber(WTPart the_part, String number) throws WTException
WTException
private static void setView(WTPart the_part, String viewName) throws WTException
WTException
private static void setPartType(WTPart the_part, String type) throws WTException
WTException
private static void setSource(WTPart the_part, String source) throws WTException
WTException
private static String[] parseTeamTemplate(Hashtable nv, Hashtable cmd_line) throws WTException
WTException
private static String getValue(String name, Hashtable nv, Hashtable cmd_line, boolean required) throws WTException
WTException
private static String[] getValues(String name, Hashtable nv, Hashtable cmd_line, boolean required) throws WTException
WTException
private static boolean getBooleanValue(String name, Hashtable nv, Hashtable cmd_line, boolean required, boolean defaultValue) throws WTException
WTException
private static void setContainer(WTContained the_contained, WTContainerRef containerRef) throws WTException
WTException
private static void setType(Typed the_typed, String subtypedef) throws WTException
WTException
private static void setVersion(Versioned the_versioned, String version) throws WTException
WTException
private static void setIteration(Iterated the_iterated, String iteration) throws WTException
WTException
private static void setFolder(WTContainerRef containerRef, FolderEntry the_folder_entry, String folderpath) throws WTException
WTException
private static void setLifeCycle(WTContainerRef containerRef, LifeCycleManaged the_lifecycle_managed, String lctemplate) throws WTException
WTException
private static void setState(LifeCycleManaged the_lifecycle_managed, String state) throws WTException
WTException
private static void setTeamTemplate(WTContainerRef containerRef, TeamManaged the_team_managed, String teamTemplate, String domain) throws WTException
WTException
private static PDMLinkProduct lookupProduct(String name, WTContainerRef containerRef) throws WTException
WTException
public static boolean createProductContainer(Hashtable nv, Hashtable cmd_line, Vector return_objects)
public static boolean createProductSerialNumberEffectivity(Hashtable nv, Hashtable cmd_line, Vector return_objects)
public static boolean createProductLotNumberEffectivity(Hashtable nv, Hashtable cmd_line, Vector return_objects)
private static boolean createProductEffectivity(Hashtable nv, Hashtable cmd_line, Vector return_objects, String effType)
private static void setUser(Hashtable nv, Hashtable cmd_line) throws WTException
WTException
private static void resetUser() throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |