Class AbstractPlatform

    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
      • whitespaceReplacement

        protected String whitespaceReplacement
      • separatorReplacement

        protected String separatorReplacement
      • colonReplacement

        protected String colonReplacement
    • Constructor Detail

      • AbstractPlatform

        public AbstractPlatform()
    • Method Detail

      • getUserHome

        public File getUserHome()
        Description copied from interface: Platform
        Returns the directory for the current user.
        Specified by:
        getUserHome in interface Platform
        Returns:
        the current user home directory
      • getApplicationDataDir

        public final File getApplicationDataDir()
        Description copied from interface: Platform
        Returns the directory in which Aduna applications can store their application-dependent data, returns 'getOSApplicationDataDir' unless the system property "aduna.platform.applicationdata.dir" has been set.
        Specified by:
        getApplicationDataDir in interface Platform
        Returns:
        the Aduna-specific application data directory
      • getApplicationDataDir

        public final File getApplicationDataDir​(String applicationName)
        Description copied from interface: Platform
        Returns the directory in which a specific application can store all its application-dependent data. This will be a sub-directory of the directory returned by the no-argument version of this method. Note: the directory might not exist yet.
        Specified by:
        getApplicationDataDir in interface Platform
        Parameters:
        applicationName - the name of the application for which to determine the directory
        Returns:
        an application-specific data directory
        See Also:
        Platform.getApplicationDataDir()
      • getOSApplicationDataDir

        public final File getOSApplicationDataDir​(String applicationName)
        Description copied from interface: Platform
        Returns the operating system dependent application data directory. This will be a sub-directory of the directory returned by the no-argument version of this method.
        Specified by:
        getOSApplicationDataDir in interface Platform
        Parameters:
        applicationName - name of the application
        Returns:
        application directory
      • getRelativeApplicationDataDir

        public String getRelativeApplicationDataDir​(String applicationName)
        Description copied from interface: Platform
        Get the directory relative to getApplicationDataDir() for the specified application.
        Specified by:
        getRelativeApplicationDataDir in interface Platform
        Parameters:
        applicationName - the name of the application
        Returns:
        the directory relative to getApplicationDataDir() for the specified application
      • getRelativeApplicationDataDir

        public String getRelativeApplicationDataDir​(String applicationName,
                                                    boolean caseSensitive,
                                                    boolean replaceWhitespace,
                                                    boolean replaceColon)
        Get the relative name of the application directory
        Parameters:
        applicationName - name of the application
        caseSensitive - true when case-sensitive
        replaceWhitespace - true when whitespace is to be replaced
        replaceColon - true when colon needs to be replaced
        Returns:
        name of the application directory