public class StaticHelper
extends FileWatchdog
implements RemoteAccess
Modifier and Type | Field and Description |
---|---|
static String |
CONTAINER |
static SimpleDateFormat |
DATE_WITH_TIME |
static String |
DEFAULT_UNIT |
static String |
DELIM |
static Method |
getSortValue |
static String |
HTTPGWHOSTNAME |
static String |
IS_PHANTOM |
static String |
LIFE_CYCLE |
static int |
MAJOR |
static int |
MINOR |
static String |
MS_NAME |
static int |
MULTIVAL_ERR |
static int |
MULTIVAL_FIRST |
static int |
MULTIVAL_LAST |
static int |
MULTIVAL_SET |
static int |
MULTIVAL_VECTOR |
static String |
NL |
static String |
OIR |
static Map<String,Long> |
ORGID |
static String |
PART_TYPE |
static String |
RMIHOSTNAME |
static URL |
RMS_URL |
static String |
SERIES |
static boolean |
SERVER |
static String |
SERVICE_NAME |
static String |
SOURCE |
static String |
STATE |
static String |
TEAM |
static String |
TYPE |
static boolean |
USEPERL |
static String |
VIEW |
static String |
viewURL |
static String |
WEBAPPNAME |
static String |
WEBJECT |
static boolean |
WITH_UNITS |
static boolean |
WITHOUT_UNITS |
static String |
WTHOME |
Modifier and Type | Method and Description |
---|---|
static Object |
_callMOnO(Object o,
String m)
Server side method - call a no-args (getter) method on an obj on the server
|
static void |
_remove(WTHashSet ws)
remove the objects in the WTHashSet (must be used only within ms context!)
|
static void |
addIBAs(Element e,
IBAHolder i,
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(Element e,
IBAHolder i,
String prefix,
SimpleDateFormat fmt,
boolean withUnits,
int multival_flag)
add the ibas of an object to an element as Atts, prefixing optionally with a string
|
static int |
addPromotables(PromotionNotice p,
List<Promotable> l)
add promotables to an existing PromotionNotice
|
static Object |
callMOnO(Object o,
String m)
call a no-args (getter) method on an obj on the server
|
static InputStream |
checkForUtf8BOM(InputStream inputStream)
return the wrapped iputstream dropping a ut8 BOM if one is present
|
static void |
checkForVersion(String seriesID,
String version,
boolean createMissingVersion)
Deprecated.
moved to SulisLoadHelper
|
static void |
clearTaskCache(Map in)
allow removal of cached tasks to force reload of class - allows to flush all MS, as in multi ms setup only the one that recompiles a task also reloads it.
|
static int |
compareVersions(String seriesID,
String versionA,
String versionB)
Deprecated.
moved to SulisLoadHelper
|
static int |
compareVersions(String seriesID,
String versionA,
String versionB,
boolean createMissingVersion)
Deprecated.
moved to SulisLoadHelper
|
static void |
copyFile(File in,
File out) |
static int |
countLinkedEPMDocs(WTPart part,
boolean countDescribeLinkToo) |
static EPMDocument |
createEPMDoc(String docNumber,
String docName,
String cadName,
String container,
String folder,
String versionID,
String iterationID,
File[] binaryContent)
Deprecated.
moved to SulisLoadHelper
|
static EPMDocument |
createEPMDoc(String docNumber,
String docName,
String cadName,
String container,
String folder,
String versionID,
String iterationID,
File[] binaryContent,
EPMAuthoringAppType authoringApp,
EPMAuthoringAppVersion appVersion)
Deprecated.
moved to SulisLoadHelper
|
static EPMDocument |
createEPMDoc(String docNumber,
String docName,
String cadName,
String container,
String folder,
String versionID,
String iterationID,
Map moreData,
File[] binaryContent)
Deprecated.
moved to SulisLoadHelper
|
static EPMDocument |
createEPMDoc(String docNumber,
String docName,
String cadName,
String container,
String folder,
String versionID,
String iterationID,
Map moreData,
File[] binaryContent,
EPMAuthoringAppType authoringApp,
EPMAuthoringAppVersion appVersion)
Deprecated.
moved to SulisLoadHelper
|
static void |
createSeq(String name)
Deprecated.
moved to SQLHelper
|
static WTDocument |
createWTDoc(String docNumber,
String docName,
String container,
String folder,
String versionID,
String iterationID,
Map moreData,
File[] binaryContent)
Deprecated.
moved to SulisLoadHelper
|
static WTDocument |
createWTDoc(String docNumber,
String docName,
WTContainer container,
String folder,
String versionID,
String iterationID,
Map moreData,
File[] binaryContent)
Deprecated.
moved to SulisLoadHelper
|
static WTPart |
createWTPart(String partNumber,
String partName,
String container,
String folder,
String versionID,
String iterationID)
Deprecated.
moved to SulisLoadHelper
|
static WTPart |
createWTPart(String partNumber,
String partName,
String container,
String folder,
String versionID,
String iterationID,
boolean makePersistent)
Deprecated.
moved to SulisLoadHelper
|
static WTPart |
createWTPart(String partNumber,
String partName,
String container,
String folder,
String versionID,
String iterationID,
Map moreData)
Deprecated.
moved to SulisLoadHelper
|
static WTPart |
createWTPart(String partNumber,
String partName,
String container,
String folder,
String versionID,
String iterationID,
Map moreDataIn,
boolean makePersistent)
Deprecated.
moved to SulisLoadHelper
|
static Connection |
dbConnect()
Deprecated.
moved to SQLHelper
|
static Connection |
dbConnect(String user,
String pass)
Deprecated.
moved to SQLHelper
|
void |
doOnChange()
internal use
|
static QueryResult |
doServerExpand(Persistable o,
String role,
Class linkClass,
Boolean otherSide)
run expand() on server (NOTE: this call can depending on link class specified be very costly). also as of windchill 10 some links are not extended from a link class - see ListAll.java in ext.tools ...
|
static String |
escapeUTF(String in) |
static int |
execCommand(String[] cmdArray)
execute a given command returns int exitValue of process.
|
static int |
execCommand(String[] cmdArray,
String[] env,
File workDir)
execute a given command with given environment and workdir.
|
static List<String> |
f2l(String fname)
reads specified file in list
|
static List<String> |
f2l(String fname,
String skipPattern)
reads specified file in list
|
static String |
f2s(File f)
reads specified file and returns filecontent as string with platformspecific line delimiters
|
static String |
f2s(File f,
String skipPattern)
reads specified file and returns filecontent as string with platformspecific line delimiters, skipping lines matching skipPattern (e.g., weed comments)
|
static String |
f2s(String fname)
reads specified file and returns filecontent as string with platformspecific line delimiters
|
static String |
f2s(String fname,
String skipPattern)
reads specified file and returns filecontent as string with platformspecific line delimiters
|
static String |
fileVaultName(Object o)
return name of file on disk of content
|
static Persistable |
findLinkBetween(Object l,
Object a,
Object b)
return (first) link of type l between objects a and b
|
static QueryResult |
findLinks(Object l,
Object a,
Object b,
boolean sort)
return queryresult of links of type l between objects a and b, if either side is null only links from/to
|
static QueryResult |
findLinksBetween(Object l,
Object a,
Object b)
return queryresult of links of type l between objects a and b
|
static QueryResult |
findLinksFrom(Object l,
Object a,
boolean sort)
return queryresult of links of type l with object a in RoleA
|
static QueryResult |
findLinksTo(Object l,
Object b,
boolean sort)
return queryresult of links of type l with object b in RoleB
|
static WTTypeDefinition |
findType(String typeName)
find a wttypedefinition by name (WARN: returns 1st one found if name is not uniqe)
|
static String |
getAbsoluteName(Object prefix,
Object fileName)
make absolute name - will use prefix unless filename is already absoulte path
|
static WTPart |
getActiveAssociated(EPMDocument doc)
return actively linked part (structure role) - if more than one exists returns first one
|
static EPMDocument |
getActiveAssociated(WTPart p)
return actively linked epmdoc (structure role) - if more than one exists returns first one
|
static List<EPMMemberLink> |
getAllEPMMemberLinks(EPMDocument epm)
returns all EPMMemberLink from a epm doc
|
static List<EPMDocument> |
getAllLinkedEPMDoc(WTPart part,
boolean checkDescribeLinkToo)
returns all epmdocs that are linked to the given wtpart either by epmbuildruile or epmdescribelink
|
static List<WTPartUsageLink> |
getAllLinkedNodes(WTPart rootPart)
TODO javadoc
|
static List<WTDocument> |
getAllLinkedWTDocs(WTPart part)
method to get all linked WTDocuments to given WTPart
|
static List<WTPart> |
getAllLinkedWTParts(WTDocument wtdoc)
method to get a list of linked WTParts on given WTDocument (via descible links)
|
static List<WTContainer> |
getAllWTContainer()
query for all container objects returns list of wt containers.
|
static List<WTContainer> |
getAllWTContainer(boolean sort)
query for all container objects returns list of wt containers.
|
static EPMBuildRule |
getBuildRule(Object docOrPart)
returns the buildrule starting from given obj
|
static int |
getBuildType(boolean roleStruct,
boolean roleRep,
boolean roleAttr)
get the buildtype as int
|
static List<EPMDocument> |
getCalDrawingsOnWTPart(WTPart prt)
method to get the calculated EPMDocument(s) (Drawing(s) only) on WTPart
|
static WTPart |
getCalWTPartOnDrawing(EPMDocument drw,
String wtPartNum)
method to get a specific calculated WTPart (by given WTPart's number) on EPMDocument (drawing)
|
static List<WTPart> |
getCalWTPartsOnDrawing(EPMDocument drw)
returns a list of calculated WTParts on given EPMDocument (DRAWING)
|
static Map<String,String> |
getCC()
Deprecated.
moved to SQLHelper
|
static Object[] |
getConsVals(long tid,
long attId)
TODO javadoc
|
static Object[] |
getConsVals(String name,
String att)
TODO javadoc
|
static Object[] |
getConsVals(WTTypeDefinition type,
String att,
long attId)
TODO javadoc
|
static void |
getCount()
Deprecated.
moved to SQLHelper
|
static List<EPMDocument> |
getDrawingReferences(EPMDocument epmdoc,
boolean latestVersionOnly,
boolean latestIterationOnly)
return lists of drawings associated with epmdoc
|
static Iterated |
getFilteredIteration(Mastered objMaster,
NavigationCriteria nc)
return the latest iteration of the given object matching the NavigationCriteria (works with epmdocs, wtparts, wtdocument / all mastered objects)
|
static Persistable |
getFirstIteration(Object identifier) |
static String |
getFullTypeName(String typeName)
return a type"s full type name e.g., WCTYPE|wt.part.WTPart|de.sulis.Stype
|
static Object[] |
getFullTypeNameWithObj(String typeName)
returns an object array with type"s full type name e.g., WCTYPE|wt.part.WTPart|de.sulis.Stype and the type object itself
|
static Object[] |
getFullTypeNameWithObj(String typeName,
boolean wantIBAs)
returns an object array with type"s full type name e.g., WCTYPE|wt.part.WTPart|de.sulis.Stype and the type object itself
|
static String |
getFullUrl(String shortUrlString)
return fully qualified url string for path relative to windchill base url
|
static Object |
getIBAAtt(Object o,
String attName)
return an iba attribute.
|
static String |
getIBAEditURL(Persistable per)
return IBA Edit page URL for object
|
static String |
getIBAEditURL(String oid)
return IBA Edit page URL for object
|
static String |
getID()
return Exchange Internet Domain
|
static Map<String,Object> |
getInitRules(Object typeName,
String container)
return init rules for given type in given container
|
static Map<String,Object> |
getInitRules(Object type,
String container,
Set<String> keys)
return init rules for given type in given container
|
static String |
getInternetDomain()
return the Site's internetdomain
|
static Iterated |
getLatestIteration(Class objClass,
String myAtt,
String attVal)
return the latest iteration of the given class searching via master with given att
|
static Iterated |
getLatestIteration(Class objClass,
String myAtt,
String attVal,
String containerName)
return the latest iteration of the given class searching via master with given att
|
static Iterated |
getLatestIteration(Class objClass,
String myAtt,
String attVal,
WTContainer container)
return the latest iteration of the given class searching via master with given att
|
static Iterated |
getLatestIteration(Mastered objMaster)
return the latest iteration of the given object (works with epmdocs, wtparts, wtdocument / all mastered objects)
|
static EPMDocument |
getLatestReleasedEPMDocByNumber(String docNumber,
String revision)
method to get the latest RELEASED Iteration (optional of given REVISION) by given document's number
|
static WTDocument |
getLatestReleasedWTDocByNumber(String docNumber,
String revision,
String docType)
method to get the latest RELEASED Iteration (optional of given REVISION) by given document's number
|
static List<EPMDocument> |
getLinkedDrawings(EPMDocument epmdoc)
return lists of drawings associated with epmdoc
|
static EPMDocument |
getLinkedEPMDoc(WTPart part)
returns the first epmdoc that is linked to the given wtpart by a epmbuildrule with type owner (former active link!)
remark: always returns the first linked epmdoc that is found!
|
static EPMDocument |
getLinkedEPMDoc(WTPart part,
boolean checkDescribeLinkToo)
returns the first epmdoc that is linked to the given wtpart either by epmbuildruile or epmdescribelink
remark: always returns the first linked epmdoc that is found!
|
static EPMDocument |
getLinkedEPMDoc(WTPart part,
boolean checkBuildRuleAssociation,
boolean checkDescribeLinkToo)
returns the first epmdoc that is linked to the given wtpart either by epmbuildruile or epmdescribelink
remark: always returns the first linked epmdoc that is found!
|
static List<EPMDocument> |
getLinkedEPMDocs(WTPart part)
returns all epmdocs linked to the given wtpart by a epmbuildrule, returning the owner (if available) in position 0
|
static List<EPMDocument> |
getLinkedEPMDocs(WTPart part,
boolean checkDescribeLinkToo)
returns all epmdocs linked to the given wtpart by a epmbuildrule or epmdescribelink
|
static List<EPMDocument> |
getLinkedEPMDocs(WTPart part,
boolean checkBuildRuleAssociation,
boolean checkDescribeLinkToo) |
static List<EPMDocument> |
getLinkedVariants(EPMDocument epmdoc)
return lists of variants associated with epmdocs master
|
static WTPart |
getLinkedWTPart(EPMDocument epmdoc)
returns the wtpart that is linked to the give epmdoc by a epmbuildrule
remark: always returns the first linked wtpart that is found!
|
static WTPart |
getLinkedWTPart(EPMDocument epmdoc,
boolean lookByDescribeLinkToo)
returns the wtpart that is linked to the give epmdoc by a epmbuildrule OR epmdescribelink
remark: always returns the first linked wtpart that is found!
|
static String |
getListAllURL(String oid)
return ListAll page URL for object
|
static List |
getListOfContainers()
list all products and libraries as List of WTContainer
|
static String |
getName(Persistable p) |
static String |
getNumber(Persistable p) |
static String |
getObjectIcon(WTObject paramWTObject)
return object's icon - if Typed return getTypeIcon - else use windchill method IconCache.getIconResource
|
static String |
getObjectInfoAnchor(Object o)
return the html for a link to the Object's info page
|
static String |
getObjectInfoAnchor(Object o,
String windowName)
return the html for a link to the Object's info page, naming the target window
|
static String |
getObjectViewURL(Persistable per)
return the view properties page of a persistable obj.
|
static String |
getObjectViewURL(String per)
return the view properties page of a persistable obj.
|
static String |
getReversedInternetDomain()
return the common prefix for atts and type names
|
static Persistable |
getSaveAsObject(Persistable aPersistable)
event trigger for save_as contains src object.
|
static String |
getShortType(WTObject o)
return an objects type name without any package stuff
|
static String |
getShortTypeNoMaster(WTObject o)
return an objects type name without any package stuff, if master return type of latest version
|
static String |
getSortSeriesSortId(SeriesSortValue ssv)
Deprecated.
moved to SulisLoadHelper
|
static String |
getSortSeriesUniqueId(SeriesSortValue ssv)
Deprecated.
moved to SulisLoadHelper
|
static String |
getSortSeriesValue(SeriesSortValue ssv)
Deprecated.
moved to SulisLoadHelper
|
static Persistable |
getSpecificVersion(Persistable obj,
String wantVersion)
return given version for RevisionControlled/Mastered or null
|
static Persistable |
getTemplate(String name,
Object type,
WTContainer wtcontainer)
get template helper method, search container hierarchy upwards for template with given name
|
static String |
getType(WTObject o)
return an objects type name
|
static String |
getTypeIcon(Typed o)
get configured icon path (relative to windchill codebase) for given type (returns "wtcore/images/query.gif" in case nothin is configured)
|
static List<EPMWorkspace> |
getWorkspacesForWorkable(Workable workedObj)
check if Workable is placed within any EPMWorkspace.
|
static String |
getWTBaseURL()
returns as string the windchill base url.
|
static List<WTContainer> |
getWTContainerByCaseInsensitiveName(String name)
query for all container objects by lower case name, returns list of matching wt containers.
|
static List<WTContainer> |
getWTContainerByCaseInsensitiveName(String name,
boolean force)
query for all container objects by lower case name, returns list of matching wt containers.
|
static List<WTContainer> |
getWTContainerByName(String name)
query for all container objects by name, returns list of matching wt containers.
|
static List<WTContainer> |
getWTContainerByName(String name,
boolean force)
query for all container objects by name, returns list of matching wt containers.
|
static List<WTContainer> |
getWTContainerByName(String name,
boolean force,
boolean ignoreCase)
query for all container objects by (lower case) name, returns list of matching wt containers.
|
static List<WTContainer> |
getWTContainerByName(String name,
boolean force,
boolean ignoreCase,
Class containerClass)
query for all container objects by (lower case) name, returns list of matching wt containers.
|
static List<WTContainer> |
getWTContainerByName(String name,
boolean force,
boolean ignoreCase,
Class containerClass,
String org)
query for all container objects by (lower case) name, returns list of matching wt containers.
|
static Hashtable |
IBAHash(DefaultAttributeContainer dac)
Deprecated.
|
static Hashtable |
IBAHash(DefaultAttributeContainer dac,
SimpleDateFormat f)
Deprecated.
|
static Hashtable |
IBAHash(DefaultAttributeContainer dac,
SimpleDateFormat f,
boolean withUnits)
Deprecated.
|
static Hashtable |
IBAHash(DefaultAttributeContainer dac,
SimpleDateFormat f,
boolean withUnits,
int multival_flag)
Deprecated.
|
static Hashtable |
IBAHash(IBAHolder i)
Deprecated.
|
static Hashtable |
IBAHash(IBAHolder h,
SimpleDateFormat f)
Deprecated.
|
static Hashtable |
IBAHash(IBAHolder h,
SimpleDateFormat f,
boolean withUnits)
Deprecated.
|
static Hashtable |
IBAHash(IBAHolder h,
SimpleDateFormat f,
boolean withUnits,
int multival_flag)
Deprecated.
|
static Hashtable |
IBAHash(IBAHolder i,
String newFmt)
Deprecated.
|
static Hashtable |
IBAHash(IBAHolder i,
String newFmt,
boolean withUnits)
Deprecated.
|
static void |
insert(Persistable p)
persist the object via serverhelper
|
static void |
insert(WTHashSet ws)
persist the objects in the WTHashSet
|
static boolean |
isA(Object typed,
String name)
tell if given typed object is of a certain type - names are compared without package/reversed domain names!
|
static boolean |
isAbsoluteName(Object fileName)
test if filename passed is an absolute name (msdos starting with drive letter or \\, unix starting with /)
|
static boolean |
isCAD3D(EPMDocument e)
return true if epmdoc is CADCOMPONENT|CADASSEMBLY
|
static boolean |
isCADAssembly(EPMDocument e)
return true if doc is assembly
|
static boolean |
isCADComponent(EPMDocument e)
return true if doc is component
|
static boolean |
isCADDrawing(EPMDocument e)
return true if doctype is CADDRAWING or authoring app is ACAD or MEDUSA
|
static boolean |
isCADFormat(EPMDocument e)
return true if epmdoc has doctype FORMAT
|
static boolean |
isLatestVersion(Object obj)
return whether this object is in the latest branch (VersionControlHelper.service.getNumberOfVersionSuccessors() == 0)
|
static boolean |
isLinkBetween(Class l,
Object a,
Object b)
check if a link with a named class exists between two objects
|
static boolean |
isME10(EPMDocument e) |
static boolean |
isProEDoc(EPMDocument ed) |
static boolean |
isProEDoc(EPMDocumentMaster edm) |
static String |
jmxUrl()
TODO javadoc
|
static String[] |
jmxUrl(String[] args) |
static String |
mailId(String header)
extract message id from mail header
|
static void |
main(String[] a)
print program usage info or invoke testConn()
|
static Folder |
mkdir(String path,
WTContainerRef c)
TODO javadoc
|
static Folder |
mkdir(String path,
WTContainerRef c,
Map<String,Object> atts) |
static void |
mv(String from,
String to)
Note: other than unix mv command perl will rename the directory wne moving dirs: havind existing a and b and performing mv("a","b") will *not* create b/a TODO javadoc
|
static void |
mvDir(Object fromDir,
Object toDir)
TODO javadoc
|
static OneOffVersioned |
newOneOff(OneOffVersioned v)
create a new one-off version of given obj
|
static Versioned |
newVersion(Versioned v)
creates and returns new version of given object
|
static Versioned |
newVersion(Versioned v,
boolean force)
creates and returns new version of given object, uncontrolled version if force=true
|
static Versioned |
newVersion(Versioned v,
boolean force,
String comment)
creates and returns new version of given object, uncontrolled version if force=true
|
static String |
primaryFileVaultName(Object o)
return name of file on disk of primary content
|
static EPMDocument |
queryForEPMDocument(String number)
query for a EPMDocument by number returns latestIteration of object
|
static Persistable |
queryForPersistable(Object objType,
String number)
query for a persistable of type objType with number objType can be a class string, a class or and instance of the supported classes.
|
static Persistable |
queryForPersistable(String number)
query for a persistable with number supported classes: EPMDocument, WTPart, WTDocumet
|
static List<Persistable> |
queryForPersistables(String number,
boolean doEPM,
boolean doWTPart,
boolean doWTDoc)
query for a persistable with number supported classes: EPMDocument, WTPart, WTDocumet
|
static PromotionNotice |
queryForPromotionNotice(String number)
query for a EPMDocument by number returns latestIteration of object
|
static WTDocument |
queryForWTDocument(String number)
query for a WTDocument by number returns latestIteration of object
|
static WTPart |
queryForWTPart(String number)
query for a WTPart by number returns latestIteration of object
|
static WTPart |
queryForWTPart(String number,
boolean fuzzy)
query for a WTPart by number returns latestIteration of object
|
static WTPartMaster |
queryForWTPartMaster(String number) |
static Map<String,Object> |
rawIBAs(IBAHolder h)
Deprecated.
|
static void |
remove(Object obj)
remove object
|
static void |
remove(WTHashSet ws)
remove the objects in the WTHashSet
|
static void |
removeWorkableFromAllWorkspaces(Workable workedObj)
TODO javadoc
|
static void |
removeWorkableFromAllWorkspaces(Workable workedObj,
List<EPMWorkspace> listOfWS)
TODO javadoc
|
static void |
renameAndRenumberObj(Persistable obj2rename,
String newName,
String newNumber,
String newCadName)
Deprecated.
moved to SulisLoadHelper
|
static void |
renameEPMDocument(EPMDocumentMaster d,
String number,
String name,
String cadName)
Deprecated.
moved to SulisLoadHelper
|
static EPMDocument |
renameEPMDocument(EPMDocument d,
String number,
String name,
String cadName)
Deprecated.
moved to SulisLoadHelper
|
static void |
renameWTPart(WTPartMaster aPart,
String number,
String name)
Deprecated.
moved to SulisLoadHelper
|
static WTPart |
renameWTPart(WTPart aPart,
String number,
String name)
Deprecated.
moved to SulisLoadHelper
|
static void |
replaceContent(Object o,
File[] binaryContent)
replace file content on contentholder
|
static void |
reviseDummyToVersion(String seriesID,
String targetVersion,
String containerName)
Deprecated.
moved to SulisLoadHelper
|
static void |
reviseDummyToVersion(String seriesID,
String targetVersion,
String containerName,
boolean clearCache)
Deprecated.
moved to SulisLoadHelper
|
static void |
reviseDummyToVersion(String seriesID,
String targetVersion,
String containerName,
boolean clearCache,
int maxRounds)
Deprecated.
moved to SulisLoadHelper
|
static Versioned |
reviseToVersion(Versioned v,
String targetVersion,
int maxRounds)
Deprecated.
moved to SulisLoadHelper
|
static RemoteMethodServer |
RMS() |
static Process |
runCommand(String cmd)
run a given command.
|
static Process |
runCommand(String[] cmdArray)
run a given command with a set of parameters
|
static Process |
runCommand(String[] cmdArray,
String workDirStr)
run a given command with parameters.
|
static Process |
runCommand(String[] cmdArray,
String[] env,
File workDir)
run a given command with parameters and environment.
|
static Map<String,Object> |
runCommand(String[] cmdArray,
String[] env,
File workDir,
boolean logStreams)
run a given command with parameters and environment.
|
static Process |
runCommand(String[] cmdArray,
String[] env,
String workDirStr)
run a given command with parameters and environment.
|
static IeCollection |
runWebject(Map<String,Object> data)
run a webject, return one group from vdb.
|
static IeCollection |
runWebject(Map<String,Object> data,
Map<String,String> fields)
run a webject, return one group from vdb.
|
static Group |
runWebject(Map<String,Object> data,
Map<String,String> fields,
String groupName)
run a webject, return one group from vdb.
|
static Group |
runWebject(Map<String,Object> data,
String groupName)
run a webject, return one group from vdb.
|
static Boolean |
setAuthoringAppVersion(EPMDocument e,
String name,
String number)
set authoring app version on epmdoc
|
static void |
setLatestLC(String containerName)
admin function: set latest lifecycletemplate for all wtdoc/epmdoc within a container
|
static void |
setLifecycleState(Persistable obj,
String newLCState)
Deprecated.
moved to SulisLoadHelper
|
static Versioned |
setObjectToSpecificVersion(Versioned revObj,
String targetVersion)
Deprecated.
moved to SulisLoadHelper
|
static Versioned |
setObjectToSpecificVersion(Versioned revObj,
String targetVersion,
String targetIteration)
Deprecated.
moved to SulisLoadHelper
|
static Versioned |
setObjectToSpecificVersion(Versioned revObj,
String targetVersion,
String targetIteration,
String series)
Deprecated.
moved to SulisLoadHelper
|
static Versioned |
setObjectToSpecificVersion(Versioned revObj,
String targetVersion,
String targetIteration,
String series,
boolean force)
Deprecated.
moved to SulisLoadHelper
|
static boolean |
stackTraceContains(Pattern p)
tell if stacktrace contains given pattern
|
static boolean |
stackTraceContains(String s)
tell if stacktrace contains the given String - using case insensitive regex (special regex chars escaped)
|
static boolean |
stackTraceContains(String s,
boolean lower)
tell if stacktrace contains the given String using (case insensitive?) regex (special regex chars escaped)
|
static Persistable |
toPersistable(Object o)
return object passed in as Persistable - if String expects obid, else accepts object reference or a persistable.
|
static String[] |
typeArray(String t)
return an array with a type's type hierarchy
|
static String[] |
typeArray(WTObject o)
return an array with an objects type hierarchy
|
static List |
unJSON(JSONArray in)
create a List from a JSONArray
|
static List |
unJSON(JSONArray in,
boolean toString)
create a List from a JSONArray
|
static Map |
unJSON(JSONObject in)
create a Map from a JSONObject
|
static Map |
unJSON(JSONObject in,
boolean toString)
create a Map from a JSONObject
|
static <T> List<T> |
validStates(String typeName,
String container,
Class<T> cls)
return availabe State values for given type in given container
|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final String RMIHOSTNAME
public static final String HTTPGWHOSTNAME
public static final String WEBAPPNAME
public static String WTHOME
public static final boolean SERVER
public static final boolean USEPERL
public static Method getSortValue
public static final String DELIM
public static final String viewURL
public static Map<String,Long> ORGID
public static final int MAJOR
public static final int MINOR
public static final int MULTIVAL_ERR
public static final int MULTIVAL_FIRST
public static final int MULTIVAL_LAST
public static final int MULTIVAL_VECTOR
public static final int MULTIVAL_SET
public static final boolean WITH_UNITS
public static final boolean WITHOUT_UNITS
public static SimpleDateFormat DATE_WITH_TIME
public static final String TYPE
public static final String LIFE_CYCLE
public static final String SERIES
public static final String DEFAULT_UNIT
public static final String PART_TYPE
public static final String SOURCE
public static final String STATE
public static final String VIEW
public static final String OIR
public static final String TEAM
public static final String IS_PHANTOM
public static final String WEBJECT
public static final String CONTAINER
public static final String MS_NAME
public static final String SERVICE_NAME
public static URL RMS_URL
public static String NL
public static RemoteMethodServer RMS()
public static String getReversedInternetDomain() throws WTException
WTException
public static String getInternetDomain() throws WTException
WTException
public static String mailId(String header)
header
- the mail header stringpublic static String getWTBaseURL()
public static String getFullUrl(String shortUrlString)
shortUrlString
- public static String getObjectInfoAnchor(Object o) throws Exception
o
- Persistable to get info screen anchor forException
public static String getObjectInfoAnchor(Object o, String windowName) throws Exception
o
- Persistable to get info screen anchor forwindowName
- if not null used as target string for new windowException
public static String getObjectViewURL(String per)
per
- String with obid of Persistable to get info screen url for, placeholder _OBID_ is accepted, else OR: is added if no OR:/VR: in front.public static String getObjectViewURL(Persistable per)
per
- Persistable to get info screen url forpublic static String getIBAEditURL(Persistable per)
per
- Persistable to get IBA Edit page url forpublic static String getIBAEditURL(String oid)
oid
- obid to Persistable to get IBA Edit page url forpublic static String getListAllURL(String oid)
oid
- Persistable to get ListAll page url for@Deprecated public static Map<String,String> getCC() throws Exception
Exception
@Deprecated public static Connection dbConnect() throws Exception
Exception
@Deprecated public static Connection dbConnect(String user, String pass) throws Exception
Exception
@Deprecated public static void getCount() throws Exception
Exception
@Deprecated public static void createSeq(String name) throws Exception
Exception
public static String getShortTypeNoMaster(WTObject o) throws WTException
o
- the WTObjectWTException
public static String getShortType(WTObject o) throws WTException
o
- the WTObjectWTException
public static String getObjectIcon(WTObject paramWTObject) throws Exception
paramWTObject
- Exception
public static String getTypeIcon(Typed o) throws WTException
o
- input objectWTException
public static String getType(WTObject o) throws WTException
o
- the WTObjectWTException
public static String getFullTypeName(String typeName) throws WTException
typeName
- the name, without prefix (e.g., not com.ptc.myType but just myType)WTException
public static Object[] getFullTypeNameWithObj(String typeName) throws WTException
typeName
- the name, without prefix (e.g., not com.ptc.myType but just myType)WTException
public static Object[] getFullTypeNameWithObj(String typeName, boolean wantIBAs) throws WTException
typeName
- the name, without prefix (e.g., not com.ptc.myType but just myType)wantIBAs
- flag to tell whether to return default ibasWTException
public static WTTypeDefinition findType(String typeName) throws WTException
typeName
- the name, without prefix (e.g., not com.ptc.myType but just myType)WTException
public static String[] typeArray(WTObject o) throws WTException
o
- the WTObjectWTException
public static String[] typeArray(String t)
t
- the windchill type stringWTException
@Deprecated public static Map<String,Object> rawIBAs(IBAHolder h) throws WTException, RemoteException
h
- the IBA HolderWTException
- from windchill codeRemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(IBAHolder i) throws WTException, RemoteException
i
- the IBA HolderWTException
- from windchill codeRemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(DefaultAttributeContainer dac) throws WTException, RemoteException
dac
- the default attribute containerWTException
- from windchill codeRemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(IBAHolder i, String newFmt) throws WTException, RemoteException
i
- the IBA HoldernewFmt
- the DateFormat to use for formatting TimestampsWTException
- from windchill code or if SimpleDateFormat is badRemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(IBAHolder i, String newFmt, boolean withUnits) throws WTException, RemoteException
i
- the IBA HoldernewFmt
- the DateFormat to use for formatting TimestampsWTException
- from windchill code or if SimpleDateFormat is badRemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(IBAHolder h, SimpleDateFormat f) throws WTException, RemoteException
h
- the IBA Holderf
- the DateFormat to use for formatting TimestampsWTException
- from windchill code or if multivalued IBA encountered.RemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(DefaultAttributeContainer dac, SimpleDateFormat f) throws WTException, RemoteException
dac
- the default attibute containerf
- the DateFormat to use for formatting TimestampsWTException
- from windchill code or if multivalued IBA encountered.RemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(IBAHolder h, SimpleDateFormat f, boolean withUnits) throws WTException, RemoteException
WTException
- from windchill code or if multivalued IBA encountered.RemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(DefaultAttributeContainer dac, SimpleDateFormat f, boolean withUnits) throws WTException, RemoteException
WTException
- from windchill code or if multivalued IBA encountered.RemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(IBAHolder h, SimpleDateFormat f, boolean withUnits, int multival_flag) throws WTException, 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:
WTException
- from windchill code or if multivalued IBA encountered.RemoteException
- from windchill code@Deprecated public static Hashtable IBAHash(DefaultAttributeContainer dac, SimpleDateFormat f, boolean withUnits, int multival_flag) throws WTException, RemoteException
dac
- the default attibute containerf
- 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:
WTException
- from windchill code or if multivalued IBA encountered.RemoteException
- from windchill codepublic static void insert(Persistable p) throws WTException, RemoteException, InvocationTargetException
p
- WTException
- , RemoteException, InvocationTargetExceptionRemoteException
InvocationTargetException
public static void insert(WTHashSet ws) throws WTException, RemoteException, InvocationTargetException
ws
- WTException
- , RemoteException, InvocationTargetExceptionRemoteException
InvocationTargetException
public static void remove(Object obj) throws WTException, RemoteException, InvocationTargetException
obj
- obj do delete (must be persistable or string with obid)WTException
- , RemoteException, InvocationTargetExceptionRemoteException
InvocationTargetException
public static void remove(WTHashSet ws) throws WTException, RemoteException, InvocationTargetException
ws
- WTException
- , RemoteException, InvocationTargetExceptionRemoteException
InvocationTargetException
public static void _remove(WTHashSet ws) throws WTException
ws
- WTException
public static Object callMOnO(Object o, String m) throws WTException, RemoteException, InvocationTargetException
o
- object (if String run ToolUtils.objFromObid(o))m
- the method's nameWTException
- , RemoteException, InvocationTargetExceptionRemoteException
InvocationTargetException
public static Object _callMOnO(Object o, String m) throws WTException
o
- object (if String run ToolUtils.objFromObid(o))m
- the method's nameWTException
- , RemoteException, InvocationTargetExceptionpublic static void addIBAs(Element e, IBAHolder i, String prefix) throws WTException, RemoteException
e
- the Elementi
- the IBAHolderprefix
- prefix to use, e.g., "xx_" would add IBA blah as xx_blahWTException
- , RemoteExceptionRemoteException
public static void addIBAs(Element e, IBAHolder i, String prefix, SimpleDateFormat fmt, boolean withUnits, int multival_flag) throws WTException, 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
- , RemoteExceptionRemoteException
public static Versioned newVersion(Versioned v) throws Exception
v
- Versioned to start fromException
public static Versioned newVersion(Versioned v, boolean force) throws Exception
v
- Versioned to start fromforce
- flag if uncontrolled version is to be createdException
public static Versioned newVersion(Versioned v, boolean force, String comment) throws Exception
v
- Versioned to start fromforce
- flag if uncontrolled version is to be createdException
public static OneOffVersioned newOneOff(OneOffVersioned v) throws WTException, WTPropertyVetoException
v
- input objectWTException
WTPropertyVetoException
public static boolean stackTraceContains(String s)
s
- String to search forpublic static boolean stackTraceContains(String s, boolean lower)
s
- String to search forlower
- flag if search should be case insensitivepublic static boolean stackTraceContains(Pattern p)
p
- the pattern to find withpublic static QueryResult doServerExpand(Persistable o, String role, Class linkClass, Boolean otherSide) throws Exception
o
- role
- linkClass
- otherSide
- Exception
public static String f2s(String fname, String skipPattern)
fname
- name of file to read, returns null if file does not exist.public static String f2s(String fname)
fname
- name of file to read, returns null if file does not exist.public static String f2s(File f)
f
- the file to readpublic static String f2s(File f, String skipPattern)
f
- input file to readskipPattern
- pattern to match or null to read all linespublic static List<String> f2l(String fname) throws Exception
fname
- input file's nameException
public static List<String> f2l(String fname, String skipPattern) throws Exception
fname
- input file's nameskipPattern
- regex for lines to skip, else nullException
public static String getID()
public void doOnChange()
doOnChange
in class FileWatchdog
public static int addPromotables(PromotionNotice p, List<Promotable> l) throws Exception
p
- the PromotionNoticel
- list of promotion targetsException
public static Persistable queryForPersistable(Object objType, String number) throws WTException
objType
- number
- WTException
public static Persistable queryForPersistable(String number) throws WTException
number
- WTException
public static List<Persistable> queryForPersistables(String number, boolean doEPM, boolean doWTPart, boolean doWTDoc) throws WTException
number
- WTException
public static PromotionNotice queryForPromotionNotice(String number) throws WTException
number
- WTException
public static EPMDocument queryForEPMDocument(String number) throws WTException
number
- WTException
public static WTPartMaster queryForWTPartMaster(String number) throws WTException
WTException
public static WTPart queryForWTPart(String number) throws WTException
number
- WTException
public static WTPart queryForWTPart(String number, boolean fuzzy) throws WTException
number
- (base) number to search onfuzzy
- if true will try (assume input=XXX.YYY) XXX.YYY, XXX.ASM and XXX.PRT or XXXWTException
public static WTDocument queryForWTDocument(String number) throws WTException
number
- WTException
public static List<WTContainer> getWTContainerByName(String name) throws Exception
name
- Exception
public static List<WTContainer> getWTContainerByName(String name, boolean force) throws Exception
name
- force
- if true ignore access rights during searchException
public static List<WTContainer> getWTContainerByCaseInsensitiveName(String name) throws Exception
name
- Exception
public static List<WTContainer> getWTContainerByCaseInsensitiveName(String name, boolean force) throws Exception
name
- force
- if true ignore access rights during searchException
public static List<WTContainer> getWTContainerByName(String name, boolean force, boolean ignoreCase) throws Exception
name
- force
- if true ignore access rights during searchignoreCase
- if true does lower case compareException
public static List<WTContainer> getWTContainerByName(String name, boolean force, boolean ignoreCase, Class containerClass) throws Exception
name
- force
- if true ignore access rights during searchignoreCase
- if true does lower case comparecontainerClass
- if not null restricts query to this container classException
public static List<WTContainer> getWTContainerByName(String name, boolean force, boolean ignoreCase, Class containerClass, String org) throws Exception
name
- force
- if true ignore access rights during searchignoreCase
- if true does lower case comparecontainerClass
- if not null restricts query to this container classException
public static List<WTContainer> getAllWTContainer() throws Exception
Exception
public static List<WTContainer> getAllWTContainer(boolean sort) throws Exception
sort
- if false returns the list as retrieved from data storeException
public static void main(String[] a) throws Exception
a
- commandline argsException
public static List getListOfContainers()
public static String jmxUrl() throws Exception
Exception
public static String[] jmxUrl(String[] args) throws Exception
Exception
public static void mvDir(Object fromDir, Object toDir) throws Exception
fromDir
- toDir
- Exception
public static void mv(String from, String to) throws Exception
from
- to
- Exception
public static void copyFile(File in, File out) throws IOException
IOException
public static Folder mkdir(String path, WTContainerRef c) throws Exception
path
- c
- Exception
public static Folder mkdir(String path, WTContainerRef c, Map<String,Object> atts) throws Exception
Exception
public static List<EPMWorkspace> getWorkspacesForWorkable(Workable workedObj) throws Exception
workedObj
- Exception
public static void removeWorkableFromAllWorkspaces(Workable workedObj) throws Exception
workedObj
- Exception
public static void removeWorkableFromAllWorkspaces(Workable workedObj, List<EPMWorkspace> listOfWS) throws Exception
workedObj
- listOfWS
- Exception
public static EPMBuildRule getBuildRule(Object docOrPart) throws WTException
docOrPart
- EPMDocument or WTPartWTException
public static WTPart getLinkedWTPart(EPMDocument epmdoc) throws WTException
epmdoc
- WTException
public static WTPart getLinkedWTPart(EPMDocument epmdoc, boolean lookByDescribeLinkToo) throws WTException
epmdoc
- lookByDescribeLinkToo
- WTException
public static List<EPMDocument> getLinkedVariants(EPMDocument epmdoc) throws WTException
epmdoc
- WTException
public static List<EPMDocument> getLinkedDrawings(EPMDocument epmdoc) throws WTException
epmdoc
- WTException
public static WTPart getCalWTPartOnDrawing(EPMDocument drw, String wtPartNum) throws Exception
EPMDocument
- (drawing)String
- WTPart's number (for search match)Exception
public static List<WTPart> getCalWTPartsOnDrawing(EPMDocument drw) throws Exception
EPMDocument
- (Drawing)Exception
public static List<EPMDocument> getCalDrawingsOnWTPart(WTPart prt)
prt
- public static List<EPMDocument> getDrawingReferences(EPMDocument epmdoc, boolean latestVersionOnly, boolean latestIterationOnly) throws WTException
epmdoc
- WTException
public static int getBuildType(boolean roleStruct, boolean roleRep, boolean roleAttr)
roleStruct
- roleRep
- roleAttr
- public static int countLinkedEPMDocs(WTPart part, boolean countDescribeLinkToo)
public static List<EPMDocument> getLinkedEPMDocs(WTPart part) throws WTException
part
- WTException
public static List<EPMDocument> getLinkedEPMDocs(WTPart part, boolean checkDescribeLinkToo) throws WTException
part
- checkDescribeLinkToo
- if true and no active doc found will also follow EPMDescribeLinkWTException
public static List<EPMDocument> getLinkedEPMDocs(WTPart part, boolean checkBuildRuleAssociation, boolean checkDescribeLinkToo) throws WTException
WTException
public static EPMDocument getLinkedEPMDoc(WTPart part) throws WTException
part
- WTException
public static EPMDocument getLinkedEPMDoc(WTPart part, boolean checkDescribeLinkToo) throws WTException
part
- WTException
public static EPMDocument getLinkedEPMDoc(WTPart part, boolean checkBuildRuleAssociation, boolean checkDescribeLinkToo) throws WTException
part
- WTException
public static List<EPMDocument> getAllLinkedEPMDoc(WTPart part, boolean checkDescribeLinkToo) throws WTException
epmdoc
- WTException
public static List<WTDocument> getAllLinkedWTDocs(WTPart part) throws WTException
part
- WTException
public static List<WTPart> getAllLinkedWTParts(WTDocument wtdoc) throws WTException
wtdoc
- WTDocumentWTException
public static List<EPMMemberLink> getAllEPMMemberLinks(EPMDocument epm) throws WTException
epmdoc
- WTException
public static List<WTPartUsageLink> getAllLinkedNodes(WTPart rootPart) throws Exception
rootPart
- Exception
public static Iterated getLatestIteration(Class objClass, String myAtt, String attVal) throws Exception
objClass
- obj type to searchmyAtt
- att name to search forattVal
- the value to matchWTException
- on arr or if result set not equals 1Exception
public static Iterated getLatestIteration(Class objClass, String myAtt, String attVal, String containerName) throws Exception
objClass
- obj type to searchmyAtt
- att name to search forattVal
- the value to matchcontainerName
- if not null and class is wtcontained add wherecontaineris ...WTException
- on arr or if result set not equals 1Exception
public static Iterated getLatestIteration(Class objClass, String myAtt, String attVal, WTContainer container) throws Exception
objClass
- obj type to searchmyAtt
- att name to search forattVal
- the value to matchcontainer
- if not null and class is wtcontained add wherecontaineris ...WTException
- on arr or if result set not equals 1Exception
public static Iterated getLatestIteration(Mastered objMaster) throws WTException
objMaster
- WTException
public static EPMDocument getLatestReleasedEPMDocByNumber(String docNumber, String revision) throws WTException
docNumber
- (String of the EPMDocument's numberrevision
- (if NULL latest released is returned, if revision is given the latest released iteration of given version (e.g. A) is returned if existendWTException
public static WTDocument getLatestReleasedWTDocByNumber(String docNumber, String revision, String docType) throws WTException
docNumber
- (String of the WTDocument's numberrevision
- (if NULL latest released is returned, if revision is given the latest released iteration of given version (e.g. A) is returned if existendWTException
public static Iterated getFilteredIteration(Mastered objMaster, NavigationCriteria nc) throws WTException
objMaster
- master of which we want an Iterationnc
- Navigationcriteria will use latest if nullWTException
public static Group runWebject(Map<String,Object> data, String groupName) throws WTException
WTException
public static Group runWebject(Map<String,Object> data, Map<String,String> fields, String groupName) throws WTException
data
- input params, must at least contain key "webject". if a key contains a list as value parameter is added multiple times.fields
- input field data, used for create/update webjects field = name=xxx. (may be null)groupName
- group to return or last group added if nullWTException
public static IeCollection runWebject(Map<String,Object> data) throws WTException
WTException
public static IeCollection runWebject(Map<String,Object> data, Map<String,String> fields) throws WTException
data
- input params, must at least contain key "webject". if a key contains a list as value parameter is added multiple times.fields
- input field data, used for create/update webjects field = name=xxx. (may be null)WTException
public static boolean isLatestVersion(Object obj)
obj
- object to test. return true if not versioned.public static Object getIBAAtt(Object o, String attName) throws Exception
o
- attName
- Exception
public static String primaryFileVaultName(Object o) throws Exception
o
- Exception
public static String fileVaultName(Object o) throws Exception
o
- Exception
public static Process runCommand(String cmd) throws Exception
cmd
- Exception
public static Process runCommand(String[] cmdArray) throws Exception
cmdArray
- Exception
public static Process runCommand(String[] cmdArray, String workDirStr) throws Exception
cmdArray
- workDirStr
- Exception
public static Process runCommand(String[] cmdArray, String[] env, String workDirStr) throws Exception
cmdArray
- env
- workDirStr
- Exception
public static Process runCommand(String[] cmdArray, String[] env, File workDir) throws Exception
cmdArray
- env
- workDir
- Exception
public static Map<String,Object> runCommand(String[] cmdArray, String[] env, File workDir, boolean logStreams) throws Exception
cmdArray
- env
- workDir
- logStreams
- flag if data should be loggedException
public static int execCommand(String[] cmdArray) throws InterruptedException, Exception
cmdArray
- InterruptedException
- , ExceptionException
public static int execCommand(String[] cmdArray, String[] env, File workDir) throws InterruptedException, Exception
cmdArray
- env
- workDir
- InterruptedException
- , ExceptionException
public static WTPart getActiveAssociated(EPMDocument doc) throws WTException
doc
- WTException
public static EPMDocument getActiveAssociated(WTPart p) throws WTException
p
- the partWTException
public static boolean isLinkBetween(Class l, Object a, Object b) throws Exception
l
- name (String) or Class of linka
- Persistable in roleAb
- Persistable in roleBException
public static Persistable findLinkBetween(Object l, Object a, Object b) throws Exception
l
- name (String) or Class of linka
- Persistable in roleAb
- Persistable in roleBException
public static QueryResult findLinksFrom(Object l, Object a, boolean sort) throws Exception
l
- name (String) or Class of linka
- Persistable in roleAsort
- if true sort by ida2a2 descException
public static QueryResult findLinksTo(Object l, Object b, boolean sort) throws Exception
l
- name (String) or Class of linkb
- Persistable in roleBsort
- if true sort by ida2a2 descException
public static QueryResult findLinksBetween(Object l, Object a, Object b) throws Exception
l
- name (String) or Class of linka
- Persistable in roleAb
- Persistable in roleBException
public static QueryResult findLinks(Object l, Object a, Object b, boolean sort) throws Exception
l
- name (String) or Class of linka
- Persistable in roleAb
- Persistable in roleBException
- NPE if both sides nullpublic static Persistable toPersistable(Object o) throws Exception
o
- object passed inException
public static void replaceContent(Object o, File[] binaryContent) throws Exception
o
- the contentholderbinaryContent
- array with files, first one becomes primary contentException
public static Boolean setAuthoringAppVersion(EPMDocument e, String name, String number) throws Exception
e
- name
- number
- Exception
public static boolean isAbsoluteName(Object fileName)
fileName
- public static String getAbsoluteName(Object prefix, Object fileName)
prefix
- prefix if fileName is relativefileName
- filename to testpublic static void setLatestLC(String containerName) throws Exception
containerName
- Exception
public static Persistable getSpecificVersion(Persistable obj, String wantVersion) throws WTException
obj
- the object belonging to the master from which to retrieve the specific versionwantVersion
- the version to findWTException
public static Object[] getConsVals(String name, String att) throws Exception
name
- att
- Exception
public static Object[] getConsVals(WTTypeDefinition type, String att, long attId) throws Exception
type
- att
- attId
- Exception
public static Object[] getConsVals(long tid, long attId) throws Exception
tid
- attId
- Exception
public static Persistable getFirstIteration(Object identifier) throws WTException
WTException
public static Persistable getSaveAsObject(Persistable aPersistable)
aPersistable
- public static Persistable getTemplate(String name, Object type, WTContainer wtcontainer) throws Exception
modelType
- wtcontainer
- Exception
public static Map<String,Object> getInitRules(Object typeName, String container) throws Exception
typeName
- container
- Exception
public static Map<String,Object> getInitRules(Object type, String container, Set<String> keys) throws Exception
type
- pass type name, obid of Typed/WTContained or type objectcontainer
- container name - only used if passing in name of type or obj passed in has no container setkeys
- if not null only return init rule values for given keys (e.g., return Folder but do not draw a Number)Exception
public static <T> List<T> validStates(String typeName, String container, Class<T> cls) throws Exception
typeName
- container
- cls
- pass String.class or State.class to get State names or States backException
public static boolean isA(Object typed, String name)
typed
- input obj as persistable/wtobject or reference or obid stringname
- name of type to checkpublic static Map unJSON(JSONObject in)
in
- the JSONObjectpublic static Map unJSON(JSONObject in, boolean toString)
in
- the JSONObjecttoString
- if true returns Strings as valuespublic static List unJSON(JSONArray in)
in
- the JSONArraypublic static List unJSON(JSONArray in, boolean toString)
in
- the JSONArraytoString
- if true returns Strings as valuespublic static InputStream checkForUtf8BOM(InputStream inputStream) throws IOException
inputStream
- IOException
public static boolean isCAD3D(EPMDocument e)
e
- public static boolean isCADDrawing(EPMDocument e)
e
- public static boolean isCADAssembly(EPMDocument e)
e
- public static boolean isCADComponent(EPMDocument e)
e
- public static boolean isCADFormat(EPMDocument e)
e
- @Deprecated public static void renameAndRenumberObj(Persistable obj2rename, String newName, String newNumber, String newCadName) throws Exception
Exception
@Deprecated public static EPMDocument createEPMDoc(String docNumber, String docName, String cadName, String container, String folder, String versionID, String iterationID, File[] binaryContent) throws Exception
Exception
@Deprecated public static EPMDocument createEPMDoc(String docNumber, String docName, String cadName, String container, String folder, String versionID, String iterationID, Map moreData, File[] binaryContent) throws Exception
Exception
@Deprecated public static EPMDocument createEPMDoc(String docNumber, String docName, String cadName, String container, String folder, String versionID, String iterationID, File[] binaryContent, EPMAuthoringAppType authoringApp, EPMAuthoringAppVersion appVersion) throws Exception
Exception
@Deprecated public static EPMDocument createEPMDoc(String docNumber, String docName, String cadName, String container, String folder, String versionID, String iterationID, Map moreData, File[] binaryContent, EPMAuthoringAppType authoringApp, EPMAuthoringAppVersion appVersion) throws Exception
Exception
@Deprecated public static WTPart renameWTPart(WTPart aPart, String number, String name) throws Exception
Exception
@Deprecated public static void renameWTPart(WTPartMaster aPart, String number, String name) throws Exception
Exception
@Deprecated public static EPMDocument renameEPMDocument(EPMDocument d, String number, String name, String cadName) throws Exception
Exception
@Deprecated public static void renameEPMDocument(EPMDocumentMaster d, String number, String name, String cadName) throws Exception
Exception
@Deprecated public static WTDocument createWTDoc(String docNumber, String docName, String container, String folder, String versionID, String iterationID, Map moreData, File[] binaryContent) throws Exception
Exception
@Deprecated public static WTDocument createWTDoc(String docNumber, String docName, WTContainer container, String folder, String versionID, String iterationID, Map moreData, File[] binaryContent) throws Exception
Exception
@Deprecated public static WTPart createWTPart(String partNumber, String partName, String container, String folder, String versionID, String iterationID) throws Exception
Exception
@Deprecated public static WTPart createWTPart(String partNumber, String partName, String container, String folder, String versionID, String iterationID, boolean makePersistent) throws Exception
Exception
@Deprecated public static WTPart createWTPart(String partNumber, String partName, String container, String folder, String versionID, String iterationID, Map moreData) throws Exception
Exception
@Deprecated public static WTPart createWTPart(String partNumber, String partName, String container, String folder, String versionID, String iterationID, Map moreDataIn, boolean makePersistent) throws Exception
Exception
@Deprecated public static void reviseDummyToVersion(String seriesID, String targetVersion, String containerName, boolean clearCache, int maxRounds) throws Exception
Exception
@Deprecated public static Versioned reviseToVersion(Versioned v, String targetVersion, int maxRounds) throws Exception
Exception
@Deprecated public static Versioned setObjectToSpecificVersion(Versioned revObj, String targetVersion) throws Exception
Exception
@Deprecated public static Versioned setObjectToSpecificVersion(Versioned revObj, String targetVersion, String targetIteration) throws Exception
Exception
@Deprecated public static Versioned setObjectToSpecificVersion(Versioned revObj, String targetVersion, String targetIteration, String series) throws Exception
Exception
@Deprecated public static Versioned setObjectToSpecificVersion(Versioned revObj, String targetVersion, String targetIteration, String series, boolean force) throws Exception
Exception
@Deprecated public static void setLifecycleState(Persistable obj, String newLCState) throws Exception
Exception
@Deprecated public static void checkForVersion(String seriesID, String version, boolean createMissingVersion) throws Exception
Exception
@Deprecated public static int compareVersions(String seriesID, String versionA, String versionB) throws Exception
Exception
@Deprecated public static int compareVersions(String seriesID, String versionA, String versionB, boolean createMissingVersion) throws Exception
Exception
@Deprecated public static String getSortSeriesValue(SeriesSortValue ssv)
@Deprecated public static String getSortSeriesUniqueId(SeriesSortValue ssv)
@Deprecated public static String getSortSeriesSortId(SeriesSortValue ssv)
@Deprecated public static void reviseDummyToVersion(String seriesID, String targetVersion, String containerName) throws Exception
Exception
@Deprecated public static void reviseDummyToVersion(String seriesID, String targetVersion, String containerName, boolean clearCache) throws Exception
Exception
public static String getNumber(Persistable p)
public static String getName(Persistable p)
public static boolean isME10(EPMDocument e)
public static boolean isProEDoc(EPMDocumentMaster edm)
public static boolean isProEDoc(EPMDocument ed)
public static void clearTaskCache(Map in)
in
- values passed, needs "task" parameter e.g., /ext/sulispublic static String escapeUTF(String in)