public class PlatformHookUnixoid extends java.lang.Object implements PlatformHook
PlatformHook implementation for Unix systems.| Modifier and Type | Class and Description |
|---|---|
private static class |
PlatformHookUnixoid.LinuxReleaseInfo |
PlatformHook.JavaExpirationCallback, PlatformHook.NativeOsCallback| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
osDescription |
CONSTRUCT_FROM_PLATFORM| Constructor and Description |
|---|
PlatformHookUnixoid() |
| Modifier and Type | Method and Description |
|---|---|
private java.lang.String |
buildOSDescription() |
java.lang.String |
getAtkWrapperPackageDetails()
Get the Gnome ATK wrapper package name including detailed version.
|
java.io.File |
getDefaultCacheDirectory()
Returns the platform-dependent default cache directory.
|
java.io.File |
getDefaultPrefDirectory()
Returns the platform-dependent default preferences directory.
|
java.lang.String |
getDefaultStyle()
Returns the default LAF to be used on this platform to look almost as a native application.
|
java.io.File |
getDefaultUserDataDirectory()
Returns the platform-dependent default user data directory.
|
private static java.io.File |
getDotDirectory()
Get the dot directory
~/.josm. |
java.lang.String |
getJavaPackageDetails()
Get the Java package name including detailed version.
|
java.lang.String |
getOSDescription()
Returns a detailed OS description (at least family + version).
|
static java.lang.String |
getPackageDetails(java.lang.String... packageNames)
Get the package name including detailed version.
|
Platform |
getPlatform()
Get the platform corresponding to this platform hook.
|
java.util.Collection<java.lang.String> |
getPossiblePreferenceDirs()
Returns a set of possible platform specific directories where resources could be stored.
|
java.lang.String |
getWebStartPackageDetails()
Get the Web Start package name including detailed version.
|
java.security.cert.X509Certificate |
getX509Certificate(CertificateAmendment.NativeCertAmend certAmend)
Returns the
X509Certificate matching the given certificate amendment information. |
void |
initSystemShortcuts()
The initSystemShortcuts hook will be called by the
Shortcut class after the modifier groups have been read
from the config, but before any shortcuts are read from
it or registered from within the application.
|
static boolean |
isDebianOrUbuntu()
Determines if the distribution is Debian or Ubuntu, or a derivative.
|
void |
openUrl(java.lang.String url)
The openURL hook will be used to open an URL in the
default web browser.
|
void |
preStartupHook()
The preStartupHook will be called extremely early.
|
private static boolean |
useDotDirectory()
Returns true if the dot directory should be used for storing preferences,
cache and user data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitafterPrefStartupHook, canFullscreen, checkExpiredJava, exec, getDefaultProj4NadshiftDirectories, getMenuShortcutKeyMaskEx, getOSBuildNumber, isOpenJDK, rename, resolveFileLink, setNativeOsCallback, startupHookprivate java.lang.String osDescription
public PlatformHookUnixoid()
public Platform getPlatform()
PlatformHookgetPlatform in interface PlatformHookpublic void preStartupHook()
PlatformHookpreStartupHook in interface PlatformHookpublic void openUrl(java.lang.String url) throws java.io.IOException
PlatformHookopenUrl in interface PlatformHookurl - The URL to openjava.io.IOException - if any I/O error occurspublic void initSystemShortcuts()
PlatformHookinitSystemShortcuts in interface PlatformHookpublic java.lang.String getDefaultStyle()
PlatformHookgetDefaultStyle in interface PlatformHookpublic static boolean isDebianOrUbuntu()
true if the distribution is Debian, Ubuntu or Mint, false otherwisepublic static java.lang.String getPackageDetails(java.lang.String... packageNames)
packageNames - The possible package names (when a package can have different names on different distributions)public java.lang.String getJavaPackageDetails()
public java.lang.String getWebStartPackageDetails()
null if there's no separate package for Java WebStart.public java.lang.String getAtkWrapperPackageDetails()
null if it's not found.private java.lang.String buildOSDescription()
public java.lang.String getOSDescription()
PlatformHookgetOSDescription in interface PlatformHookprivate static java.io.File getDotDirectory()
~/.josm.private static boolean useDotDirectory()
public java.io.File getDefaultCacheDirectory()
PlatformHookgetDefaultCacheDirectory in interface PlatformHookpublic java.io.File getDefaultPrefDirectory()
PlatformHookgetDefaultPrefDirectory in interface PlatformHookpublic java.io.File getDefaultUserDataDirectory()
PlatformHookgetDefaultUserDataDirectory in interface PlatformHookpublic java.security.cert.X509Certificate getX509Certificate(CertificateAmendment.NativeCertAmend certAmend) throws java.security.KeyStoreException, java.security.NoSuchAlgorithmException, java.security.cert.CertificateException, java.io.IOException
PlatformHookX509Certificate matching the given certificate amendment information.getX509Certificate in interface PlatformHookcertAmend - certificate amendmentX509Certificate matching the given certificate amendment information, or nulljava.security.KeyStoreException - in case of errorjava.security.NoSuchAlgorithmException - in case of errorjava.security.cert.CertificateException - in case of errorjava.io.IOException - in case of errorpublic java.util.Collection<java.lang.String> getPossiblePreferenceDirs()
PlatformHookgetPossiblePreferenceDirs in interface PlatformHook