Welcome to qOffer_2.0’s documentation!

TOMATO - The Offer MAnager Tool

Tomato assists in managing and creating offers

Github Workflow Build Maven Package Status Github Workflow Tests Status CodeQL Release status Project Licence Written in Java Written in Groovy

How to run

Build the project with Maven and Java 8

mvn clean package

Deploy the created portlet in a Liferay instance. Make sure that Chromium is installed on the server, it is required for the download of the offer. (see How to use)

Local testing

Run the project with

mvn clean jetty:run -Denvironment=testing

And open the application through localhost:8080. The system property -Denvironment=testing will enable to application to run in test mode and does not require a successful user role determination to access all the features.

The WAR file will be created in the /target folder:

How to use

Authorization and roles

The offer manager app currently distinguishes between two roles: Role.PROJECT_MANAGER and Role.OFFER_ADMIN. The admin role provides access to features such as the service product maintenance interface, and only dedicated users with the admin role will be able to access it.

The current production implementation of the RoleService interface is used for deployment in an Liferay 6.2 GA6 environment and maps the Liferay site-roles “Project Manager” and “Offer Administration” to the internal app role representation.

If an authenticated user has none of these roles, she will not be able to execute the application.

Configuration

Environment

Description

Default Value

datasource.url

Connection to datasource

https://openbis.domain.de

datasource.api.url

Connection to API datasource

https://openbis.domain.de/api/path

datasource.user

The user name for the datasource

myuser

datasource.password

The password for the datasource

mypassword

mysql.host

Host address for MySQL database

123.4.56.789

mysql.pass

Password for MySQL database

mypassword

mysql.user

MySQL user

mysqluser

mysql.db

MySQL database

my_sql_database_name

mysql.port

Port to MySQL database

3306

portal.user

Username for QBiC portal

qbcjb02

System setup

Make sure to have chromium installed on your laptop. In case you use a Mac, can do so via homebrew

brew install --cask chromium

If you want to build the chromium browser from source please see the instructions on the chromium website For some Linux system the application is also provided by the name chromium-browser

sudo apt-get install chromium-browser

After successful installation please provide the offer manager with your chromium installation by setting

export CHROMIUM_EXECUTABLE=<your/path/to/chromium>

In order to enable the offer manager app to convert an offer as PDF, you need to define a environment variable in the system’s environment accessible by the application.

The app will look for an environment variable CHROMIUM_EXECUTABLE, so make sure to have set it.

License

This work is licensed under the MIT license.

Note: This work uses the Vaadin Framework, which is licensed under Apache 2.0.

Installation

Stable release

To install qOffer_2.0, run this command in your terminal:

$ mvn install

This is the preferred method to install qOffer_2.0, as it will always install the most recent stable release.

If you don’t have maven installed you can get it from here

From sources

The sources for qOffer_2.0 can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/qbicsoftware/qOffer_2.0

Or download the tarball:

$ curl -OJL https://github.com/qbicsoftware/qOffer_2.0/tarball/master

Once you have a copy of the source, you can install it with:

$ mvn install

Usage

To use qOffer_2.0:

create the qOffer_2.0.war/.jar according to the installation description and deploy the the project to the current Liferay instance

Credits

Development Lead

Contributors

Changelog

This project adheres to Semantic Versioning.

1.2.7 (2022-01-24)

Added

  • Update publication acknowledgement template text in offer template (#884)

Fixed

Dependencies

Deprecated

1.2.6 (2022-01-04)

Added

Fixed

  • CVE-2021-44832

Dependencies

  • org.apache.logging.log4j:log4j-core:2.17.0 -> 2.17.1

  • org.apache.logging.log4j:log4j-api:2.17.0 -> 2.17.1

Deprecated

1.2.5 (2021-12-21)

Added

Fixed

  • CVE-2021-45105

Dependencies

  • org.apache.logging.log4j:log4j-core:2.16.0 -> 2.17.0

  • org.apache.logging.log4j:log4j-api:2.16.0 -> 2.17.0

Deprecated

1.2.4 (2021-12-15)

Added

Fixed

  • CVE-2021-45046

Dependencies

  • com.vaadin:vaadin-bom:8.14.0 -> 8.14.3

  • org.codehaus.groovy:groovy-sql:3.0.8 -> 3.0.9

  • org.codehaus.groovy:groovy-all:3.0.8 -> 3.0.9

  • org.apache.logging.log4j:log4j-core:2.15.0 -> 2.16.0

  • org.apache.logging.log4j:log4j-api:2.15.0 -> 2.16.0

Deprecated

1.2.3 (2021-12-13)

Added

Fixed

  • CVE-2021-44228

Dependencies

  • org.apache.logging.log4j:log4j-core:2.14.0 -> 2.15.0

  • org.apache.logging.log4j:log4j-api:2.14.0 -> 2.15.0

Deprecated

1.2.2 (2021-11-09)

Added

  • Address additions of customers are now shown on generated offer PDFs

Fixed

  • Offer identifiers are now all in the format O_project_rand_1

  • ZIP code and city of the offer recipient are in the same line now

Dependencies

Deprecated

1.2.1 (2021-10-27)

Added

Fixed

  • Introduce proper exception handling when product cannot found in the database (DM-66)

  • Address exception creation when CopyProduct use case was triggered (DM-33)

Dependencies

  • com.vaadin 8.13.0 -> 8.14.0 (addresses CVE-2021-37714)

  • Bump data model lib 2.13.0 -> 2.14.0 (includes extension of ProductCategory with ProductType abbreviation)

Deprecated

1.2.0 (2021-10-13)

Added

  • Support for external service products (#700)

  • Adds a facility column to the view (#835)

Fixed

  • Update offer template footer to show correct names (#817)

  • Generated offers are removed from the server after download (#776)

  • Fix race condition issue in the update person use case (#833)

Dependencies

  • org.jsoup 1.13.1 -> 1.14.2 (addresses CVE-2021-37714)

  • org.apache.logging.log4j 1.2.17 -> 2.14.0 (addresses CVE-2019-17571)

  • Bump data model lib 2.12.1 -> 2.13.0 (includes extended enum with the external service )

Deprecated

1.1.3 (2021-09-20)

Added

Fixed

  • Add spacing to cost overview (#810)

Dependencies

Deprecated

1.1.2 (2021-09-17)

Added

Fixed

  • Catch exception during discount generation for negative product prices (#808)

Dependencies

Deprecated

1.1.1 (2021-09-14)

Added

Fixed

  • Avoid page breaks in footer content (#798)

  • Disable buttons after deselecting offers (#799)

  • Avoid division by zero during offer content creation (#806)

Dependencies

  • Bump data model lib 2.12.0 -> 2.12.1 (includes important bug fixes)

Deprecated

1.1.0 (2021-08-17)

Added

  • Function to apply the quantity discount price (#707)

  • Add automatic data management discount generation (#783)

  • Adds a new DTO OfferItem which represents an item on the offer (#728)

  • Display total quantity discount included in the offer in the offer overview (#686)

  • Adds a new DTO OfferContent which represents the content of an offer (#724)

  • Uses new DTOs instead of performing unnecessary computations in PDF creation (#725)

  • Adds the CreateOfferContent use case (#735)

  • Add discount unit and percentage to discount items, specify the discount item description (#755)

  • Adds the total price before VAT is applied to an offer (#754)

  • Add new offer layout and css (#768)

Fixed

  • Invert quantity discount in order to be able to display size of discount (#710

  • Include Offer ID Prefix in Offer PDF filename (#685)

  • Differentiate between internal and external product unit prices (#713)

  • Include internal and external prices as well as facilities in the products (#712)

  • The internal and external product unit prices are shown in the user interface (#723)

  • Reset the offer update view, when a new offer is selected in the offer overview (#716)

  • Offers without an experimental design can now be updated (#726)

  • Creating a product switches name and description (#731)

  • Space names are now validated (#736)

  • Fix rounding issue for discount unit price (#784)

  • Fix app trying to unregister file downloaders that were not previously registered (#796)

  • Restructured the cost summary to solve (#784 and #689)

Dependencies

  • mysql:mysql-connector-java:8.0.24 -> 8.0.25

  • org.mariadb.jdbc:mariadb-java-client:2.7.2 -> 2.7.3

  • life.qbic:data-model-lib:2.8.2 -> 2.11.0

Deprecated

1.0.5 (2021-06-15)

Added

  • Increase Space allocated for product description in Offer PDF (#675)

  • Allocate space for each productItem dependent on number of characters in each property (#675)

Fixed

  • Limit width of product description columns (#673)

Dependencies

  • Bump data model lib 2.8.1 -> 2.8.2 and therefore adds ‘Batch’ as unit for service products

Deprecated

1.0.5 (2021-06-15)

Added

  • Increase space allocated for product description in Offer PDF based on the number of characters (#675)

Fixed

  • Limit width of product description columns (#673)

Dependencies

  • Bump data model lib 2.8.1 -> 2.8.2 and therefore adds ‘Batch’ as unit for service products

Deprecated

1.0.4 (2021-06-14)

Added

  • DataStorage and ProjectManagement ProductItems are now included in the overhead calculation of an Offer Entity (#665)

  • Offer PDF overhead listing now includes DataStorage and ProjectManagement ProductItems (#665)

Fixed

  • Renamed ProductGroup.DATA_MANAGEMENT Enum Item to PROJECT_MANAGEMENT_AND_DATA_MANAGEMENT in OfferToPDFConverter to make it more explicit (#666)

Dependencies

  • Bump data model lib 2.8.0 -> 2.8.1 and therefore adds ‘Flow cell’ as unit for service products

Deprecated

  • Deprecate life.qbic.business.offers.Offer.getOverheadItems() since all ProductItems now have an associated overhead cost (#665)

  • Deprecate life.qbic.business.offers.Offer.getNoOverheadItems() since all ProductItems now have an associated overhead cost (#665)

  • Deprecate life.qbic.business.offers.Offer.getOverheadItemsNet() since all ProductItems now have an associated overhead cost (#665)

  • Deprecate life.qbic.business.offers.Offer.getNoOverheadItemsNet() since all ProductItems now have an associated overhead cost (#665)

  • Deprecate life.qbic.business.offers.Offer.itemsWithOverheadNetPrice since all ProductItems now have an associated overhead cost (#665)

  • Deprecate life.qbic.business.offers.Offer.itemsWithoutOverheadNetPrice since all ProductItems now have an associated overhead cost (#665)

  • Deprecate life.qbic.business.offers.Offer.itemsWithOverheads from Offer entity since all ProductItems now have an associated overhead cost (#665)

  • Deprecate life.qbic.business.offers.Offer.itemsWithoutOverhead since all ProductItems now have an associated overhead cost (#665)

1.0.3 (2021-06-10)

Added

Fixed

  • Assign proteomic and metabolomic products to product group data generation (#660)

Dependencies

Deprecated

1.0.2 (2021-06-07)

Added

Fixed

  • Update of person entries is no longer blocked by ignored affiliation selection (#654)

  • Disable the affiliation attachment during person update if no affiliation is selected (#656)

Dependencies

Deprecated

1.0.1 (2021-06-07)

Added

  • More units for the service products

Fixed

Dependencies

  • Bump data model lib 2.7.0 -> 2.8.0 and therefore adds more units for service products

Deprecated

1.0.0 (2021-06-04)

Added

  • Only list overhead costs of productGroup items present in offer in Offer PDF (#643)

  • A person can now be updated if only the associated academic title is changed (#567)

  • Small modifications for the offer layout (#620)

  • Filter for product id in life.qbic.portal.offermanager.components.offer.create.SelectItemsView (#599)

  • Customers can now be updated in the selection step of creating a new offer (#611)

  • Experimental design description is now added to the detailed project description during offer creation. (#623)

  • Improve display of product descriptions during product modification (#631)

  • Adapt dynamically generated offer PDF layout to match html template (#613)

  • Limit grid size for offer item overviews while creating an offer (#646)

Fixed

  • User ID of a person is set in database during person creation/update (#616)

  • Layout of total price row in price summary of offer pdf stays inline (#615)

  • Deprecated project identifier format assumption leads to failing parsing (#617)

  • Restructured DependencyManager (#624) fixing (#612)

  • Fix sorting by product id for the offer creation process (#599)

  • Disable empty selection for address addition combobox (#565)

  • Fix validation error being shown after an affiliation is added to a person (#566)

  • Disable ‘Archive Product’ button after deselection (#547)

  • Fix project information showing a validation error upon successful offer creation (#633)

  • Fix Copy Product button being enabled even though the information was not changed (#568)

  • Fix the misplaced product description panel (#640)

Dependencies

Deprecated

1.0.0-rc.1 (2021-04-25)

Added

  • Introduce filterable Project Manager column to offer overview (#576)

  • Adds ability to filter by project identifiers in the offer overview (#591)

  • Displays a total price overview on the first offer page, including taxes, net cost and total cost (#559)

  • Include overhead cost in total price overview on the first offer page (#593)

  • Add a column filter option which takes a predicate as argument (#589)

  • Enable Github workflow for changelog update checks (#595)

  • Enable sorting products by productId (MaintainProductView) (#574)

  • Adjust agreement text in offer template and move table header below section/product category title in offer html template (#606)

  • Move table header below section/product category title in offer html template (#604)

  • Provide entry point to affiliation creation in CreatePersonView (#601)

Fixed

  • Update and fix broken offer template (#597)

  • Enumeration of product items increases over all productGroups in Offer PDF (#562)

  • Improve test description for external non-academic customers (#605)

  • Tax cost for offers outside of germany is set to 0 (#575)

  • App won’t freeze after creation of multiple projects (#558)

Dependencies

  • life.qbic.data-model-lib:2.5.0 -> 2.7.0 (#606)

  • com.vaadin.vaadin-bom:8.12.3 -> 8.13.0 (#572)

  • org.spockframework.spock-bom:2.0-M4-groovy-3.0 -> 2.0-groovy-3.0 ( #588)

Deprecated

  • Deprecate OfferOverview Constructor to allow for inclusion of ProjectManager (#576)

1.0.0-beta.2 (2021-04-30)

Added

Fixed

  • Duplicate product identifiers are no longer generated (#551) fixes (#546)

  • Rephrased error message for product creation failure (#552)

Dependencies

Deprecated

1.0.0-beta.1 (2021-04-27)

Added

  • Product selection now notifies a user if the provided input is incorrect and disables the button until the given information is valid (#407)

  • Experimental designs can be defined for an offer (#263)

  • New dropdown menu bar (#490)

  • Jump back to maintain view after product creation/update (#481)

  • Search for affiliations is now possible (#533)

  • Add confirmation request for product archiving (#528)

  • Allow offer updated when experimental design has changed (#515)

Fixed

  • Add timeout of 10 second to PDF rendering (#494)

  • Allow resetting the date picker in the offer overview (#486)

  • Naming of the downloaded offer pdf is consistent (#498)

  • Reset the view after an offer has been created (#495)

  • Provide ISO 8601 date format renderer for offer overview table (#299)

  • Provide functionality to remove items from an offer (#516)

  • Adds amount to existing items on the offer (#462)

  • Make filter for service product view work (#523)

  • Add validation for project information input for offer creation/update (#488)

Dependencies

  • Bump Vaadin 8.12.0 -> 8.12.3

Deprecated

1.0.0-alpha.6 (2021-04-13)

Added

  • Filter message in grids is now dependent on column ID (#457)

  • Add link to item table in offer pdf (#469)

Fixed

  • Allow natural sorting of prices by their double value as opposed to their String representation (#458)

  • Update position of country string in affiliation summary during customer creation (#453)

  • Input fields of the CreateProductView are cleared after successful product creation(#454)

  • Shows the same affiliation organisation only once and maps it correctly to the address addition (#448)

  • Fix fail based on double clicking a customer in the SelectCustomerView for in the offer creation process (#452)

  • Make adding a new affiliation more intuitive (#467) (#463)

  • Harmonized Title and label structure across all views (#455)

  • Updating a person removes the old entry also from the customerResourceService and projectManagerResourceService (#456)

  • Make empty address addition explicitly selectable during person creation and update (#474)

  • Replace ‘customer’ with ‘person’ in menu bar for the headings ‘create customer’ and ‘search person’ (#473)

  • Update position of country string in affiliation summary during customer creation (#453)

  • Input fields of the CreateProductView are cleared after successful product creation(#454)

Dependencies

Deprecated

1.0.0-alpha.5 (2021-04-07)

Added

  • Proteomic and Metabolomic Products can now be selected and included in an Offer (#425)

  • Link offers to project now. The life.qbic.business.offers.Offer and life.qbic.portal.offermanager.dataresources.offers have been extended with a new property to associate it with an existing project by its project identifier. (#410).

  • Finalized the life.qbic.business.products.archive.ArchiveProduct and life/qbic/business/products/create/CreateProduct.groovy use cases of the product maintenance and creation feature (#411).

  • After a project has been created from an offer, the offer overview is updated accordingly (#427)

  • Add the UpdatePersonView to separate the Update and Create Person use cases more consequently (#436)

  • Proteomic and Metabolomic Products are now included in the Offer PDF (#420)

Fixed

  • Popup based Notifications are now properly centered in a liferay-environment(#428)

  • Properly refresh the SearchPersonView after Updating a Person (#436)

  • Products that cannot be read from the database are skipped (#444)

Dependencies

Deprecated

1.0.0-alpha.4 (2021-03-16)

Added

  • Introduce subtotals in Offer PDF ProductItem Table(#349)

  • Add logging with throwable cause (#371)

  • Introduce distinction of products in the offer PDF according to the associated service data generation, data analysis and project management (#364)

  • Introduce overheadRatio property to life.qbic.business.offers.Offer used to show the applied overhead markup in the pricing footer of the Offer PDF(#362)

  • Introduce first draft for OpenBis based project space and project creation (#396)

  • Introduce first draft for product maintenance and creation (#392)

Fixed

  • User cannot select other offers from the overview anymore, during the offer details are loaded after a selection. Selection is enabled again after the resource has been loaded. This solves a not yet reported issue that can be observed when dealing with a significant network delay. (#374)

Dependencies

Deprecated

1.0.0-alpha.3 (2021-03-02)

Added

  • Authorization based on user roles. Two new roles have been introduced that represent the organisational roles project manager Role.PROJECT_MANAGER and offer admin Role .OFFER_ADMIN. The administrator will provide access to additional app features, such as the upcoming service product maintenance interface.

  • Introduce Offer retrieval via Fetch Offer Use Case (#344)

Fixed

  • Update the agreement section of the offer (#329)

  • Make the offer controls more intuitive (#341)

  • Update offers without changes is not possible anymore (#222)

  • Rename CreateCustomer and UpdateCustomer classes and methods (#315)

Dependencies

Deprecated

1.0.0-SNAPSHOT (2020-11-09)

  • Create project with QUBE

  • Create project modules infrastructure and domain

  • Possibility to list all affiliations stored in the database

  • Possibility to list all customers and project managers stored in the database

  • Possibility to list all offers stored in the database

  • Create and add a new customer to the database

  • Create and add a new affiliation to the database

  • Create and add a new offer to the database

  • Possibility to list all packages stored in the database

  • Add the option to create a customer while creating an offer

  • Show affiliation details when selecting an affiliation for a customer

  • Possibility to filter for customers in table overview

  • Show overview over all offers in database

  • Possibility to download an offer

  • Possibility to abort customer creation

  • Dynamic cost overview upon offer creation

  • Calculate prices of an offer (VAT, overheads, net price)

  • Create an unique offer id

  • Addressed #124

  • Addressed #234

  • Addressed #246

  • Addressed #260

  • Addressed #269

  • Addressed #270

  • Addressed #271

  • Addressed #275

  • Addressed #282

  • Addressed #295

  • Addressed #309

  • Replace the project description with project objective (#339)

  • Added support to configure the chromium browser executable. An environment variable CHROMIUM_ALIAS has been introduced that can be set to define the chromium executable in the deployment system of the application. Addresses #336

Fixed

  • Fixed (#324) no affiliation preloaded into view upon customer update with (#328)

Dependencies

Deprecated

Contributor Covenant Code of Conduct

Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

Our Standards

Examples of behavior that contributes to creating a positive environment include:

  • Using welcoming and inclusive language

  • Being respectful of differing viewpoints and experiences

  • Gracefully accepting constructive criticism

  • Focusing on what is best for the community

  • Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

  • The use of sexualized language or imagery and unwelcome sexual attention or advances

  • Trolling, insulting/derogatory comments, and personal or political attacks

  • Public or private harassment

  • Publishing others’ private information, such as a physical or electronic address, without explicit permission

  • Other conduct which could reasonably be considered inappropriate in a professional setting

Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.

Attribution

Indices and tables