Common: Difference between revisions

From tehowiki
Jump to navigation Jump to search
imported>Gfis
Stub
 
imported>Gfis
→‎Classes: ErrorServlet
 
Line 2: Line 2:


===Classes===
===Classes===
''Common'' contains the following generally useable Java classes:
''Common'' contains several groups of Java classes which are used in many projects on [[Main_Page|teherba.org]]:
* <code>'''[http://www.teherba.org/dbat/index.php/Regression_Testing RegressionTester]'''</code> - Runs a suite of commandline and web test cases and compare the new results with previous results
====Testing====
* <code>'''[[Common/URIReader|URIReader]]'''</code> - Reads a text or binary file from  
* <code>'''[http://www.teherba.org/dbat/index.php/Regression_Testing RegressionTester]'''</code> - runs a suite of commandline and web test cases and compare the new results with previous results
* <code>'''CommandTokenizer'''</code> - used by RegressionTester, for splitting of command line arguments
* <code>'''ReplacingPrintStream'''</code> - used by RegressionTester, for substitution of patterns in the test output
* <code>'''[[Common/URIReader|URIReader]]'''</code> - reads a text or binary file from  
** the local file system,  
** the local file system,  
** an <code>http</code>, <code>ftp</code>, <code>gopher</code> URL  
** an <code>http</code> or a <code>ftp</code> URL  
** a <code>data</code> URI
** a <code>data</code> URI
* <code>'''[[Common/BasePage|BasePage]]'''</code> - Unifies the handling of secondary web pages which are printed by the application's servlet
====Web Support====
* <code>'''[[Common/MetaInf|MetaInfPage]]'''</code> - Reads the manifest, license and notice files from the application JAR and shows them in a web page
* <code>'''[[Common/BasePage|BasePage]]'''</code> - unifies the handling of secondary web pages which are printed by the application's servlet
* <code>'''[[Common/ErrorServlet|ErrorServlet]]'''</code> - handles Http server error codes (e.g. 404 = file not found), and unexpected internal Java exceptions and shows a corresponding message to the user
* <code>'''[[Common/MetaInf|MetaInfPage]]'''</code> - reads the manifest, license and notice files from the application JAR and shows them in a web page
====Miscellaneous====
* <code>'''SmallScript'''</code> - handles Unicode characters for upperscript and lowerscript digits


===Build Procedure ===
===Build Procedure ===

Latest revision as of 13:19, 11 October 2016

The Common sub-project contains no helper classes which are used by most other applications on teherba.org. Furthermore, Common is the reference for build procedure, property files and so on.

Classes

Common contains several groups of Java classes which are used in many projects on teherba.org:

Testing

  • RegressionTester - runs a suite of commandline and web test cases and compare the new results with previous results
  • CommandTokenizer - used by RegressionTester, for splitting of command line arguments
  • ReplacingPrintStream - used by RegressionTester, for substitution of patterns in the test output
  • URIReader - reads a text or binary file from
    • the local file system,
    • an http or a ftp URL
    • a data URI

Web Support

  • BasePage - unifies the handling of secondary web pages which are printed by the application's servlet
  • ErrorServlet - handles Http server error codes (e.g. 404 = file not found), and unexpected internal Java exceptions and shows a corresponding message to the user
  • MetaInfPage - reads the manifest, license and notice files from the application JAR and shows them in a web page

Miscellaneous

  • SmallScript - handles Unicode characters for upperscript and lowerscript digits

Build Procedure

The build process with compiling and creating of the JAR, WAR and EAR files is done with Apache ant. It is standardized for all applications by the include file

  • build-import.xml

This file should be the same for all applications. Application-specific tasks (for example data or code generation processes) should be moved to the build.xml which includes build-import.xml.