private DistributionSetType getDefaultDistributionSetType() { final TenantMetaData tenantMetaData = systemManagement.getTenantMetadata(); return tenantMetaData.getDefaultDsType(); }
private DistributionSetType getCurrentDistributionSetType() { return systemManagement.getTenantMetadata().getDefaultDsType(); } }
private DistributionSetType getDefaultDistributionSetType() { final TenantMetaData tenantMetaData = systemManagement.getTenantMetadata(); return tenantMetaData.getDefaultDsType(); }
private DistributionSetType getCurrentDistributionSetType() { tenantMetaData = systemManagement.getTenantMetadata(); return tenantMetaData.getDefaultDsType(); }
private DistributionSetType getCurrentDistributionSetType() { return systemManagement.getTenantMetadata().getDefaultDsType(); } }
private DistributionSetType getCurrentDistributionSetType() { tenantMetaData = systemManagement.getTenantMetadata(); return tenantMetaData.getDefaultDsType(); }
@Override public ResponseEntity<List<MgmtDistributionSet>> createDistributionSets( @RequestBody final List<MgmtDistributionSetRequestBodyPost> sets) { LOG.debug("creating {} distribution sets", sets.size()); // set default Ds type if ds type is null final String defaultDsKey = systemSecurityContext .runAsSystem(systemManagement.getTenantMetadata().getDefaultDsType()::getKey); sets.stream().filter(ds -> ds.getType() == null).forEach(ds -> ds.setType(defaultDsKey)); final Collection<DistributionSet> createdDSets = distributionSetManagement .create(MgmtDistributionSetMapper.dsFromRequest(sets, entityFactory)); LOG.debug("{} distribution sets created, return status {}", sets.size(), HttpStatus.CREATED); return new ResponseEntity<>(MgmtDistributionSetMapper.toResponseDistributionSets(createdDSets), HttpStatus.CREATED); }
@Override @Transactional @Retryable(include = { ConcurrencyFailureException.class }, maxAttempts = Constants.TX_RT_MAX, backoff = @Backoff(delay = Constants.TX_RT_DELAY)) public DistributionSet create(final DistributionSetCreate c) { final JpaDistributionSetCreate create = (JpaDistributionSetCreate) c; if (create.getType() == null) { create.type(systemManagement.getTenantMetadata().getDefaultDsType().getKey()); } return distributionSetRepository.save(create.build()); }
@Override @Transactional @Retryable(include = { ConcurrencyFailureException.class }, maxAttempts = Constants.TX_RT_MAX, backoff = @Backoff(delay = Constants.TX_RT_DELAY)) public DistributionSet create(final DistributionSetCreate c) { final JpaDistributionSetCreate create = (JpaDistributionSetCreate) c; if (create.getType() == null) { create.type(systemManagement.getTenantMetadata().getDefaultDsType().getKey()); } return distributionSetRepository.save(create.build()); }