Package com.ptc.tml.utils
Class TMLUtils
java.lang.Object
com.ptc.tml.utils.TMLUtils
The utility class for TranslationManagement.
Supported API: true
Supported API: true
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddeleteTempFiles(File parentImportDir) This method will delete the files from temp directory for translation import.static PersistablegetPersistable(String reference) Gets the persistable.static StringgetReference(Persistable persistable) Gets a string reference to a Persistablestatic WTPrincipalConvert a user name to a WTPrincipal; check the site context if not found, return null.static StringgetUserName(WTPrincipalReference principalRef) Converts a principalRef to a stringstatic StringswitchSessionPrincipal(String newPrincipalName) Sets the principal for the session to the user name specified and returns the name of the previous user.static NavigationCriteriatoNavigationCriteria(String csString, Persistable sourceObject) Convert a string representation to a Navigation Criteria; the inverse of toCsString
Supported API: true
-
Method Details
-
getReference
Gets a string reference to a Persistable- Parameters:
persistable-- Returns:
- Throws:
TranslationException-
Supported API: true
-
getPersistable
Gets the persistable.- Parameters:
reference- the reference- Returns:
- the persistable
- Throws:
TranslationException- the translation exception
Supported API: true
-
getUser
Convert a user name to a WTPrincipal; check the site context if not found, return null.- Parameters:
userName-- Returns:
- Throws:
TranslationException-
Supported API: true
-
getUserName
Converts a principalRef to a string- Parameters:
principalRef-- Returns:
- Throws:
WTException-
Supported API: true
-
switchSessionPrincipal
Sets the principal for the session to the user name specified and returns the name of the previous user. The returned value may be used to set the session user back to its original value.- Parameters:
newPrincipalName-- Returns:
Supported API: true
-
deleteTempFiles
This method will delete the files from temp directory for translation import.
Supported API: true