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

Add factories #54

Merged
merged 5 commits into from
Apr 20, 2024
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ build/
.DS_Store

### Node modules ###
node_modules/
node_modules/

### Runtime and Output ###
myapp-runtime/
output/
113 changes: 72 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20231013</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down Expand Up @@ -178,21 +173,6 @@
<version>3.2.5</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>org.graphstream</groupId>
<artifactId>gs-core</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.graphstream</groupId>
<artifactId>gs-ui-javafx</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.11.0</version>
</dependency>
<dependency>
<groupId>org.java-websocket</groupId>
<artifactId>Java-WebSocket</artifactId>
Expand Down Expand Up @@ -228,40 +208,91 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.openjfx</groupId>-->
<!-- <artifactId>javafx-maven-plugin</artifactId>-->
<!-- <version>0.0.8</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- &lt;!&ndash; Default configuration for running with: mvn clean javafx:run &ndash;&gt;-->
<!-- <id>default-cli</id>-->
<!-- <configuration>-->
<!-- <mainClass>-->
<!-- org.chainoptim.desktop.MainApplication-->
<!-- </mainClass>-->
<!-- <launcher>app</launcher>-->
<!-- <jlinkZipName>app</jlinkZipName>-->
<!-- <jlinkImageName>app</jlinkImageName>-->
<!-- <noManPages>true</noManPages>-->
<!-- <stripDebug>true</stripDebug>-->
<!-- <noHeaderFiles>true</noHeaderFiles>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- <execution>-->
<!-- &lt;!&ndash; Configuration for packaging with jlink &ndash;&gt;-->
<!-- <id>package-jlink</id>-->
<!-- <phase>package</phase>-->
<!-- <goals>-->
<!-- <goal>jlink</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <mainClass>org.chainoptim.desktop.MainApplication</mainClass>-->
<!-- <launcher>app</launcher>-->
<!-- <jlinkZipName>app</jlinkZipName>-->
<!-- <jlinkImageName>app</jlinkImageName>-->
<!-- <noManPages>true</noManPages>-->
<!-- <stripDebug>true</stripDebug>-->
<!-- <noHeaderFiles>true</noHeaderFiles>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<executions>
<execution>
<!-- Default configuration for running with: mvn clean javafx:run -->
<id>default-cli</id>
<configuration>
<mainClass>
org.chainoptim.desktop.MainApplication
</mainClass>
<launcher>app</launcher>
<jlinkZipName>app</jlinkZipName>
<jlinkImageName>app</jlinkImageName>
<noManPages>true</noManPages>
<stripDebug>true</stripDebug>
<noHeaderFiles>true</noHeaderFiles>
</configuration>
</execution>
</executions>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<mainClass>org.chainoptim.desktop.MainApplication</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<useModulePath>true</useModulePath>
<useModulePath>false</useModulePath>
<includes>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<mainClass>org.chainoptim.desktop.MainApplication</mainClass>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
176 changes: 0 additions & 176 deletions src/main/java/module-info.java

This file was deleted.

4 changes: 4 additions & 0 deletions src/main/java/org/chainoptim/desktop/AppModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.chainoptim.desktop.core.main.service.NavigationService;
import org.chainoptim.desktop.core.main.service.NavigationServiceImpl;
import org.chainoptim.desktop.core.notification.controller.NotificationManager;
import org.chainoptim.desktop.core.notification.model.NotificationUser;
import org.chainoptim.desktop.core.notification.service.NotificationPersistenceService;
import org.chainoptim.desktop.core.notification.service.NotificationPersistenceServiceImpl;
import org.chainoptim.desktop.core.organization.service.CustomRoleService;
Expand Down Expand Up @@ -178,6 +179,9 @@ protected void configure() {
bind(ToastManager.class).to(ToastManagerImpl.class);

// - Caching
bind(new TypeLiteral<CachingService<PaginatedResults<NotificationUser>>>() {})
.to(new TypeLiteral<CachingServiceImpl<PaginatedResults<NotificationUser>>>() {})
.in(Singleton.class);
bind(new TypeLiteral<CachingService<PaginatedResults<Product>>>() {})
.to(new TypeLiteral<CachingServiceImpl<PaginatedResults<Product>>>() {})
.in(Singleton.class);
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/org/chainoptim/desktop/MainApplication.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package org.chainoptim.desktop;

import com.google.inject.Guice;
import com.google.inject.Injector;
import org.chainoptim.desktop.core.main.service.SceneManager;
import org.chainoptim.desktop.core.user.service.AuthenticationServiceImpl;
import org.chainoptim.desktop.core.user.util.TokenManager;
import org.chainoptim.desktop.features.supplier.controller.SupplierOrdersController;
import org.chainoptim.desktop.features.supplier.model.Supplier;
import org.chainoptim.desktop.shared.util.resourceloader.FontLoaderService;

import com.google.inject.Guice;
import com.google.inject.Injector;

import javafx.application.Application;
import javafx.stage.Stage;
import java.io.IOException;
Expand Down Expand Up @@ -44,7 +43,7 @@ public void start(Stage primaryStage) throws IOException {
}

public static void main(String[] args) {
System.setProperty("org.graphstream.ui", "javafx");
System.out.println("Launching ChainOptim Desktop Application");
launch(args);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.chainoptim.desktop.core.notification.service;

import org.chainoptim.desktop.core.notification.model.NotificationUser;
import org.chainoptim.desktop.shared.search.model.PaginatedResults;
import org.chainoptim.desktop.shared.search.model.SearchParams;

import java.util.List;
import java.util.Optional;
Expand All @@ -9,4 +11,6 @@
public interface NotificationPersistenceService {

CompletableFuture<Optional<List<NotificationUser>>> getNotificationsByUserId(String userId);

CompletableFuture<Optional<PaginatedResults<NotificationUser>>> getNotificationsByUserIdAdvanced(String userId, SearchParams searchParams);
}
Loading
Loading