-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/limit_tests
- Loading branch information
Showing
14 changed files
with
523 additions
and
30 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
58 changes: 58 additions & 0 deletions
58
dockstore-webservice/src/main/java/io/dockstore/webservice/api/Config.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,58 @@ | ||
package io.dockstore.webservice.api; | ||
|
||
import java.lang.reflect.InvocationTargetException; | ||
|
||
import io.dockstore.webservice.DockstoreWebserviceConfiguration; | ||
import io.swagger.annotations.ApiModel; | ||
import org.apache.commons.beanutils.BeanUtils; | ||
|
||
@ApiModel(description = "Configuration information for UI clients of the Dockstore webservice.") | ||
public final class Config extends DockstoreWebserviceConfiguration.UIConfig { | ||
|
||
/** | ||
* Properties that aren't in UIConfig | ||
*/ | ||
|
||
private String githubClientId; | ||
private String quayIoClientId; | ||
private String bitBucketClientId; | ||
private String gitlabClientId; | ||
private String googleClientId; | ||
|
||
|
||
private Config() { | ||
} | ||
|
||
public static Config fromWebConfig(DockstoreWebserviceConfiguration webConfig) | ||
throws InvocationTargetException, IllegalAccessException { | ||
final Config config = new Config(); | ||
config.githubClientId = webConfig.getGithubClientID(); | ||
config.quayIoClientId = webConfig.getQuayClientID(); | ||
config.bitBucketClientId = webConfig.getBitbucketClientID(); | ||
config.gitlabClientId = webConfig.getGitlabClientID(); | ||
config.googleClientId = webConfig.getGoogleClientID(); | ||
BeanUtils.copyProperties(config, webConfig.getUiConfig()); | ||
return config; | ||
} | ||
|
||
public String getGithubClientId() { | ||
return githubClientId; | ||
} | ||
|
||
public String getQuayIoClientId() { | ||
return quayIoClientId; | ||
} | ||
|
||
public String getBitBucketClientId() { | ||
return bitBucketClientId; | ||
} | ||
|
||
public String getGitlabClientId() { | ||
return gitlabClientId; | ||
} | ||
|
||
public String getGoogleClientId() { | ||
return googleClientId; | ||
} | ||
|
||
} |
Oops, something went wrong.