ext.tools
Class ToolUtils

java.lang.Object
  extended by ext.tools.ToolUtils
All Implemented Interfaces:
wt.method.RemoteAccess

public class ToolUtils
extends java.lang.Object
implements wt.method.RemoteAccess

collection of a few useful methods to help with windchill/IE


Field Summary
static java.lang.String CVSVersion
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
ToolUtils()
           
 
Method Summary
static void _update(wt.fc.Persistable p)
          server side part of update method.
static com.infoengine.object.factory.Group callTask(java.util.Hashtable formHash, com.infoengine.object.factory.Group serverGroup, java.lang.String myTaskName)
          short form of callTask
static com.infoengine.object.factory.Group callTask(java.util.Hashtable formHash, com.infoengine.object.factory.Group serverGroup, java.lang.String myTaskName, java.util.Hashtable params)
          Prepare and invoke an InfoEngine Task.
static com.infoengine.object.factory.Group callTask(wt.fc.Persistable pbo, java.lang.String myTaskName)
          workflow form of callTask
static void deser(java.lang.String[] argv)
          deserialize an object from a file and dump it to stdout
static void deserex(java.lang.String[] argv)
          deserialize the base64 encoded text given in argv into an object and either print a stacktrace (if it's an exception) or dump it to stdout typical use to get a stacktrace for the exception message in an I*E error group
static void dumpGroup(com.infoengine.object.factory.Group wt_group)
          class to call dump of first element of group passed in.
static void dumpGroup(com.infoengine.object.factory.Group g, int many)
          class to dump a number of elements of group passed in.
static java.lang.String escapeXML(java.lang.Object o)
          escape xml (or html) special chars & > < " ' with their textual representation e.g.
static java.lang.String fixEscapes(java.lang.String a)
          return string with occurences of %hh (hh being two hex digits) replaced with the character represented by hex value.
static void fixEscapes(java.lang.String[] a)
          call fixEscapes for all strings in an array.
static void fixEscapes(java.lang.String a, java.lang.StringBuffer b)
          replaces all occurrences of %hh (hh being two hex digits) with the character represented by hex value VR%3Awt.doc.WTDocument%3A423428 -> VR:wt.doc.WTDocument:423428
currently provides no way to escape the % except with %25
static com.infoengine.object.factory.Group fixObid(com.infoengine.object.factory.Group in)
          make obid atts in group contain only the short obid for wt so we loop and change all values of atts named obid or masterReference
static com.infoengine.object.factory.Group fixObid(com.infoengine.object.factory.Group in, java.lang.String[] fixNames, boolean complain)
          make obid atts in group contain only the short obid for wt so we loop and change all values of atts in String[] fixNames
static java.lang.String getOR(java.lang.Object p)
           
static java.lang.String getOR(wt.fc.Persistable p)
           
static java.lang.String getWidths(com.infoengine.object.factory.Group in)
          return a string that will set the width for a display webject for all cols of a group to the max num of chars contained in each col.
NOTE: as a sideeffect it checks and makes sure first element(=line) has all attributes occurring in elements 2..n, so display-table will work properly
static java.lang.String group2csv(com.infoengine.object.factory.Group in, java.lang.String fdelim, java.lang.String rdelim, boolean includeHeaders)
          make csv data from group
static java.util.Hashtable[] group2HashArray(com.infoengine.object.factory.Group in)
          return a group as an array of Hashtables filled with first att values, including com.infoengine.object.type meta (e.g., wt.part.WTPart)
static java.util.Hashtable[] group2HashArray(com.infoengine.object.factory.Group in, boolean toLower)
          return a group as an array of Hashtables filled with first att values, including com.infoengine.object.type meta (e.g., wt.part.WTPart)
static com.infoengine.object.factory.Group hash2Group(java.util.Hashtable h, java.lang.String groupName)
          Make an infoengine group from a hash table.
static com.infoengine.object.factory.Group hash2Group(java.util.Hashtable h, java.lang.String groupName, java.lang.String key, java.lang.String value)
          Make an infoengine group from a hash table, each key/value pair givng an element having a key and value att.
static com.infoengine.object.factory.Group hash2ParamGroup(java.util.Hashtable h, java.util.Hashtable f, java.lang.String groupName)
          prepare a form group from 2 hashes, one gives "normal" atts, the other makes atts of the form param=name=value
static boolean isRoleMaster(java.lang.String link, int roleoff)
          tell caller if a links roleA or roleB object is a Master.
static boolean isValUnique(com.infoengine.object.factory.Group g, java.lang.String col)
          tell if a group's column contains the same value in all rows (e.g. verify all rows have the same value for att number)
static wt.vc.wip.Workable latestVersionWrkObjFromObid(java.lang.Object obid)
          return the latest version of a persistable from an object (which via toString() must give an obid), return the working copy if the object is checked out.
static void logElement(org.apache.log4j.Logger l, com.infoengine.object.factory.Element e)
          log a group's xml to the log4j logger.
static void logException(org.apache.log4j.Logger l, java.lang.Throwable e)
          log an exceptions stacktrace to the logger
static void logGroup(org.apache.log4j.Logger l, com.infoengine.object.factory.Group g)
          log a group's xml to the log4j logger.
static void logGroup(org.apache.log4j.Logger l, com.infoengine.object.factory.Group g, java.lang.String reason)
          log a group's xml to the log4j logger.
static java.util.Hashtable lookupFromGroup(com.infoengine.object.factory.Group in, java.lang.String key, java.lang.String value)
          return a lookup hash made from two cols of a group
static void main(java.lang.String[] args)
          main to invoke setting of state or test isRoleMaster().
static void mergeSelectedAtts(com.infoengine.object.factory.Group in, java.lang.String key, com.infoengine.object.factory.Group from, java.lang.String look, java.lang.String[] use)
          merge the atts from one group into the rows of a receiving group, using a value from the receiving group as key into group from will throw exception if the lookup key value is not present in "from" group.
static void meta2att(com.infoengine.object.factory.Group in, java.lang.String meta, java.lang.String attName)
          adds normal Att for requested meta data
static java.lang.String nn(java.lang.Object o)
          returns an empty string if passed null or an object's string representation
static java.lang.String nn(java.lang.Object o, java.lang.String def)
          returns a default string if passed null or an object's string representation
static java.lang.Object nno(java.lang.Object o)
          returns an empty string if passed null or the object
static wt.fc.Persistable objFromObid(java.lang.Object obid)
          return a persistable from an object (which via toString() must give an obid)
static java.lang.String prettyPrint(java.lang.Object o)
          simple override method for fullblown prettyPrint - returns a string of the obj's prettyprinted representation result will (intentionally) resemble perl's Data::Dumper output.
static java.lang.String prettyPrint(java.lang.Object o, boolean wantNL)
          simple override method for fullblown prettyPrint - returns a string of the obj's prettyprinted representation result will (intentionally) resemble perl's Data::Dumper output.
static java.lang.String prettyPrint(java.lang.Object o, java.lang.StringBuffer b, java.lang.String indent, boolean wantNL)
          print an object in a layout that allows to identify hases, vectors etc.
static com.infoengine.object.factory.Group readGroup(java.lang.String s)
          deserialize an infoengine group from a file.
static void removeAttNameTypePrefix(com.infoengine.object.factory.Group in, java.lang.String[] names)
          removes the type prefix in an att's name (e.g., wt.part.WTPartUsageLink.quantity.unit -> quantity.unit)
static void removeAttNameTypePrefix(com.infoengine.object.factory.Group in, java.lang.String[] names, java.lang.String tail)
          removes the type prefix in an att's name (e.g., wt.part.WTPartUsageLink.quantity.unit -> quantity.unit)
static boolean rmDashR(java.io.File fOrD)
           
static boolean rmDashR(java.lang.String fOrD)
           
static void rotGroup(com.infoengine.object.factory.Group in)
          rotate group -> cols get rows, new col headers are row0 row1 etc.
static void saveGroup(com.infoengine.object.factory.Group g, java.lang.String s)
          serialize an infoengine group to a file.
static void setLC(java.lang.String lcname, wt.enterprise.RevisionControlled r)
           
static void setStates(java.lang.String[] args)
          set the state of obid[s] passed in; if args[0] is "-l" then args[1] has lifecycle to assign to objs
static java.lang.String shortObid(java.lang.Object longObid)
          extract the short ([OV]R:class.name:seqnr) obid from a ufid
static java.lang.String shortObid(java.lang.Object longObid, boolean throwException)
          extract the short ([OV]R:class.name:seqnr) obid from a ufid
static java.lang.String shortObid(java.lang.String longObid)
          Deprecated. Method shortObid(String) is deprecated, replaced by shortObid(Object).
static java.lang.String shortObid(java.lang.String longObid, boolean throwException)
          Deprecated. Method shortObid(String ,boolean) is deprecated, replaced by shortObid(Object, boolean).
static com.infoengine.object.factory.Group subGroup(com.infoengine.object.factory.Group g, int skip, int n)
          return part of a group (for paging? )
static void trimAtt(com.infoengine.object.factory.Group in, java.lang.String attName)
          walks a group's elements and trims whitespace from a given Att's value - IeDatum will be String afterwards.
static void update(wt.fc.Persistable p)
          calls server side update method on a given Persistable, bypassing checkin/checkout etc.
static wt.vc.wip.Workable wrkObjFromObid(java.lang.Object obid)
          return a persistable from an object (which via toString() must give an obid), return the working copy if the object is checked out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CVSVersion

public static final java.lang.String CVSVersion
See Also:
Constant Field Values
Constructor Detail

ToolUtils

public ToolUtils()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
main to invoke setting of state or test isRoleMaster().

Parameters:
args -
Throws:
java.lang.Exception

setStates

public static void setStates(java.lang.String[] args)
                      throws java.lang.Exception
set the state of obid[s] passed in; if args[0] is "-l" then args[1] has lifecycle to assign to objs

Parameters:
args -
Throws:
java.lang.Exception

setLC

public static void setLC(java.lang.String lcname,
                         wt.enterprise.RevisionControlled r)
                  throws java.lang.Exception
Throws:
java.lang.Exception

rotGroup

public static void rotGroup(com.infoengine.object.factory.Group in)
rotate group -> cols get rows, new col headers are row0 row1 etc. rot is done within group -> group gets altered!

Parameters:
in - group to rotate

getWidths

public static java.lang.String getWidths(com.infoengine.object.factory.Group in)
return a string that will set the width for a display webject for all cols of a group to the max num of chars contained in each col.
NOTE: as a sideeffect it checks and makes sure first element(=line) has all attributes occurring in elements 2..n, so display-table will work properly

Parameters:
in - group to determine the widths for
Returns:
String e.g., 10,30,23,24

dumpGroup

public static void dumpGroup(com.infoengine.object.factory.Group wt_group)
class to call dump of first element of group passed in. passes call to dumpGroup(group, 1)

Parameters:
wt_group - group to ask dump for

dumpGroup

public static void dumpGroup(com.infoengine.object.factory.Group g,
                             int many)
class to dump a number of elements of group passed in.

Parameters:
g - input group to dump
many - number of elements to dump

fixObid

public static com.infoengine.object.factory.Group fixObid(com.infoengine.object.factory.Group in)
                                                   throws java.lang.Exception
make obid atts in group contain only the short obid for wt so we loop and change all values of atts named obid or masterReference

Parameters:
in - group to make subst in
Returns:
void
Throws:
java.lang.Exception

fixObid

public static com.infoengine.object.factory.Group fixObid(com.infoengine.object.factory.Group in,
                                                          java.lang.String[] fixNames,
                                                          boolean complain)
                                                   throws java.lang.Exception
make obid atts in group contain only the short obid for wt so we loop and change all values of atts in String[] fixNames

Parameters:
in - group to make subst in
fixNames - names of atts to fix.
Returns:
void
Throws:
java.lang.Exception

subGroup

public static com.infoengine.object.factory.Group subGroup(com.infoengine.object.factory.Group g,
                                                           int skip,
                                                           int n)
return part of a group (for paging? )

Parameters:
g - group with all records
skip - elements to skip
n - number of elements to return
Returns:
Group newly created smaller group

shortObid

public static java.lang.String shortObid(java.lang.String longObid)
                                  throws wt.util.WTException
Deprecated. Method shortObid(String) is deprecated, replaced by shortObid(Object).

Throws:
wt.util.WTException

shortObid

public static java.lang.String shortObid(java.lang.String longObid,
                                         boolean throwException)
                                  throws wt.util.WTException
Deprecated. Method shortObid(String ,boolean) is deprecated, replaced by shortObid(Object, boolean).

Throws:
wt.util.WTException

shortObid

public static java.lang.String shortObid(java.lang.Object longObid)
                                  throws wt.util.WTException
extract the short ([OV]R:class.name:seqnr) obid from a ufid

Parameters:
longObid -
Returns:
String
Throws:
java.lang.Exception
wt.util.WTException

shortObid

public static java.lang.String shortObid(java.lang.Object longObid,
                                         boolean throwException)
                                  throws wt.util.WTException
extract the short ([OV]R:class.name:seqnr) obid from a ufid

Parameters:
longObid -
throwException -
Returns:
String
Throws:
java.lang.Exception
wt.util.WTException

group2csv

public static java.lang.String group2csv(com.infoengine.object.factory.Group in,
                                         java.lang.String fdelim,
                                         java.lang.String rdelim,
                                         boolean includeHeaders)
make csv data from group

Parameters:
in - group to make data from
Returns:
data

hash2Group

public static com.infoengine.object.factory.Group hash2Group(java.util.Hashtable h,
                                                             java.lang.String groupName)
Make an infoengine group from a hash table. Creates one row.

Parameters:
h - input hash table with name/value pairs
groupName - name to give to newly created group
Returns:
Constructed group

hash2Group

public static com.infoengine.object.factory.Group hash2Group(java.util.Hashtable h,
                                                             java.lang.String groupName,
                                                             java.lang.String key,
                                                             java.lang.String value)
Make an infoengine group from a hash table, each key/value pair givng an element having a key and value att. Creates as many rows as necessary.

Parameters:
h - input hash table with key/value pairs
groupName - name to give to newly created group
key - Attribute name for the key column
value - Attribute name for the value column

meta2att

public static void meta2att(com.infoengine.object.factory.Group in,
                            java.lang.String meta,
                            java.lang.String attName)
adds normal Att for requested meta data

Parameters:
in -
meta -
attName -

removeAttNameTypePrefix

public static void removeAttNameTypePrefix(com.infoengine.object.factory.Group in,
                                           java.lang.String[] names)
                                    throws wt.util.WTException
removes the type prefix in an att's name (e.g., wt.part.WTPartUsageLink.quantity.unit -> quantity.unit)

Parameters:
in -
Throws:
java.lang.Exception - if an att creates a duplicate name.
wt.util.WTException

removeAttNameTypePrefix

public static void removeAttNameTypePrefix(com.infoengine.object.factory.Group in,
                                           java.lang.String[] names,
                                           java.lang.String tail)
                                    throws wt.util.WTException
removes the type prefix in an att's name (e.g., wt.part.WTPartUsageLink.quantity.unit -> quantity.unit)

Parameters:
in -
Throws:
java.lang.Exception - if an att creates a duplicate name.
wt.util.WTException

callTask

public static com.infoengine.object.factory.Group callTask(wt.fc.Persistable pbo,
                                                           java.lang.String myTaskName)
                                                    throws java.lang.Exception
workflow form of callTask

Parameters:
pbo - obid of the workflows primaryBusinessObject
myTaskName - name of the Task
Returns:
the output group of the Task (or new Group with getSuccess()="ERROR" and exception-object and exception-message set if task.invoke() throws an exception e.g. task cannot be compiled)
Throws:
java.lang.Exception - if the task setup fails.

callTask

public static com.infoengine.object.factory.Group callTask(java.util.Hashtable formHash,
                                                           com.infoengine.object.factory.Group serverGroup,
                                                           java.lang.String myTaskName)
                                                    throws java.lang.Exception
short form of callTask

Parameters:
formHash - form data in a hash
serverGroup - if null we'll create one - else server data to pass on
myTaskName - name of the Task
Returns:
the output group of the Task (or new Group with getSuccess()="ERROR" and exception-object and exception-message set if task.invoke() throws an exception e.g. task cannot be compiled)
Throws:
java.lang.Exception - if the task setup fails.

callTask

public static com.infoengine.object.factory.Group callTask(java.util.Hashtable formHash,
                                                           com.infoengine.object.factory.Group serverGroup,
                                                           java.lang.String myTaskName,
                                                           java.util.Hashtable params)
                                                    throws java.lang.Exception
Prepare and invoke an InfoEngine Task.

Parameters:
formHash - form data in a hash
serverGroup - if null we'll create one - else server data to pass on
myTaskName - name of the Task
params - hashtable to make form param=name=value entries
Returns:
the output group of the Task (or new Group with getSuccess()="ERROR" and exception-object and exception-message set if task.invoke() throws an exception e.g. task cannot be compiled)
Throws:
java.lang.Exception - if the task setup fails.

nn

public static java.lang.String nn(java.lang.Object o)
returns an empty string if passed null or an object's string representation

Parameters:
o -
Returns:
String

nno

public static java.lang.Object nno(java.lang.Object o)
returns an empty string if passed null or the object

Parameters:
o -
Returns:
Object

nn

public static java.lang.String nn(java.lang.Object o,
                                  java.lang.String def)
returns a default string if passed null or an object's string representation

Parameters:
o -
Returns:
String

update

public static void update(wt.fc.Persistable p)
                   throws java.lang.Exception
calls server side update method on a given Persistable, bypassing checkin/checkout etc.

Parameters:
p -
Throws:
java.lang.Exception

_update

public static void _update(wt.fc.Persistable p)
                    throws java.lang.Exception
server side part of update method.

Parameters:
p -
Throws:
java.lang.Exception

trimAtt

public static void trimAtt(com.infoengine.object.factory.Group in,
                           java.lang.String attName)
walks a group's elements and trims whitespace from a given Att's value - IeDatum will be String afterwards.

Parameters:
in -
attName -

fixEscapes

public static void fixEscapes(java.lang.String[] a)
call fixEscapes for all strings in an array.

Parameters:
a - array with strings passed in.

fixEscapes

public static void fixEscapes(java.lang.String a,
                              java.lang.StringBuffer b)
replaces all occurrences of %hh (hh being two hex digits) with the character represented by hex value VR%3Awt.doc.WTDocument%3A423428 -> VR:wt.doc.WTDocument:423428
currently provides no way to escape the % except with %25

Parameters:
a - String to make replacements to
b - StringBuffer for new data, gets truncated first.

fixEscapes

public static java.lang.String fixEscapes(java.lang.String a)
return string with occurences of %hh (hh being two hex digits) replaced with the character represented by hex value. if used more than once consider using the method that gets a StringBuffer passed for the newly created String.

Parameters:
a -
Returns:
String

group2HashArray

public static java.util.Hashtable[] group2HashArray(com.infoengine.object.factory.Group in)
return a group as an array of Hashtables filled with first att values, including com.infoengine.object.type meta (e.g., wt.part.WTPart)

Parameters:
in - group to unload
Returns:
Hashtable[]

group2HashArray

public static java.util.Hashtable[] group2HashArray(com.infoengine.object.factory.Group in,
                                                    boolean toLower)
return a group as an array of Hashtables filled with first att values, including com.infoengine.object.type meta (e.g., wt.part.WTPart)

Parameters:
in - group to unload
toLower - flag whether to lowercase att names
Returns:
Hashtable[]

lookupFromGroup

public static java.util.Hashtable lookupFromGroup(com.infoengine.object.factory.Group in,
                                                  java.lang.String key,
                                                  java.lang.String value)
return a lookup hash made from two cols of a group

Parameters:
in - group to unload
Returns:
Hashtable

saveGroup

public static void saveGroup(com.infoengine.object.factory.Group g,
                             java.lang.String s)
                      throws java.lang.Exception
serialize an infoengine group to a file.

Parameters:
g - the group
s - the filename
Throws:
java.lang.Exception

readGroup

public static com.infoengine.object.factory.Group readGroup(java.lang.String s)
                                                     throws java.lang.Exception
deserialize an infoengine group from a file.

Parameters:
s - the filename
Returns:
Group
Throws:
java.lang.Exception

prettyPrint

public static java.lang.String prettyPrint(java.lang.Object o)
simple override method for fullblown prettyPrint - returns a string of the obj's prettyprinted representation result will (intentionally) resemble perl's Data::Dumper output.

Parameters:
o -
Returns:
String
Throws:

prettyPrint

public static java.lang.String prettyPrint(java.lang.Object o,
                                           boolean wantNL)
simple override method for fullblown prettyPrint - returns a string of the obj's prettyprinted representation result will (intentionally) resemble perl's Data::Dumper output. on demand replace \n with ' '

Parameters:
o -
wantNL -
Returns:
String
Throws:

prettyPrint

public static java.lang.String prettyPrint(java.lang.Object o,
                                           java.lang.StringBuffer b,
                                           java.lang.String indent,
                                           boolean wantNL)
print an object in a layout that allows to identify hases, vectors etc. including contents.
vector gives ( data data data ...)
hashtable gives { key => value, key => value ... }
enumeration will print it's elements
arrays prints [ elem elem ...]
wtobjects print displayidentifier
else we print obj.toString() (classname)

Parameters:
o - the object
b - a stringbuffer to fill
indent - indentation to use for prettyprintend output
Returns:
String
Throws:

hash2ParamGroup

public static com.infoengine.object.factory.Group hash2ParamGroup(java.util.Hashtable h,
                                                                  java.util.Hashtable f,
                                                                  java.lang.String groupName)
prepare a form group from 2 hashes, one gives "normal" atts, the other makes atts of the form param=name=value

Parameters:
h -
f -
groupName -
Returns:
Group

logGroup

public static void logGroup(org.apache.log4j.Logger l,
                            com.infoengine.object.factory.Group g,
                            java.lang.String reason)
log a group's xml to the log4j logger.

Parameters:
l - the logger
g - the group
reason - string to print in line before groups's xml appears
Throws:

logGroup

public static void logGroup(org.apache.log4j.Logger l,
                            com.infoengine.object.factory.Group g)
log a group's xml to the log4j logger.

Parameters:
l - the logger
g - the group
Throws:

logElement

public static void logElement(org.apache.log4j.Logger l,
                              com.infoengine.object.factory.Element e)
log a group's xml to the log4j logger.

Parameters:
l - the logger
g - the group
Throws:

mergeSelectedAtts

public static void mergeSelectedAtts(com.infoengine.object.factory.Group in,
                                     java.lang.String key,
                                     com.infoengine.object.factory.Group from,
                                     java.lang.String look,
                                     java.lang.String[] use)
                              throws com.infoengine.util.IEException
merge the atts from one group into the rows of a receiving group, using a value from the receiving group as key into group from will throw exception if the lookup key value is not present in "from" group.

Parameters:
in - receiving group
key - col name of key into group from
from - group to merge in
look - colname for key lookup
use - array of column names to merge into new group. possibly existing atts are first removed.
Throws:
com.infoengine.util.IEException - thrown for various error conditions

isValUnique

public static boolean isValUnique(com.infoengine.object.factory.Group g,
                                  java.lang.String col)
tell if a group's column contains the same value in all rows (e.g. verify all rows have the same value for att number)

Parameters:
g - the group
col - the column name
Returns:
boolean
Throws:

isRoleMaster

public static boolean isRoleMaster(java.lang.String link,
                                   int roleoff)
                            throws wt.util.WTException
tell caller if a links roleA or roleB object is a Master. according to windchill's design pattern we use introspection to find a links two-argument static constructor method, which happens to be called new<LinkName> e.g., newWTPartUsageLink the first such method is inspected and queried for the object types of it's parameters. the result is cached so we speed up things. as of now all of the links we needed could be inspected that way. in case it happens that a link misses the appropriate constructor, the linkroles hash should be initialized to contain the data for such links.

Parameters:
link - string name of link class, e.g., wt.part.WTPartUsageLink
roleoff - 0=roleA, 1=roleB
Returns:
boolean
Throws:
wt.util.WTException

escapeXML

public static java.lang.String escapeXML(java.lang.Object o)
escape xml (or html) special chars & > < " ' with their textual representation e.g. &->&amp;

Parameters:
o - the object to print (o.toString() or "" if null)
Returns:
String the escaped string

objFromObid

public static wt.fc.Persistable objFromObid(java.lang.Object obid)
                                     throws wt.util.WTException
return a persistable from an object (which via toString() must give an obid)

Parameters:
obid -
Returns:
Persistable
Throws:
wt.util.WTException

wrkObjFromObid

public static wt.vc.wip.Workable wrkObjFromObid(java.lang.Object obid)
                                         throws wt.util.WTException
return a persistable from an object (which via toString() must give an obid), return the working copy if the object is checked out.

Parameters:
obid -
Returns:
Persistable
Throws:
wt.util.WTException

latestVersionWrkObjFromObid

public static wt.vc.wip.Workable latestVersionWrkObjFromObid(java.lang.Object obid)
                                                      throws wt.util.WTException
return the latest version of a persistable from an object (which via toString() must give an obid), return the working copy if the object is checked out.

Parameters:
obid -
Returns:
Persistable
Throws:
wt.util.WTException

deser

public static void deser(java.lang.String[] argv)
                  throws java.lang.Exception
deserialize an object from a file and dump it to stdout

Parameters:
argv -
Throws:
java.lang.Exception

deserex

public static void deserex(java.lang.String[] argv)
                    throws java.lang.Exception
deserialize the base64 encoded text given in argv into an object and either print a stacktrace (if it's an exception) or dump it to stdout typical use to get a stacktrace for the exception message in an I*E error group

Parameters:
argv -
Throws:
java.lang.Exception

logException

public static void logException(org.apache.log4j.Logger l,
                                java.lang.Throwable e)
log an exceptions stacktrace to the logger

Parameters:
l -
e -
Throws:
java.lang.Exception

getOR

public static java.lang.String getOR(wt.fc.Persistable p)

getOR

public static java.lang.String getOR(java.lang.Object p)

rmDashR

public static boolean rmDashR(java.lang.String fOrD)

rmDashR

public static boolean rmDashR(java.io.File fOrD)