Class EnvironmentService
java.lang.Object
fr.enedis.chutney.environment.domain.EnvironmentService
-
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentService(EnvironmentRepository environmentRepository) EnvironmentService(EnvironmentRepository environmentRepository, List<fr.enedis.chutney.server.core.domain.environment.UpdateEnvironmentHandler> updateEnvironmentHandlers) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddVariable(List<EnvironmentVariable> values) createEnvironment(Environment environment) createEnvironment(Environment environment, boolean force) protected voidcreateOrUpdate(Environment environment) voidcreateOrUpdateVariable(String existingKey, List<EnvironmentVariable> values) voiddeleteEnvironment(String environmentName) voiddeleteTarget(String targetName) voiddeleteTarget(String environmentName, String targetName) voiddeleteVariable(String key) voiddeleteVariable(String key, List<String> envs) getEnvironment(String environmentName) listTargets(TargetFilter filters) voidupdateEnvironment(String environmentName, Environment newVersion) voidupdateTarget(String previousTargetName, Target targetToUpdate)
-
Constructor Details
-
EnvironmentService
public EnvironmentService(EnvironmentRepository environmentRepository, List<fr.enedis.chutney.server.core.domain.environment.UpdateEnvironmentHandler> updateEnvironmentHandlers) -
EnvironmentService
-
-
Method Details
-
listEnvironmentsNames
-
listEnvironments
-
createEnvironment
public Environment createEnvironment(Environment environment) throws InvalidEnvironmentNameException, AlreadyExistingEnvironmentException -
createEnvironment
public Environment createEnvironment(Environment environment, boolean force) throws InvalidEnvironmentNameException, AlreadyExistingEnvironmentException -
getEnvironment
- Throws:
EnvironmentNotFoundException
-
deleteEnvironment
public void deleteEnvironment(String environmentName) throws EnvironmentNotFoundException, CannotDeleteEnvironmentException -
updateEnvironment
public void updateEnvironment(String environmentName, Environment newVersion) throws InvalidEnvironmentNameException, EnvironmentNotFoundException -
defaultEnvironmentName
- Throws:
EnvironmentNotFoundException
-
listTargets
-
listTargetsNames
-
getTarget
-
addTarget
public void addTarget(Target target) throws EnvironmentNotFoundException, AlreadyExistingTargetException -
deleteTarget
public void deleteTarget(String environmentName, String targetName) throws EnvironmentNotFoundException, TargetNotFoundException -
deleteTarget
public void deleteTarget(String targetName) throws EnvironmentNotFoundException, TargetNotFoundException -
updateTarget
public void updateTarget(String previousTargetName, Target targetToUpdate) throws EnvironmentNotFoundException, TargetNotFoundException -
addVariable
public void addVariable(List<EnvironmentVariable> values) throws EnvironmentNotFoundException, VariableAlreadyExistingException -
createOrUpdateVariable
public void createOrUpdateVariable(String existingKey, List<EnvironmentVariable> values) throws EnvironmentNotFoundException, EnvVariableNotFoundException -
deleteVariable
-
deleteVariable
-
createOrUpdate
-