Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,36 @@ chmod +x google-java-format_linux-x86-64 # just once, use the name of your platf

To format all of your files.

(Note: this command might change slightly! If anything unexpected happens, see if the command in the [GitHub Action workflow](.github/workflows/formatting.yml) has changed first.)

## Transforming `.wsdl` mock files

We need to modify newly downloaded `.wsdl` files to allow them to be tested with a mock server and to make them more readable. We hope to eventually automate this.

**Copy**

Duplicate the updated "illinois" `.wsdl` files in `/src/main/resources/wsdl/test`. Replace "illinois" with "mock" and delete any additional text that the duplication may have added (like "copy" or "(1)").

**Format**

<!-- Discuss: what do we want the indentation to be for attributes? 1 indent or extra indentation? -->

This assumes you're using a dedicated code editor, like VSCode or SublimeText.

* Copy and paste the current code into https://toolboxfy.com/tool/wsdl-beautifier.
* Replace the text of the current file with the result of the beautifier.
* Put attributes on new lines:
* "Find all" with a regular expression: `[^=\s]+:?[^=\s]+="`.
* Select the space before all found items and replace with a new line.
* Some editors may indent correctly. For SublimeText use cmd/ctrl+shift+p, type in "reindent", and choose to "Reindent lines".

Now the changes you need to make will be easier to see.

**Modify values**

* If you're copying the `illinois` files, replace `https://illinois-test.tylertech.cloud` with http://host.docker.internal:8080 (find regex that patterns "illinois-text")
* Remove all `Policy` elements

## Linting the code

We use [Spotbugs](https://spotbugs.readthedocs.io/en/latest/introduction.html#) as a java linter. To find linter errors, run this:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public class TylerClients {
"massachusetts", TylerVersion.v2025_0,
"texas", TylerVersion.v2024_6);

private static final Map<String, TylerVersion> TEST_VERSION_MAP =
Map.of(
"mock", TylerVersion.v2022_1);

private static final Map<String, TylerVersion> PROD_VERSION_MAP =
Map.of(
"illinois", TylerVersion.v2024_6,
Expand Down Expand Up @@ -59,6 +63,12 @@ public static Optional<EfmFirmService> getEfmFirmFactory(String jurisdiction, Ty
* @return
*/
public static String getTylerServerRootUrl(String jurisdiction, TylerEnv envEnum) {
String endpoint = System.getenv("ENDPOINT_ROOT");
if (endpoint != null && !endpoint.trim().isEmpty()) {
log.info("getCodeENdpointRootUrl() will return ENDPOINT_ROOT as a String: ", endpoint);
return endpoint;
}

String env = envEnum.name().toLowerCase();
if (jurisdiction.equalsIgnoreCase("california")) {
return "https://california-efm-" + env + ".tylertech.cloud/";
Expand All @@ -70,14 +80,14 @@ public static String getTylerServerRootUrl(String jurisdiction, TylerEnv envEnum
}

private static Optional<TylerVersion> getVersion(String jurisdiction, TylerEnv tylerEnv) {
if (tylerEnv.equals(TylerEnv.TEST)) {
log.warn("TylerEnv.TEST not supported yet (i.e. we don't call their test server)");
if (tylerEnv.equals(TylerEnv.TEST) && !jurisdiction.equals("mock")) {
log.warn("TylerEnv.TEST not supported for all jurisdictions yet (i.e. we don't call their test server)");
Optional.empty();
}

Map<String, TylerVersion> versionMap =
switch (tylerEnv) {
case TylerEnv.TEST -> Map.of();
case TylerEnv.TEST -> TEST_VERSION_MAP;
case TylerEnv.STAGE -> STAGE_VERSION_MAP;
case TylerEnv.PROD -> PROD_VERSION_MAP;
};
Expand Down
Loading
Loading