Package net.ontopia.topicmaps.nav2.utils
Class ContextUtils
java.lang.Object
net.ontopia.topicmaps.nav2.utils.ContextUtils
PUBLIC: Utility methods for working with the variable bindings in
the Navigator context.
-
Method Summary
Modifier and TypeMethodDescriptionstatic TopicMapRepositoryIFgetRepository(javax.servlet.ServletContext servletContext) EXPERIMENTAL: Gets the topic map repository used by the navigator framework.static ObjectgetSingleValue(String name, javax.servlet.jsp.PageContext pageContext) PUBLIC: Returns the first value in the collection bound to a specific variable in the current scope.static ObjectgetSingleValue(String name, javax.servlet.ServletRequest request) PUBLIC: Returns the first value in the collection bound to a specific variable in the current scope.static TopicMapIFgetTopicMap(javax.servlet.jsp.PageContext pageContext) EXPERIMENTAL: Get the topic map object the context tag is working with.static TopicMapIFgetTopicMap(javax.servlet.ServletRequest request) EXPERIMENTAL: Get the topic map object the context tag is working with.static CollectionPUBLIC: Returns the value bound to a specific variable in the current scope.static CollectiongetValue(String name, javax.servlet.jsp.PageContext pageContext, Collection defaultValue) PUBLIC: Returns the value bound to a specific variable in the current scope.static voidsetSingleValue(String name, javax.servlet.jsp.PageContext pageContext, Object value) PUBLIC: Sets the value of the named variable to a collection consisting only of the single value given.static voidsetValue(String name, javax.servlet.jsp.PageContext pageContext, Collection value) PUBLIC: Sets the value of the named variable to the collection given.
-
Method Details
-
getRepository
EXPERIMENTAL: Gets the topic map repository used by the navigator framework.- Since:
- 3.4
-
getTopicMap
EXPERIMENTAL: Get the topic map object the context tag is working with. This method will give direct access to the same transaction as the context tag is using.- Since:
- 3.4
-
getTopicMap
EXPERIMENTAL: Get the topic map object the context tag is working with. This method will give direct access to the same transaction as the context tag is using.- Since:
- 3.2.1
-
getValue
PUBLIC: Returns the value bound to a specific variable in the current scope. The value returned will be null if the variable is unknown. -
getValue
public static Collection getValue(String name, javax.servlet.jsp.PageContext pageContext, Collection defaultValue) PUBLIC: Returns the value bound to a specific variable in the current scope. The value returned will be defaultValue if the variable is unknown. -
getSingleValue
PUBLIC: Returns the first value in the collection bound to a specific variable in the current scope. The value returned will be null if the variable is unknown or if the collection is empty. -
getSingleValue
PUBLIC: Returns the first value in the collection bound to a specific variable in the current scope. The value returned will be null if the variable is unknown or if the collection is empty.- Since:
- 2.2.1
-
setValue
public static void setValue(String name, javax.servlet.jsp.PageContext pageContext, Collection value) PUBLIC: Sets the value of the named variable to the collection given. The value can be null, which effectively unsets the variable. -
setSingleValue
public static void setSingleValue(String name, javax.servlet.jsp.PageContext pageContext, Object value) PUBLIC: Sets the value of the named variable to a collection consisting only of the single value given.
-