Class SystemServiceImpl
java.lang.Object
org.qubership.atp.environments.service.direct.impl.SystemServiceImpl
- All Implemented Interfaces:
IdentifiedService<System>,SystemService
-
Constructor Summary
ConstructorsConstructorDescriptionSystemServiceImpl(SystemRepositoryImpl systemRepository, ConnectionRepositoryImpl connectionRepository, ConnectionService connectionService, SystemCategoriesService systemCategoriesService, DateTimeUtil dateTimeUtil, EnvironmentRepositoryImpl environmentRepository, EncryptorService encryptorService, DecryptorService decryptorService, org.qubership.atp.auth.springbootstarter.ssl.Provider<org.qubership.atp.auth.springbootstarter.entities.UserInfo> userInfoProvider, KafkaService kafkaService, RegexpHandler regexpHandler, JsonPathHandler jsonPathHandler, VersionCheckerFactory versionCheckerFactory, MetricService metricService) TODO Make javadoc documentation for this method. -
Method Summary
Modifier and TypeMethodDescriptioncopy(UUID id, UUID environmentId, String name, String description, UUID systemCategoryId, ParametersGettingVersion parametersGettingVersion, UUID parentSystemId, ServerItf serverItf, Boolean mergeByName, UUID linkToSystemId, UUID externalId, String externalName) create(UUID environmentId, String name, String description, UUID systemCategoryId, ParametersGettingVersion parametersGettingVersion, UUID parentSystemId, ServerItf serverItf, Boolean mergeByName, UUID linkToSystemId, UUID externalId, String externalName) create(UUID systemId, ConnectionDto connection) create(UUID environmentId, CreateSystemDto system) createListFromCloudServer(List<UUID> serviceIds, UUID cloudServerSystemId, UUID environmentId, Class<? extends ExternalCloudClient> clientClass) voidvoiddeleteLinkedServices(UUID parentSystemId, UUID environmentId) voiddeleteSystemsByIds(List<UUID> systemIds, UUID environmentId) booleanexistsById(UUID id) getAll()getBySourceId(UUID sourceId) getCachedVersionBySystem(System system) getConnectionBySystemIdAndConnectionType(UUID systemId, UUID connectionType) getConnections(UUID systemId) getDifference(List<UUID> first, List<UUID> second) Returns list of UUIDs which exist in first list, but absent in second.getLinkedSystemByParentId(UUID systemId) getShortExternalServices(UUID kubernetesServerSystemId, Class<? extends ExternalCloudClient> clientClass) getShortSystem(UUID id) getSystemByNameAndEnvironmentId(String name, UUID environmentId) getSystemsByProjectId(UUID projectId) getSystemsByProjectIdAndCategoryName(UUID projectId, String categoryName) getSystemVersionByTypeCheck(System system) Getting version by system.booleanisSystemNameChanged(SystemDto system) replicate(UUID environmentId, UUID systemId, String name, String description, UUID systemCategoryId, ParametersGettingVersion parametersGettingVersion, UUID parentSystemId, ServerItf serverItf, UUID linkToSystemId, UUID externalId, UUID sourceId, String externalName) saveStatusAndDateOfLastCheck(UUID id, Status status) Save System status and date of last check system status in DB.saveStatusAndDateOfLastCheck(System system, Status status, UUID userId) Save System status and date of last check system status in DB.saveStatusesAndDateOfLastCheck(List<StatusDto> statuses, UUID projectId) Save List of System statuses and date of last check system status in DB.saveVersionAndDateOfLastCheck(System system, String version) Save system version and date of last check system version in DB.shareProcessing(UUID systemId, SharingRequestDto sharingRequestDto) transformSystemVersionToHtml(System system) Get version with HTML-marking.update(UUID id, String name, String description, UUID systemCategoryId, ParametersGettingVersion parametersGettingVersion, UUID parentSystemId, ServerItf serverItf, Boolean mergeByName, UUID linkToSystemId, UUID externalId, String externalName) updateOpenshiftRoute(UUID environmentId) updateOpenshiftRoute(UUID systemId, UUID environmentId) updateParametersGettingVersion(UUID id, ParametersGettingVersion parametersGettingVersion) updateServicesFromCloudServer(UUID cloudServerSystemId, Class<? extends ExternalCloudClient> clientClass) updateUrlRoutes(UUID environmentId, UUID openShiftSystemConnection, List<Connection> openShiftServerConnection) Updating route parameter url openshift project.Update version by environment id.updateVersionBySystem(System system, boolean updateCache) Update version by system.updateVersionBySystemId(UUID id, boolean updateCache) Update version by system id.
-
Constructor Details
-
SystemServiceImpl
@Autowired public SystemServiceImpl(SystemRepositoryImpl systemRepository, ConnectionRepositoryImpl connectionRepository, ConnectionService connectionService, SystemCategoriesService systemCategoriesService, DateTimeUtil dateTimeUtil, EnvironmentRepositoryImpl environmentRepository, EncryptorService encryptorService, DecryptorService decryptorService, org.qubership.atp.auth.springbootstarter.ssl.Provider<org.qubership.atp.auth.springbootstarter.entities.UserInfo> userInfoProvider, KafkaService kafkaService, RegexpHandler regexpHandler, JsonPathHandler jsonPathHandler, VersionCheckerFactory versionCheckerFactory, MetricService metricService) TODO Make javadoc documentation for this method.
-
-
Method Details
-
get
- Specified by:
getin interfaceIdentifiedService<System>
-
existsById
- Specified by:
existsByIdin interfaceIdentifiedService<System>
-
getV2
- Specified by:
getV2in interfaceSystemService
-
getAll
- Specified by:
getAllin interfaceIdentifiedService<System>
-
replicate
@Transactional public System replicate(@Nonnull UUID environmentId, @Nonnull UUID systemId, @Nonnull String name, String description, UUID systemCategoryId, ParametersGettingVersion parametersGettingVersion, UUID parentSystemId, ServerItf serverItf, UUID linkToSystemId, UUID externalId, UUID sourceId, String externalName) - Specified by:
replicatein interfaceSystemService
-
create
@Transactional public System create(UUID environmentId, String name, String description, UUID systemCategoryId, ParametersGettingVersion parametersGettingVersion, UUID parentSystemId, ServerItf serverItf, Boolean mergeByName, UUID linkToSystemId, UUID externalId, String externalName) - Specified by:
createin interfaceSystemService
-
create
- Specified by:
createin interfaceSystemService
-
create
- Specified by:
createin interfaceSystemService
-
copy
@Transactional public System copy(UUID id, UUID environmentId, String name, String description, UUID systemCategoryId, ParametersGettingVersion parametersGettingVersion, UUID parentSystemId, ServerItf serverItf, Boolean mergeByName, UUID linkToSystemId, UUID externalId, String externalName) - Specified by:
copyin interfaceSystemService
-
updateOpenshiftRoute
- Specified by:
updateOpenshiftRoutein interfaceSystemService
-
updateOpenshiftRoute
- Specified by:
updateOpenshiftRoutein interfaceSystemService
-
getCachedVersionById
@Cacheable(value="ATP_ENVIRONMENTS-SYSTEM_VERSION", key="#id", condition="#id!=null") public Object getCachedVersionById(UUID id) - Specified by:
getCachedVersionByIdin interfaceSystemService
-
getCachedVersionBySystem
@Cacheable(value="ATP_ENVIRONMENTS-SYSTEM_VERSION", key="#system.id", condition="#system!=null && #system.id!=null") public System getCachedVersionBySystem(System system) - Specified by:
getCachedVersionBySystemin interfaceSystemService
-
updateUrlRoutes
@Transactional public List<Connection> updateUrlRoutes(UUID environmentId, UUID openShiftSystemConnection, List<Connection> openShiftServerConnection) Updating route parameter url openshift project. -
update
- Specified by:
updatein interfaceSystemService
-
update
@Transactional public System update(UUID id, String name, String description, UUID systemCategoryId, ParametersGettingVersion parametersGettingVersion, UUID parentSystemId, ServerItf serverItf, Boolean mergeByName, UUID linkToSystemId, UUID externalId, String externalName) - Specified by:
updatein interfaceSystemService
-
update
- Specified by:
updatein interfaceSystemService
-
isSystemNameChanged
-
getDifference
Returns list of UUIDs which exist in first list, but absent in second.- Parameters:
first- First list.second- Second list.
-
delete
- Specified by:
deletein interfaceSystemService
-
deleteLinkedServices
- Specified by:
deleteLinkedServicesin interfaceSystemService
-
deleteSystemsByIds
- Specified by:
deleteSystemsByIdsin interfaceSystemService
-
getConnections
- Specified by:
getConnectionsin interfaceSystemService
-
getConnectionBySystemIdAndConnectionType
- Specified by:
getConnectionBySystemIdAndConnectionTypein interfaceSystemService
-
saveStatusAndDateOfLastCheck
Save System status and date of last check system status in DB.- Specified by:
saveStatusAndDateOfLastCheckin interfaceSystemService- Parameters:
id- System id.status- System status.- Returns:
System
-
saveStatusAndDateOfLastCheck
@Transactional public System saveStatusAndDateOfLastCheck(System system, Status status, UUID userId) Save System status and date of last check system status in DB.- Parameters:
system- System.status- System status.- Returns:
System
-
saveStatusesAndDateOfLastCheck
Save List of System statuses and date of last check system status in DB.- Specified by:
saveStatusesAndDateOfLastCheckin interfaceSystemService- Parameters:
statuses- System statuses.- Returns:
- list of
System
-
saveVersionAndDateOfLastCheck
@Transactional @CachePut(value="ATP_ENVIRONMENTS-SYSTEM_VERSION", key="#system.id", condition="#system.id!=null") public System saveVersionAndDateOfLastCheck(System system, String version) Save system version and date of last check system version in DB.- Specified by:
saveVersionAndDateOfLastCheckin interfaceSystemService- Parameters:
system- System where version should updated.version- System version.- Returns:
System
-
getSystemVersionByTypeCheck
Getting version by system.- Parameters:
system- System where version should updated.- Returns:
- String version
-
updateVersionBySystemId
Update version by system id.- Specified by:
updateVersionBySystemIdin interfaceSystemService- Parameters:
id- System id.updateCache- flag for update system on version-cache- Returns:
- System
-
updateVersionBySystem
Update version by system.- Parameters:
system- System .updateCache- flag for update system on version-cache- Returns:
- System
-
transformSystemVersionToHtml
Get version with HTML-marking.- Specified by:
transformSystemVersionToHtmlin interfaceSystemService- Parameters:
system- System for transformating.- Returns:
- String
-
updateVersionByEnvironmentId
@CacheEvict(value="ATP_ENVIRONMENTS-SYSTEMS_BY_ENVIRONMENT_ID", key="#id", condition="#id!=null") public List<System> updateVersionByEnvironmentId(UUID id) Update version by environment id.- Specified by:
updateVersionByEnvironmentIdin interfaceSystemService- Parameters:
id- Environment id.- Returns:
- List Systems
-
getByIds
- Specified by:
getByIdsin interfaceSystemService
-
createListFromCloudServer
public List<System> createListFromCloudServer(List<UUID> serviceIds, UUID cloudServerSystemId, UUID environmentId, Class<? extends ExternalCloudClient> clientClass) - Specified by:
createListFromCloudServerin interfaceSystemService
-
updateServicesFromCloudServer
public List<System> updateServicesFromCloudServer(UUID cloudServerSystemId, Class<? extends ExternalCloudClient> clientClass) - Specified by:
updateServicesFromCloudServerin interfaceSystemService
-
getShortExternalServices
public List<ShortExternalService> getShortExternalServices(UUID kubernetesServerSystemId, Class<? extends ExternalCloudClient> clientClass) - Specified by:
getShortExternalServicesin interfaceSystemService
-
updateParametersGettingVersion
@Transactional public System updateParametersGettingVersion(UUID id, ParametersGettingVersion parametersGettingVersion) - Specified by:
updateParametersGettingVersionin interfaceSystemService
-
getLinkedSystemByParentId
- Specified by:
getLinkedSystemByParentIdin interfaceSystemService
-
getBySourceId
- Specified by:
getBySourceIdin interfaceSystemService
-
getSystemsByProjectId
- Specified by:
getSystemsByProjectIdin interfaceSystemService
-
getSystemsByProjectIdAndCategoryName
- Specified by:
getSystemsByProjectIdAndCategoryNamein interfaceSystemService
-
getShortSystem
- Specified by:
getShortSystemin interfaceSystemService
-
getSystemByNameAndEnvironmentId
- Specified by:
getSystemByNameAndEnvironmentIdin interfaceSystemService
-