Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
59ed198
Update the scan calls to send maxHashExtractionFileSize, for now hard…
lilstiffy Nov 1, 2025
db3d9fb
Added max hash extraction file size config value
lilstiffy Nov 1, 2025
4fb1bf4
Send actual config value in the requests
lilstiffy Nov 1, 2025
863cfaf
GUI progress, storing settings left :)
lilstiffy Nov 1, 2025
503d5b5
Replace HTTP 422 to 400 in service classes status code handling
lilstiffy Nov 2, 2025
342a554
Unlimited checkbox
lilstiffy Nov 2, 2025
fca5da1
Add safeguard for not allowing /dev & /proc to be set as monitored di…
lilstiffy Nov 2, 2025
8064b72
Bump to 1.1 :)
lilstiffy Nov 2, 2025
34fee1d
Update src/main/java/org/pwss/view/screen/HomeScreen.java
pwgit-create Nov 2, 2025
cbb8316
Update src/main/java/org/pwss/view/screen/HomeScreen.java
pwgit-create Nov 2, 2025
ed4c6ac
Update src/main/java/org/pwss/controller/HomeController.java
pwgit-create Nov 2, 2025
43858eb
Update src/main/java/org/pwss/controller/HomeController.java
pwgit-create Nov 2, 2025
bcfed1a
Update src/main/java/org/pwss/app_settings/ConfigLoader.java
pwgit-create Nov 2, 2025
62e3e05
Spelling error correction
pwgit-create Nov 2, 2025
32c9260
Corrected grammar error no.2
pwgit-create Nov 2, 2025
ad4b994
Updated the Start Script & set log level to INFO
pwgit-create Nov 2, 2025
17e3d8a
Merge pull request #67 from pwssOrg/61-implement-max-file-size-parame…
lilstiffy Nov 2, 2025
0c52dce
Implement password complexity validation when creating user and added…
lilstiffy Nov 3, 2025
477a4d8
Update src/main/java/org/pwss/utils/LoginUtils.java
lilstiffy Nov 3, 2025
989ea50
Update src/main/java/org/pwss/utils/LoginUtils.java
lilstiffy Nov 3, 2025
32755bf
Editable includeSubDirs & active status for a monitored directory
lilstiffy Nov 3, 2025
59d53bf
Fix things that came up from discussion with @pwgit-create
lilstiffy Nov 3, 2025
5d21423
Fix unwanted error message caused when having no active monitored dir…
lilstiffy Nov 3, 2025
57f81ce
✨ Update emojis, add Error Utils class, and improve error dialog
pwgit-create Nov 3, 2025
408947c
Live feed output has been enhanced
pwgit-create Nov 3, 2025
4e219e2
Changes to LoginUtils and new unit tests, WIP welcome message
lilstiffy Nov 4, 2025
a888939
Welcome dialog when creating user reminding of importance of remember…
lilstiffy Nov 4, 2025
c6d5bcc
Fix dynamic frame size depending on if createUser mode or regular mod…
lilstiffy Nov 4, 2025
8005213
Some adjustments, now the height is also licenseKey aware
lilstiffy Nov 4, 2025
09aaf81
Merge pull request #70 from pwssOrg/68-implement-frontend-validation-…
lilstiffy Nov 5, 2025
fc19f69
Update user creation text
lilstiffy Nov 16, 2025
a16651f
Tweak string for update notes
lilstiffy Nov 16, 2025
ffcf071
Fix error dialog issue and update dependencies
pwgit-create Nov 8, 2025
308b851
Bump logback-classic -> 1.5.21
lilstiffy Nov 16, 2025
a9500ba
Refine welcome message for clarity and update note formatting
pwgit-create Nov 17, 2025
e09cdc5
Update Maven repository reference comments in pom.xml
pwgit-create Nov 17, 2025
98d4057
Update Maven repository reference comments in pom.xml nr 2
pwgit-create Nov 17, 2025
132b52a
Merge pull request #72 from pwssOrg/lilstiffy-patch-1.1
pwgit-create Nov 17, 2025
2299bfa
Clean up
pwgit-create Nov 17, 2025
aee252b
Added Java Doc
pwgit-create Nov 17, 2025
bebb98e
MDs that does not exists wont be shown to the enduser
pwgit-create Nov 17, 2025
f3f4754
feat(gui): improve UI/UX and enhance diff workflow
pwgit-create Nov 17, 2025
7a34c08
Update ScanTableModel Status column icon
lilstiffy Nov 17, 2025
4b85b27
Added RingBuffer Data Structure
pwgit-create Nov 17, 2025
41d6dd6
Beginning of diff count label
lilstiffy Nov 17, 2025
db34e13
Merge pull request #75 from pwssOrg/73-improve-update-note-formatting…
pwgit-create Nov 17, 2025
0079bdf
Added endpoint call for diff count
lilstiffy Nov 17, 2025
d5edc68
Set limit to Integer.MAX_VALUE -1
pwgit-create Nov 17, 2025
72d0271
Merge pull request #76 from pwssOrg/add-diff-count
lilstiffy Nov 18, 2025
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
2 changes: 1 addition & 1 deletion app_storage/metadata/metadata.temp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#Wed Oct 15 22:29:09 CEST 2025
#Thu Oct 30 19:28:32 CET 2025
3 changes: 2 additions & 1 deletion options/app.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#Sat Oct 18 15:00:03 CEST 2025
#Sat Nov 01 14:24:19 CET 2025
frontend.licensekey=
frontend.splashscreen=false
frontend.theme=1
scanner.max_hash_extraction_file_size=-1
24 changes: 12 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>org.pwss</groupId>
<artifactId>integrity_hash</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<version>1.1</version>
<description>A GUI application for file integrity checking</description>

<!-- Licenses -->
Expand Down Expand Up @@ -60,25 +60,25 @@
<!-- Project dependencies -->
<dependencies>
<!-- Jackson Databind dependency for JSON processing -->
<!--https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.20.0-->
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind/2.20.1 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.20.0</version>
<version>2.20.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.20</version>
<version>1.5.21</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>6.0.0</version>
<version>6.0.1</version>
<scope>test</scope>
</dependency>

Expand All @@ -90,11 +90,11 @@
</dependency>

<!-- FlatLaf dependency for modern UI look and feel -->
<!--https://mvnrepository.com/artifact/com.formdev/flatlaf/3.6.1-->
<!-- https://mvnrepository.com/artifact/com.formdev/flatlaf -->
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
<version>3.6.1</version>
<version>3.6.2</version>
</dependency>
</dependencies>

Expand All @@ -103,21 +103,21 @@
<plugins>
<!-- Plugin to execute Java classes from Maven -->
<plugin>
<!--https://mvnrepository.com/artifact/org.codehaus.mojo/exec-maven-plugin/3.5.1-->
<!-- https://mvnrepository.com/artifact/org.codehaus.mojo/exec-maven-plugin -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.1</version> <!-- Use the latest version -->
<version>3.6.2</version>
<configuration>
<mainClass>${project.mainClass}</mainClass>
</configuration>
</plugin>

<!-- Plugin to configure Java compiler settings -->
<plugin>
<!--https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin/3.14.0-->
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin/3.14.1 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<version>3.14.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
Expand All @@ -126,7 +126,7 @@

<!-- Plugin to create a JAR with dependencies -->
<plugin>
<!--https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-assembly-plugin/3.7.1-->
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-assembly-plugin/3.7.1 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/pwss/FileIntegrityScannerFrontend.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.pwss.navigation.NavigationEvents;
import org.pwss.navigation.NavigationHandler;
import org.pwss.navigation.Screen;
import org.pwss.utils.OSUtils;
import org.pwss.util.OSUtil;
import org.pwss.view.screen.splash_screen.FileIntegrityScannerSplashScreen;
import org.slf4j.LoggerFactory;

Expand All @@ -40,7 +40,7 @@ class FileIntegrityScannerFrontend {
final static void StartApplication() throws FailedToLaunchAppException {
final org.slf4j.Logger log = LoggerFactory.getLogger(FileIntegrityScannerFrontend.class);
log.debug("Starting File-Integrity Scanner Frontend Application");
log.debug("OS Name: {}", OSUtils.getOSName());
log.debug("OS Name: {}", OSUtil.getOSName());
try {
if (AppConfig.USE_SPLASH_SCREEN) {
FileIntegrityScannerSplashScreen.showSplash();
Expand Down
19 changes: 19 additions & 0 deletions src/main/java/org/pwss/app_settings/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public final class AppConfig {
* when the class is initialized.
*/
public final static String LICENSE_KEY;
/**
* Maximum file size (in bytes) for hash extraction. This value is loaded from
* the configuration file
* when the class is initialized.
*/
public final static long MAX_HASH_EXTRACTION_FILE_SIZE;

/**
* ConfigLoader instance used to load and manage configuration values.
Expand All @@ -41,6 +47,7 @@ public final class AppConfig {
USE_SPLASH_SCREEN = configLoader.isUseSplashScreen();
APP_THEME = configLoader.getAppTheme();
LICENSE_KEY = configLoader.getLicenseKey();
MAX_HASH_EXTRACTION_FILE_SIZE = configLoader.getHashExtractionMaxFileSizeValue();
}

/**
Expand Down Expand Up @@ -80,4 +87,16 @@ public static final boolean setLicenseKey(String licenseKey) {
return configLoader.setLicenseKey(licenseKey);
}

/**
* Sets the maximum file size for hash extraction in the configuration file.
* This change will take effect only after
* the frontend application is restarted.
*
* @param maxFileSize The value to set for the maximum file size (in bytes)
* @return true if setting was successful, otherwise false
*/
public static final boolean setMaxHashExtractionFileSize(long maxFileSize) {
return configLoader.setMaxHashExtractionFileSize(String.valueOf(maxFileSize));
}

}
77 changes: 76 additions & 1 deletion src/main/java/org/pwss/app_settings/ConfigLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ final class ConfigLoader {
* Key in the properties file for license key setting.
*/
private final String LICENSE_KEY = "frontend.licensekey";
/**
* Key in the properties file for maximum hash extraction file size setting.
*/
private final String MAX_HASH_EXTRACTION_FILE_SIZE_KEY = "scanner.max_hash_extraction_file_size";

/**
* Path to the configuration file.
Expand All @@ -52,6 +56,10 @@ final class ConfigLoader {
* License key for the application.
*/
private final String licenseKey;
/**
* Maximum hash extraction file size.
*/
private final long maxHashExtractionFileSize;

/**
* Constructor that loads configuration settings from the properties file and
Expand All @@ -67,10 +75,12 @@ final class ConfigLoader {
this.useSplashScreen = true;
this.appTheme = 1;
this.licenseKey = "none";
this.maxHashExtractionFileSize = -1;
} else {
this.useSplashScreen = getSplashScreenFlagFromConfigString(getSplashScreenProperty());
this.appTheme = getAppThemeValueFromConfigString(getAppThemeProperty());
this.licenseKey = getLicenseKeyProperty();
this.maxHashExtractionFileSize = getMaxHashExtractionFileSizeFromConfigString(getMaxHashExtractionFileSizeProperty());
}

}
Expand All @@ -79,7 +89,7 @@ final class ConfigLoader {
* Parses the splash screen flag from a configuration string.
*
* @param configFileString The configuration string to be parsed
* @return falsee if the string is "false" (case insensitive), otherwise true
* @return false if the string is "false" (case insensitive), otherwise true
*/
private final boolean getSplashScreenFlagFromConfigString(String configFileString) {

Expand Down Expand Up @@ -124,6 +134,29 @@ private final int getAppThemeValueFromConfigString(String configFileString) {

}

/**
* Parses the maximum hash extraction file size from a configuration string.
*
* @return The long value of the maximum hash extraction file size, or -1 if
* parsing fails or the value is invalid
*/
private final long getMaxHashExtractionFileSizeFromConfigString(String configFileString) {
try {
long maxHashExtractionFileSizeValue = Long.parseLong(configFileString);

if (maxHashExtractionFileSizeValue >= -1)
return maxHashExtractionFileSizeValue;
else
return -1;
}

catch (Exception exception) {
log.debug("Could not parse max hash extraction file size value from app settings", exception);
log.error("Could not parse max hash extraction file size value from app settings {}", exception.getMessage());
return -1;
}
}

/**
* Loads the configuration properties from the file specified by
* CONFIG_FILE_PATH.
Expand Down Expand Up @@ -200,6 +233,23 @@ private final String getLicenseKeyProperty() {

}

/**
* Retrieves the maximum hash extraction file size property value from the
* properties file.
*
* @return The maximum hash extraction file size property value, or "-1" if an
* error occurs
*/
private final String getMaxHashExtractionFileSizeProperty() {
try {
return properties.getProperty(MAX_HASH_EXTRACTION_FILE_SIZE_KEY);
} catch (Exception exception) {
log.debug("Max hash extraction file size property could not be fetched", exception);
log.error("Max hash extraction file size property could not be fetched {}", exception.getMessage());
return "-1";
}
}

/**
* Sets the splash screen flag in the properties file.
*
Expand Down Expand Up @@ -260,6 +310,27 @@ final boolean setLicenseKey(String licenseKey) {
}
}

/**
* Sets the maximum hash extraction file size value in the properties file.
*
* @param maxHashExtractionFileSize The value to set for the maximum hash
* extraction file size
* @return true if setting was successful, otherwise false
*/
final boolean setMaxHashExtractionFileSize(String maxHashExtractionFileSize) {

properties.setProperty(MAX_HASH_EXTRACTION_FILE_SIZE_KEY, maxHashExtractionFileSize);

try (FileOutputStream fos = new FileOutputStream(CONFIG_FILE_PATH)) {
properties.store(fos, null);
return true;
} catch (Exception exception) {
log.debug("Max hash extraction file size could not be set in app.config file", exception);
log.error("Max hash extraction file size could not be set in app.config file: {}", exception.getMessage());
return false;
}
}

/**
* Gets the value indicating whether to use splash screen or not.
*
Expand All @@ -286,4 +357,8 @@ final int getAppTheme() {
final String getLicenseKey() {
return licenseKey;
}

final long getHashExtractionMaxFileSizeValue() {
return maxHashExtractionFileSize;
}
}
22 changes: 8 additions & 14 deletions src/main/java/org/pwss/controller/BaseController.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ public abstract class BaseController<Screen extends BaseScreen> {
* Represents the UI component associated with this controller.
*/
protected Screen screen;

/**
* The navigation context for passing data between different parts of the application during navigation.
*/
private NavigationContext context;

/**
* Logger instance for logging purposes.
*/
private final org.slf4j.Logger log;
/**
* Constructs a `BaseController` with the specified view.
* Initializes the view and sets up event listeners.
Expand All @@ -30,12 +32,12 @@ public abstract class BaseController<Screen extends BaseScreen> {
*/
public BaseController(Screen screen) {
this.screen = screen;
this.log = org.slf4j.LoggerFactory.getLogger(BaseController.class);
// Run onCreate lifecycle method
onCreate();
// Initialize event listeners
initListeners();
}

/**
* Retrieves the current navigation context.
*
Expand All @@ -44,7 +46,6 @@ public BaseController(Screen screen) {
protected NavigationContext getContext() {
return context;
}

/**
* Sets the navigation context for the controller.
*
Expand All @@ -53,26 +54,22 @@ protected NavigationContext getContext() {
public void setContext(NavigationContext context) {
this.context = context;
}

/**
* Abstract method to initialize event listeners for the Screen.
* Subclasses must provide an implementation for this method.
*/
abstract void initListeners();

/**
* Abstract method to refresh or update the view.
* Subclasses must provide an implementation for this method.
*/
abstract void refreshView();

/**
* Method to reload or refresh data displayed in the view.
* Subclasses can override this method to provide specific data reloading logic.
* The default implementation does nothing.
*/
public void reloadData() {
// Default implementation does nothing
log.debug("reloadData called for {}", screen.getScreenName());
}

/**
Expand All @@ -83,22 +80,19 @@ public void reloadData() {
public Screen getScreen() {
return screen;
}

/**
* Method called when the view is shown.
* Subclasses can override this method to perform actions when the view becomes visible.
* The default implementation does nothing.
*/
public void onShow() {
// Default implementation does nothing
log.debug("onShow called for {}", screen.getScreenName());
}

/**
* Method called when the view is created.
* Subclasses can override this method to perform actions during the creation of the view.
* The default implementation does nothing.
*/
public void onCreate() {
// Default implementation does nothing
log.debug("onCreate called for {}", screen.getScreenName());
}
}
Loading