Class GitSettingsHelper


  • public class GitSettingsHelper
    extends Object
    Helper class for the default git.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Method Detail

      • isModified

        public boolean isModified()
        Whether the settings got modified.
        Returns:
        true if modified
      • getDefaultSshDir

        public String getDefaultSshDir()
        Returns the default ssh dir.
        Returns:
        the default dir
      • getSshDir

        public String getSshDir()
        Returns the ssh key dir.
        Returns:
        the dir, by default the user's home dir + .ssh
      • getSshDirFile

        public adams.core.io.PlaceholderFile getSshDirFile()
        Returns the ssh dir file.
        Returns:
        the directory
      • setSshDir

        public void setSshDir​(String value)
        Updates the ssh key file.
        Parameters:
        value - the file
      • getDefaultKnownHosts

        public String getDefaultKnownHosts()
        Returns the default known_hosts file.
        Returns:
        the default file
      • getKnownHosts

        public String getKnownHosts()
        Returns the known_hosts file.
        Returns:
        the file, by default the user's home dir + .ssh/known_hosts
      • getKnownHostsFile

        public adams.core.io.PlaceholderFile getKnownHostsFile()
        Returns the known_hosts file.
        Returns:
        the file
      • setKnownHosts

        public void setKnownHosts​(String value)
        Updates the known_hosts file.
        Parameters:
        value - the file
      • getGlobalUser

        public String getGlobalUser()
        Returns the global user, if possible.
        Returns:
        the global user, empty string if not available
      • getUser

        public String getUser()
        Returns the user for commits.
        Returns:
        the user
      • setUser

        public void setUser​(String value)
        Updates the user for commits.
        Parameters:
        value - the user
      • getGlobalEmail

        public String getGlobalEmail()
        Returns the global email, if possible.
        Returns:
        the global email, empty string if not available
      • getEmail

        public String getEmail()
        Returns the email for commits.
        Returns:
        the email
      • setEmail

        public void setEmail​(String value)
        Updates the email for commits.
        Parameters:
        value - the email
      • getLoggingLevel

        public adams.core.logging.LoggingLevel getLoggingLevel()
        Returns the email for commits.
        Returns:
        the email
      • reload

        public void reload()
        Reloads the properties file. Discards any unsaved settings.
      • getFlowEditorSupport

        public boolean getFlowEditorSupport()
        Returns whether to enable git support in the flow editor.
        Returns:
        true if to enable support
      • setFlowEditorSupport

        public void setFlowEditorSupport​(boolean value)
        Updates whether to enable git support in the flow editor.
        Parameters:
        value - true if to enable support
      • getProperties

        public adams.core.Properties getProperties()
        Returns the current properties.
        Returns:
        the properties
      • save

        public boolean save()
        Saves the settings in the user's home directory.
        Returns:
        true if successfully saved
      • getSingleton

        public static GitSettingsHelper getSingleton()
        Returns the singleton.
        Returns:
        the singleton