Download BPSE-Basic Example

BPSE-Basic Archetype

By far the easiest way to get a copy of the BPSE-Basic Example is to use the provided archetype. Details about Maven Archetypes is available in the Technology section of the BPSE Parent Project. If you just want to download an executable jar file, you can do this here: basic-1.1-jar-with-dependencies.jar

Automatic Download, Installation & Usage

You can have maven download, install and use the archetype in one step, however you must specifiy the private Repository location:

mvn archetype:generate -DarchetypeRepository=http://bpse.ifs.tuwien.ac.at/repository/ 
  -DarchetypeGroupId=at.ac.tuwien.ifs.bpse -DarchetypeArtifactId=basic-archetype 
  -DarchetypeVersion=1.1 -DgroupId=MyGroupId -DartifactId=MyArtifactId

Directory and File Stucture

The archetype creates the following structure for the project.

  MyartifactId
  |-- pom.xml
  |
  `-- src
      |-- main
      |   |-- java
      |   |   `-- MygroupId
      |   |       |-- dao
      |   |       |   |-- package-info.java
      |   |       |   |-- IStudentDAO.java
      |   |       |   `-- JdbcObjectStudentDAO.java
      |   |       |-- domain
      |   |       |   |-- Person.java
      |   |       |   `-- Student.java
      |   |       |-- export_import
      |   |       |   |-- Export.java
      |   |       |   |-- HtmlExport.java
      |   |       |   |-- Import.java
      |   |       |   |-- package-info.java
      |   |       |   `-- XmlExportImport.java
      |   |       |-- gui
      |   |       |   |-- EditStudentFrame.java
      |   |       |   |-- ExportMenuModel.java
      |   |       |   |-- MainFrame.java
      |   |       |   |-- package-info.java
      |   |       |   |-- RegexTextField.java
      |   |       |   `-- StudentTableModel.java
      |   |       |-- helper
      |   |       |   |-- Constants.java
      |   |       |   `-- package-info.java
      |   |       |-- package-info.java
      |   |       `-- Basis.java
      |   `-- resources
      |       |-- data
      |       |   |-- database.properties
      |       |   `-- database.script
      |       |-- beans.xml
      |       |-- log4j.properties
      |       |-- messages_en.properties
      |       `-- messages.properties
      |-- test
      |   |-- java
      |   |   `-- MygroupId
      |   |       `-- test
      |   |           |-- dao
      |   |           |    |-- AllDAOTests.java
      |   |           |    |-- package-info.java
      |   |           |    `-- JdbcStudentTest.java
      |   |           |-- export
      |   |           |    |-- AllExportTests.java
      |   |           |    |-- ExportImportTest.java
      |   |           |    |-- HtmlExportTest.java
      |   |           |    |-- package-info.java
      |   |           |    `-- XmlExportImportTest.java
      |   |           |-- AllTests.java
      |   |           `-- package-info.java
      |   `-- resources
      |       |-- data
      |       |   |-- pruefungen.properties
      |       |   `-- pruefungen.script
      |       | -- test
      |       |    `-- html-export.html
      |       `-- test-beans.xml
      `-- site
          |-- apt
          |   |-- index.apt
          |   `-- format.apt
          |-- fml
          |   `-- faq.fml
          |-- xdoc
          |   `-- xdoc.xml
          `-- site.xml


General Files
  • pom.xml is the Project Object Model for this application which contains all information about the organisation, structure, dependencies and reporting.
  • package-info.java: contains the Javadoc description for the specific Java Package.
Database

The data folder contains the necessary files for the HSQL database.

  • studentdb.properties sets the basic settings for the database.
  • studentdb.script contains the structure and content of the database.
Application Source
  • main - java - MygroupId is the general package of the project where e.g. the starting class is placed.
    • Basis.java is the starting class for the sample application.
    • Constants.java defines some constants that are generally available within the application.
  • main - java - MygroupId.domain contains all Business Objects for the application logic.
    • Student.java is the BO for the example application and represents the internal structure of a student as a POJO.
  • main - java - MygroupId.dao contains the interfaces and DAOs for the application.
    • IStudentDAO.java represents the interface to manipulate the corresponding BO.
    • JdbcObjectStudentDAO.java is the DAO that contains the implemented methods to manipulate the BO.
  • main - java - MygroupId.gui is the package that contains all classes that are used by the User-Interface.
    • MainFrame.java builds the User-Interface of the sample application and shows the data.
  • main - resources is the folder where additional resources for the program can be stored.
    • beans.xml contains all the information to wire the used framework to the beans.
    • log4j.properties contains properties for the Log4J logger in the application.
    • message_en.properties contains keys and values for l18n used by the application.
  • test - java is the folder where Unit tests are placed.
  • test - java - MygroupId.test.dao is the package for the DAO tests.
    • JdbcStudentTest.java is the test for the Student DAO of the sample.
  • test - resources is the folder where additional resources for the tests can be stored.
  • site contains the documentation of the project.
  • site - apt contains documentation in APT (Almost Plain Text) format.
  • site - fml contains the FAQs in FML format
  • site - xdoc contains documenation in XDOC format.

Application Usage

To explore the application source and use the application open a console window and change the directory to the root directory of your created archetype. Type and run mvn eclipse:eclipse for an Eclipse integration.

Open Eclipse and import the project as a new Java project. You might set the variable path for the dependencies to the directory of your Maven repository.

You can now browse through the code an run the application by right clicking Basis.java and selecting Run as - JavaApplication.

Jar Packages

These jar archives contain the source code and test source code of the BPSE-Basic Example. There is also an executable jar provided which should be launchable directly through your browser.