Loggerhead API


This document comprises the documentation for the Loggerhead API version . The API comprises a set of PL/SQL packages for which the specifications are shown below.

Packages


TTPL_DEBUG

CREATE OR REPLACE PACKAGE ttpl_debug AS
/*******************************************************************************
 *
 * Copyright (c) 1999, Tortuga Technologies Pty Ltd. All rights reserved.
 *
 * This is unpublished proprietary source code of Tortuga Technologies.
 * The copyright notice above does not evidence any actual or intended
 * publication of such source code.
 *
 *******************************************************************************
 *
 * Filename:    $Id: api.html,v 1.2 2003/01/31 02:04:35 jill Exp $
 *
 * Description: Package specification.  
 *              Provides the ability to debug PL/SQL procedures using the 
 *              Oracle package utl_file to output to an file on the Oracle 
 *              server.
 *
 * Author:      Jill Stephenson
 *
 * Created:     03/03/1999
 *
 * Change History:
 * ---------------
 * $Log: api.html,v $
 * Revision 1.2  2003/01/31 02:04:35  jill
 * Added favicon link
 *
 * Revision 1.1  2002/04/22 10:12:53  jill
 * Initial import
 *
 * Revision 1.1.1.1  2000/02/18 06:41:28  graham
 * initial import
 *
 *
 *******************************************************************************
 */
  
  ------------------------------------------------------------------------------
  -- Documentation
  ------------------------------------------------------------------------------
  --
  -- External Functions/Procedures
  -- -----------------------------
  -- Version
  --   Return the version of the package spec and body, which must be manually
  --   updated whenever a package spec or body is modified.
  -- IsEnabled
  --   Determine whether debug is enabled or not.
  -- GetDirName
  --   Return the name of the directory to where debug is being written.
  -- GetFileName
  --   Return the name of the file to where debug is being written.
  -- GetMode
  --   Return the mode of the file to which debug is being written.
  -- Enable
  --   Enable debugging to the specified directory and file, using the
  --   specified file mode.
  --   Exceptions handled: utl_file.INVALID_PATH, utl_file.INVALID_OPERATION
  -- PutLine
  --   If debug is currently enabled, output the specified line to the open
  --   debug file.
  --   Exceptions handled: utl_file.INVALID_FILEHANDLE, utl_file.WRITE_ERROR
  -- Disable
  --   Disable debugging.
  --   Exceptions handled: utl_file.WRITE_ERROR
  --
  ------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  -- Public Types/Constants/Variables
  ------------------------------------------------------------------------------
  -- general constants
  c_VERSION_SPEC CONSTANT ttpl_util.t_Short := '1.0.0';

  -- Modes that debug file can be opened in
  c_MODE_APPEND  CONSTANT VARCHAR2(1)       := 'A';
  c_MODE_WRITE   CONSTANT VARCHAR2(1)       := 'W';
  c_MODE_READ    CONSTANT VARCHAR2(1)       := 'R';
  ------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  -- Public Functions/Procedures
  ------------------------------------------------------------------------------
  FUNCTION Version
  RETURN VARCHAR2;
  PRAGMA RESTRICT_REFERENCES (Version, WNDS, WNPS);

  FUNCTION IsEnabled
  RETURN BOOLEAN;

  FUNCTION GetDirName
  RETURN VARCHAR2;

  FUNCTION GetFileName
  RETURN VARCHAR2;

  FUNCTION GetMode
  RETURN VARCHAR2;

  PROCEDURE Enable (
    pi_Dirname  IN VARCHAR2,
    pi_Filename IN VARCHAR2,
    pi_Mode     IN VARCHAR2 DEFAULT c_MODE_APPEND
  );

  PROCEDURE PutLine (
    pi_Buffer IN VARCHAR2
  );

  PROCEDURE Disable;
  ------------------------------------------------------------------------------

END ttpl_debug;
  

Back to Top


TTPL_HTML

CREATE OR REPLACE PACKAGE ttpl_html AS
/*******************************************************************************
 *
 * Copyright (c) 1999, Tortuga Technologies Pty Ltd. All rights reserved.
 *
 * This is unpublished proprietary source code of Tortuga Technologies.
 * The copyright notice above does not evidence any actual or intended
 * publication of such source code.
 *
 *******************************************************************************
 *
 * Filename:    $Id: api.html,v 1.2 2003/01/31 02:04:35 jill Exp $
 *
 * Description: Package specification.
 *              Provides a set of functions to provide a level of abstraction
 *              when building html pages.  A basic knowledge of html is however
 *              required in order to build syntactically correct html pages.
 *
 * Author:      Jill Stephenson
 *
 * Created:     15/07/1999
 *
 * Change History:
 * ---------------
 * $Log: api.html,v $
 * Revision 1.2  2003/01/31 02:04:35  jill
 * Added favicon link
 *
 * Revision 1.1  2002/04/22 10:12:53  jill
 * Initial import
 *
 * Revision 1.1.1.1  2000/02/18 06:41:28  graham
 * initial import
 *
 *
 *******************************************************************************
 */
  
  ------------------------------------------------------------------------------
  -- Documentation
  ------------------------------------------------------------------------------
  --
  -- Public Functions/Procedures
  -- ---------------------------
  -- Version
  --   Return the version of the package spec and body, which must be manually
  --   updated whenever a package spec or body is modified.
  --
  -- Due to the volume of functions provided and the basic knowledge of html
  -- that has been assumed, full documentation is not provided on each function.
  -- The naming convention used is intended to convey purpose of the function
  -- and assumptions can be made such as using a function xxxStart would require
  -- the corresponding function xxxEnd to also be used.
  --
  -- anatomy tags
  -- ------------
  -- HtmlStart
  -- HtmlEnd
  -- HeadStart
  -- HeadEnd
  -- Title
  -- BaseTarget
  -- BodyStart
  -- BodyEnd

  -- basic text tags
  -- ---------------
  -- ParagraphStart
  -- ParagraphEnd
  -- Heading
  -- ContentStyleStart
  -- ContentStyleEnd
  -- FontStart
  -- FontEnd
  -- LineBreak
  -- CenterStart
  -- CenterEnd
  --
  -- rules, images and multimedia tags
  -------------------------------------
  -- HorizontalRule
  -- Image
  --
  -- links and webs tags
  ----------------------
  -- AnchorStart
  -- AnchorEnd
  --
  -- formatted lists tags
  -----------------------
  -- UnorderedListStart
  -- UnorderedListEnd
  -- ListItem
  --
  -- form tags
  ------------
  -- FormStart
  -- FormEnd
  -- FormInput
  -- FormSelectStart
  -- FormSelectEnd
  -- FormOption
  --
  -- table tags
  -------------
  -- TableStart
  -- TableEnd
  -- TableRowStart
  -- TableRowEnd
  -- TableDataStart
  -- TableDataEnd
  --
  -- frame tags
  -------------
  -- FramesetStart
  -- FramesetEnd
  -- Frame
  -- NoFrames
  --
  -- style tags
  -------------
  -- ExternalStyle
  -- InternalStyleStart
  -- InternalStyleEnd
  -- StyleTagStart
  -- StyleTagEnd
  -- StyleProperty
  --
  ------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  -- Public Types/Constants/Variables
  ------------------------------------------------------------------------------
  -- types
  SUBTYPE t_Html IS ttpl_util.t_Long;

  -- general constants
  c_VERSION_SPEC         CONSTANT ttpl_util.t_Short := '1.0.0';

  -- values for scroll bars on frames
  c_SCROLLING_YES        CONSTANT ttpl_util.t_Short := 'YES';
  c_SCROLLING_NO         CONSTANT ttpl_util.t_Short := 'NO';
  c_SCROLLING_AUTO       CONSTANT ttpl_util.t_Short := 'AUTO';
  
  -- alignment options
  c_ALIGN_LEFT           CONSTANT ttpl_util.t_Short := 'LEFT';
  c_ALIGN_CENTER         CONSTANT ttpl_util.t_Short := 'CENTER';
  c_ALIGN_RIGHT          CONSTANT ttpl_util.t_Short := 'RIGHT';

  -- form methods
  c_METHOD_GET           CONSTANT ttpl_util.t_Short := 'GET';
  c_METHOD_HEAD          CONSTANT ttpl_util.t_Short := 'HEAD';
  c_METHOD_POST          CONSTANT ttpl_util.t_Short := 'POST';

  -- form input type options
  c_TYPE_TEXT            CONSTANT ttpl_util.t_Short := 'TEXT';
  c_TYPE_PASSWORD        CONSTANT ttpl_util.t_Short := 'PASSWORD';
  c_TYPE_FILE            CONSTANT ttpl_util.t_Short := 'FILE';
  c_TYPE_CHECKBOX        CONSTANT ttpl_util.t_Short := 'CHECKBOX';
  c_TYPE_RADIO           CONSTANT ttpl_util.t_Short := 'RADIO';
  c_TYPE_SUBMIT          CONSTANT ttpl_util.t_Short := 'SUBMIT';
  c_TYPE_RESET           CONSTANT ttpl_util.t_Short := 'RESET';
  c_TYPE_IMAGE           CONSTANT ttpl_util.t_Short := 'IMAGE';
  c_TYPE_HIDDEN          CONSTANT ttpl_util.t_Short := 'HIDDEN';

  -- heading levels
  c_LEVEL_1              CONSTANT NUMBER            := 1;
  c_LEVEL_2              CONSTANT NUMBER            := 2;
  c_LEVEL_3              CONSTANT NUMBER            := 3;
  c_LEVEL_4              CONSTANT NUMBER            := 4;
  c_LEVEL_5              CONSTANT NUMBER            := 5;
  c_LEVEL_6              CONSTANT NUMBER            := 6;

  -- text styles
  c_CONTENT_STYLE_CITE   CONSTANT ttpl_util.t_Short := 'CITE';
  c_CONTENT_STYLE_CODE   CONSTANT ttpl_util.t_Short := 'CODE';
  c_CONTENT_STYLE_DFN    CONSTANT ttpl_util.t_Short := 'DFN';
  c_CONTENT_STYLE_EM     CONSTANT ttpl_util.t_Short := 'EM';
  c_CONTENT_STYLE_KBD    CONSTANT ttpl_util.t_Short := 'KBD';
  c_CONTENT_STYLE_SAMP   CONSTANT ttpl_util.t_Short := 'SAMP';
  c_CONTENT_STYLE_STRONG CONSTANT ttpl_util.t_Short := 'STRONG';
  c_CONTENT_STYLE_VAR    CONSTANT ttpl_util.t_Short := 'VAR';

  -- common web page content types
  c_CONTENT_TYPE_HTML    CONSTANT ttpl_util.t_Short := 'text/html';
  c_CONTENT_TYPE_GIF     CONSTANT ttpl_util.t_Short := 'image/gif';
  ------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  -- Public Functions/Procedures
  ------------------------------------------------------------------------------
  FUNCTION Version 
  RETURN VARCHAR2;
  PRAGMA RESTRICT_REFERENCES (Version, WNDS, WNPS);
  ------------------------------------------------------------------------------

  ------------------------------------------------------------------------------
  -- anatomy tags
  ------------------------------------------------------------------------------
  FUNCTION HtmlStart 
  RETURN t_Html;

  FUNCTION HtmlEnd 
  RETURN t_Html;

  FUNCTION HeadStart 
  RETURN t_Html;

  FUNCTION HeadEnd 
  RETURN t_Html;

  FUNCTION Title (
    pi_Text IN VARCHAR2
  ) RETURN t_Html;

  FUNCTION BaseTarget (
    pi_Text IN VARCHAR2
  ) RETURN t_Html;

  FUNCTION BodyStart (
    pi_BackGroundColor IN VARCHAR2 DEFAULT NULL,
    pi_LinkColor       IN VARCHAR2 DEFAULT NULL,
    pi_ViewedLinkColor IN VARCHAR2 DEFAULT NULL,
    pi_ActiveLinkColor IN VARCHAR2 DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION BodyEnd 
  RETURN t_Html;
  ------------------------------------------------------------------------------

  ------------------------------------------------------------------------------
  -- basic text tags
  ------------------------------------------------------------------------------
  FUNCTION ParagraphStart (
   pi_Align  IN VARCHAR2 DEFAULT NULL,
   pi_Class  IN VARCHAR2 DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION ParagraphEnd
  RETURN t_Html;

  FUNCTION Heading (
    pi_Level IN NUMBER,
    pi_Text  IN VARCHAR2,
    pi_Align IN VARCHAR2 DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION ContentStyleStart (
    pi_Style IN VARCHAR2
  ) RETURN t_Html;

  FUNCTION ContentStyleEnd (
    pi_Style IN VARCHAR2
  ) RETURN t_Html;

  FUNCTION FontStart (
    pi_Color IN VARCHAR2 DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION FontEnd
  RETURN t_Html;

  FUNCTION LineBreak
  RETURN t_Html;

  FUNCTION CenterStart
  RETURN t_Html;

  FUNCTION CenterEnd
  RETURN t_Html;
  ------------------------------------------------------------------------------

  ------------------------------------------------------------------------------
  -- rules, images and multimedia tags
  ------------------------------------------------------------------------------
  FUNCTION HorizontalRule (
    pi_Align   IN VARCHAR2 DEFAULT NULL,
    pi_Size    IN NUMBER   DEFAULT NULL,
    pi_Width   IN VARCHAR2 DEFAULT NULL,
    pi_NoShade IN BOOLEAN  DEFAULT FALSE
  ) RETURN t_Html;

  FUNCTION Image (
    pi_Src    IN VARCHAR2,
    pi_Height IN NUMBER   DEFAULT NULL,
    pi_Width  IN NUMBER   DEFAULT NULL,
    pi_Alt    IN VARCHAR2 DEFAULT NULL,
    pi_Border IN NUMBER   DEFAULT NULL
  ) RETURN t_Html;
  ------------------------------------------------------------------------------

  ------------------------------------------------------------------------------
  -- links and webs tags
  ------------------------------------------------------------------------------
  FUNCTION AnchorStart (
    pi_Href   IN VARCHAR2 DEFAULT NULL,
    pi_Name   IN VARCHAR2 DEFAULT NULL,
    pi_Target IN VARCHAR2 DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION AnchorEnd 
  RETURN t_Html;
  ------------------------------------------------------------------------------

  ------------------------------------------------------------------------------
  -- formatted lists tags
  ------------------------------------------------------------------------------
  FUNCTION UnorderedListStart
  RETURN t_Html;

  FUNCTION UnorderedListEnd
  RETURN t_Html;

  FUNCTION ListItem (
    pi_Text IN VARCHAR2
  ) RETURN t_Html;
  ------------------------------------------------------------------------------

  ------------------------------------------------------------------------------
  -- form tags
  ------------------------------------------------------------------------------
  FUNCTION FormStart (
    pi_Method IN VARCHAR2,
    pi_Action IN VARCHAR2,
    pi_Target IN VARCHAR2 DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION FormEnd
  RETURN t_Html;

  FUNCTION FormInput (
    pi_Type             IN VARCHAR2,
    pi_Name             IN VARCHAR2 DEFAULT NULL,
    pi_Value            IN VARCHAR2 DEFAULT NULL,
    pi_ValueDescription IN VARCHAR2 DEFAULT NULL,
    pi_ValueChecked     IN BOOLEAN  DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION FormSelectStart (
    pi_Name IN VARCHAR2,
    pi_Size IN NUMBER   DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION FormSelectEnd
  RETURN t_Html;

  FUNCTION FormOption (
    pi_Text IN VARCHAR2
  ) RETURN t_Html;
  ------------------------------------------------------------------------------

  ------------------------------------------------------------------------------
  -- table tags
  ------------------------------------------------------------------------------
  FUNCTION TableStart (
    pi_Border      IN NUMBER DEFAULT NULL,
    pi_CellPadding IN NUMBER DEFAULT NULL,
    pi_CellSpacing IN NUMBER DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION TableEnd
  RETURN t_Html;

  FUNCTION TableRowStart
  RETURN t_Html;

  FUNCTION TableRowEnd
  RETURN t_Html;

  FUNCTION TableDataStart (
    pi_Header IN BOOLEAN  DEFAULT FALSE,
    pi_Align  IN VARCHAR2 DEFAULT NULL,
    pi_Class  IN VARCHAR2 DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION TableDataEnd (
   pi_Header IN BOOLEAN DEFAULT FALSE
  ) RETURN t_Html;
  ------------------------------------------------------------------------------

  ------------------------------------------------------------------------------
  -- frame tags
  ------------------------------------------------------------------------------
  FUNCTION FramesetStart (
    pi_Cols   IN VARCHAR2 DEFAULT NULL,
    pi_Rows   IN VARCHAR2 DEFAULT NULL,
    pi_Border IN NUMBER   DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION FramesetEnd
  RETURN t_Html;

  FUNCTION Frame (
    pi_Src       IN VARCHAR2,
    pi_Name      IN VARCHAR2 DEFAULT NULL,
    pi_Scrolling IN VARCHAR2 DEFAULT NULL
  ) RETURN t_Html;

  FUNCTION NoFrames (
    pi_Text IN VARCHAR2
  ) RETURN t_Html;
  ------------------------------------------------------------------------------

  ------------------------------------------------------------------------------
  -- style tags
  ------------------------------------------------------------------------------
  FUNCTION ExternalStyle (
    pi_Href IN VARCHAR2
  ) RETURN t_Html;

  FUNCTION InternalStyleStart
  RETURN t_Html;

  FUNCTION InternalStyleEnd
  RETURN t_Html;

  FUNCTION StyleTagStart (
    pi_Tag IN VARCHAR2
  ) RETURN t_Html;

  FUNCTION StyleTagEnd
  RETURN t_Html;

  FUNCTION StyleProperty (
    pi_Property IN VARCHAR2,
    pi_Value    IN VARCHAR2
  ) RETURN t_Html;
  ------------------------------------------------------------------------------

END ttpl_html;
  

Back to Top


TTPL_UTIL

CREATE OR REPLACE PACKAGE ttpl_util AS
/*******************************************************************************
 *
 * Copyright (c) 1999, Tortuga Technologies Pty Ltd. All rights reserved.
 *
 * This is unpublished proprietary source code of Tortuga Technologies.
 * The copyright notice above does not evidence any actual or intended
 * publication of such source code.
 *
 *******************************************************************************
 *
 * Filename:    $Id: api.html,v 1.2 2003/01/31 02:04:35 jill Exp $
 *
 * Description: Package specification.
 *              Provides a set of general purpose functions, types, constants, 
 *              etc that can be used when building any application.
 *
 * Author:      Jill Stephenson
 *
 * Created:     16/08/1999
 *
 * Change History:
 * ---------------
 * $Log: api.html,v $
 * Revision 1.2  2003/01/31 02:04:35  jill
 * Added favicon link
 *
 * Revision 1.1  2002/04/22 10:12:53  jill
 * Initial import
 *
 * Revision 1.1.1.1  2000/02/18 06:41:28  graham
 * initial import
 *
 *
 *******************************************************************************
 */

  ------------------------------------------------------------------------------
  -- Documentation
  ------------------------------------------------------------------------------
  --
  -- Public Functions/Procedures
  -- ---------------------------
  -- ErrorHandler
  --   Raise an application error as a result of any Oracle error occuring 
  --   during processing.  The location of the error within the code is 
  --   recorded as well as the actual error initially raised.  All errors 
  --   should be trapped with an OTHERS exception as it would be expected that
  --   no error condition exists that can be recovered from.
  -- Version
  --   Return the formated version of the package spec and body combined based
  --   on parameters supplied.
  -- Version
  --   Return the version of the package spec and body, which must be manually
  --   updated whenever a package spec or body is modified.
  --
  ------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  -- Public Types/Constants/Variables
  ------------------------------------------------------------------------------
  -- types
  short   VARCHAR2(10); -- dummy variable to subtype off
  SUBTYPE t_Short IS short%TYPE;

  medium  VARCHAR2(256); -- dummy variable to subtype off
  SUBTYPE t_Medium IS medium%TYPE;

  xlong   VARCHAR2(2000); -- dummy variable to subtype off
  SUBTYPE t_Long IS xlong%TYPE;

  object  VARCHAR2(30);   -- dummy variable to subtype off
  SUBTYPE t_Object IS object%TYPE;

  -- general constants
  c_VERSION_SPEC        CONSTANT t_Short  := '1.0.0';
  c_DATE_FORMAT         CONSTANT t_Object := 'DD/MM/YYYY HH24:MI:SS';

  c_SIZE_SHORT          CONSTANT NUMBER   := 10;
  c_SIZE_MEDIUM         CONSTANT NUMBER   := 256;
  c_SIZE_LONG           CONSTANT NUMBER   := 2000;
  c_SIZE_OBJECT         CONSTANT NUMBER   := 30;

  -- numeric equivalents to booleans
  c_FALSE               CONSTANT NUMBER   := 0;
  c_TRUE                CONSTANT NUMBER   := 1;

  -- exceptions/errors
  c_TTPL_UTIL_ERROR     CONSTANT NUMBER   := -20000;
  e_TTPL_UTIL_ERROR     EXCEPTION;
  PRAGMA exception_init (e_TTPL_UTIL_ERROR, -20000);
  ------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  -- Public Functions/Procedures
  ------------------------------------------------------------------------------
  PROCEDURE ErrorHandler (
    pi_Package   IN VARCHAR2,
    pi_Module    IN VARCHAR2,
    pi_Statement IN NUMBER
  );

  FUNCTION Version (
   pi_Spec IN VARCHAR2,
   pi_Body IN VARCHAR2
  ) RETURN VARCHAR2;
  PRAGMA RESTRICT_REFERENCES (Version, WNDS, RNPS, WNPS);

  FUNCTION Version RETURN VARCHAR2;
  PRAGMA RESTRICT_REFERENCES (Version, WNDS, WNPS);
  ------------------------------------------------------------------------------

END ttpl_util;
  

Back to Top


LOGGERHEAD_UTIL

CREATE OR REPLACE PACKAGE loggerhead_util AS
/*******************************************************************************
 *
 * Copyright (c) 1999, Tortuga Technologies Pty Ltd. All rights reserved.
 *
 * This is unpublished proprietary source code of Tortuga Technologies.
 * The copyright notice above does not evidence any actual or intended
 * publication of such source code.
 *
 *******************************************************************************
 *
 * Filename:    $Id: api.html,v 1.2 2003/01/31 02:04:35 jill Exp $
 *
 * Description: Package specification.
 *              Provides a set of Loggerhead specific functions, types, 
 *              constants, etc that can be used when building applications for 
 *              use by Loggerhead.
 *
 * Author:      Jill Stephenson
 *
 * Created:     03/12/1999
 *
 * Change History:
 * ---------------
 * $Log: api.html,v $
 * Revision 1.2  2003/01/31 02:04:35  jill
 * Added favicon link
 *
 * Revision 1.1  2002/04/22 10:12:53  jill
 * Initial import
 *
 * Revision 1.1.1.1  2000/02/18 06:41:32  graham
 * initial import
 *
 *
 *******************************************************************************
 */
  
  ------------------------------------------------------------------------------
  -- Documentation
  ------------------------------------------------------------------------------
  --
  -- Public Functions/Procedures
  -- ----------------------------
  -- Version
  --   Return the version of the package spec and body, which must be manually
  --   updated whenever a package spec or body is modified.
  -- AddDbImage
  --   Add a link to the Loggerhead action which retrieves the specified image
  --   from the database.
  -- AddLine
  --   Add the specified text to the specified page, appending a carriage return
  --   for clarity when viewing the html source.
  -- AddActionLink
  --   Add a link to a Loggerhead action, which may be based on text, an image
  --   previously loaded into Injun or an image from the database.
  -- AddPageHeader
  --   Add the start of a web page formatted for display in Loggerhead, 
  --   including the standard stylesheet and optionally a heading and start of
  --   a form.
  -- AddPageFooter
  --   Add the end of a web page formatted for display in Loggerhead, optionally
  --   including the end of a form.
  -- AddParagraph
  --   Add the specified text as its own paragraph.
  -- AddRule
  --   Add a horizontal rule in the standard Loggerhead format.
  -- AddTableHeader
  --   Add the specified text as a table header entry.
  -- AddTableData
  --   Add the specified text as a table data entry.
  --
  ------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  -- Public Types/Constants/Variables
  ------------------------------------------------------------------------------
  -- tables
  TYPE t_Page IS TABLE OF ttpl_html.t_Html INDEX BY BINARY_INTEGER;

  -- general constants
  c_VERSION_SPEC      CONSTANT ttpl_util.t_Short  := '1.0.0';
  c_BGCOLOR           CONSTANT ttpl_util.t_Short  := '#008B8B';
  c_STYLESHEET        CONSTANT ttpl_util.t_Medium :=
                           'stylesheets/loggerhead_main.css';

  -- specific parameters names
  c_PARAM_ACTION_PAGE CONSTANT ttpl_util.t_Medium := 'action_manager.html';
  c_PARAM_ACTION      CONSTANT ttpl_util.t_Medium := 'action';
  c_PARAM_PREFIX      CONSTANT ttpl_util.t_Medium := 'action_prefix';
  c_PARAM_IMAGENAME   CONSTANT ttpl_util.t_Medium := 'image_name';

  -- actions for generating pages
  c_ACTION_IMAGE      CONSTANT ttpl_util.t_Medium := 'image';

  -- parameter delimiters
  c_DELIMITER_PARAMS  CONSTANT ttpl_util.t_Short  := '?';
  c_DELIMITER_ATTRIB  CONSTANT ttpl_util.t_Short  := '&';
  c_DELIMITER_VALUE   CONSTANT ttpl_util.t_Short  := '=';

  -- types of hypertext links
  c_LINK_TEXT         CONSTANT ttpl_util.t_Short  := 'TEXT';
  c_LINK_DB_IMAGE     CONSTANT ttpl_util.t_Short  := 'DB_IMAGE';
  c_LINK_IMAGE        CONSTANT ttpl_util.t_Short  := 'IMAGE';
  ------------------------------------------------------------------------------


  ------------------------------------------------------------------------------
  -- Public Functions/Procedures
  ------------------------------------------------------------------------------
  FUNCTION Version RETURN VARCHAR2;
  PRAGMA RESTRICT_REFERENCES (Version, WNDS, WNPS);

  PROCEDURE AddDbImage (
    pi_ImageName IN     loggerhead_images.image_name%TYPE,
    pi_AltText   IN     VARCHAR2,
    pi_Height    IN     NUMBER DEFAULT NULL,
    pi_Width     IN     NUMBER DEFAULT NULL,
    pio_Page     IN OUT t_Page
  );

  PROCEDURE AddLine (
    pi_Line  IN     VARCHAR2,
    pio_Page IN OUT t_Page
  );

  PROCEDURE AddActionLink (
    pi_ActionPrefix IN     VARCHAR2,
    pi_Action       IN     VARCHAR2,
    pi_LinkType     IN     VARCHAR2 DEFAULT NULL,
    pi_LinkContents IN     VARCHAR2 DEFAULT NULL,
    pi_ImageAltText IN     VARCHAR2 DEFAULT NULL,
    pio_Page        IN OUT t_Page
  );

  PROCEDURE AddPageHeader (
    pi_Title       IN     VARCHAR2,
    pi_HeadingText IN     VARCHAR2 DEFAULT NULL,
    pi_FormStart   IN     BOOLEAN  DEFAULT FALSE,
    pi_HideLinks   IN     BOOLEAN  DEFAULT FALSE,
    pio_Page       IN OUT t_Page
  );

  PROCEDURE AddPageFooter (
    pi_FormEnd IN     BOOLEAN DEFAULT FALSE,
    pi_Rule    IN     BOOLEAN DEFAULT TRUE,
    pio_Page   IN OUT t_Page
  );

  PROCEDURE AddParagraph (
    pi_Text  IN     VARCHAR2,
    pio_Page IN OUT t_Page
  );

  PROCEDURE AddRule (
    pio_Page IN OUT t_Page
  );

  PROCEDURE AddTableHeader (
    pi_Heading IN     VARCHAR2,
    pio_Page   IN OUT t_Page
  );

  PROCEDURE AddTableData (
    pi_Data  IN     VARCHAR2,
    pio_Page IN OUT t_Page
  );
  ------------------------------------------------------------------------------

END loggerhead_util;
  

Back to Top


last updated 18-February-2000