-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13612ca
commit cb2df49
Showing
7 changed files
with
130 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...rc/main/java/bio/terra/workspace/amalgam/landingzone/azure/LandingZoneServiceFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package bio.terra.workspace.amalgam.landingzone.azure; | ||
|
||
import bio.terra.landingzone.service.landingzone.azure.LandingZoneService; | ||
import bio.terra.workspace.app.configuration.external.FeatureConfiguration; | ||
import io.opentelemetry.api.OpenTelemetry; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class LandingZoneServiceFactory { | ||
|
||
private final LandingZoneService amalgamatedLandingZoneService; | ||
private FeatureConfiguration configuration; | ||
private final OpenTelemetry openTelemetry; | ||
|
||
@Autowired | ||
public LandingZoneServiceFactory( | ||
FeatureConfiguration configuration, | ||
OpenTelemetry openTelemetry, | ||
LandingZoneService landingZoneService) { | ||
this.configuration = configuration; | ||
this.openTelemetry = openTelemetry; | ||
this.amalgamatedLandingZoneService = landingZoneService; | ||
} | ||
|
||
public WorkspaceLandingZoneService getLandingZoneService() { | ||
if (this.configuration.isLzsEnabled()) { | ||
return new HttpLandingZoneService(openTelemetry); | ||
} else { | ||
return new AmalgamatedLandingZoneService(amalgamatedLandingZoneService); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.