CIRC4Life ICT Systems Source Code

General

This document contains the links to the software source code for the implementation of various components of the CIRC4Life ICT Systems. The source code is accompanied with instructions where it is necessary.

ICCS ICT Platform RESTful API Services (WP4, T4.5)

Source code

The ICCS ICT Platform RESTful API Services source code archive can be downloaded from here.

SHA256 checksum: 6d790d0e3db46cca17d82073a5a1acd39489f825c3c7731f9012c02c63ca7ab6

Build instructions

The ICT Platform RESTful API Services source code is written in the Java Programming Language and builds using the Apache Maven software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information. The source code is cross-platform and can be build and executed in any Operating System has installed the Java Platform, Standard Edition (Java SE) version 8 and Apache Maven. Apache Maven requires a Java SE environment already installed in order to operate.

Since Java Platform, Standard Edition Runtime Environment (JRE) is not a single package and installation details are different from one Operating System to another, please consult the Web on how to install Java SE Runtime Environment for your system. The main available implementations are:

For a detailed guide on how to install Apache Maven see the online official documentation.

In most GNU/Linux distributions the system’s package manager already contains packaged versions of JRE and Maven. For example in Debian, both can be installed with a single command:

sudo apt-get install default-jre maven

Once you have installed both, you can extract the source code archive in the directory of your choice and change into the directory the contains the file pom.xml. The contents should be:

Common
CommonTesting
DataAccessObject
EcoCreditCalculator
EcoCreditCalculatorClient
EcoCreditCalculatorWS
EndUserModuleWS
pom.xml
README.txt
RecycleModuleWS
RetailerModuleWS
src

Each module of this Maven multi-project contains a deployment configuration file under the directory <ModuleName>/src/main/config/default/config.properties, for example for the EcoCreditCalculatorWS module this file is EcoCreditCalculatorWS/src/main/config/default/config.properties. Before building the module packages for deployment, the developer should update the Access Control Manager CIRC4Life Realm Administrator credentials. Here are the contents of EcoCreditCalculatorWS/src/main/config/default/config.properties:

logging.level=CONFIG
logging.verbosity=HEADERS_ONLY
accesscontrolmanager.enabled=true
accesscontrolmanager.url=https://circ4life.iccs.gr/auth
accesscontrolmanager.realm=CIRC4LIFE
accesscontrolmanager.admin.username=SET HERE THE ACM CIRC4LIFE ADMIN USERNAME
accesscontrolmanager.admin.password=SET HERE THE ACM CIRC4LIFE ADMIN PASSWORD
accesscontrolmanager.admin.clientid=admin-cli
database.host=127.0.0.1
database.port=27017

Now build the RESTful API Services packages with the command:

mvn package

The first time this command runs, Maven will automatically download from the Web all the external dependencies and build the final packages. Once the build completes without errors, the final Web Archive (WAR) packages located here:

EcoCreditCalculatorWS/target/EcoCreditCalculatorWS-VERSION.war
EndUserModuleWS/target/EndUserModuleWS-VERSION.war
RecycleModuleWS/target/RecycleModuleWS-VERSION.war
RetailerModuleWS/target/RetailerModuleWS-VERSION.war

These packages should be deployed to the application server. The should be properly running on all Java Enterprise Edition application servers as-is. ICCS has only used and tested the Java EE reference implementation Glassfish.

ENV Interoperability Layer and Escrow Systems (WP4, T4.6)

All instructions below are provided as-is by ENV.

Source code

The Escrow System source code archive can be downloaded from here.

SHA256 checksum: b1439fa877c89380679530d73e007840563842d250d71bbad785d4f7f7b6e7ac

Build instructions

The Interoperability Layer and Escrow Systems are developed using Omnis Studio, a development environment allowing for parallel management of database, services access and hosting, design of end-user systems for desktop computers, web browsers and mobile devices. The system can be implemented on Linux (server only), Windows and MacOS - all allowing scalability between servers both on application server layer and on database server layers.

The components needed for an initial install (more extensive installs demanding more advanced servers) demand additional resources dependent on local implementation variants. The installation instruction below covers a local installation for testing and access to the systems overall source code.

The delivered source code and resources:

  • Source code for the integrated interoperability layer / product data / escrow system.
  • Source code for the pilot work covering consumer app system including projects for compilation into Android.
  • Connection information for the consumer app when using Omnis App from Apple Appstore.
  • Source code for a simple feedback system (not finalized at the deadline for the Deliverable 4.4).
  • Support resources in the form of graphics, localization strings (small and large selection of languages) and files to be installed in Apache web servers.
  • Databases for the above-mentioned systems in the form of SQLite databases and dumps of PostgreSQL databases.

The local installation requires:

A production server-based installation requires:

The installation instructions for the Omnis Studio Application Server are documented here.

Installation instructions for autonomous node

  • Install Omnis Studio using the above-mentioned installer
  • Open the folder “Autonomous node” and open the file “c4l_db.lbs”

The autonomous node runs a local SQLite version of the system for its data - both for Interoperability / Escrow and for the feedback functions.

With the above steps you now have a running node of the system that be used for local testing on one node. The base data entry form is accessible from the C4L Base Data folder -> JS_Data_Entry. Right-click gives the option of opening this form using the local web browser.

Installation instructions server-based node

The server-based node demands installations in two different places - the Omnis Application Server installations and installations for the web server functions.

The installation of the Omnis Application Server is described in the link above and is different depending on operating system (Linux, Windows, MacOS X) and version of Apache. The installation of the server system presumes use of Apache modules for handling the interaction with the Omnis Application Server and the use of SQLite as the database manager to simplify installation. Database backup files for PostgreSQL are included in the source file package if needed.

After install of the files in the Server Mode -> Omnis Data folder -> startup shall be placed in the Omnis data (depending on operating system) startup folder. These files include the source code for the Interoperability layer / Escrow system, its localization strings and the SQLite databases.

After the Omnis App Server installation is done with relevant source installs the directory c4l_data_entry containing the complete Apache setup for the system can be placed at relevant place in the Apache site documents tree. Kindly remember that the choice of location will have a direct impact on the resulting URLs for using the system.

Consumer Tools pilot

Android Native Application

An Android project creating a wrapper for the Consumer Tools pilot is part of the source - allowing for the compiling of an app connecting to the existing C4L data entry server. By changing parameters, the resulting app can connect and use the server system that is installed.

iOS Native Application

From the Apple AppStore an application can be downloaded (Omnis App) that allows for use of the Consumer Tools pilot in the form of an iOS app, locally caching form data and logic to increase speed and to allow use of bar code scanning etc. Below is a screen dump for the settings to the current C4L Data Entry server hosting the Consumer Tools pilot.

Consumer Tools screenshot