Class ContextTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
net.ontopia.topicmaps.nav2.taglibs.logic.ContextTag
- All Implemented Interfaces:
jakarta.servlet.jsp.tagext.IterationTag,jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.Tag,jakarta.servlet.jsp.tagext.TryCatchFinally,Serializable,NavigatorPageIF
public class ContextTag
extends jakarta.servlet.jsp.tagext.TagSupport
implements jakarta.servlet.jsp.tagext.TryCatchFinally, NavigatorPageIF
INTERNAL: Logic Tag for establishing the outermost lexical scope in
which all computation happens and the embedded tags are executed.
Use this tag as root tag for all tags defined in the Tag Libraries of the Ontopia Navigator Framework (2nd Generation).
- See Also:
-
Field Summary
FieldsFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid_setTopicMap(TopicMapIF topicmap) Special setter used only for unit testing purposes.voidintdoEndTag()Process the end tag for this instance.voidintProcess the start tag for this instance.INTERNAL: Get the Context Manager.INTERNAL: Gets the tolog declaration context.getFunction(String name) INTERNAL: Get a function out of the register.INTERNAL: Get the navigator application which allows accessing all kind of configuration.INTERNAL: Get the navigator configuration for getting access to the application.xml settings.String[]Get Topic map object identifiers.Gets the topic map objects retrieved by the context tag.jakarta.servlet.jsp.PageContextINTERNAL: Gets the JSP page context which allows to have access to further request relevant information.INTERNAL: Get the tolog query processor the context tag is working with.getQueryResult(String name) INTERNAL: Get the topicmap object the context tag is working with.voidregisterFunction(String name, FunctionIF function) INTERNAL: Add a named function to the registry.voidregisterFunction(FunctionIF function) INTERNAL: Add a function to the registry.voidregisterQueryResult(String name, QueryResultIF queryResult) voidsetContextManager(ContextManagerIF ctxtmgr) Special setter used only for unit testing purposes.voidsetDeclarationContext(DeclarationContextIF declarationContext) voidsetObjparam(String objParam) If set, it tells the tag what request parameter contains the object ID of the object to set as the value of the default variable.voidsetReadonly(boolean readonly) A boolean flag to tell the tag to fetch a read-only or a read-write topic map.voidThe variable name which the object will be set as the value of.voidThe variable name which the topic map will be set as the value of.voidsetTmparam(String tmParam) Tells the tag which request parameter contains the ID of the topic map in the context.voidsetTopicmap(String topicmap) If set, the ID taken from this attribute is the ID of the topic map.Methods inherited from class jakarta.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
-
Field Details
-
TOPICMAPID_REQUEST_ATTRIBUTE
-
-
Constructor Details
-
ContextTag
public ContextTag()
-
-
Method Details
-
doStartTag
public int doStartTag() throws jakarta.servlet.jsp.JspTagExceptionProcess the start tag for this instance.- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspTagException
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspTagExceptionProcess the end tag for this instance.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.TagSupport- Throws:
jakarta.servlet.jsp.JspTagException
-
setTmparam
Tells the tag which request parameter contains the ID of the topic map in the context.- Parameters:
tmParam- String which specifies a Request parameter name.
-
getTmparam
-
setObjparam
If set, it tells the tag what request parameter contains the object ID of the object to set as the value of the default variable. If not set, the default variable is set to the topic map.- Parameters:
objParam- String which specifies a Request parameter name.
-
getObjparam
-
setSet
The variable name which the object will be set as the value of.- Parameters:
varObjName- String which specifies a variable name for the object.
-
setSettm
The variable name which the topic map will be set as the value of.- Parameters:
varTMName- String which specifies a variable name for the topicmap.
-
setTopicmap
If set, the ID taken from this attribute is the ID of the topic map.- Parameters:
topicmap- String which specifies a Topic map ID.
-
setReadonly
public void setReadonly(boolean readonly) A boolean flag to tell the tag to fetch a read-only or a read-write topic map.- Parameters:
readonly- boolean value; true if read-only. The default is true.
-
getObjectIDs
Get Topic map object identifiers. -
getObjects
Gets the topic map objects retrieved by the context tag.- Returns:
- collection of TopicIF objects.
-
getContextManager
Description copied from interface:NavigatorPageIFINTERNAL: Get the Context Manager.- Specified by:
getContextManagerin interfaceNavigatorPageIF- Returns:
- object which implements the ContextManagerIF interface
-
getFunction
Description copied from interface:NavigatorPageIFINTERNAL: Get a function out of the register.- Specified by:
getFunctionin interfaceNavigatorPageIF- Parameters:
name- The string which identifies the name of the function.- Returns:
- The function
-
registerQueryResult
-
getQueryResult
-
getTopicMapRepository
-
getTopicMap
Description copied from interface:NavigatorPageIFINTERNAL: Get the topicmap object the context tag is working with.- Specified by:
getTopicMapin interfaceNavigatorPageIF- Returns:
- Object implementing TopicMapIF
-
getTopicMapId
-
getQueryProcessor
Description copied from interface:NavigatorPageIFINTERNAL: Get the tolog query processor the context tag is working with.- Specified by:
getQueryProcessorin interfaceNavigatorPageIF- Returns:
- Object implementing QueryProcessorIF
-
getPageContext
public jakarta.servlet.jsp.PageContext getPageContext()Description copied from interface:NavigatorPageIFINTERNAL: Gets the JSP page context which allows to have access to further request relevant information.- Specified by:
getPageContextin interfaceNavigatorPageIF
-
getDeclarationContext
Description copied from interface:NavigatorPageIFINTERNAL: Gets the tolog declaration context.- Specified by:
getDeclarationContextin interfaceNavigatorPageIF
-
setDeclarationContext
-
doCatch
- Specified by:
doCatchin interfacejakarta.servlet.jsp.tagext.TryCatchFinally- Throws:
Throwable
-
doFinally
public void doFinally()- Specified by:
doFinallyin interfacejakarta.servlet.jsp.tagext.TryCatchFinally
-
_setTopicMap
Special setter used only for unit testing purposes. The JSP containers will never call this constructor, nor should anyone else.
-