Skip to content

Commit 78fabd9

Browse files
committed
cleanup p2
1 parent 87847c7 commit 78fabd9

File tree

7 files changed

+31
-31
lines changed

7 files changed

+31
-31
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,20 @@ It was chosen to use embedded PG instead of H2 for unit tests since H2 doesn't s
9494

9595
To start the application locally, the following quick steps (all commands are executed from repository root directory)
9696

97-
1. Ensure that you have the following tools installed: Java 1.8, maven (check via `mvn -v`), docker-ce (check via `docker -v`), psql command line client
97+
1. Ensure that you have the following tools installed: Java 1.8, maven (check via `mvn -v`), docker-ce (check via `docker -v`), psql command line client
9898
(check via psql --version) or other tool that allows to connect to postgres DB.
9999
2. Run `mvn clean install` and make sure it completes successfully, resolve dependency issues if any.
100100
3. Create a new database in docker: `docker create --name postgres-webapi -p 8432:5432 -e POSTGRES_PASSWORD=ohdsi postgres:15.0-alpine`.
101101
4. Start DB container: `docker start postgres-webapi`.
102102
Verify that you can connect via psql console (`PGPASSWORD='ohdsi' psql -d postgresql://localhost:8432/?user=postgres`).
103-
5. If your default java version is too high (e.g. 17), set JAVA_HOME to point to 1.8 installaction, for example `export JAVA_HOME=/usr/lib/jvm/zulu8-ca-amd64`
103+
5. If your default java version is too high (e.g. 17), set JAVA_HOME to point to 1.8 installaction, for example `export JAVA_HOME=/usr/lib/jvm/zulu8-ca-amd64`
104104
6. Start WebAPI `mvn clean install spring-boot:run -Dmaven.test.skip=true -P webapi-postgresql -s src/dev/settings.xml -f pom.xml`
105105
7. Log in with the username of your liking
106106
8. Grant this newly created user admin privileges by running the following sql `INSERT INTO sec_user_role (user_id, role_id, origin) VALUES (1000, 2, 'SYSTEM');`
107107
and log in again.
108108

109-
At this point you have the application running and admin account operational. To actually use it, additional steps are required to set up privileges
110-
and at least one CDM database. They are covered in the respective documentation sections.
111-
109+
At this point you have the application running and admin account operational. To actually use it, additional steps are required to set up privileges
110+
and at least one CDM database. They are covered in the respective documentation sections.
111+
112112
## License
113113
OHDSI WebAPI is licensed under Apache License 2.0

src/main/java/org/ohdsi/webapi/trexsql/TrexsqlConfig.java renamed to src/main/java/org/ohdsi/webapi/trexsql/TrexSQLConfig.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
*/
1313
@Configuration
1414
@ConfigurationProperties(prefix = "trexsql")
15-
public class TrexsqlConfig {
15+
public class TrexSQLConfig {
1616

1717
private boolean enabled = false;
1818
private String cachePath = "./data/cache";
1919
private String extensionsPath;
20-
private Map<String, TrexsqlSourceConfig> sources = new HashMap<>();
20+
private Map<String, TrexSQLSourceConfig> sources = new HashMap<>();
2121

2222
public boolean isEnabled() {
2323
return enabled;
@@ -43,23 +43,23 @@ public void setExtensionsPath(String extensionsPath) {
4343
this.extensionsPath = extensionsPath;
4444
}
4545

46-
public Map<String, TrexsqlSourceConfig> getSources() {
46+
public Map<String, TrexSQLSourceConfig> getSources() {
4747
return sources;
4848
}
4949

50-
public void setSources(Map<String, TrexsqlSourceConfig> sources) {
50+
public void setSources(Map<String, TrexSQLSourceConfig> sources) {
5151
this.sources = sources;
5252
}
5353

54-
public TrexsqlSourceConfig getSourceConfig(String sourceKey) {
54+
public TrexSQLSourceConfig getSourceConfig(String sourceKey) {
5555
return sources.get(sourceKey);
5656
}
5757

5858
public boolean isEnabledForSource(String sourceKey) {
5959
if (!enabled) {
6060
return false;
6161
}
62-
TrexsqlSourceConfig sourceConfig = sources.get(sourceKey);
62+
TrexSQLSourceConfig sourceConfig = sources.get(sourceKey);
6363
return sourceConfig != null && sourceConfig.isEnabled();
6464
}
6565
}

src/main/java/org/ohdsi/webapi/trexsql/TrexsqlInstanceManager.java renamed to src/main/java/org/ohdsi/webapi/trexsql/TrexSQLInstanceManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
*/
1818
@Component
1919
@ConditionalOnProperty(name = "trexsql.enabled", havingValue = "true", matchIfMissing = false)
20-
public class TrexsqlInstanceManager {
20+
public class TrexSQLInstanceManager {
2121

22-
private static final Logger log = LoggerFactory.getLogger(TrexsqlInstanceManager.class);
22+
private static final Logger log = LoggerFactory.getLogger(TrexSQLInstanceManager.class);
2323

24-
private final TrexsqlConfig config;
24+
private final TrexSQLConfig config;
2525
private volatile Object trexsqlDb = null;
2626
private final ReentrantLock initLock = new ReentrantLock();
2727

28-
public TrexsqlInstanceManager(TrexsqlConfig config) {
28+
public TrexSQLInstanceManager(TrexSQLConfig config) {
2929
this.config = config;
3030
}
3131

src/main/java/org/ohdsi/webapi/trexsql/TrexsqlSearchProvider.java renamed to src/main/java/org/ohdsi/webapi/trexsql/TrexSQLSearchProvider.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
*/
1919
@Component
2020
@ConditionalOnProperty(name = "trexsql.enabled", havingValue = "true", matchIfMissing = false)
21-
public class TrexsqlSearchProvider implements SearchProvider {
21+
public class TrexSQLSearchProvider implements SearchProvider {
2222

23-
private static final Logger log = LoggerFactory.getLogger(TrexsqlSearchProvider.class);
23+
private static final Logger log = LoggerFactory.getLogger(TrexSQLSearchProvider.class);
2424

2525
private static final int TREXSQL_PRIORITY = 1;
2626

27-
private final TrexsqlService trexsqlService;
28-
private final TrexsqlConfig config;
27+
private final TrexSQLService trexsqlService;
28+
private final TrexSQLConfig config;
2929

30-
public TrexsqlSearchProvider(TrexsqlService trexsqlService, TrexsqlConfig config) {
30+
public TrexSQLSearchProvider(TrexSQLService trexsqlService, TrexSQLConfig config) {
3131
this.trexsqlService = trexsqlService;
3232
this.config = config;
3333
}

src/main/java/org/ohdsi/webapi/trexsql/TrexsqlService.java renamed to src/main/java/org/ohdsi/webapi/trexsql/TrexSQLService.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
*/
1717
@Service
1818
@ConditionalOnProperty(name = "trexsql.enabled", havingValue = "true", matchIfMissing = false)
19-
public class TrexsqlService {
19+
public class TrexSQLService {
2020

21-
private static final Logger log = LoggerFactory.getLogger(TrexsqlService.class);
21+
private static final Logger log = LoggerFactory.getLogger(TrexSQLService.class);
2222

23-
private final TrexsqlConfig config;
24-
private final TrexsqlInstanceManager instanceManager;
23+
private final TrexSQLConfig config;
24+
private final TrexSQLInstanceManager instanceManager;
2525

26-
public TrexsqlService(TrexsqlConfig config, TrexsqlInstanceManager instanceManager) {
26+
public TrexSQLService(TrexSQLConfig config, TrexSQLInstanceManager instanceManager) {
2727
this.config = config;
2828
this.instanceManager = instanceManager;
2929
}
@@ -33,7 +33,7 @@ public boolean isEnabledForSource(String sourceKey) {
3333
}
3434

3535
public boolean isCacheAvailable(String sourceKey) {
36-
TrexsqlSourceConfig sourceConfig = config.getSourceConfig(sourceKey);
36+
TrexSQLSourceConfig sourceConfig = config.getSourceConfig(sourceKey);
3737
if (sourceConfig == null) {
3838
return false;
3939
}
@@ -45,7 +45,7 @@ public boolean isCacheAvailable(String sourceKey) {
4545
public List<Map<String, Object>> searchVocab(String sourceKey, String searchTerm, int maxRows) {
4646
log.debug("Searching vocabulary for source {} with term: {}", sourceKey, searchTerm);
4747

48-
TrexsqlSourceConfig sourceConfig = config.getSourceConfig(sourceKey);
48+
TrexSQLSourceConfig sourceConfig = config.getSourceConfig(sourceKey);
4949
String databaseCode = sourceConfig.getDatabaseCode();
5050

5151
Map<String, Object> options = new HashMap<>();

src/main/java/org/ohdsi/webapi/trexsql/TrexServletConfig.java renamed to src/main/java/org/ohdsi/webapi/trexsql/TrexSQLServletConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010

1111
@Configuration
1212
@ConditionalOnProperty(name = "trexsql.enabled", havingValue = "true")
13-
public class TrexServletConfig {
13+
public class TrexSQLServletConfig {
1414

1515
@Bean
16-
public ServletRegistrationBean<HttpServlet> trexServlet(
17-
TrexsqlInstanceManager instanceManager,
16+
public ServletRegistrationBean<HttpServlet> trexServlet(
17+
TrexSQLInstanceManager instanceManager,
1818
SourceRepository sourceRepository) {
1919

2020
TrexServlet servlet = new TrexServlet();

src/main/java/org/ohdsi/webapi/trexsql/TrexsqlSourceConfig.java renamed to src/main/java/org/ohdsi/webapi/trexsql/TrexSQLSourceConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Per-source configuration for trexsql integration.
55
* Maps to trexsql.sources.{sourceKey} in application properties.
66
*/
7-
public class TrexsqlSourceConfig {
7+
public class TrexSQLSourceConfig {
88

99
private boolean enabled = false;
1010
private String databaseCode;

0 commit comments

Comments
 (0)