Skip to content

Commit 720ab63

Browse files
Add external service product (#262)
* Provide External Service product class Co-authored-by: jnnfr <jennifer.boedker@qbic.uni-tuebingen.de>
1 parent d8ca8af commit 720ab63

File tree

5 files changed

+41
-4
lines changed

5 files changed

+41
-4
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ This project adheres to `Semantic Versioning <https://semver.org/>`_.
99

1010
**Added**
1111

12+
* Added new product type ``life.qbic.datamodel.dtos.business.services.ExternalServiceProduct`` (#262)
13+
* Added new ``Facility`` enum ``CEGAT`` in ``life.qbic.datamodel.dtos.business.facilities.Facility`` (#262)
14+
* Added new product type ``EXTERNAL_SERVICE`` for ``life.qbic.datamodel.dtos.business.ProductCategory`` (#262)
15+
1216
**Fixed**
1317

1418
**Dependencies**

src/main/groovy/life/qbic/datamodel/dtos/business/ProductCategory.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ enum ProductCategory {
1515
SECONDARY_BIOINFO("Secondary Bioinformatics"),
1616
DATA_STORAGE("Data Storage"),
1717
PROTEOMIC("Proteomics"),
18-
METABOLOMIC("Metabolomics")
18+
METABOLOMIC("Metabolomics"),
19+
EXTERNAL_SERVICE("External Service")
1920

2021
/**
2122
* Value describing the enum type with a string

src/main/groovy/life/qbic/datamodel/dtos/business/facilities/Facility.groovy

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ package life.qbic.datamodel.dtos.business.facilities
1010
* <li>IMGAG: Institute for Medical Genetics and Applied Genomics</li>
1111
* <li>MGM: Institute for Medical Microbiology and Hygiene</li>
1212
* <li>QBIC: Quantitative Biology Center</li>
13-
* <li>PCT: Proteome Center Tübingen</li>
13+
* <li>CFMB_PCT: Proteomics Facility Tübingen</li>
14+
* <li>CEGAT: CeGaT GmbH</li>
1415
* </ul>
1516
*
1617
* @since 2.11.0
@@ -21,7 +22,8 @@ enum Facility {
2122
IMGAG("Institute for Medical Genetics and Applied Genomics", "IMGAG"),
2223
MGM("Institute for Medical Microbiology and Hygiene", "MGM"),
2324
QBIC("Quantitative Biology Center", "QBIC"),
24-
CFMB_PCT("Proteomics Facility Tübingen", "Proteomics Facility")
25+
CFMB_PCT("Proteomics Facility Tübingen", "Proteomics Facility"),
26+
CEGAT("CeGaT GmbH", "CeGaT GmbH")
2527

2628
private final String fullName
2729
private final String label
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package life.qbic.datamodel.dtos.business.services
2+
3+
import groovy.transform.EqualsAndHashCode
4+
import life.qbic.datamodel.dtos.business.ProductId
5+
import life.qbic.datamodel.dtos.business.facilities.Facility
6+
7+
/**
8+
* <p>External service product</p>
9+
*
10+
* <p>Represents a service product that is offered through QBiC by an external partner.</p>
11+
*
12+
* @since 2.13.0
13+
*/
14+
@EqualsAndHashCode(callSuper = true)
15+
class ExternalServiceProduct extends PartialProduct {
16+
/**
17+
* Creates an instance of an {@link ExternalServiceProduct}.
18+
* @param name The name of the product
19+
* @param description A product description
20+
* @param internalUnitPrice The net internal unit price of the product
21+
* @param externalUnitPrice The net external unit price of the product
22+
* @param unit The unit of the product
23+
* @param productId A product id, uniquely identifying the product in the offer environment
24+
* @param serviceProvider The service provider
25+
*/
26+
ExternalServiceProduct(String name, String description, double internalUnitPrice, double externalUnitPrice, ProductUnit unit, long runningNumber, Facility serviceProvider) {
27+
super(name, description, internalUnitPrice, externalUnitPrice, unit, new ProductId.Builder(ProductType.EXTERNAL_SERVICE.toString(), runningNumber).build(), serviceProvider)
28+
}
29+
}

src/main/groovy/life/qbic/datamodel/dtos/business/services/ProductType.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ enum ProductType {
1515
SECONDARY_BIOINFO("SB"),
1616
DATA_STORAGE("DS"),
1717
PROTEOMIC("PR"),
18-
METABOLOMIC("ME")
18+
METABOLOMIC("ME"),
19+
EXTERNAL_SERVICE("EXT")
1920

2021
/**
2122
Holds the String value of the enum

0 commit comments

Comments
 (0)