biz.hammurapi.web.menu
Class HelpActions

java.lang.Object
  extended bybiz.hammurapi.web.ActionsBase
      extended bybiz.hammurapi.web.menu.HelpActions

public class HelpActions
extends ActionsBase

This class provides actions to render help topics

Author:
Pavel

Nested Class Summary
 
Nested classes inherited from class biz.hammurapi.web.ActionsBase
ActionsBase.ErrorMessage
 
Field Summary
 
Fields inherited from class biz.hammurapi.web.ActionsBase
compositeDomSerializer, converter, REFERRER_HEADER
 
Constructor Summary
HelpActions()
           
 
Method Summary
 java.lang.Object menuHelp(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionServlet servlet)
          To generate help frame.
 java.lang.Object menuTree(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionServlet servlet)
           
 java.lang.Object page(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionServlet servlet)
          This method returns help content for a menu item in XML format.
 java.lang.Object pdf(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionServlet servlet)
           
 java.lang.Object search(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionServlet servlet)
           
 java.lang.Object singlePage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionServlet servlet)
           
 java.lang.String topicContent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ActionServlet servlet)
          This method returns topic content to be rendered in Ajax tooltip.
 
Methods inherited from class biz.hammurapi.web.ActionsBase
getGlobal, getMatched, getMenu, getReferrer, getRemoted, getUid, hasPermission, includeThisInPath, invoke, isBlank, java, request2xml, setReferrer, sql
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelpActions

public HelpActions()
Method Detail

topicContent

public java.lang.String topicContent(javax.servlet.http.HttpServletRequest request,
                                     javax.servlet.http.HttpServletResponse response,
                                     ActionServlet servlet)
                              throws java.sql.SQLException
This method returns topic content to be rendered in Ajax tooltip. Content is truncated to "db/max-tooltip-length" global parameter, which defaults to 2000. Truncation rules: 1. if {{tooltip-end}} is present in the first max-tooltip-length character then toolip is truncated at that point. 2. Otherwise it is truncated at the end of the last paragraph which fits into max-tooltip-length. 3. If there is no such character then content is truncted at the last word which fits into max-tooltip-length. If content is truncated then ellipsis (...) appears at the end of the content fragment or value of "tail" parameter.

Parameters:
request -
response -
servlet -
Returns:
Throws:
java.sql.SQLException

page

public java.lang.Object page(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             ActionServlet servlet)
                      throws java.sql.SQLException
This method returns help content for a menu item in XML format. Help content is constructed from help topics, which don't have slash character in their name. Construction rules: 1. Menu Description goes to DESCRIPTION xml element 2. Menu name goes to NAME 3. Menu title goes to TITLE 4. Help topic with name "main" becomes the top section. other topics become sub-sections in the main topic unless they have slash in their names. Topics with # in their names become subtopics in the topics with the same prefix before #. Topics with / in the name are not included to the menu item article but become additional articles mounted under the main article in the help tree. Topics with names without slashes equal to name elements in "slashed" names are considered parents of those "slashed" topics. Names with # characters preceding / character are considered illegal.

Parameters:
request -
response -
servlet -
Returns:
Throws:
java.sql.SQLException

menuTree

public java.lang.Object menuTree(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 ActionServlet servlet)
Parameters:
request -
response -
servlet -
Returns:
XML representation of menu item subtree excluding trees of sub-items.

search

public java.lang.Object search(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response,
                               ActionServlet servlet)
Parameters:
request -
response -
servlet -
Returns:
XML representation of menu item subtree excluding trees of sub-items.

singlePage

public java.lang.Object singlePage(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response,
                                   ActionServlet servlet)
                            throws java.io.IOException,
                                   java.sql.SQLException
Parameters:
request -
response -
servlet -
Returns:
XML representation of menu item subtree excluding trees of sub-items.
Throws:
java.sql.SQLException
java.io.IOException

pdf

public java.lang.Object pdf(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response,
                            ActionServlet servlet)
Parameters:
request -
response -
servlet -
Returns:
Help content converted to PDF document.

menuHelp

public java.lang.Object menuHelp(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 ActionServlet servlet)
To generate help frame.

Parameters:
request -
response -
servlet -
Returns:


Copyright © 2006 Hammurapi Group. All Rights Reserved.