|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectext.sulis.StaticHelper
public class StaticHelper
purpose: provide static methods to ease various common windchill tasks
| Field Summary | |
|---|---|
static java.text.SimpleDateFormat |
DATE_WITH_TIME
|
static int |
MULTIVAL_ERR
|
static int |
MULTIVAL_FIRST
|
static int |
MULTIVAL_VECTOR
|
static boolean |
WITH_UNITS
|
static boolean |
WITHOUT_UNITS
|
| Fields inherited from interface wt.method.RemoteAccess |
|---|
versionID |
| Constructor Summary | |
|---|---|
StaticHelper()
|
|
| Method Summary | |
|---|---|
static void |
_insert(wt.fc.collections.WTHashSet ws)
|
static void |
addIBAs(com.infoengine.object.factory.Element e,
wt.iba.value.IBAHolder i,
java.lang.String prefix)
add the ibas of an object to an element as Atts, prefixing optionally with a string; use default data and time, no units and throw error on multivalued iba. |
static void |
addIBAs(com.infoengine.object.factory.Element e,
wt.iba.value.IBAHolder i,
java.lang.String prefix,
java.text.SimpleDateFormat fmt,
boolean withUnits,
int multival_flag)
add the ibas of an object to an element as Atts, prefixing optionally with a string |
static java.lang.String |
getFullTypeName(java.lang.String typeName)
return a type"s full type name e˙g˙, WCTYPE|wt.part.WTPart|de.sulis.Stype |
static java.lang.String |
getType(wt.fc.WTObject o)
return an objects type name |
static java.util.Hashtable |
IBAHash(wt.iba.value.DefaultAttributeContainer dac)
return the result of IBAHash(DefaultAttributeContainer,SimpleDateFormat) with default date "yyyyMMdd hh:mm:ss" |
static java.util.Hashtable |
IBAHash(wt.iba.value.DefaultAttributeContainer dac,
java.text.SimpleDateFormat f)
return the IBAs of an IBAHolder's attribute container; format Timestamps with dateformat passed in. |
static java.util.Hashtable |
IBAHash(wt.iba.value.DefaultAttributeContainer dac,
java.text.SimpleDateFormat f,
boolean withUnits)
return the IBAs of an IBAHolder's attribute container; format Timestamps with dateformat passed in. |
static java.util.Hashtable |
IBAHash(wt.iba.value.DefaultAttributeContainer dac,
java.text.SimpleDateFormat f,
boolean withUnits,
int multival_flag)
return the IBAs of an IBAHolder's attribute container; format Timestamps with dateformat passed in. |
static java.util.Hashtable |
IBAHash(wt.iba.value.IBAHolder i)
return the result of IBAHash(IBAHolder,SimpleDateFormat) with default date "yyyyMMdd hh:mm:ss" |
static java.util.Hashtable |
IBAHash(wt.iba.value.IBAHolder h,
java.text.SimpleDateFormat f)
return the IBAs of an IBAHolder; format Timestamps with dateformat passed in. |
static java.util.Hashtable |
IBAHash(wt.iba.value.IBAHolder h,
java.text.SimpleDateFormat f,
boolean withUnits)
return the IBAs of an IBAHolder; format Timestamps with dateformat passed in. |
static java.util.Hashtable |
IBAHash(wt.iba.value.IBAHolder h,
java.text.SimpleDateFormat f,
boolean withUnits,
int multival_flag)
return the IBAs of an IBAHolder; format Timestamps with dateformat passed in. |
static java.util.Hashtable |
IBAHash(wt.iba.value.IBAHolder i,
java.lang.String newFmt)
return the result of IBAHash(IBAHolder,SimpleDateFormat) with dateformat passed in |
static java.util.Hashtable |
IBAHash(wt.iba.value.IBAHolder i,
java.lang.String newFmt,
boolean withUnits)
return the result of IBAHash(IBAHolder,SimpleDateFormat,withUnits) with dateformat passed in |
static void |
insert(wt.fc.collections.WTHashSet ws)
persiste the objects in the WTHashSet using server side method. |
static void |
main(java.lang.String[] a)
print program usage info or invoke testConn() |
static wt.vc.OneOffVersioned |
newOneOff(wt.vc.OneOffVersioned v)
|
static wt.vc.Versioned |
newVersion(wt.vc.Versioned v)
|
static boolean |
stackTraceContains(java.util.regex.Pattern p)
|
static boolean |
stackTraceContains(java.lang.String s)
|
static boolean |
stackTraceContains(java.lang.String s,
boolean lower)
|
static void |
testConn(java.lang.String[] a)
allow testing of oracle connection running "select sysdate from dual", either with supplied args or the connection info from db.properties. prints result to STDERR |
static java.lang.String[] |
typeArray(java.lang.String t)
return an array with an objects type hierarchy |
static java.lang.String[] |
typeArray(wt.fc.WTObject o)
return an array with an objects type hierarchy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MULTIVAL_ERR
public static final int MULTIVAL_FIRST
public static final int MULTIVAL_VECTOR
public static final boolean WITH_UNITS
public static final boolean WITHOUT_UNITS
public static java.text.SimpleDateFormat DATE_WITH_TIME
| Constructor Detail |
|---|
public StaticHelper()
| Method Detail |
|---|
public static void main(java.lang.String[] a)
throws java.lang.Exception
a - commandline args
java.lang.Exception
public static void testConn(java.lang.String[] a)
throws java.lang.Exception
a - arguments, -c [host port sid user [pass]]
java.lang.Exception
public static java.lang.String getType(wt.fc.WTObject o)
throws wt.util.WTException
o - the WTObject
wt.util.WTException
public static java.lang.String getFullTypeName(java.lang.String typeName)
throws wt.util.WTException
o - the name, without prefix (e.g., not com.ptc.myType but just myType)
wt.util.WTException
public static java.lang.String[] typeArray(wt.fc.WTObject o)
throws wt.util.WTException
o - the WTObject
wt.util.WTExceptionpublic static java.lang.String[] typeArray(java.lang.String t)
t - the windchill type string
wt.util.WTException
public static java.util.Hashtable IBAHash(wt.iba.value.IBAHolder i)
throws wt.util.WTException,
java.rmi.RemoteException
i - the IBA Holder
wt.util.WTException - from windchill code
java.rmi.RemoteException - from windchill code
public static java.util.Hashtable IBAHash(wt.iba.value.DefaultAttributeContainer dac)
throws wt.util.WTException,
java.rmi.RemoteException
i - the IBA Holder's Attribute Container
wt.util.WTException - from windchill code
java.rmi.RemoteException - from windchill code
public static java.util.Hashtable IBAHash(wt.iba.value.IBAHolder i,
java.lang.String newFmt)
throws wt.util.WTException,
java.rmi.RemoteException
i - the IBA HoldernewFmt - the DateFormat to use for formatting Timestamps
wt.util.WTException - from windchill code or if SimpleDateFormat is bad
java.rmi.RemoteException - from windchill code
public static java.util.Hashtable IBAHash(wt.iba.value.IBAHolder i,
java.lang.String newFmt,
boolean withUnits)
throws wt.util.WTException,
java.rmi.RemoteException
i - the IBA HoldernewFmt - the DateFormat to use for formatting Timestamps
wt.util.WTException - from windchill code or if SimpleDateFormat is bad
java.rmi.RemoteException - from windchill code
public static java.util.Hashtable IBAHash(wt.iba.value.IBAHolder h,
java.text.SimpleDateFormat f)
throws wt.util.WTException,
java.rmi.RemoteException
h - the IBA Holderf - the DateFormat to use for formatting Timestamps
wt.util.WTException - from windchill code or if multivalued IBA encountered.
java.rmi.RemoteException - from windchill code
public static java.util.Hashtable IBAHash(wt.iba.value.DefaultAttributeContainer dac,
java.text.SimpleDateFormat f)
throws wt.util.WTException,
java.rmi.RemoteException
h - the IBA Holderf - the DateFormat to use for formatting Timestamps
wt.util.WTException - from windchill code or if multivalued IBA encountered.
java.rmi.RemoteException - from windchill code
public static java.util.Hashtable IBAHash(wt.iba.value.IBAHolder h,
java.text.SimpleDateFormat f,
boolean withUnits)
throws wt.util.WTException,
java.rmi.RemoteException
wt.util.WTException - from windchill code or if multivalued IBA encountered.
java.rmi.RemoteException - from windchill code
public static java.util.Hashtable IBAHash(wt.iba.value.DefaultAttributeContainer dac,
java.text.SimpleDateFormat f,
boolean withUnits)
throws wt.util.WTException,
java.rmi.RemoteException
wt.util.WTException - from windchill code or if multivalued IBA encountered.
java.rmi.RemoteException - from windchill code
public static java.util.Hashtable IBAHash(wt.iba.value.IBAHolder h,
java.text.SimpleDateFormat f,
boolean withUnits,
int multival_flag)
throws wt.util.WTException,
java.rmi.RemoteException
h - the IBA Holderf - the DateFormat to use for formatting TimestampswithUnits - if true add a float/units att's unit display string to the string valuemultival_flag - indicate what to do if multivalued IBA found:
wt.util.WTException - from windchill code or if multivalued IBA encountered.
java.rmi.RemoteException - from windchill code
public static java.util.Hashtable IBAHash(wt.iba.value.DefaultAttributeContainer dac,
java.text.SimpleDateFormat f,
boolean withUnits,
int multival_flag)
throws wt.util.WTException,
java.rmi.RemoteException
h - the IBA Holderf - the DateFormat to use for formatting TimestampswithUnits - if true add a float/units att's unit display string to the string valuemultival_flag - indicate what to do if multivalued IBA found:
wt.util.WTException - from windchill code or if multivalued IBA encountered.
java.rmi.RemoteException - from windchill code
public static void insert(wt.fc.collections.WTHashSet ws)
throws wt.util.WTException,
java.rmi.RemoteException,
java.lang.reflect.InvocationTargetException
ws -
WTException, - RemoteException, InvocationTargetException
wt.util.WTException
java.rmi.RemoteException
java.lang.reflect.InvocationTargetException
public static void _insert(wt.fc.collections.WTHashSet ws)
throws wt.util.WTException
wt.util.WTException
public static void addIBAs(com.infoengine.object.factory.Element e,
wt.iba.value.IBAHolder i,
java.lang.String prefix)
throws wt.util.WTException,
java.rmi.RemoteException
e - the Elementi - the IBAHolderprefix - prefix to use, e.g., "xx_" would add IBA blah as xx_blah
WTException, - RemoteException
wt.util.WTException
java.rmi.RemoteException
public static void addIBAs(com.infoengine.object.factory.Element e,
wt.iba.value.IBAHolder i,
java.lang.String prefix,
java.text.SimpleDateFormat fmt,
boolean withUnits,
int multival_flag)
throws wt.util.WTException,
java.rmi.RemoteException
e - the Elementi - the IBAHolderprefix - prefix to use, e.g., "xx_" would add IBA blah as xx_blahfmt - date format for dateswithUnits - flag if unit should be appended to float-with-unitmultival_flag - indicate what to do if multivalued IBA found:
WTException, - RemoteException
wt.util.WTException
java.rmi.RemoteException
public static wt.vc.Versioned newVersion(wt.vc.Versioned v)
throws wt.util.WTException,
wt.util.WTPropertyVetoException
wt.util.WTException
wt.util.WTPropertyVetoException
public static wt.vc.OneOffVersioned newOneOff(wt.vc.OneOffVersioned v)
throws wt.util.WTException,
wt.util.WTPropertyVetoException
wt.util.WTException
wt.util.WTPropertyVetoExceptionpublic static boolean stackTraceContains(java.lang.String s)
public static boolean stackTraceContains(java.lang.String s,
boolean lower)
public static boolean stackTraceContains(java.util.regex.Pattern p)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||