Class ClientUtils

java.lang.Object
com.inductiveautomation.snap.filedata.ClientUtils

public class ClientUtils extends Object
Some utility methods for Snap.
  • Method Details

    • getUserLocalSettings

      public static Settings getUserLocalSettings()
      Returns the settings.
    • saveUserLocalSettings

      public static void saveUserLocalSettings()
      Saves the settings.
    • getHomeDir

      public static File getHomeDir(boolean doCreate)
      Returns the SnapCode directory in user's home directory.
    • getTableViews

      public static List<SnapTableView> getTableViews(SnapSite aSite)
      Returns the list of known table views for this site.
    • setAccess

      public static boolean setAccess(WebSite aSite)
      Sets login info for given URL (if different than what has been previously saved for URL).
      Returns:
      Whether login info was different than URL data source.
    • setAccess

      public static void setAccess(WebSite aSite, String aUserName, String aPW)
      Sets the access info for given URL to system.
    • getUserName

      public static String getUserName(String aSourceId)
      Returns the user name for (site) URL, if previously entered/recorded.
    • getPassword

      public static String getPassword(String aSourceId)
      Returns the password for (site) URL, if previously entered/recorded.
    • getHostUserName

      public static String getHostUserName(String aUrl)
      Returns the user name for a site/host, if previously entered/recorded.
    • getKnownSites

      public static List<String> getKnownSites()
      Returns a list of known sites.