|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.step.processor.WTImportService
A utilities class providing high-level utility methods used during STEP import.
Field Summary | |
private static WTContainerRef |
_containerRef
|
private static boolean |
_hasListeners
|
private static Folder |
_importFolder
|
private static FolderingInfo |
_importFolderingInfo
|
private static Vector |
_listeners
|
private static Object[] |
_singleArg
|
private static String |
ENUMERATED_TYPE_VALUE_ATTRIBUTE
The name of the standard attribute within any wt.fc.EnumeratedType (in STEP entity form) which can be used to access the enum instance. |
private static String |
IMPORT_FOLDER_PROP
|
private static Class[] |
NO_ARGS
|
private static String |
STEP_CHECKIN_COMMENT
|
private static String |
STEP_CHECKOUT_COMMENT
|
private static String |
UNNAMED_MASTER_NAME
|
Constructor Summary | |
WTImportService()
|
Method Summary | |
static void |
addListener(WTImportEventListener listener)
|
protected static Object |
convertToEnumTypeValue(Object rawValue,
String enumTypeName,
ExpressSchema wtSchema,
StepData dataForEntityRefs)
Takes a parsed value for an enumeration type ( result of EnumeratedType.getStringValue() ) and converts it into a Windchill enumeration type value. |
static RevisionControlled |
createNewIteration(Versioned version,
String masterName,
String masterNumber,
String versionId,
String iterationId)
Create a new version of the given Master. |
static ObjectToObjectLink |
createNewLink(Class linkClass,
Persistable roleAInstance,
Persistable roleBInstance)
Create a new link object. |
static RevisionControlled |
createNewMasterVersionAndIteration(Class iterationClass,
String masterNumber,
String masterName,
String vId,
String iId)
Create a new iteration with a given Number and Name. |
static RevisionControlled |
createNewVersionAndIteration(Mastered master,
String masterName,
String masterNumber,
String importVersionId,
String importIterationId)
Create a new version of the given Master. |
static RevisionControlled |
findIteration(Class masterClass,
String masterNumber,
String masterName,
String versionId,
String iterationId)
Finds the iteration given the number and name of the Master and the iteration Id. |
static RevisionControlled |
findIteration(Versioned version,
String iterationId)
Finds the iteration of the given version with the given iteration Id. |
static RevisionControlled |
findLatestIteration(Versioned version)
Finds the latest version of the given master. |
static RevisionControlled |
findLatestVersion(Mastered master)
Finds the latest version of the given master. |
static Mastered |
findMaster(Class masterClass,
String masterImportNumber,
String masterImportName)
Find a (Part/Document)Master given its class, name and number. |
protected static Method |
findSetMethod(Object wtObject,
String attrName,
String type)
Finds a set method for a given Windchill object. |
static Versioned |
findVersion(Mastered master,
String versionId)
Finds the version of the given master with the given version Id. |
private static void |
fireEvent(Persistable instance,
Persistable parentInstance,
int objectType,
int eventType)
|
private static void |
fireEvent(Persistable instance,
Persistable parentInstance,
int objectType,
int eventType,
String id1)
|
private static void |
fireEvent(Persistable instance,
Persistable parentInstance,
int objectType,
int eventType,
String id1,
String id2)
|
private static void |
firePersistenceEvent(Persistable nonPersistent,
Persistable persistent)
|
private static void |
fireWarningEvent(Persistable instance,
String warning)
|
static ObjectToObjectLink |
getExistingLink(Class linkClass,
Object tmpLink,
Persistable roleAInstance,
Persistable roleBInstance)
|
static Folder |
getImportFolder()
|
static Mastered |
getMaster(RevisionControlled iteration)
|
private static Method |
getMethod(Class theClass,
String name)
|
private static Method |
getMethod(Class theClass,
String name,
Class[] args)
|
private static String |
getShortClassName(Class theClass)
|
private static Object |
invokeMethod(Method theMethod)
|
private static Object |
invokeMethod(Method theMethod,
Object instance)
|
private static Object |
invokeMethod(Method theMethod,
Object instance,
Object[] args)
|
static Persistable |
makePersistent(Persistable instance)
|
static void |
progressMessage(String message)
|
static void |
removeListener(WTImportEventListener listener)
|
static void |
setImportFolder(Foldered instance)
|
static void |
setImportFolder(String folderName)
Set the folder that all instances will be created in. |
static void |
setInstanceAttributes(Persistable wtObject,
StepEntity stepObject,
ExpressSchema wtSchema,
StepData dataForEntityReferences)
Given a parse StepEntity and its corresponding imported Windchill instance set all the attributes it has values for. |
private static void |
setPropertyToDefault(Persistable wtObject,
PropertyDescriptor propertyInfo)
Set a Windchill objects property to its default value. |
private static void |
validateNewIterationIds(RevisionControlled newIteration,
String masterName,
String masterNumber,
String importVersionId,
String importIterationId,
boolean incrementCheckedout)
Validate that the actual version/iteration ids match the imported version/iteration ids. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String IMPORT_FOLDER_PROP
private static final String STEP_CHECKOUT_COMMENT
private static final String STEP_CHECKIN_COMMENT
private static final String UNNAMED_MASTER_NAME
private static final String ENUMERATED_TYPE_VALUE_ATTRIBUTE
private static FolderingInfo _importFolderingInfo
private static Folder _importFolder
private static WTContainerRef _containerRef
private static final Class[] NO_ARGS
private static final Object[] _singleArg
private static Vector _listeners
private static boolean _hasListeners
Constructor Detail |
public WTImportService()
Method Detail |
public static void addListener(WTImportEventListener listener)
public static void removeListener(WTImportEventListener listener)
private static void fireEvent(Persistable instance, Persistable parentInstance, int objectType, int eventType)
private static void fireEvent(Persistable instance, Persistable parentInstance, int objectType, int eventType, String id1)
private static void fireEvent(Persistable instance, Persistable parentInstance, int objectType, int eventType, String id1, String id2)
private static void fireWarningEvent(Persistable instance, String warning)
private static void firePersistenceEvent(Persistable nonPersistent, Persistable persistent)
public static void progressMessage(String message)
public static Mastered findMaster(Class masterClass, String masterImportNumber, String masterImportName) throws TransferException
TransferException
public static Versioned findVersion(Mastered master, String versionId) throws TransferException
TransferException
public static RevisionControlled findLatestVersion(Mastered master) throws TransferException
TransferException
public static RevisionControlled findIteration(Versioned version, String iterationId) throws TransferException
TransferException
public static RevisionControlled findIteration(Class masterClass, String masterNumber, String masterName, String versionId, String iterationId) throws TransferException
TransferException
public static RevisionControlled findLatestIteration(Versioned version) throws TransferException
TransferException
private static Method getMethod(Class theClass, String name) throws TransferException
TransferException
private static Method getMethod(Class theClass, String name, Class[] args) throws TransferException
TransferException
private static Object invokeMethod(Method theMethod) throws TransferException
TransferException
private static Object invokeMethod(Method theMethod, Object instance) throws TransferException
TransferException
private static Object invokeMethod(Method theMethod, Object instance, Object[] args) throws TransferException
TransferException
public static RevisionControlled createNewMasterVersionAndIteration(Class iterationClass, String masterNumber, String masterName, String vId, String iId) throws TransferException
TransferException
public static Mastered getMaster(RevisionControlled iteration) throws TransferException
TransferException
public static RevisionControlled createNewVersionAndIteration(Mastered master, String masterName, String masterNumber, String importVersionId, String importIterationId) throws TransferException
TransferException
public static RevisionControlled createNewIteration(Versioned version, String masterName, String masterNumber, String versionId, String iterationId) throws TransferException
TransferException
private static void validateNewIterationIds(RevisionControlled newIteration, String masterName, String masterNumber, String importVersionId, String importIterationId, boolean incrementCheckedout) throws TransferException
TransferException
ImportLog
private static String getShortClassName(Class theClass)
private static void setPropertyToDefault(Persistable wtObject, PropertyDescriptor propertyInfo) throws TransferException
TransferException
public static void setImportFolder(String folderName) throws TransferException
TransferException
public static Folder getImportFolder() throws TransferException
TransferException
public static void setImportFolder(Foldered instance) throws TransferException
TransferException
public static Persistable makePersistent(Persistable instance) throws TransferException
TransferException
public static ObjectToObjectLink getExistingLink(Class linkClass, Object tmpLink, Persistable roleAInstance, Persistable roleBInstance) throws TransferException
TransferException
public static ObjectToObjectLink createNewLink(Class linkClass, Persistable roleAInstance, Persistable roleBInstance) throws TransferException
TransferException
public static void setInstanceAttributes(Persistable wtObject, StepEntity stepObject, ExpressSchema wtSchema, StepData dataForEntityReferences) throws TransferException
TransferException
protected static Object convertToEnumTypeValue(Object rawValue, String enumTypeName, ExpressSchema wtSchema, StepData dataForEntityRefs) throws TransferException
rawValue
- Original value as parsed (a String).enumTypeName
- Name of the enumeration this value is one of.
TransferException
protected static Method findSetMethod(Object wtObject, String attrName, String type)
wtObject
- The instanceattrName
- The name of the attribute.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |