Skip to content
This repository has been archived by the owner on Feb 15, 2021. It is now read-only.

Platform specific funcs #29

Merged
merged 4 commits into from
May 4, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>easyfxml-native</artifactId>
<groupId>moe.tristan</groupId>
<version>3.1.7-SNAPSHOT</version>
</parent>

<name>EasyFXML - Native integrations - Settings management</name>
<artifactId>easyfxml-settings</artifactId>
<name>EasyFXML - Native integrations - Notifications</name>
<artifactId>easyfxml-notifications</artifactId>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
requires spring.context;
requires spring.core;

requires oshi.core;
requires transitive oshi.core;

requires slf4j.api;

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package moe.tristan.easyfxml.natives.platform;

import java.util.Optional;
import java.util.concurrent.atomic.AtomicReference;

import org.slf4j.Logger;
Expand All @@ -26,16 +27,20 @@
import oshi.SystemInfo;

@Component
public class PlatformService {
public class PlatformDetectionService {

private static final Logger LOGGER = LoggerFactory.getLogger(PlatformService.class);
private static final Logger LOGGER = LoggerFactory.getLogger(PlatformDetectionService.class);

private final AtomicReference<SystemInfo> systemInfo = new AtomicReference<>();

public PlatformEnum getPlatformType() {
return SystemInfo.getCurrentPlatformEnum();
}

public Optional<PlatformEnum> lookupPlatformType() {
return Optional.of(getPlatformType());
}

public SystemInfo getFullSystemInformation() {
return getSystemInfo();
}
Expand Down
10 changes: 0 additions & 10 deletions easyfxml-native/easyfxml-settings/src/main/java/module-info.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion easyfxml-native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<modules>
<module>easyfxml-platform</module>
<module>easyfxml-settings</module>
<module>easyfxml-notifications</module>
</modules>

</project>