Class SystemService
java.lang.Object
ch.admin.bit.jeap.deploymentlog.domain.SystemService
-
Constructor Summary
ConstructorsConstructorDescriptionSystemService(SystemRepository systemRepository, EnvironmentRepository environmentRepository, DeploymentRepository deploymentRepository, ComponentRepository componentRepository, EnvironmentComponentVersionStateRepository environmentComponentVersionStateRepository, SystemAliasRepository systemAliasRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateAlias(String systemName, String alias) voiddeleteComponent(String systemName, String componentName, String environmentName) getCurrentDeploymentOfComponent(String systemName, String componentName, String environmentName) getCurrentVersionOfComponent(String systemName, String componentName, String environmentName) getPreviousDeploymentOfComponent(String systemName, String componentName, String environmentName, String version) Retrieves the previous deployment of a component in a specific environment, excluding the current version.getPreviousVersionOfComponent(String systemName, String componentName, String environmentName, String version) Retrieves the previous version of a component deployed in a specific environment, excluding the current version.voidmergeSystems(System system, System oldSystem) retrieveComponentByName(String systemName, String componentName) retrieveOrCreateComponent(String systemName, String componentName) retrieveSystemByName(String name) updateSystemName(String oldSystemName, String newSystemName)
-
Constructor Details
-
SystemService
public SystemService(SystemRepository systemRepository, EnvironmentRepository environmentRepository, DeploymentRepository deploymentRepository, ComponentRepository componentRepository, EnvironmentComponentVersionStateRepository environmentComponentVersionStateRepository, SystemAliasRepository systemAliasRepository)
-
-
Method Details
-
deleteComponent
@Transactional public void deleteComponent(String systemName, String componentName, String environmentName) throws SystemNotFoundException, EnvironmentNotFoundException, ComponentNotFoundException -
retrieveSystemByName
- Throws:
SystemNotFoundException
-
retrieveComponentByName
@Transactional public Component retrieveComponentByName(String systemName, String componentName) throws SystemNotFoundException, ComponentNotFoundException -
retrieveEnvironmentByName
- Throws:
EnvironmentNotFoundException
-
getCurrentVersionOfComponent
public Optional<String> getCurrentVersionOfComponent(String systemName, String componentName, String environmentName) throws SystemNotFoundException, ComponentNotFoundException, EnvironmentNotFoundException -
getCurrentDeploymentOfComponent
public Optional<Deployment> getCurrentDeploymentOfComponent(String systemName, String componentName, String environmentName) throws SystemNotFoundException, ComponentNotFoundException, EnvironmentNotFoundException -
getPreviousVersionOfComponent
public Optional<String> getPreviousVersionOfComponent(String systemName, String componentName, String environmentName, String version) throws SystemNotFoundException, ComponentNotFoundException, EnvironmentNotFoundException Retrieves the previous version of a component deployed in a specific environment, excluding the current version.- Parameters:
systemName- The name of the system.componentName- The name of the component.environmentName- The name of the environment.version- The current version of the component.- Returns:
- An Optional containing the previous version of the component, or empty if not found.
- Throws:
SystemNotFoundException- If the system with the given name is not found.ComponentNotFoundException- If the component with the given name is not found.EnvironmentNotFoundException- If the environment with the given name is not found.
-
getPreviousDeploymentOfComponent
public Optional<Deployment> getPreviousDeploymentOfComponent(String systemName, String componentName, String environmentName, String version) throws SystemNotFoundException, ComponentNotFoundException, EnvironmentNotFoundException Retrieves the previous deployment of a component in a specific environment, excluding the current version.- Parameters:
systemName- The name of the system.componentName- The name of the component.environmentName- The name of the environment.version- The version of the component.- Returns:
- An Optional containing the previous deployment, or empty if not found.
- Throws:
SystemNotFoundException- If the system with the given name is not found.ComponentNotFoundException- If the component with the given name is not found.EnvironmentNotFoundException- If the environment with the given name is not found.
-
retrieveOrCreateComponent
-
createAlias
@Transactional public void createAlias(String systemName, String alias) throws SystemNotFoundException, AliasNameAlreadyDefinedException, SystemNameAlreadyDefinedException -
updateSystemName
@Transactional public System updateSystemName(String oldSystemName, String newSystemName) throws SystemNotFoundException, AliasNameAlreadyDefinedException, SystemNameAlreadyDefinedException -
mergeSystems
-