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