add DomainSetup-HostingAssets for new BookingItem via created-event #111
@ -146,7 +146,7 @@ public class HsBookingItemController implements HsBookingItemsApi {
|
||||
try {
|
||||
final var bookingItemRealEntity = em.getReference(HsBookingItemRealEntity.class, saveProcessor.getEntity().getUuid());
|
||||
applicationEventPublisher.publishEvent(new BookingItemCreatedAppEvent(
|
||||
this, bookingItemRealEntity, jsonMapper.writeValueAsString(body.getAsset())));
|
||||
this, bookingItemRealEntity, jsonMapper.writeValueAsString(body.getHostingAsset())));
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class DomainSetupHostingAssetFactory extends HostingAssetFactory {
|
||||
final var expectedSubAssetResource = new HsHostingAssetSubInsertResource();
|
||||
expectedSubAssetResource.setType(givenSubAssetResource.getType());
|
||||
if ( !convert.from(givenSubAssetResource).equals(convert.from(expectedSubAssetResource)) ) {
|
||||
throw new ValidationException("sub asset " + givenSubAssetResource.getType() + " is over-specified, in compatibilty mode, only default values allowed");
|
||||
throw new ValidationException("sub asset " + givenSubAssetResource.getType() + " is over-specified, in compatibility mode, only default values allowed");
|
||||
hsh-michaelhoennig marked this conversation as resolved
Outdated
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -62,17 +62,6 @@ components:
|
||||
nullable: false
|
||||
type:
|
||||
$ref: '#/components/schemas/HsBookingItemType'
|
||||
identifier:
|
||||
type: string
|
||||
minLength: 3
|
||||
maxLength: 80
|
||||
nullable: false
|
||||
description: only used as a default value for automatically created hosting assets, not part of the booking item
|
||||
assignedToHostingAssetUuid:
|
||||
type: string
|
||||
format: uuid
|
||||
nullable: false
|
||||
description: only used as a default value for automatically created hosting assets, not part of the booking item
|
||||
caption:
|
||||
hsh-michaelhoennig marked this conversation as resolved
Outdated
|
||||
type: string
|
||||
minLength: 3
|
||||
@ -84,7 +73,7 @@ components:
|
||||
nullable: true
|
||||
resources:
|
||||
$ref: '#/components/schemas/BookingResources'
|
||||
asset:
|
||||
hostingAsset:
|
||||
$ref: '../hs-hosting/hs-hosting-asset-schemas.yaml#/components/schemas/HsHostingAssetAutoInsert'
|
||||
required:
|
||||
- caption
|
||||
|
@ -208,7 +208,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
"SSD": 25,
|
||||
"Traffic": 250
|
||||
},
|
||||
"asset": {
|
||||
"hostingAsset": {
|
||||
"type": "MANAGED_WEBSPACE",
|
||||
"identifier": "fir00"
|
||||
}
|
||||
@ -277,7 +277,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
"domainName": "example.org",
|
||||
"verificationCode": "just-a-fake-verification-code"
|
||||
},
|
||||
"asset": { // FIXME: rename to hostingAsset
|
||||
"hostingAsset": {
|
||||
"identifier": "example.org", // also as default for all subAssets
|
||||
"subHostingAssets": [
|
||||
{
|
||||
@ -367,7 +367,7 @@ class HsBookingItemControllerAcceptanceTest extends ContextBasedTestWithCleanup
|
||||
"domainName": "example.org",
|
||||
"verificationCode": "just-a-fake-verification-code"
|
||||
},
|
||||
"asset": { // FIXME: rename to hostingAsset
|
||||
"hostingAsset": {
|
||||
"identifier": "example.org", // also as default for all subAssets
|
||||
"subHostingAssets": [
|
||||
{
|
||||
|
@ -502,7 +502,7 @@ public abstract class BaseOfficeDataImport extends CsvDataImport {
|
||||
// this happens if a natural person is marked as 'contractual' for itself
|
||||
final var idsToRemove = new HashSet<Integer>();
|
||||
relations.forEach((id, r) -> {
|
||||
if (r.getType() == HsOfficeRelationType.REPRESENTATIVE && r.getHolder() == r.getAnchor()) {
|
||||
if (r.getHolder() == r.getAnchor()) {
|
||||
hsh-michaelhoennig marked this conversation as resolved
Outdated
|
||||
idsToRemove.add(id);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user
i fehlt in compatibility mode