use of com.epam.pipeline.entity.dts.DtsRegistry in project cloud-pipeline by epam.
the class DtsRegistryManager method create.
/**
* Creates a new {@link DtsRegistry}.
* @param dtsRegistryVO a {@link DtsRegistryVO} to create
* @return created {@link DtsRegistry}
*/
@Transactional(propagation = Propagation.REQUIRED)
public DtsRegistry create(DtsRegistryVO dtsRegistryVO) {
validateDtsRegistryVO(dtsRegistryVO);
DtsRegistry dtsRegistry = dtsRegistryMapper.toDtsRegistry(dtsRegistryVO);
return dtsRegistryDao.create(dtsRegistry);
}
use of com.epam.pipeline.entity.dts.DtsRegistry in project cloud-pipeline by epam.
the class DtsListingManager method getDtsBaseUrl.
private String getDtsBaseUrl(String path, Long dtsId) {
DtsRegistry registry = dtsRegistryManager.load(dtsId);
Assert.isTrue(registry.getPrefixes().stream().anyMatch(prefix -> path.startsWith(trimTrailingDelimiter(prefix))), String.format("Required path %s does not satisfy DTS registry with id %d", path, dtsId));
return registry.getUrl();
}
use of com.epam.pipeline.entity.dts.DtsRegistry in project cloud-pipeline by epam.
the class DtsRegistryManager method delete.
/**
* Deletes a {@link DtsRegistry} specified by ID. If required {@link DtsRegistry} does not exist an error will be
* thrown.
* @param registryId a {@link DtsRegistry} ID to delete
* @return deleted {@link DtsRegistry}
*/
@Transactional(propagation = Propagation.REQUIRED)
public DtsRegistry delete(Long registryId) {
validateDtsRegistryId(registryId);
DtsRegistry dtsRegistry = loadOrThrow(registryId);
dtsRegistryDao.delete(registryId);
return dtsRegistry;
}
use of com.epam.pipeline.entity.dts.DtsRegistry in project cloud-pipeline by epam.
the class DtsRegistryManager method update.
/**
* Updates a {@link DtsRegistry} specified by ID. If required {@link DtsRegistry} does not exist an error will be
* thrown.
* @param registryId a {@link DtsRegistry} ID to update
* @param dtsRegistryVO a {@link DtsRegistryVO} to update
* @return updated {@link DtsRegistry}
*/
@Transactional(propagation = Propagation.REQUIRED)
public DtsRegistry update(Long registryId, DtsRegistryVO dtsRegistryVO) {
validateDtsRegistryId(registryId);
validateDtsRegistryVO(dtsRegistryVO);
loadOrThrow(registryId);
DtsRegistry dtsRegistry = dtsRegistryMapper.toDtsRegistry(dtsRegistryVO);
dtsRegistry.setId(registryId);
dtsRegistryDao.update(dtsRegistry);
return dtsRegistry;
}
use of com.epam.pipeline.entity.dts.DtsRegistry in project cloud-pipeline by epam.
the class DtsConfigurationProviderImpl method validateEntry.
@Override
public void validateEntry(DtsRunConfigurationEntry entry) {
DtsRegistry dts = dtsRegistryManager.load(entry.getDtsId());
Assert.isTrue(dts.isSchedulable(), messageHelper.getMessage(MessageConstants.ERROR_DTS_NOT_SCHEDULABLE, dts.getName()));
if (entry.getPipelineId() != null) {
pipelineManager.load(entry.getPipelineId());
}
}
Aggregations