Class ModelLinkGenerator

  • All Implemented Interfaces:
    LinkGeneratorIF

    public class ModelLinkGenerator
    extends Object
    implements LinkGeneratorIF
    INTERNAL: class which implements interface LinkGeneratorIF. Generate a URI link to a model page (MVS environment).

    This implementation should be used by a link tag in a customized JSP when working with the MVS approach.

    Example usage within the link tag:

    template="/models/topic_%model%.jsp?tm=%topicmap%&id=%id%"
    See Also:
    LinkTag
    • Field Detail

      • LINK_MODEL_KEY

        public static final String LINK_MODEL_KEY
        INTERNAL: Constant String value representing the name of a template variable being replaced with the object id.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ModelLinkGenerator

        public ModelLinkGenerator()
    • Method Detail

      • generate

        public String generate​(ContextTag contextTag,
                               TMObjectIF tmObj,
                               String topicmapId,
                               String template)
                        throws NavigatorRuntimeException
        Description copied from interface: LinkGeneratorIF
        INTERNAL: create a String which contains link information for a Topic Map Object.

        Note: This String gets converted to an URL encoded format by the link tag automatically afterwards.

        Specified by:
        generate in interface LinkGeneratorIF
        Parameters:
        contextTag - A ContextTag object providing access to all important information to the application.
        tmObj - An Object implementing TMObjectIF to which the link should direct.
        topicmapId - The id that the topic map has in the registry.
        template - A template string which may contain template variable(s) which are replaced.
        Throws:
        NavigatorRuntimeException
      • generate

        public String generate​(ContextTag contextTag,
                               TopicMapReferenceIF tmRefObj,
                               String template)
                        throws NavigatorRuntimeException
        Description copied from interface: LinkGeneratorIF
        INTERNAL: create a String which contains link information to a Topicmap retrieved with the help of an TopicMapReferenceIF object.

        Note: This String gets converted to an URL encoded format by the link tag automatically afterwards.

        Specified by:
        generate in interface LinkGeneratorIF
        Parameters:
        contextTag - A ContextTag object providing access to all important information to the application.
        tmRefObj - An Object implementing TopicMapReferenceIF to which beloning Topic Map the link should direct.
        template - A template string which may contain template variable(s) which are replaced.
        Throws:
        NavigatorRuntimeException