Common

From tehowiki
Jump to navigation Jump to search

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.