public final class TagUtils extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
VELOCITY_TEMPLATE_PATH
The default location where the velocity templates are stored in.
|
Constructor and Description |
---|
TagUtils() |
Modifier and Type | Method and Description |
---|---|
static ActionDataSet |
createActionDataSet(javax.servlet.jsp.PageContext pageContext) |
static String |
createRequestId()
INTERNAL: Creates a new request ID, guaranteed to be unique
throughout the lifetime of the web application (that is, until
server restart).
|
static List |
deserializeParameters(List parameters,
TopicMapIF topicmap) |
static List |
evaluateParameterList(javax.servlet.jsp.PageContext pageContext,
String params)
INTERNAL: Evaluates a string of space-separated variable names as a list
of collections, and returns it.
|
static ActionDataSet |
getActionDataSet(javax.servlet.jsp.PageContext pageContext)
INTERNAL: Retrieves the action data set for the current form.
|
static String |
getActionGroup(javax.servlet.jsp.PageContext pageContext)
Gets the name of the action group as an attribute value (residing
in the page scope).
|
static String |
getActionID(javax.servlet.jsp.PageContext pageContext,
String action_name,
String group_name,
Set value)
INTERNAL: Utility for attaching an ID to an action.
|
static ActionRegistryIF |
getActionRegistry(javax.servlet.jsp.PageContext pageContext)
Gets the action registry object from application scope.
|
static ActionRegistryIF |
getActionRegistry(javax.servlet.ServletRequest request) |
static FormTag |
getCurrentFormTag(javax.servlet.ServletRequest request) |
static NamedLockManager |
getNamedLockManager(javax.servlet.ServletContext servletContext) |
static LockResult |
getReadOnlyLock(javax.servlet.http.HttpServletRequest request) |
static String |
getRequestId(javax.servlet.jsp.PageContext pageContext) |
static Map |
getSchemaRegistry(javax.servlet.ServletContext servletContext) |
static TMObjectIF |
getTMObject(javax.servlet.jsp.PageContext pageContext,
String obj_name)
Gets the topic map object from the given
obj_name by
requesting the context manager retrieved by the given
pageContext . |
static org.apache.velocity.VelocityContext |
getVelocityContext(javax.servlet.jsp.PageContext pageContext) |
protected static org.apache.velocity.app.VelocityEngine |
getVelocityEngine(javax.servlet.ServletContext scontext) |
static boolean |
isComponentReadOnly(javax.servlet.jsp.PageContext pageContext,
String compReadOnlyAttr) |
static boolean |
isComponentReadOnly(javax.servlet.ServletRequest request,
boolean componentIsReadOnly) |
static boolean |
isFormReadOnly(javax.servlet.ServletRequest request)
INTERNAL: Returns true if the form is read-only.
|
static ActionData |
makeActionData(javax.servlet.jsp.PageContext pageContext,
String action_name,
String group_name,
String params)
INTERNAL: Creates an ActionData wrapper for the given action and
parameters.
|
static void |
processWithVelocity(javax.servlet.jsp.PageContext pageContext,
String template_file,
Writer writer,
org.apache.velocity.VelocityContext vc) |
static String |
registerData(javax.servlet.jsp.PageContext pageContext,
String action_name,
String group_name,
List paramlist,
List sub_actions,
Set value)
INTERNAL: Creates the field name used by a particular action and
registers the data used by the action in the user session.
|
static String |
registerData(javax.servlet.jsp.PageContext pageContext,
String action_name,
String group_name,
List paramlist,
Set value)
INTERNAL: Creates the field name used by a particular action and
registers the data used by the action in the user session.
|
static String |
registerData(javax.servlet.jsp.PageContext pageContext,
String action_name,
String group_name,
String params,
List sub_actions,
Set value)
INTERNAL: Creates the field name used by a particular action and
registers the data used by the action in the user session.
|
static String |
registerData(javax.servlet.jsp.PageContext pageContext,
String action_name,
String group_name,
String params,
Set value)
INTERNAL: Creates the field name used by a particular action and
registers the data used by the action in the user session.
|
static String |
registerData(javax.servlet.jsp.PageContext pageContext,
String action_name,
String group_name,
String params,
Set value,
boolean run_if_no_changes)
INTERNAL: Creates the field name used by a particular action and
registers the data used by the action in the user session.
|
static List |
serializeParameters(List parameters) |
static void |
setActionGroup(javax.servlet.jsp.PageContext pageContext,
String actionGroup)
Sets the name of the action group (an attribute is set in the
page scope).
|
static void |
setCurrentFormTag(javax.servlet.ServletRequest request,
FormTag tag) |
protected static final String VELOCITY_TEMPLATE_PATH
public static String getActionGroup(javax.servlet.jsp.PageContext pageContext)
public static void setActionGroup(javax.servlet.jsp.PageContext pageContext, String actionGroup)
public static TMObjectIF getTMObject(javax.servlet.jsp.PageContext pageContext, String obj_name) throws javax.servlet.jsp.JspTagException
obj_name
by
requesting the context manager retrieved by the given
pageContext
.javax.servlet.jsp.JspTagException
public static Map getSchemaRegistry(javax.servlet.ServletContext servletContext)
public static NamedLockManager getNamedLockManager(javax.servlet.ServletContext servletContext)
public static ActionRegistryIF getActionRegistry(javax.servlet.ServletRequest request) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public static String getActionID(javax.servlet.jsp.PageContext pageContext, String action_name, String group_name, Set value) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public static List evaluateParameterList(javax.servlet.jsp.PageContext pageContext, String params) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public static String registerData(javax.servlet.jsp.PageContext pageContext, String action_name, String group_name, String params, Set value) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public static String registerData(javax.servlet.jsp.PageContext pageContext, String action_name, String group_name, String params, Set value, boolean run_if_no_changes) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public static String registerData(javax.servlet.jsp.PageContext pageContext, String action_name, String group_name, String params, List sub_actions, Set value) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public static String registerData(javax.servlet.jsp.PageContext pageContext, String action_name, String group_name, List paramlist, Set value) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public static String registerData(javax.servlet.jsp.PageContext pageContext, String action_name, String group_name, List paramlist, List sub_actions, Set value) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public static ActionData makeActionData(javax.servlet.jsp.PageContext pageContext, String action_name, String group_name, String params) throws javax.servlet.jsp.JspTagException
params
- A whitespace-separated list of navigator variable namesjavax.servlet.jsp.JspTagException
public static String createRequestId()
public static ActionDataSet getActionDataSet(javax.servlet.jsp.PageContext pageContext)
public static ActionDataSet createActionDataSet(javax.servlet.jsp.PageContext pageContext)
public static org.apache.velocity.VelocityContext getVelocityContext(javax.servlet.jsp.PageContext pageContext)
protected static org.apache.velocity.app.VelocityEngine getVelocityEngine(javax.servlet.ServletContext scontext)
public static void processWithVelocity(javax.servlet.jsp.PageContext pageContext, String template_file, Writer writer, org.apache.velocity.VelocityContext vc)
public static ActionRegistryIF getActionRegistry(javax.servlet.jsp.PageContext pageContext) throws javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspTagException
public static String getRequestId(javax.servlet.jsp.PageContext pageContext)
public static boolean isFormReadOnly(javax.servlet.ServletRequest request)
request
- The current request objectpublic static LockResult getReadOnlyLock(javax.servlet.http.HttpServletRequest request)
public static boolean isComponentReadOnly(javax.servlet.ServletRequest request, boolean componentIsReadOnly)
public static boolean isComponentReadOnly(javax.servlet.jsp.PageContext pageContext, String compReadOnlyAttr)
public static FormTag getCurrentFormTag(javax.servlet.ServletRequest request)
public static void setCurrentFormTag(javax.servlet.ServletRequest request, FormTag tag)
public static List deserializeParameters(List parameters, TopicMapIF topicmap)