public class TMLContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TMLContext.IndependentDesignContext |
static class |
TMLContext.IndependentTMLScriptEnvironment |
static class |
TMLContext.MasterAction |
static class |
TMLContext.WebTMLContextEnvironment |
static class |
TMLContext.WebTMLDesignContext |
static class |
TMLContext.WebTMLOccasion |
Modifier and Type | Field and Description |
---|---|
static ThreadLocal<LinkedList<TMLContext>> |
_threadMainContexts |
static String |
ACTIONID_DIVIDER |
static Object |
SESSIONATTRIB_ASYNCACTION
Set as session attribute for tasks that execute master/async actions.
|
Constructor and Description |
---|
TMLContext(TMLContext parentContext,
BaseTagStatus status)
Constructor to create clones of a context with a design context for a different WebTML tag
|
TMLContext(de.innovationgate.webgate.api.WGDocument doc,
de.innovationgate.wgpublisher.webtml.Base tag)
Constructor for the main context of a WebTML request
|
TMLContext(de.innovationgate.webgate.api.WGDocument doc,
WGACore core,
TMLUserProfile userProfile,
TMLForm form) |
TMLContext(de.innovationgate.webgate.api.WGDocument doc,
WGACore core,
TMLUserProfile userProfile,
TMLForm form,
HttpServletRequest req,
HttpServletResponse rsp) |
Modifier and Type | Method and Description |
---|---|
void |
addwarning(String msg) |
void |
addwarning(String msg,
boolean severe) |
void |
appendvar(String name,
Object value) |
boolean |
assertequallists(String title,
String category,
List l1,
List l2)
Compares two lists based on their contents but not on their order.
|
void |
assertequals(String id,
Object obj1,
Object obj2)
wrapper for TestCore.assertEquals(...)
|
boolean |
assertequals(String title,
String category,
Object obj1,
Object obj2)
wrapper for TestCore.assertEquals(...)
|
void |
assertiondebug(boolean enabled)
enable or disable TestCore.assertionDebugMode
|
boolean |
assertisregisteredorexecuted(String id)
wrapper for TestCore.assertIsRegisteredOrExecuted()
|
boolean |
assertlarger(String title,
String category,
Date obj1,
Date obj2) |
boolean |
assertlarger(String title,
String category,
Number obj1,
Number obj2) |
boolean |
assertnotequals(String title,
String category,
Object obj1,
Object obj2)
wrapper for TestCore.assertNotEquals(...)
|
void |
asserttrue(String id,
String condition)
wrapper for TestCore.assertTrue(...)
|
void |
asserttrue(String title,
String category,
String condition)
wrapper for TestCore.assertTrue(...)
|
int |
assignuserprofile(String name,
String password) |
int |
assignuserprofile(String domain,
String name,
String password) |
void |
attachscaledimage(de.innovationgate.webgate.api.WGDocument doc,
de.innovationgate.utils.ImageScaler scaler) |
void |
attachscaledimage(de.innovationgate.webgate.api.WGDocument doc,
de.innovationgate.utils.ImageScaler scaler,
String targetFileName) |
List |
bestfragments(String itemname,
int fragmentSize,
int maxFragments)
retrieves a list of the best fragments from the given contentItem based upon the last lucene query with highlight attribute set to true
query hits are not highlighted in fragments
|
List |
bestfragments(String itemname,
int fragmentSize,
int maxFragments,
String prefix,
String suffix)
retrieves a list of the best fragments from the given contentItem based upon the last lucene query with highlight attribute set to true
query hits are highlighted (surrounded by given
|
List |
bestfragments(String itemname,
int fragmentSize,
int maxFragments,
String prefix,
String suffix,
String encode)
retrieves a list of the best fragments from the given contentItem based upon the last lucene query with highlight attribute set to true
query hits are highlighted (surrounded by given
|
List<String> |
buildOptions(Iterable<de.innovationgate.webgate.api.WGContent> contents,
String titleExpr,
String emptyTitle) |
Object |
callCustomAction(TMLAction tmlAction,
List params) |
Object |
callCustomAction(TMLAction tmlAction,
List<Object> params,
Map<String,Object> parentScopeObjects) |
Object |
callDefaultAction(String string,
List params) |
void |
changesessionpassword(String newPassword) |
void |
changesessionpassword(String domain,
String newPassword) |
static void |
clearThreadMainContext() |
int |
closeuserprofile() |
int |
closeuserprofile(String domain) |
de.innovationgate.webgate.api.WGContent |
content() |
String |
contentdataurl(String mediaKey,
String layoutKey) |
String |
contentdataurl(String mediaKey,
String layoutKey,
boolean ignoreVirtualLink,
String queryString) |
String |
contentdataurl(String mediaKey,
String layoutKey,
String queryString) |
String |
contenturl() |
String |
contenturl(String mediaKey,
String layoutKey) |
String |
contenturl(String mediaKey,
String layoutKey,
boolean ignoreVirtualLink) |
TMLContext |
context(String expression) |
TMLContext |
context(String expression,
boolean returnContextOnError) |
TMLContext |
context(de.innovationgate.webgate.api.WGContent content) |
TMLContext |
context(de.innovationgate.webgate.api.WGDocument doc) |
Calendar |
createcalendar() |
Calendar |
createcalendar(Date date) |
static String |
createContextKey(de.innovationgate.webgate.api.WGDocument doc) |
Cookie |
createcookie(String name,
String value) |
Cookie |
createCookie(String name,
String value) |
Date |
createdate() |
Date |
createdate(boolean includeMillis) |
PortletEvent |
createevent(String name) |
TMLForm |
createform(FormInfo formInfo) |
FormInfo |
createforminfo(String id) |
FormInfo |
createforminfo(String id,
boolean htmlInput,
boolean persistent) |
de.innovationgate.utils.ImageScaler |
createimagescaler(File imageFile) |
de.innovationgate.utils.ImageScaler |
createimagescaler(InputStream is) |
List |
createlist() |
List |
createlist(Object[] objects) |
List |
createlist(String listString,
String delimiter) |
Login |
createlogin(String username,
String password) |
Map |
createlookuptable() |
Map |
createlookuptable(Map map) |
Mail |
createmail() |
Mail |
createmail(String smtpHost,
String username,
String password) |
static TMLContext |
createMasterSessionContext(TMLContext context) |
int |
createuserprofile(String name,
String password) |
int |
createuserprofile(String domain,
String name,
String password) |
int |
createuserprofile(String domain,
String name,
String password,
boolean forCurrentUser) |
Date |
dateonly(Date date) |
de.innovationgate.webgate.api.WGDatabase |
db()
Returns the db current in context
|
de.innovationgate.webgate.api.WGDatabase |
db(String key) |
TMLContext |
dbContext(de.innovationgate.webgate.api.WGDatabase dbTarget) |
TMLContext |
dbContext(de.innovationgate.webgate.api.WGDatabase dbTarget,
de.innovationgate.webgate.api.WGLanguageChooser chooser) |
TMLContext |
designContext(TMLDesignContext designContext) |
de.innovationgate.webgate.api.WGDatabase |
designdb() |
String |
encode(String encode,
Object input) |
DerivateQuery |
enhanceFileDerivateQuery(String fileDerivates) |
ExpressionResult |
evaluateExpression(String expression) |
ExpressionResult |
evaluateExpression(String expression,
Map additionalObjects) |
ExpressionResult |
evaluateScript(String script) |
ExpressionResult |
evaluateScript(String script,
Map additionalObjects) |
static String |
expandLocalName(String ref,
String currentModuleRef)
Takes a reference name that might be a local name (starting with ":").
|
String |
filedataurl(String fileName) |
String |
filedataurl(String containerName,
String fileName) |
String |
filedataurl(String containerName,
String fileName,
String contentType) |
String |
filedataurl(String dbKey,
String containerName,
String fileName,
String contentType)
creates a RFC2397 data url from the given file
|
String |
fileurl(String fileName) |
String |
fileurl(String containerName,
String fileName) |
String |
fileurl(String dbKey,
String containerName,
String fileName) |
static Object |
flattenList(Object object) |
TMLAction |
getActionByID(String id,
String dbkey) |
TMLAction |
getActionByID(String id,
String dbkey,
DesignResourceReference baseRef)
Retrieves an TMLAction definition from all valid sources
|
Map |
getActionRegistration() |
de.innovationgate.webgate.api.WGDocument |
getapiobject() |
de.innovationgate.webgate.api.WGContent |
getcontent() |
Cookie[] |
getcookies() |
DateFormat |
getDateFormat(String pattern)
returns a dateFormat for the given pattern
if pattern is 'null' a default dateFormat is returned
|
TMLDesignContext |
getDesignContext() |
String |
getDesignDBKey() |
de.innovationgate.webgate.api.WGDocument |
getdocument() |
int |
getDummy() |
TMLContextEnvironment |
getEnvironment() |
HttpSession |
gethttpsession() |
String |
getlasterror() |
org.apache.log4j.Logger |
getlog() |
TMLContext |
getmaincontext() |
TMLAction |
getModuleActionByID(String id,
String dbKey) |
NumberFormat |
getNumberFormat(String pattern)
returns a numberFormat for the given pattern
if pattern is 'null' a default numberFormat is returned
|
de.innovationgate.webgate.api.WGUserAccess |
getoriginaluserdata() |
String |
getpath() |
Map |
getPersistentForms() |
de.innovationgate.wga.common.beans.csconfig.v1.PluginID |
getpluginid(de.innovationgate.webgate.api.WGDatabase db)
Ugly duplicate of
pluginid(WGDatabase) , kept for historical reasons. |
TMLPortlet |
getportlet()
Returns the current portlet object, containing configuration information for the current portlet
Portlet informations are always stored in the personalisation db of the request's main context.
|
TMLPortlet |
getportletbykey(String nameSpace) |
de.innovationgate.webgate.api.WGPortletRegistry |
getPortletRegistry() |
TMLPortletStateStorage |
getPortletStateStorage() |
String |
getpreferredlanguage()
Deprecated.
|
Locale |
getPreferredLanguageLocale() |
TMLUserProfile |
getprofile()
Returns the user profile for the current context
For WebTML-Environments: the profile in the personalisation db, that belongs to the domain of the current context database
For Event scripts and master actions: The profile of the user that triggered the event or master action
For other environments: null
|
javax.servlet.http.HttpServletRequest |
getrequest() |
HttpServletResponse |
getresponse() |
String |
getrole() |
String |
getScopedString(String str,
String scope) |
Object |
getsessionvar(String name) |
BaseTagStatus |
gettag() |
static TMLContext |
getThreadMainContext() |
TMLContext |
getTMLContextForDocument(de.innovationgate.webgate.api.WGDocument doc) |
TMLForm |
gettmlform() |
String |
getUriHash() |
WGAURLBuilder |
getURLBuilder() |
String |
geturlparameter(String name) |
List |
geturlparameterlist(String name) |
List |
geturlparameternames() |
Object |
getvar(String name) |
List<Warning> |
getWarnings() |
WGACore |
getwgacore() |
boolean |
haschildren() |
boolean |
hasgroup(String group) |
boolean |
haslabel(String key) |
boolean |
haslabel(String fileName,
String key) |
boolean |
haslabel(String containerName,
String fileName,
String key) |
boolean |
hasMappedItemValue(String name) |
boolean |
hasoption(String option) |
boolean |
hasprofile() |
boolean |
hasrole(String role) |
boolean |
hassiblings() |
boolean |
hasVariable(String name) |
de.innovationgate.webgate.api.WGHierarchicalDatabase |
hdb() |
de.innovationgate.webgate.api.WGHierarchicalDatabase |
hdb(String key) |
String |
highlightitem(String name,
String prefix,
String suffix)
returns a singleton list with itemvalues highlighted (surrounded with given
|
String |
highlightitem(String name,
String prefix,
String suffix,
String encode)
returns a singleton list with itemvalues highlighted (surrounded with given
|
List |
highlightMeta(String name,
String prefix,
String suffix)
returns a singleton list with metavalues highlighted (surrounded with given
|
List |
highlightMeta(String name,
String prefix,
String suffix,
String encode)
returns a singleton list with metavalues highlighted (surrounded with given
|
void |
importEnvironmentData(TMLContext context) |
void |
importEnvironmentData(TMLContext context,
boolean includeIntrusiveData) |
boolean |
isanonymous() |
boolean |
isassertiondebug() |
boolean |
isbotrequest() |
boolean |
isbrowserinterface() |
boolean |
isdefined(String name) |
boolean |
isempty(String itemName) |
boolean |
isemptyvalue(Object value) |
boolean |
isfalse(String varname) |
boolean |
isfilled(String attValue) |
boolean |
isfirstloop() |
boolean |
isfirstloop(String tagId) |
boolean |
islastloop() |
boolean |
islastloop(String tagId) |
boolean |
ismaindocument() |
boolean |
isnewsession() |
boolean |
isroot() |
boolean |
isselected() |
boolean |
istagidvalid(String tagid) |
boolean |
istrue(String varname) |
boolean |
iswebenvironment() |
Object |
item(String name) |
Object |
item(String type,
String name) |
List |
itemlist(String name) |
Object |
itemlist(String type,
String name) |
String |
label(String key) |
String |
label(String key,
List params) |
String |
label(String fileName,
String key) |
String |
label(String fileName,
String key,
List params) |
String |
label(String containerName,
String fileName,
String key) |
String |
label(String containerName,
String fileName,
String key,
List params) |
String |
label(String containerName,
String fileName,
String key,
List params,
boolean usePlaceholder) |
String |
label(de.innovationgate.webgate.api.WGDatabase designDB,
String containerName,
String fileName,
String key,
List params) |
String |
label(de.innovationgate.webgate.api.WGDatabase designDB,
String containerName,
String fileName,
String key,
List<String> params,
boolean usePlaceholder) |
String |
layouturl(String mediaKey,
String layoutKey) |
String |
layouturl(String dbKey,
String mediaKey,
String layoutKey) |
org.dom4j.Document |
loadhtml(org.apache.commons.httpclient.HttpClient client,
String url) |
org.dom4j.Document |
loadhtml(String url) |
boolean |
login(String user,
String password) |
boolean |
login(String user,
String password,
String domain) |
boolean |
logout(String domain) |
de.innovationgate.webgate.api.WGResultSet |
lucenesearch(String phrase) |
de.innovationgate.webgate.api.WGResultSet |
lucenesearch(String phrase,
String scope) |
void |
makeThreadMainContext() |
Object |
meta(String name) |
Object |
meta(String type,
String name) |
List |
metalist(String name) |
List |
metalist(String type,
String name) |
String |
multiencode(String encode,
Object input) |
Object |
option(String option) |
Object |
option(String option,
Object defaultValue) |
Date |
parsedate(String date,
String format) |
org.dom4j.Document |
parsehtml(String html) |
Number |
parsenumber(String number,
String format) |
de.innovationgate.webgate.api.WGDatabase |
plugindb(String pluginUniqueName) |
String |
plugindbkey(String pluginUniqueName) |
de.innovationgate.wga.common.beans.csconfig.v1.PluginID |
pluginid(String pluginUniqueName) |
de.innovationgate.wga.common.beans.csconfig.v1.PluginID |
pluginid(de.innovationgate.webgate.api.WGDatabase db) |
TMLPortlet |
portletbypath(String path)
Returns a portlet by its path, relative to the current portlet
Valid path expressions
/ - At start: The parent portlet.
|
void |
redirectto(String url) |
TMLAction |
registerAction(TMLAction currentAction,
String id,
String designDB)
Registers an action for the current Http-Session, if an action with this code is not already registered.
|
void |
registerassertequals(String id,
String title,
String category)
wrapper for TestCore.registerAssertEquals()
|
void |
registerasserttrue(String id,
String title,
String category)
wrapper for TestCore.registerAssertTrue()
|
void |
registerForm(TMLForm form,
boolean persist) |
void |
removelucenequery()
removes the last lucene query from session
should be called when you are sure you do not need further highlighting of content items
for the last executed lucene query with highlight=="true"
|
void |
removesessionvar(String name) |
void |
removeThreadMainContext() |
void |
removetmlform(String formid) |
void |
removevar(String name) |
String |
resolveDBKey(String dbkey) |
DesignResourceReference |
resolveDesignResource(String ref) |
DesignResourceReference |
resolveDesignResource(String refString,
DesignResourceReference baseReference) |
DesignResourceReference |
resolveDesignResource(String designDB,
String refString) |
DesignResourceReference |
resolveDesignResource(String refDB,
String refString,
DesignResourceReference baseReference)
Resolves a design reference to find the corresponding resource.
|
void |
saveprofileonend() |
String |
scripturl(String dbKey,
String type,
String doc) |
void |
setLastError(String lastError) |
void |
setoption(String name,
Object value) |
void |
setoption(String name,
Object value,
String scope) |
void |
setpreferredlanguage(String lang)
Deprecated.
|
void |
setrole(String role) |
void |
setsessionvar(String name,
Object value) |
void |
setsessionvar(String name,
Object value,
boolean allowSerialisation) |
void |
setSessionVar(String name,
Object value,
boolean allowSerialization,
boolean keepList) |
void |
seturlparameterifempty(String name,
List values) |
void |
seturlparameterifempty(String name,
String value) |
void |
setvar(String name,
Object value) |
void |
setvar(String name,
Object value,
boolean keepList) |
Date |
stringtodate(String text) |
String |
systemLabel(String systemBundleName,
String labelKey) |
String |
systemLabel(String systemBundleName,
String labelKey,
List params)
Retrieves a WGA internal system label from the properties files lying under
WGACore#SYSTEMLABEL_BASE_PATH in the language of the current request locale |
Object |
taginfo(String tagId,
String name) |
Date |
timeonly(Date date) |
TMLForm |
tmlformbyid(String id) |
static List |
toList(Object value) |
String |
toString() |
static Object |
unwrapSessionVar(Object var) |
void |
updateOrSetVar(String name,
Object value)
Tool method for the TMLScript engine defining the behaviour of setvar() short syntax
Will look for possible existing variables to update before setting a new variable
|
void |
waitforauthupdates(de.innovationgate.webgate.api.WGDatabase db,
int timeoutSeconds) |
public static final String ACTIONID_DIVIDER
public static final Object SESSIONATTRIB_ASYNCACTION
public static ThreadLocal<LinkedList<TMLContext>> _threadMainContexts
public TMLContext(de.innovationgate.webgate.api.WGDocument doc, de.innovationgate.wgpublisher.webtml.Base tag)
doc
- tag
- public TMLContext(TMLContext parentContext, BaseTagStatus status)
doc
- parentContext
- public TMLContext(de.innovationgate.webgate.api.WGDocument doc, WGACore core, TMLUserProfile userProfile, TMLForm form) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public TMLContext(de.innovationgate.webgate.api.WGDocument doc, WGACore core, TMLUserProfile userProfile, TMLForm form, HttpServletRequest req, HttpServletResponse rsp) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public static TMLContext getThreadMainContext()
public void makeThreadMainContext()
public void removeThreadMainContext()
public static void clearThreadMainContext()
public TMLContextEnvironment getEnvironment()
public void importEnvironmentData(TMLContext context, boolean includeIntrusiveData) throws TMLException
TMLException
public void importEnvironmentData(TMLContext context) throws TMLException
TMLException
public Map getActionRegistration()
public Object callCustomAction(TMLAction tmlAction, List params) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public Object callCustomAction(TMLAction tmlAction, List<Object> params, Map<String,Object> parentScopeObjects) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public void setvar(String name, Object value, boolean keepList) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public void setvar(String name, Object value) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public void updateOrSetVar(String name, Object value) throws de.innovationgate.webgate.api.WGAPIException
name
- Variable to setvalue
- Value to Setde.innovationgate.webgate.api.WGAPIException
public TMLContext getmaincontext()
public Object item(String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public Object item(String type, String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean isbotrequest()
public Object itemlist(String type, String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public de.innovationgate.webgate.api.WGDocument getdocument()
public boolean hasVariable(String name)
public boolean hasMappedItemValue(String name)
public List itemlist(String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public String highlightitem(String name, String prefix, String suffix) throws de.innovationgate.webgate.api.WGAPIException
name
- prefix
- suffix
- de.innovationgate.webgate.api.WGAPIException
public String highlightitem(String name, String prefix, String suffix, String encode) throws de.innovationgate.webgate.api.WGAPIException
name
- prefix
- suffix
- encode
- encode the result in the given encoding - prefix and suffix will not be encodedde.innovationgate.webgate.api.WGAPIException
public List highlightMeta(String name, String prefix, String suffix) throws de.innovationgate.webgate.api.WGAPIException
name
- prefix
- suffix
- de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public List highlightMeta(String name, String prefix, String suffix, String encode) throws de.innovationgate.webgate.api.WGAPIException
name
- prefix
- suffix
- encode
- de.innovationgate.webgate.api.WGAPIException
public List bestfragments(String itemname, int fragmentSize, int maxFragments) throws de.innovationgate.webgate.api.WGAPIException
itemname
- the item fragements should be retrieved fromfragmentSize
- the number of characters for each fragmentmaxFragments
- the maximum number of fragements returnedde.innovationgate.webgate.api.WGAPIException
public List bestfragments(String itemname, int fragmentSize, int maxFragments, String prefix, String suffix) throws de.innovationgate.webgate.api.WGAPIException
itemname
- the item fragements should be retrieved fromfragmentSize
- the number of characters for each fragmentmaxFragments
- the maximum number of fragements returnedprefix
- the prefix for highlighting the search term in fragementssuffix
- the suffix for highlighting the search term in fragementsde.innovationgate.webgate.api.WGAPIException
public List bestfragments(String itemname, int fragmentSize, int maxFragments, String prefix, String suffix, String encode) throws de.innovationgate.webgate.api.WGAPIException
itemname
- the item fragements should be retrieved fromfragmentSize
- the number of characters for each fragmentmaxFragments
- the maximum number of fragements returnedprefix
- the prefix for highlighting the search term in fragementssuffix
- the suffix for highlighting the search term in fragementsencode
- encode each fragment in the given encoding - prefix and suffix will not be encodedde.innovationgate.webgate.api.WGAPIException
public void removelucenequery()
public List metalist(String type, String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public List metalist(String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public void setSessionVar(String name, Object value, boolean allowSerialization, boolean keepList)
public void removesessionvar(String name)
public de.innovationgate.webgate.api.WGContent content()
public de.innovationgate.webgate.api.WGContent getcontent()
public TMLContext context(String expression, boolean returnContextOnError)
public TMLContext context(String expression)
public Object meta(String type, String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public TMLUserProfile getprofile()
public TMLPortlet getportlet() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public TMLPortlet portletbypath(String path) throws de.innovationgate.webgate.api.WGException
path
- de.innovationgate.webgate.api.WGException
public TMLPortlet getportletbykey(String nameSpace) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public de.innovationgate.webgate.api.WGPortletRegistry getPortletRegistry() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public TMLPortletStateStorage getPortletStateStorage()
public Object meta(String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public Object taginfo(String tagId, String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public String getlasterror()
public void setLastError(String lastError)
public boolean isselected() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean haschildren() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean hassiblings() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean isroot() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean ismaindocument() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean isbrowserinterface()
public String contenturl(String mediaKey, String layoutKey) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public String contenturl() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public String contenturl(String mediaKey, String layoutKey, boolean ignoreVirtualLink) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public String contentdataurl(String mediaKey, String layoutKey) throws ServletException, IOException, de.innovationgate.webgate.api.WGException
ServletException
IOException
de.innovationgate.webgate.api.WGException
public String contentdataurl(String mediaKey, String layoutKey, String queryString) throws ServletException, IOException, de.innovationgate.webgate.api.WGException
ServletException
IOException
de.innovationgate.webgate.api.WGException
public String contentdataurl(String mediaKey, String layoutKey, boolean ignoreVirtualLink, String queryString) throws ServletException, IOException, de.innovationgate.webgate.api.WGException
ServletException
IOException
de.innovationgate.webgate.api.WGException
public int getDummy()
public String layouturl(String dbKey, String mediaKey, String layoutKey) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public String layouturl(String mediaKey, String layoutKey) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public void setrole(String role)
public String getrole()
public void addwarning(String msg, boolean severe)
public void addwarning(String msg)
public boolean isnewsession()
public Cookie[] getcookies()
public javax.servlet.http.HttpServletRequest getrequest()
public boolean istrue(String varname) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean isdefined(String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean isfalse(String varname) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean hasoption(String option)
public de.innovationgate.webgate.api.WGDocument getapiobject()
public List createlist()
public int createuserprofile(String name, String password) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public int createuserprofile(String domain, String name, String password) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public int createuserprofile(String domain, String name, String password, boolean forCurrentUser) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public int assignuserprofile(String name, String password) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public int assignuserprofile(String domain, String name, String password) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public TMLForm gettmlform()
public TMLForm tmlformbyid(String id)
public de.innovationgate.webgate.api.WGDatabase db(String key) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public de.innovationgate.webgate.api.WGDatabase db()
public de.innovationgate.webgate.api.WGDatabase designdb() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public de.innovationgate.webgate.api.WGHierarchicalDatabase hdb(String key) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public de.innovationgate.webgate.api.WGHierarchicalDatabase hdb() throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public int closeuserprofile(String domain) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public int closeuserprofile() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean hasprofile()
public TMLContext context(de.innovationgate.webgate.api.WGContent content) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public TMLContext context(de.innovationgate.webgate.api.WGDocument doc) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public Mail createmail(String smtpHost, String username, String password) throws UnsupportedEncodingException
UnsupportedEncodingException
public Mail createmail() throws TMLException
TMLException
public de.innovationgate.utils.ImageScaler createimagescaler(File imageFile) throws de.innovationgate.webgate.api.WGException, IOException
de.innovationgate.webgate.api.WGException
IOException
public de.innovationgate.utils.ImageScaler createimagescaler(InputStream is) throws de.innovationgate.webgate.api.WGException, IOException
de.innovationgate.webgate.api.WGException
IOException
public String getpath() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public void registerForm(TMLForm form, boolean persist)
public HttpServletResponse getresponse()
public void redirectto(String url) throws IOException
IOException
public TMLContext getTMLContextForDocument(de.innovationgate.webgate.api.WGDocument doc)
public static String createContextKey(de.innovationgate.webgate.api.WGDocument doc)
public org.apache.log4j.Logger getlog()
public void removevar(String name) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public WGACore getwgacore()
public HttpSession gethttpsession()
public void setpreferredlanguage(String lang)
public String getpreferredlanguage()
getpreferredlanguage(WGDatabase, boolean)
with the current context database and "true" for the exhaustive parameterde.innovationgate.webgate.api.WGAPIException
public Locale getPreferredLanguageLocale()
public DateFormat getDateFormat(String pattern)
pattern
- - @see java.text.SimpleDateFormatpublic NumberFormat getNumberFormat(String pattern)
pattern
- - @see java.text.DecimalFormatpublic Date parsedate(String date, String format) throws ParseException
ParseException
public Number parsenumber(String number, String format) throws ParseException
ParseException
public Date createdate()
public Date createdate(boolean includeMillis)
public Calendar createcalendar()
public String label(String containerName, String fileName, String key, List params, boolean usePlaceholder)
public String label(de.innovationgate.webgate.api.WGDatabase designDB, String containerName, String fileName, String key, List<String> params, boolean usePlaceholder) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public String label(de.innovationgate.webgate.api.WGDatabase designDB, String containerName, String fileName, String key, List params) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public boolean haslabel(String key)
public boolean iswebenvironment()
public void asserttrue(String title, String category, String condition)
title
- assertion-titlecategory
- assertion-categorycondition
- tmlscript-condition to test for truepublic boolean assertequals(String title, String category, Object obj1, Object obj2)
title
- assertion-titlecategory
- assertion-categoryobj1
- Object1 for compareobj2
- Object2 for comparepublic boolean assertnotequals(String title, String category, Object obj1, Object obj2)
title
- assertion-titlecategory
- assertion-categoryobj1
- Object1 for compareobj2
- Object2 for comparepublic boolean assertequallists(String title, String category, List l1, List l2)
title
- assertion-titlecategory
- assertion-categoryl1
- List 1 for comparel2
- List 2 for comparepublic void asserttrue(String id, String condition)
id
- of preregistered assertioncondition
- tmlscript-condition to test for truepublic void assertequals(String id, Object obj1, Object obj2)
id
- of preregistered assertionobj1
- Object1 for compareobj2
- Object2 for comparepublic void registerasserttrue(String id, String title, String category)
id
- unqiue id for the assertiontitle
- assertion-titlecategory
- assertion-categorypublic void registerassertequals(String id, String title, String category)
id
- unqiue id for the assertiontitle
- assertion-titlecategory
- assertion-categorypublic boolean assertisregisteredorexecuted(String id)
id
- unique id for the assertionpublic void assertiondebug(boolean enabled)
public boolean isassertiondebug()
public void changesessionpassword(String newPassword) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public TMLAction getActionByID(String id, String dbkey, DesignResourceReference baseRef)
id
- The reference of the actiondbkey
- An explicitly chosen dbkey where to lookup the action. Give null if nothing was chosen.baseRef
- The base design reference of the current design context, used to resolve the action.public String getDesignDBKey()
public TMLAction getModuleActionByID(String id, String dbKey) throws TMLActionException
TMLActionException
public TMLForm createform(FormInfo formInfo) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public FormInfo createforminfo(String id)
public FormInfo createforminfo(String id, boolean htmlInput, boolean persistent)
public static String expandLocalName(String ref, String currentModuleRef)
ref
- The reference name to expandcurrentModuleRef
- The name of the currently executed modulepublic de.innovationgate.webgate.api.WGResultSet lucenesearch(String phrase, String scope) throws de.innovationgate.webgate.api.WGQueryException
de.innovationgate.webgate.api.WGQueryException
public de.innovationgate.webgate.api.WGResultSet lucenesearch(String phrase) throws de.innovationgate.webgate.api.WGQueryException
de.innovationgate.webgate.api.WGQueryException
public String fileurl(String containerName, String fileName) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public String fileurl(String dbKey, String containerName, String fileName) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public String fileurl(String fileName) throws UnsupportedEncodingException, de.innovationgate.webgate.api.WGException
UnsupportedEncodingException
de.innovationgate.webgate.api.WGException
public String filedataurl(String containerName, String fileName) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public String filedataurl(String fileName) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public String filedataurl(String containerName, String fileName, String contentType) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public String filedataurl(String dbKey, String containerName, String fileName, String contentType) throws de.innovationgate.webgate.api.WGAPIException
dbKey
- containerName
- fileName
- contentType
- de.innovationgate.webgate.api.WGAPIException
public void saveprofileonend()
public Map createlookuptable()
public PortletEvent createevent(String name)
public boolean isempty(String itemName) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean isemptyvalue(Object value)
public boolean isfilled(String attValue) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean login(String user, String password, String domain) throws LoginException, de.innovationgate.webgate.api.WGAPIException
LoginException
de.innovationgate.webgate.api.WGAPIException
public boolean login(String user, String password) throws LoginException, de.innovationgate.webgate.api.WGAPIException
LoginException
de.innovationgate.webgate.api.WGAPIException
public boolean logout(String domain) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public de.innovationgate.webgate.api.WGDatabase plugindb(String pluginUniqueName) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public de.innovationgate.wga.common.beans.csconfig.v1.PluginID pluginid(String pluginUniqueName) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public String encode(String encode, Object input) throws de.innovationgate.utils.FormattingException
de.innovationgate.utils.FormattingException
public String multiencode(String encode, Object input) throws de.innovationgate.utils.FormattingException
de.innovationgate.utils.FormattingException
public WGAURLBuilder getURLBuilder()
public org.dom4j.Document loadhtml(org.apache.commons.httpclient.HttpClient client, String url) throws UnsupportedEncodingException, de.innovationgate.webgate.api.WGAPIException, IOException, org.apache.commons.httpclient.HttpException, SAXException
UnsupportedEncodingException
de.innovationgate.webgate.api.WGAPIException
IOException
org.apache.commons.httpclient.HttpException
SAXException
public org.dom4j.Document loadhtml(String url) throws UnsupportedEncodingException, de.innovationgate.webgate.api.WGAPIException, org.apache.commons.httpclient.HttpException, IOException, SAXException
UnsupportedEncodingException
de.innovationgate.webgate.api.WGAPIException
org.apache.commons.httpclient.HttpException
IOException
SAXException
public org.dom4j.Document parsehtml(String html) throws SAXException, IOException
SAXException
IOException
public TMLAction registerAction(TMLAction currentAction, String id, String designDB)
currentAction
- The action to registerid
- The id of the action. Specify null if the action has no id.public List geturlparameternames()
public void seturlparameterifempty(String name, String value) throws de.innovationgate.webgate.api.WGIllegalStateException
de.innovationgate.webgate.api.WGIllegalStateException
public void seturlparameterifempty(String name, List values) throws de.innovationgate.webgate.api.WGIllegalStateException
de.innovationgate.webgate.api.WGIllegalStateException
public boolean isfirstloop()
public boolean islastloop()
public boolean isfirstloop(String tagId)
public boolean islastloop(String tagId)
public de.innovationgate.wga.common.beans.csconfig.v1.PluginID getpluginid(de.innovationgate.webgate.api.WGDatabase db)
pluginid(WGDatabase)
, kept for historical reasons. See B00005E92db
- public de.innovationgate.wga.common.beans.csconfig.v1.PluginID pluginid(de.innovationgate.webgate.api.WGDatabase db)
public Map getPersistentForms()
public TMLDesignContext getDesignContext()
public ExpressionResult evaluateExpression(String expression, Map additionalObjects)
public ExpressionResult evaluateExpression(String expression)
public ExpressionResult evaluateScript(String script)
public void waitforauthupdates(de.innovationgate.webgate.api.WGDatabase db, int timeoutSeconds) throws WGAServerException
WGAServerException
public String systemLabel(String systemBundleName, String labelKey, List params)
WGACore#SYSTEMLABEL_BASE_PATH
in the language of the current request localesystemBundleName
- Name of the bundle filelabelKey
- Key of the labelparams
- A list of parameters that replace placeholders {1}...{n} in the labelpublic static TMLContext createMasterSessionContext(TMLContext context) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public de.innovationgate.webgate.api.WGUserAccess getoriginaluserdata()
public void removetmlform(String formid)
public void attachscaledimage(de.innovationgate.webgate.api.WGDocument doc, de.innovationgate.utils.ImageScaler scaler, String targetFileName) throws IOException, de.innovationgate.webgate.api.WGAPIException
IOException
de.innovationgate.webgate.api.WGAPIException
public void attachscaledimage(de.innovationgate.webgate.api.WGDocument doc, de.innovationgate.utils.ImageScaler scaler) throws IOException, de.innovationgate.webgate.api.WGAPIException
IOException
de.innovationgate.webgate.api.WGAPIException
public TMLContext dbContext(de.innovationgate.webgate.api.WGDatabase dbTarget, de.innovationgate.webgate.api.WGLanguageChooser chooser) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public TMLContext dbContext(de.innovationgate.webgate.api.WGDatabase dbTarget) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public BaseTagStatus gettag()
public List<Warning> getWarnings()
public DesignResourceReference resolveDesignResource(String ref) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public DesignResourceReference resolveDesignResource(String designDB, String refString) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public DesignResourceReference resolveDesignResource(String refString, DesignResourceReference baseReference) throws de.innovationgate.webgate.api.WGException
de.innovationgate.webgate.api.WGException
public DesignResourceReference resolveDesignResource(String refDB, String refString, DesignResourceReference baseReference) throws de.innovationgate.webgate.api.WGException
refDB
- dbkey of an explicitly chosen target app. Give null if nothing was chosen.refString
- The reference string addressing the resourcebaseReference
- The base reference used to resolve relative addressationde.innovationgate.webgate.api.WGException
public List<String> buildOptions(Iterable<de.innovationgate.webgate.api.WGContent> contents, String titleExpr, String emptyTitle) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public String scripturl(String dbKey, String type, String doc) throws UnsupportedEncodingException, de.innovationgate.webgate.api.WGException
UnsupportedEncodingException
de.innovationgate.webgate.api.WGException
public boolean istagidvalid(String tagid)
public boolean hasrole(String role) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean hasgroup(String group) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public boolean isanonymous() throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public void appendvar(String name, Object value) throws de.innovationgate.webgate.api.WGAPIException
de.innovationgate.webgate.api.WGAPIException
public String getUriHash()
public DerivateQuery enhanceFileDerivateQuery(String fileDerivates)
public TMLContext designContext(TMLDesignContext designContext)