Class AbstractJSPGenerator

    • Field Detail

      • FOOTER_SELECTION_QUERIES

        public static final java.lang.String FOOTER_SELECTION_QUERIES
        Captions for the Queries link in the footer.
        See Also:
        Constant Field Values
      • FOOTER_SELECTION_CMS

        public static final java.lang.String FOOTER_SELECTION_CMS
        Caption for the CMS link in the footer.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractJSPGenerator

        public AbstractJSPGenerator()
    • Method Detail

      • appendCommentLine

        protected void appendCommentLine​(java.lang.String commentLine)

        appendCommentLine.

        Overrides:
        appendCommentLine in class AbstractGenerator
        Parameters:
        commentLine - a String object.
      • getBaseJSPHeader

        protected java.lang.String getBaseJSPHeader()
        Generates the header for all jsp files.
        Returns:
        a String object.
      • getBaseXMLHeader

        protected java.lang.String getBaseXMLHeader()
        Generates the header for jsp files that generate xml exports.
        Returns:
        a String object.
      • getBaseCSVHeader

        protected java.lang.String getBaseCSVHeader()
        Generates the header for jsp files that generate csv exports.
        Returns:
        a String object.
      • generateFooter

        protected GeneratedJSPFile generateFooter​(MetaView view,
                                                  java.lang.String selection,
                                                  java.lang.String name)
        Generates a footer file which is included by other jsps.
        Parameters:
        view - the vie to generate the footer for.
        selection - ?
        name - the name of the file.
        Returns:
        a GeneratedJSPFile object.
      • getDuplicateImage

        protected java.lang.String getDuplicateImage()
        Returns image tag for the duplicate entry image.
        Returns:
        a String object.
      • getBaseJSPFooter

        protected java.lang.String getBaseJSPFooter()
        Returns the basic footer used in all jsps.
        Returns:
        content of the base jsp footer.
      • getShowPageName

        public static java.lang.String getShowPageName​(MetaDocument doc)
        Returns the name of the jsp file for the show page for the document.
        Parameters:
        doc - a MetaDocument object.
        Returns:
        a String object.
      • getSearchResultPageName

        public static java.lang.String getSearchResultPageName()

        getSearchResultPageName.

        Returns:
        a String object.
      • getVersionInfoPageName

        public static java.lang.String getVersionInfoPageName()
        Returns the page name for the version info page.
        Returns:
        a String object.
      • getVersionInfoPageName

        public static java.lang.String getVersionInfoPageName​(MetaDocument doc)
        Returns the page name for the version info page for the given document.
        Parameters:
        doc - a MetaDocument object.
        Returns:
        a String object.
      • getShowQueriesPageName

        public static java.lang.String getShowQueriesPageName​(MetaDocument doc)

        getShowQueriesPageName.

        Parameters:
        doc - a MetaDocument object.
        Returns:
        a String object.
      • getExportAsCSVPageName

        public static java.lang.String getExportAsCSVPageName​(MetaDocument doc)
        Returns the name of the jsp file for the csv page export for the document.
        Parameters:
        doc - a MetaDocument object.
        Returns:
        a String object.
      • getExportAsXMLPageName

        public static java.lang.String getExportAsXMLPageName​(MetaDocument doc)
        Returns the name of the jsp file for the xml page export for the document.
        Parameters:
        doc - a MetaDocument object.
        Returns:
        a String object.
      • getEditPageName

        public static java.lang.String getEditPageName​(MetaDocument doc)
        Returns the name of the edit page for this document.
        Parameters:
        doc - a MetaDocument object.
        Returns:
        a String object.
      • getLinksToMePageName

        public static java.lang.String getLinksToMePageName​(MetaDocument doc)

        getLinksToMePageName.

        Parameters:
        doc - a MetaDocument object.
        Returns:
        a String object.
      • generateTimestampedLinkPath

        protected static java.lang.String generateTimestampedLinkPath​(java.lang.String path)

        generateTimestampedLinkPath.

        Parameters:
        path - a String object.
        Returns:
        a String object.
      • getCurrentImagePath

        protected java.lang.String getCurrentImagePath​(java.lang.String imageName)

        getCurrentImagePath.

        Parameters:
        imageName - a String object.
        Returns:
        a String object.
      • getImagePath

        public static java.lang.String getImagePath​(java.lang.String imageName,
                                                    Context context)

        getImagePath.

        Parameters:
        imageName - a String object.
        context - a Context object.
        Returns:
        a String object.
      • getCurrentCSSPath

        protected java.lang.String getCurrentCSSPath​(java.lang.String stylesheetName)

        getCurrentCSSPath.

        Parameters:
        stylesheetName - a String object.
        Returns:
        a String object.
      • getCurrentJSPath

        protected java.lang.String getCurrentJSPath​(java.lang.String jsName)

        getCurrentJSPath.

        Parameters:
        jsName - a String object.
        Returns:
        a String object.
      • getCurrentYUIPath

        protected java.lang.String getCurrentYUIPath​(java.lang.String yuiName)

        getCurrentYUIPath.

        Parameters:
        yuiName - a String object.
        Returns:
        a String object.
      • getCurrentJavaScriptPath

        protected java.lang.String getCurrentJavaScriptPath​(java.lang.String javaScript)

        getCurrentJavaScriptPath.

        Parameters:
        javaScript - a String object.
        Returns:
        a String object.
      • getCSSPath

        public static java.lang.String getCSSPath​(java.lang.String stylesheetName,
                                                  Context context)

        getCSSPath.

        Parameters:
        stylesheetName - a String object.
        context - a Context object.
        Returns:
        a String object.
      • getJSPath

        public static java.lang.String getJSPath​(java.lang.String jsName,
                                                 Context context)

        getJSPath.

        Parameters:
        jsName - a String object.
        context - a Context object.
        Returns:
        a String object.
      • getJavaScriptPath

        public static java.lang.String getJavaScriptPath​(java.lang.String javaScript,
                                                         Context context)

        getJavaScriptPath.

        Parameters:
        javaScript - a String object.
        context - a Context object.
        Returns:
        a String object.
      • getYUIPath

        public static java.lang.String getYUIPath​(java.lang.String yuiName,
                                                  Context context)

        getYUIPath.

        Parameters:
        yuiName - a String object.
        context - a Context object.
        Returns:
        a String object.
      • getPackage

        public static java.lang.String getPackage​(MetaModule mod)

        getPackage.

        Parameters:
        mod - a MetaModule object.
        Returns:
        a String object.
      • getPackage

        public static java.lang.String getPackage​(MetaDocument doc)

        getPackage.

        Parameters:
        doc - a MetaDocument object.
        Returns:
        a String object.
      • getDeleteImage

        protected java.lang.String getDeleteImage()
        Returns the tag for the delete image in the overview.
        Returns:
        a String object.
      • getPreviewImage

        protected java.lang.String getPreviewImage()
        Returns the tag for the preview image in the overview.
        Returns:
        a String object.
      • getVersionImage

        protected java.lang.String getVersionImage()
        Returns the tag for the version info image in the overview. Note: for now it returns a 'V' text.
        Returns:
        a String object.
      • getEditImage

        protected java.lang.String getEditImage()
        Returns the tag for the edit image in the overview.
        Returns:
        a String object.
      • getVersionImage

        protected java.lang.String getVersionImage​(java.lang.String alt)
        Returns the tag for the Version in the overview with the given alt tag.
        Parameters:
        alt - a String object.
        Returns:
        a String object.
      • getDeleteImage

        protected java.lang.String getDeleteImage​(java.lang.String alt)
        Returns the tag for the delete image in the overview with the given alt tag.
        Parameters:
        alt - a String object.
        Returns:
        a String object.
      • getPreviewImage

        protected java.lang.String getPreviewImage​(java.lang.String alt)
        Returns the tag for the preview image in the overview with the given alt tag.
        Parameters:
        alt - a String object.
        Returns:
        a String object.
      • getLockImage

        protected java.lang.String getLockImage()
        Returns the tag for the lock image in the overview.
        Returns:
        created image tag
      • getUnLockImage

        protected java.lang.String getUnLockImage()
        Returns the tag for the lock image in the overview.
        Returns:
        created image tag
      • getLockImage

        protected java.lang.String getLockImage​(java.lang.String alt)
        Returns the tag for the lock image in the overview with the given alt tag.
        Parameters:
        alt - actually alt - for the image tag
        Returns:
        created image tag
      • getUnLockImage

        protected java.lang.String getUnLockImage​(java.lang.String alt)
        Returns the tag for the unLock image in the overview with the given alt tag.
        Parameters:
        alt - actually alt for image tag
        Returns:
        created image tag
      • getTopImage

        protected java.lang.String getTopImage​(java.lang.String alt)
        Returns the tag for the move to the top image in the list view with the given alt tag.
        Parameters:
        alt - a String object.
        Returns:
        a String object.
      • getBottomImage

        protected java.lang.String getBottomImage​(java.lang.String alt)
        Returns the tag for the move to the bottom image in the list view with the given alt tag.
        Parameters:
        alt - a String object.
        Returns:
        a String object.
      • getUpImage

        protected java.lang.String getUpImage​(java.lang.String alt)
        Returns the tag for the move up image in the list view with the given alt tag.
        Parameters:
        alt - a String object.
        Returns:
        a String object.
      • getDownImage

        protected java.lang.String getDownImage​(java.lang.String alt)
        Returns the tag for the move down image in the list view with the given alt tag.
        Parameters:
        alt - a String object.
        Returns:
        a String object.
      • getDuplicateImage

        protected java.lang.String getDuplicateImage​(java.lang.String alt)
        Returns the tag for the duplicate image in the overview with the given alt tag.
        Parameters:
        alt - a String object.
        Returns:
        a String object.
      • getEditImage

        protected java.lang.String getEditImage​(java.lang.String alt)

        getEditImage.

        Parameters:
        alt - a String object.
        Returns:
        a String object.
      • getImage

        protected java.lang.String getImage​(java.lang.String name,
                                            java.lang.String alt)
        Returns the img tag to embed an image into the jsp.
        Parameters:
        name - name of the gif file containing the image.
        alt - alternative description (alt tag).
        Returns:
        a String object.
      • getContext

        public Context getContext()

        getContext.

        Returns:
        a Context object.
      • generatePragmas

        protected void generatePragmas​(MetaView view)
        Generates pragmas for a given view.
        Parameters:
        view - the view to generate pragmas for.
      • generatePragmas

        protected void generatePragmas()
        Generates generic pragmas. Adds the generated content to the current job.
      • openTag

        protected void openTag​(java.lang.String tag,
                               java.lang.String params)

        openTag.

        Parameters:
        tag - a String object.
        params - a String object.
      • closeTag

        protected void closeTag​(java.lang.String tag,
                                java.lang.String params)

        closeTag.

        Parameters:
        tag - a String object.
        params - a String object.
      • openTR

        protected void openTR​(java.lang.String additionalParams)

        openTR.

        Parameters:
        additionalParams - a String object.
      • closeTR

        protected void closeTR​(java.lang.String additionalParams)

        closeTR.

        Parameters:
        additionalParams - a String object.
      • openTR

        protected void openTR()

        openTR.

      • closeTR

        protected void closeTR()

        closeTR.

      • openTD

        protected void openTD()
        Opens a table cell.
      • closeTD

        protected void closeTD()

        closeTD.

      • openTD

        protected void openTD​(java.lang.String additionalParams)
        Opens a table cell.
        Parameters:
        additionalParams - additional parameters.
      • closeTD

        protected void closeTD​(java.lang.String additionalParams)

        closeTD.

        Parameters:
        additionalParams - a String object.
      • tag

        protected void tag​(java.lang.String tag,
                           java.lang.String id,
                           java.lang.String clazz,
                           AbstractJSPGenerator.TagAttribute... attrs)
        Appends to generation output tag without body.
        Parameters:
        tag - tag name
        id - html id attribute
        clazz - html class attribute
        attrs - array of tag attributes
      • tag

        protected void tag​(java.lang.String tag,
                           java.lang.String clazz,
                           AbstractJSPGenerator.TagAttribute... attrs)
        Appends to generation output tag without body.
        Parameters:
        tag - tag name
        clazz - html class attribute
        attrs - array of tag attributes
      • tag

        protected void tag​(java.lang.String tag,
                           AbstractJSPGenerator.TagAttribute... attrs)
        Appends to generation output tag without body.
        Parameters:
        tag - tag name
        attrs - array of tag attributes
      • tagOpen

        protected void tagOpen​(java.lang.String tag,
                               java.lang.String id,
                               java.lang.String clazz,
                               AbstractJSPGenerator.TagAttribute... attrs)
        Appends to generation output opening for tag.
        Parameters:
        tag - tag name
        id - html id attribute
        clazz - html class attribute
        attrs - array of tag attributes
      • tagOpen

        protected void tagOpen​(java.lang.String tag,
                               java.lang.String clazz,
                               AbstractJSPGenerator.TagAttribute... attrs)
        Appends to generation output opening for tag.
        Parameters:
        tag - tag name
        clazz - html class attribute
        attrs - array of tag attributes
      • tagOpen

        protected void tagOpen​(java.lang.String tag,
                               AbstractJSPGenerator.TagAttribute... attrs)
        Appends to generation output opening for tag.
        Parameters:
        tag - tag name
        attrs - array of tag attributes
      • tagClose

        protected void tagClose​(java.lang.String tag)
        Appends to generation output closing for tag.
        Parameters:
        tag - tag name
      • openJavaScript

        protected void openJavaScript()
        Appends to generation output script tag with type javascript.
      • closeJavaScript

        protected void closeJavaScript()
        Appends to generation output script tag closing.
      • getTopMenuPage

        protected java.lang.String getTopMenuPage()

        getTopMenuPage.

        Returns:
        a String object.
      • getMenuName

        protected java.lang.String getMenuName​(MetaView view)

        getMenuName.

        Parameters:
        view - a MetaView object.
        Returns:
        a String object.
      • getFooterName

        protected java.lang.String getFooterName​(MetaView view)

        getFooterName.

        Parameters:
        view - a MetaView object.
        Returns:
        a String object.