Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Maven plugins #669

Merged
merged 4 commits into from
Oct 7, 2023
Merged
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
24 changes: 14 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
/target
/dicoogle/.classpath
/dicoogle/.settings/*
/sdk-ext/.classpath
/sdk-ext/.settings/*
/sdk/.classpath
/sdk/.project
/sdk/.settings/*
/webcore/lib/
node_modules/
dist
**/webapp/dist
.tmp
.sass-cache/
app/bower_components

#eclipse
.project
.settings/*
dicoogle/.classpath
dicoogle/.settings/*
sdk-ext/.classpath
sdk-ext/.settings/*
sdk/.classpath
sdk/.project
sdk/.settings/*
webcore/lib/
# IDEA
.idea

# Visual Studio Code
.vscode/

*.iml


Expand Down
39 changes: 23 additions & 16 deletions dicoogle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -146,7 +146,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.11.0</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<source>1.8</source>
Expand All @@ -158,7 +158,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.1</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
Expand Down Expand Up @@ -209,16 +209,22 @@
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.4</version>
<version>4.3</version>
<configuration>
<header>../short-license.txt</header>
<includes>
<include>**/*.java</include>
</includes>
<excludes>
<exclude>**/package-info.java</exclude>
</excludes>

<mapping>
<java>JAVADOC_STYLE</java>
</mapping>
<licenseSets>
<licenseSet>
<header>../short-license.txt</header>
<includes>
<include>**/*.java</include>
</includes>
<excludes>
<exclude>**/package-info.java</exclude>
</excludes>
</licenseSet>
</licenseSets>
</configuration>
<executions>
<execution>
Expand All @@ -232,9 +238,10 @@
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.11.0</version>
<version>2.16.0</version>
<configuration>
<encoding>UTF-8</encoding>
<lineEnding>KEEP</lineEnding>
<includes>
<include>**/*.java</include>
</includes>
Expand All @@ -257,7 +264,7 @@
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.12.0</version>
<version>1.14.0</version>
<executions>
<!-- Install Node and NPM -->
<execution>
Expand Down Expand Up @@ -296,8 +303,8 @@

</executions>
<configuration>
<nodeVersion>v14.17.3</nodeVersion>
<npmVersion>6.14.13</npmVersion>
<nodeVersion>v18.17.1</nodeVersion>
<npmVersion>9.6.7</npmVersion>
<installDirectory>target</installDirectory>
<!-- Defining webapp directory -->
<workingDirectory>src/main/resources/webapp</workingDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ public List<String> getDefaultStorage() {
public String getNodeName() {
return LegacyServerSettings.this.getNodeName();
}

@JsonGetter("encrypt-users-file")
@Override
public boolean isEncryptUsersFile() {
Expand Down
135 changes: 41 additions & 94 deletions dicoogle/src/main/java/pt/ua/dicoogle/server/SOPList.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,91 +48,42 @@ public class SOPList {

private Hashtable<String, TransfersStorage> table;

private String[] SOP = {
UID.BasicStudyContentNotificationSOPClassRetired,
UID.StoredPrintStorageSOPClassRetired,
UID.HardcopyGrayscaleImageStorageSOPClassRetired,
UID.HardcopyColorImageStorageSOPClassRetired,
UID.ComputedRadiographyImageStorage,
UID.DigitalXRayImageStorageForPresentation,
UID.DigitalXRayImageStorageForProcessing,
UID.DigitalMammographyXRayImageStorageForPresentation,
UID.DigitalIntraOralXRayImageStorageForPresentation,
UID.DigitalIntraOralXRayImageStorageForProcessing,
UID.StandaloneModalityLUTStorageRetired,
UID.EncapsulatedPDFStorage,
UID.StandaloneVOILUTStorageRetired,
UID.GrayscaleSoftcopyPresentationStateStorageSOPClass,
UID.ColorSoftcopyPresentationStateStorageSOPClass,
UID.PseudoColorSoftcopyPresentationStateStorageSOPClass,
UID.BlendingSoftcopyPresentationStateStorageSOPClass,
UID.XRayAngiographicImageStorage,
UID.EnhancedXAImageStorage,
UID.XRayRadiofluoroscopicImageStorage,
UID.EnhancedXRFImageStorage,
UID.XRayAngiographicBiPlaneImageStorageRetired,
UID.PositronEmissionTomographyImageStorage,
UID.StandalonePETCurveStorageRetired,
UID.CTImageStorage,
UID.EnhancedCTImageStorage,
UID.NuclearMedicineImageStorage,
UID.UltrasoundMultiFrameImageStorageRetired,
UID.UltrasoundMultiFrameImageStorage,
UID.MRImageStorage,
UID.EnhancedMRImageStorage,
UID.MRSpectroscopyStorage,
UID.RTImageStorage,
UID.RTDoseStorage,
UID.RTStructureSetStorage,
UID.RTBeamsTreatmentRecordStorage,
UID.RTPlanStorage,
UID.RTBrachyTreatmentRecordStorage,
UID.RTTreatmentSummaryRecordStorage,
UID.NuclearMedicineImageStorageRetired,
UID.UltrasoundImageStorageRetired,
UID.UltrasoundImageStorage,
UID.RawDataStorage,
UID.SpatialRegistrationStorage,
UID.SpatialFiducialsStorage,
UID.RealWorldValueMappingStorage,
UID.SecondaryCaptureImageStorage,
UID.MultiFrameSingleBitSecondaryCaptureImageStorage,
UID.MultiFrameGrayscaleByteSecondaryCaptureImageStorage,
UID.MultiFrameGrayscaleWordSecondaryCaptureImageStorage,
UID.MultiFrameTrueColorSecondaryCaptureImageStorage,
UID.VLImageStorageTrialRetired,
UID.VLEndoscopicImageStorage,
UID.VideoEndoscopicImageStorage,
UID.VLMicroscopicImageStorage,
UID.VideoMicroscopicImageStorage,
UID.VLSlideCoordinatesMicroscopicImageStorage,
UID.VLPhotographicImageStorage,
UID.VideoPhotographicImageStorage,
UID.OphthalmicPhotography8BitImageStorage,
UID.OphthalmicPhotography16BitImageStorage,
UID.StereometricRelationshipStorage,
UID.VLMultiFrameImageStorageTrialRetired,
UID.StandaloneOverlayStorageRetired,
UID.BasicTextSRStorage,
UID.EnhancedSRStorage,
UID.ComprehensiveSRStorage,
UID.ProcedureLogStorage,
UID.MammographyCADSRStorage,
UID.KeyObjectSelectionDocumentStorage,
UID.ChestCADSRStorage,
UID.StandaloneCurveStorageRetired,
//UID._12leadECGWaveformStorage,
UID.GeneralECGWaveformStorage,
UID.AmbulatoryECGWaveformStorage,
UID.HemodynamicWaveformStorage,
UID.CardiacElectrophysiologyWaveformStorage,
UID.BasicVoiceAudioWaveformStorage,
UID.HangingProtocolStorage,
UID.SiemensCSANonImageStorage,
UID.VLWholeSlideMicroscopyImageStorage,
UID.BreastTomosynthesisImageStorage,
UID.XRayRadiationDoseSRStorage
};
private String[] SOP = {UID.BasicStudyContentNotificationSOPClassRetired, UID.StoredPrintStorageSOPClassRetired,
UID.HardcopyGrayscaleImageStorageSOPClassRetired, UID.HardcopyColorImageStorageSOPClassRetired,
UID.ComputedRadiographyImageStorage, UID.DigitalXRayImageStorageForPresentation,
UID.DigitalXRayImageStorageForProcessing, UID.DigitalMammographyXRayImageStorageForPresentation,
UID.DigitalIntraOralXRayImageStorageForPresentation, UID.DigitalIntraOralXRayImageStorageForProcessing,
UID.StandaloneModalityLUTStorageRetired, UID.EncapsulatedPDFStorage, UID.StandaloneVOILUTStorageRetired,
UID.GrayscaleSoftcopyPresentationStateStorageSOPClass, UID.ColorSoftcopyPresentationStateStorageSOPClass,
UID.PseudoColorSoftcopyPresentationStateStorageSOPClass,
UID.BlendingSoftcopyPresentationStateStorageSOPClass, UID.XRayAngiographicImageStorage,
UID.EnhancedXAImageStorage, UID.XRayRadiofluoroscopicImageStorage, UID.EnhancedXRFImageStorage,
UID.XRayAngiographicBiPlaneImageStorageRetired, UID.PositronEmissionTomographyImageStorage,
UID.StandalonePETCurveStorageRetired, UID.CTImageStorage, UID.EnhancedCTImageStorage,
UID.NuclearMedicineImageStorage, UID.UltrasoundMultiFrameImageStorageRetired,
UID.UltrasoundMultiFrameImageStorage, UID.MRImageStorage, UID.EnhancedMRImageStorage,
UID.MRSpectroscopyStorage, UID.RTImageStorage, UID.RTDoseStorage, UID.RTStructureSetStorage,
UID.RTBeamsTreatmentRecordStorage, UID.RTPlanStorage, UID.RTBrachyTreatmentRecordStorage,
UID.RTTreatmentSummaryRecordStorage, UID.NuclearMedicineImageStorageRetired,
UID.UltrasoundImageStorageRetired, UID.UltrasoundImageStorage, UID.RawDataStorage,
UID.SpatialRegistrationStorage, UID.SpatialFiducialsStorage, UID.RealWorldValueMappingStorage,
UID.SecondaryCaptureImageStorage, UID.MultiFrameSingleBitSecondaryCaptureImageStorage,
UID.MultiFrameGrayscaleByteSecondaryCaptureImageStorage,
UID.MultiFrameGrayscaleWordSecondaryCaptureImageStorage,
UID.MultiFrameTrueColorSecondaryCaptureImageStorage, UID.VLImageStorageTrialRetired,
UID.VLEndoscopicImageStorage, UID.VideoEndoscopicImageStorage, UID.VLMicroscopicImageStorage,
UID.VideoMicroscopicImageStorage, UID.VLSlideCoordinatesMicroscopicImageStorage,
UID.VLPhotographicImageStorage, UID.VideoPhotographicImageStorage,
UID.OphthalmicPhotography8BitImageStorage, UID.OphthalmicPhotography16BitImageStorage,
UID.StereometricRelationshipStorage, UID.VLMultiFrameImageStorageTrialRetired,
UID.StandaloneOverlayStorageRetired, UID.BasicTextSRStorage, UID.EnhancedSRStorage,
UID.ComprehensiveSRStorage, UID.ProcedureLogStorage, UID.MammographyCADSRStorage,
UID.KeyObjectSelectionDocumentStorage, UID.ChestCADSRStorage, UID.StandaloneCurveStorageRetired,
// UID._12leadECGWaveformStorage,
UID.GeneralECGWaveformStorage, UID.AmbulatoryECGWaveformStorage, UID.HemodynamicWaveformStorage,
UID.CardiacElectrophysiologyWaveformStorage, UID.BasicVoiceAudioWaveformStorage, UID.HangingProtocolStorage,
UID.SiemensCSANonImageStorage, UID.VLWholeSlideMicroscopyImageStorage, UID.BreastTomosynthesisImageStorage,
UID.XRayRadiationDoseSRStorage};

public static synchronized SOPList getInstance() {
if (instance == null) {
Expand Down Expand Up @@ -383,10 +334,9 @@ public synchronized void updateList() {
*/
public synchronized void updateList(ServerSettings settings) {
// Get all new SOP classes' UID (not existing in String[] SOP)
Collection<String> newSOPs = settings.getDicomServicesSettings().getAdditionalSOPClasses().stream()
.map(AdditionalSOPClass::getUid)
.filter(newSOPUID -> !Arrays.asList(SOP).contains(newSOPUID))
.collect(Collectors.toList());
Collection<String> newSOPs =
settings.getDicomServicesSettings().getAdditionalSOPClasses().stream().map(AdditionalSOPClass::getUid)
.filter(newSOPUID -> !Arrays.asList(SOP).contains(newSOPUID)).collect(Collectors.toList());
// Refresh hardcoded SOPs (outdated TransfersStorage)
Arrays.asList(SOP).forEach(sop -> table.put(sop, new TransfersStorage()));
// Add "Additional" SOPs to table w/ default transfer syntaxes
Expand Down Expand Up @@ -417,11 +367,8 @@ public synchronized void readFromSettings() {
* and update the archive's SOP list and storage transfer options accordingly.
*/
public synchronized void readFromSettings(ServerSettings settings) {
settings.getDicomServicesSettings()
.getSOPClasses()
.forEach(sopClass -> sopClass.getTransferSyntaxes()
.forEach(ts -> this.updateTSFieldByTsUID(sopClass.getUID(), ts, true))
);
settings.getDicomServicesSettings().getSOPClasses().forEach(sopClass -> sopClass.getTransferSyntaxes()
.forEach(ts -> this.updateTSFieldByTsUID(sopClass.getUID(), ts, true)));
}

/** Save any changes made to the SOP transfer options listings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public String[] getVerboseTS() {
}
return return_value;
}

public static String convertTsNameToUID(String name) {
return namesUidMapping.getKey(name).toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ public class DicoogleDcmSend extends StorageCommitmentService {
/** TransferSyntax: DCM4CHE URI Referenced */
private static final String DCM4CHEE_URI_REFERENCED_TS_UID = "1.2.40.0.13.1.1.2.4.94";

private static final boolean FILE_READ_GUARD = System.getProperty("dicoogle.store.fileReadGuard", "").equalsIgnoreCase("true");
private static final boolean FILE_READ_GUARD =
System.getProperty("dicoogle.store.fileReadGuard", "").equalsIgnoreCase("true");

private Executor executor = new NewThreadExecutor("DCMSND");

Expand Down Expand Up @@ -458,10 +459,8 @@ public void send() {
FileInfo info = files.get(i);
TransferCapability tc = assoc.getTransferCapabilityAsSCU(info.cuid);
if (tc == null) {
LOGGER.warn("{} not supported by {}, skip file {}",
UIDDictionary.getDictionary().prompt(info.cuid),
remoteAE.getAETitle(),
info.item.getURI());
LOGGER.warn("{} not supported by {}, skip file {}", UIDDictionary.getDictionary().prompt(info.cuid),
remoteAE.getAETitle(), info.item.getURI());
continue;
}

Expand All @@ -472,8 +471,7 @@ public void send() {
LOGGER.warn("{} with {} not supported by {}, skip file {}",
UIDDictionary.getDictionary().prompt(info.cuid),
UIDDictionary.getDictionary().prompt(fileref ? DCM4CHEE_URI_REFERENCED_TS_UID : info.tsuid),
remoteAE.getAETitle(),
info.item.getURI());
remoteAE.getAETitle(), info.item.getURI());
continue;
}

Expand Down Expand Up @@ -690,14 +688,12 @@ public void writeTo(PDVOutputStream out, String tsuid) throws IOException {
}

private void promptWarnRSP(String prefix, int status, FileInfo info, DicomObject cmd) {
LOGGER.warn("{} {}H for {}, cuid={}, tsuid={} (Command: {})",
prefix, StringUtils.shortToHex(status),
LOGGER.warn("{} {}H for {}, cuid={}, tsuid={} (Command: {})", prefix, StringUtils.shortToHex(status),
info.item.getURI(), info.cuid, info.tsuid, cmd);
}

private void promptErrRSP(String prefix, int status, FileInfo info, DicomObject cmd) {
LOGGER.error("{} {}H for {}, cuid={}, tsuid={} (Command: {})",
prefix, StringUtils.shortToHex(status),
LOGGER.error("{} {}H for {}, cuid={}, tsuid={} (Command: {})", prefix, StringUtils.shortToHex(status),
info.item.getURI(), info.cuid, info.tsuid, cmd);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public UserFileHandle(Path baseConfDir) throws IOException {
} else if (Files.exists(users)) {
// (2) users, encrypted
logger.warn("File `users` will be interpreted as an encrypted users file. "
+ "If this is correct, please rename to `users.xml.enc`");
+ "If this is correct, please rename to `users.xml.enc`");
filename = users;
shouldEncrypt = true;
} else if (Files.exists(usersXml)) {
Expand All @@ -115,7 +115,7 @@ public UserFileHandle(Path baseConfDir) throws IOException {
if (Files.exists(users)) {
// (4) users, no encryption
logger.warn("File `users` will be interpreted as an plain XML users file. "
+ "If this is correct, please rename to `users.xml`");
+ "If this is correct, please rename to `users.xml`");
filename = users;
shouldEncrypt = false;
} else if (encryptUsersFile) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected void doPut(HttpServletRequest req, HttpServletResponse resp) throws Se
ServerSettingsManager.saveSettings();
ResponseUtil.simpleResponse(resp, "success", true);
}

@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
this.doPut(req, resp);
Expand Down
Loading