-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refresh IG Group file POST addition & messaging improvements (#506)
* Refresh IG POST expanded to include other resources such as group files. Duplicate bundle files during refresh fixed. -x added as possible argument during Refresh IG to show expanded reporting for errors, warnings, and information messages. Bundle Test Cases enhanced with multithreading optimizations. General enhancements to message output for readability. * Tracking POST tasks via IBaseResource as key rather than resourceID to avoid possible duplicate keys * Corrected formatting of cql processing summary. * Code cleanup. * users * Adjusted over to exception handling rather than boolean return for various methods during bundling process, to relay exception messages to uusers * Safeguarding lists against concurrency issues. * Adjusted some Maps in IOUtils to be concurrent safe, clarified POST summary during refresh. * Moved start/end messages for bundle process from igbundleprocessor to abstract class. Finished message won't appear if no resources exist for bundling. * Consistent titling of sections in console (ie [Bundling Measures] * Group file creation bug resolved. * Added Group file verification during Refresh IG test. * Added failed test tracking so we don't have to delete any test files and can cleanly report to measure developers the issues they have with tests. * Moving some hard coded strings to constants * Added failed POST logging so users can retain a log of what files fail post. Added ability to ignore certain tests during refresh. * Sorting all summary lists at end of bundle process. Moved summary message generation to its own method. * applying a timestamp to the httpfail log filename * Sorting the test case refresh summary for readability. * Using SLF4J provider ch.qos.logback.classic.spi.LogbackServiceProvider so that warnings from ca.uhn.fhir.parser.LenientErrorHandler can be supressed during various operations. We already handle the translator error list. * Using logger over System.out --------- Co-authored-by: Evan Chicoine <[email protected]> Co-authored-by: JP <[email protected]>
- Loading branch information
1 parent
d395b04
commit dca1a3d
Showing
61 changed files
with
5,601 additions
and
1,494 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
38 changes: 0 additions & 38 deletions
38
tooling/src/main/java/org/opencds/cqf/tooling/cql/exception/CQLTranslatorException.java
This file was deleted.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
tooling/src/main/java/org/opencds/cqf/tooling/cql/exception/CqlTranslatorException.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,46 @@ | ||
package org.opencds.cqf.tooling.cql.exception; | ||
|
||
import org.cqframework.cql.cql2elm.CqlCompilerException; | ||
|
||
import java.io.Serializable; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Custom exception to pass the list of errors returned by the translator to calling methods. | ||
*/ | ||
public class CqlTranslatorException extends Exception implements Serializable { | ||
private static final long serialVersionUID = 20600L; | ||
|
||
/** | ||
* Using Set to avoid duplicate entries. | ||
*/ | ||
private final transient List<CqlCompilerException> errors = new ArrayList<>(); | ||
|
||
public CqlTranslatorException(Exception e) { | ||
super("CQL Translation Error(s): " + e.getMessage()); | ||
} | ||
|
||
public CqlTranslatorException(List<CqlCompilerException> errors) { | ||
super("CQL Translation Error(s)"); | ||
this.errors.addAll(errors); | ||
} | ||
|
||
public CqlTranslatorException(List<String> errorsInput, CqlCompilerException.ErrorSeverity errorSeverity) { | ||
super("CQL Translation Error(s)"); | ||
for (String error : errorsInput){ | ||
errors.add(new CqlCompilerException(error, errorSeverity)); | ||
} | ||
} | ||
|
||
public CqlTranslatorException(String message) { | ||
super("CQL Translation Error(s): " + message); | ||
} | ||
|
||
public List<CqlCompilerException> getErrors() { | ||
if (errors.isEmpty()) { | ||
errors.add(new CqlCompilerException(this.getMessage())); | ||
} | ||
return errors; | ||
} | ||
} |
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.