use of com.thoughtworks.go.config.merge.MergeEnvironmentConfig in project gocd by gocd.
the class PatchEnvironmentCommand method isValid.
@Override
public boolean isValid(CruiseConfig preprocessedConfig) {
EnvironmentConfig preprocessedEnvironmentConfig = preprocessedConfig.getEnvironments().find(environmentConfig.name());
boolean isValid = validateRemovalOfInvalidEntities();
if (preprocessedEnvironmentConfig instanceof MergeEnvironmentConfig) {
isValid = validateRemovalOfRemoteEntities(preprocessedEnvironmentConfig);
}
return isValid && super.isValid(preprocessedConfig);
}
Aggregations