Class ClientUtils
- java.lang.Object
- 
- com.inductiveautomation.snap.filedata.ClientUtils
 
- 
 public class ClientUtils extends java.lang.ObjectSome utility methods for Snap.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static java.io.FilegetHomeDir(boolean doCreate)Returns the SnapCode directory in user's home directory.static java.lang.StringgetHostUserName(java.lang.String aUrl)Returns the user name for a site/host, if previously entered/recorded.static java.util.List<java.lang.String>getKnownSites()Returns a list of known sites.static java.lang.StringgetPassword(java.lang.String aSourceId)Returns the password for (site) URL, if previously entered/recorded.static java.util.List<SnapTableView>getTableViews(SnapSite aSite)Returns the list of known table views for this site.static SettingsgetUserLocalSettings()Returns the settings.static java.lang.StringgetUserName(java.lang.String aSourceId)Returns the user name for (site) URL, if previously entered/recorded.static voidsaveUserLocalSettings()Saves the settings.static booleansetAccess(WebSite aSite)Sets login info for given URL (if different than what has been previously saved for URL).static voidsetAccess(WebSite aSite, java.lang.String aUserName, java.lang.String aPW)Sets the access info for given URL to system.
 
- 
- 
- 
Method Detail- 
getUserLocalSettingspublic static Settings getUserLocalSettings() Returns the settings.
 - 
saveUserLocalSettingspublic static void saveUserLocalSettings() Saves the settings.
 - 
getHomeDirpublic static java.io.File getHomeDir(boolean doCreate) Returns the SnapCode directory in user's home directory.
 - 
getTableViewspublic static java.util.List<SnapTableView> getTableViews(SnapSite aSite) Returns the list of known table views for this site.
 - 
setAccesspublic 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.
 
 - 
setAccesspublic static void setAccess(WebSite aSite, java.lang.String aUserName, java.lang.String aPW) Sets the access info for given URL to system.
 - 
getUserNamepublic static java.lang.String getUserName(java.lang.String aSourceId) Returns the user name for (site) URL, if previously entered/recorded.
 - 
getPasswordpublic static java.lang.String getPassword(java.lang.String aSourceId) Returns the password for (site) URL, if previously entered/recorded.
 - 
getHostUserNamepublic static java.lang.String getHostUserName(java.lang.String aUrl) Returns the user name for a site/host, if previously entered/recorded.
 - 
getKnownSitespublic static java.util.List<java.lang.String> getKnownSites() Returns a list of known sites.
 
- 
 
-