Class GrouperTextContainer
java.lang.Object
edu.internet2.middleware.grouper.cfg.text.GrouperTextContainer
text container in request for user
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.commons.logging.Loglogger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassignThreadLocalVariable(String key, Object value) assign thread local variable mapstatic voidassignThreadLocalVariableMap(Map<String, Object> variableMap) assign thread local variable mapconvertTextToTooltip(String key, String value) convert text to tooltipstatic StringconvertTooltipTextToHtml(String tooltipText, String term, boolean isIgnoreTooltipStyle) convert tooltip text to htmlgetText()text maptext map, escape double quotestext map, escape single quotestext map, escape single and double quotestext map, escape xml including double quotestext map with tooltips if applicablestatic voidgrouperRequestContainerThreadLocalAssign(Object grouperRequestContainer) keep grouper requestcontainer in threadlocal during request from filterstatic voidkeep grouper requestcontainer in threadlocal during request from filterstatic StringmassageText(String key, String value) massage text with substitutions etcstatic StringmassageText(String key, String value, boolean errorIfNotFound) massage text with substitutions etcstatic voidremove the threadlocalstatic GrouperTextContainerretrieve the container from the request or create a new one if not therestatic voidservletRequestThreadLocalAssign(javax.servlet.ServletRequest servletRequest) assign thread local from filterstatic voidclea thread localsubstituteTooltips(String message, boolean isIgnoreTooltipStyle) substitute tooltipsstatic StringtextOrNull(String key) get the text or null if not found
-
Field Details
-
LOG
protected static final org.apache.commons.logging.Log LOGlogger
-
-
Constructor Details
-
GrouperTextContainer
public GrouperTextContainer()
-
-
Method Details
-
assignThreadLocalVariableMap
assign thread local variable map- Parameters:
variableMap-
-
resetThreadLocalVariableMap
public static void resetThreadLocalVariableMap()remove the threadlocal -
assignThreadLocalVariable
assign thread local variable map- Parameters:
variableMap-
-
textOrNull
get the text or null if not found- Parameters:
key-- Returns:
- the text or null if not found
-
servletRequestThreadLocalAssign
public static void servletRequestThreadLocalAssign(javax.servlet.ServletRequest servletRequest) assign thread local from filter- Parameters:
servletRequest-
-
servletRequestThreadLocalClear
public static void servletRequestThreadLocalClear()clea thread local -
grouperRequestContainerThreadLocalAssign
keep grouper requestcontainer in threadlocal during request from filter- Parameters:
grouperRequestContainer-
-
grouperRequestContainerThreadLocalClear
public static void grouperRequestContainerThreadLocalClear()keep grouper requestcontainer in threadlocal during request from filter -
retrieveFromRequest
retrieve the container from the request or create a new one if not there- Returns:
- the container
-
massageText
massage text with substitutions etc- Parameters:
key-value-- Returns:
- the text
-
massageText
massage text with substitutions etc- Parameters:
key-value-errorIfNotFound- true if error text if not found- Returns:
- the text
-
convertTextToTooltip
convert text to tooltip- Parameters:
key-value-- Returns:
- the tooltip html
-
substituteTooltips
substitute tooltips- Parameters:
message-isIgnoreTooltipStyle- true if should ignore tooltip style- Returns:
- the substituted strings
-
convertTooltipTextToHtml
public static String convertTooltipTextToHtml(String tooltipText, String term, boolean isIgnoreTooltipStyle) convert tooltip text to html- Parameters:
tooltipText-term-isIgnoreTooltipStyle- if tooltip style should be ignored- Returns:
- the html tooltip text
-
getText
text map- Returns:
- the text object
-
getTextWithTooltip
text map with tooltips if applicable- Returns:
- the text object with tooltips
-
getTextEscapeSingle
text map, escape single quotes- Returns:
- the text object
-
getTextEscapeXml
text map, escape xml including double quotes- Returns:
- the text object
-
getTextEscapeDouble
text map, escape double quotes- Returns:
- the text object
-
getTextEscapeSingleDouble
text map, escape single and double quotes- Returns:
- the text object
-