public class Settings
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BUILTIN_BROWSER |
static java.lang.String |
DEFAULT_CHARACTER_SET
The character set to use if it hasn't been set previously.
|
static java.lang.String |
DEFAULT_LOOK_AND_FEEL
The Look & Feel if it hasn't been set previously.
|
static java.lang.String |
DEFAULT_USER_AGENT
The default user agent string to use when none is explicitly specified
|
static java.lang.String |
DEFAULT_WEB_BROWSER
Constants to define possible values for the help browser setting.
|
static int |
EDITION_BASIC
Define possible editions.
|
static int |
EDITION_ENTERPRISE |
static int |
EDITION_PROFESSIONAL |
static int |
EXPORT_CANCEL |
static int |
EXPORT_NO |
static int |
EXPORT_YES
Constants used in the export prompt.
|
static int |
EXPORT_YES_TO_ALL |
static java.lang.String |
iaPropertiesFilePath
The InstallAnywhere settings file path.
|
static int |
IMPORT_CANCEL |
static int |
IMPORT_NO |
static int |
IMPORT_YES
Constants used in the import prompt.
|
static int |
IMPORT_YES_TO_ALL |
static org.apache.log4j.Logger |
log
Used for logging.
|
static java.lang.String |
LOOK_AND_FEEL_NATIVE
The different Look & Feels (Native).
|
static java.lang.String |
LOOK_AND_FEEL_SILVER
The different Look & Feels (Silver).
|
static java.lang.String |
lwsPropertiesFilePath
The LWS settings file path.
|
static int |
RUN_MODE_COMMAND_LINE
Command line run mode
|
static int |
RUN_MODE_SERVER
Server run mode
|
static int |
RUN_MODE_WORKBENCH
Workbench run mode
|
static java.lang.String |
serverVMOptionsFilePath
The screen-scraper.vmoptions path.
|
static java.lang.String |
ssInfoPlistFilePath
The Info.plist path.
|
static java.lang.String |
ssVMOptionsFilePath
The screen-scraper.vmoptions path.
|
static int |
TIDY_DEFAULT_TIDIER |
static int |
TIDY_HTML_DONT_TIDY
Used to indicate the type of tidying that should be done.
|
static int |
TIDY_HTML_JERICHO |
static int |
TIDY_HTML_JSOUP |
static int |
TIDY_HTML_JTIDY |
static int |
TIDY_HTML_NEKO |
static int |
TIDY_JSON |
static int |
TIDY_XML |
static java.lang.String |
wPropertiesFilePath
The wrapper settings file path.
|
Constructor and Description |
---|
Settings() |
Modifier and Type | Method and Description |
---|---|
static boolean |
allowNavigationActions()
Indicates whether or not navigation actions are to be allowed.
|
static boolean |
allowScriptExport()
Flag to skip script exports.
|
static java.lang.String |
convertEditionNumberToString(int edition)
Converts the given number to the edition name
|
static boolean |
displayBreakpointWindowOutsideOfWorkbench()
Indicates whether or not the breakpoint window should be displayed outside of the workbench.
|
static boolean |
doesUserWantToViewTutorials()
Indicates whether or not the user would like to view the tutorials.
|
static boolean |
enableCachingAndFilteringDataSets()
Indicates whether or not caching and filtering of data sets should be enabled.
|
static boolean |
enableCodeFoldingInLastResponse()
Returns whether code folding should be enabled in the last response tab or not
|
static boolean |
filterHTTPTransactions()
Indicates whether or not HTTP transactions in the proxy should be filtered by their usefulness.
|
static java.lang.String |
getALEFilePath()
Gets the path to the ALE file, based on the edition running.
|
static java.lang.Object[] |
getAllAvailableFontNames()
Gets a list of the names of all fonts on the system.
|
static boolean |
getAllowMultipleSimultaneousInstances()
Indicates whether or not to disallow multiple instances of ss running simultaneously (e.g., workbench and server running at the same time).
|
static boolean |
getAllowProxyScripting()
Indicates whether or not proxy scripting should be allowed.
|
static boolean |
getAllowUnstableWindowsFeatures()
Indicates whether or not unstable Windows features should be made available in the workbench UI.
|
static java.lang.String |
getAnonymizationURLPrepend()
Gets the URL to pre-pend to anonymization requests.
|
static java.lang.String |
getAPIURLPrepend()
Gets the URL to pre-pend to API requests.
|
static int |
getAutoCompleteDelay()
Gets how long to delay before the auto-complete box appears.
|
static boolean |
getCheckForUpdatesOnStartup()
Indicates whether or not a check for updates should occur when ss starts up.
|
static boolean |
getCheckLogAutoScroll()
Indicates whether or not the auto-scroll checkbox should be checked.
|
static int |
getConnectionTimeout()
Returns the connection timeout, in seconds, for the http connections
|
static boolean |
getConvertHTMLEntitiesByDefault()
Indicates whether or not the "Convert HTML entities" checkbox should be checked by default.
|
static long |
getDataExtractorTimeout()
Gets the data extractor timeout value.
|
static java.lang.String |
getDefaultCharacterSet()
Gets the default character set to use when displaying HTML, extractor patterns, and extracted data.
|
static java.awt.Font |
getDefaultFont()
Gets the default font to use when displaying HTML, extractor patterns, and extracted data.
|
static int |
getEdition()
Gets the edition we're running as.
|
static java.lang.String |
getEditionAsString()
Gets a string representative of the edition.
|
static boolean |
getForceOverwriteScripts()
Indicates whether or not all scripts should be force overwritten.
|
static java.lang.String |
getIPAddressesToAllow()
Gets the IP addresses that should be allowed to connect to the ss server.
|
static java.lang.String |
getKeyManagerFactory()
The key manager factory to use.
|
static java.lang.String |
getLookAndFeel()
Gets the Look & Feel.
|
static boolean |
getMarkScriptOccurrences()
Returns whether or not hovering the caret in the script editor should highlight matching text
|
static int |
getMaxConcurrentScrapingSessions()
Returns the maximum number of concurrent scraping sessions allowed
|
static int |
getMaximumDisplayedLastResponseLength()
Gets the maximum length of displayed text in the "Last Response" tab.
|
static int |
getMaximumMemoryAllocation()
Gets the value of the MaximumMemoryAllocation property.
|
static int |
getMaximumNumberOfRedirects()
Gets the maximum number of times an HTTP redirect should be allowed for a given transaction.
|
static int |
getMaximumNumberOfScrapeableSessions()
Gets the maximum number of scrapeable sessions that should be loaded from the database.
|
static int |
getMaximumProxyWaits()
Gets the maximum number of times screen-scraper should attempt to connect to a proxy before giving up.
|
static int |
getMaxScrapingSessionLogFileSize()
Gets the maximum size of a scraping session log file in megabytes.
|
static int |
getMinLoggingLevel()
Returns the minimum logging level the instance will allow for all scrapes.
|
static int |
getNumRecentScriptsToShow()
Returns how many recent scripts to show in the script selection dropdown
|
static int |
getNumTimesCommandLineHasBeenRun()
Gets the number of times the command line has been run.
|
static int |
getNumTimesServerHasBeenRun()
Gets the number of times the server has been run.
|
static int |
getNumTimesWorkbenchHasBeenRun()
Gets the number of times the workbench has been run.
|
static java.util.Properties |
getProperties()
Returns a reference to the
Properties object. |
static int |
getRequestTimeout()
Returns the timeout, in seconds, for the downloading a page or block of content.
|
static int |
getRunMode()
Gets the current run mode, as defined by one of the RUN_MODE constants defined in this class.
|
static java.lang.String |
getRunModeAsString()
Returns a string representation of the run mode.
|
static boolean |
getSaveLargeFields()
Indicates whether or not large fields should be saved to the database.
|
static java.lang.String |
getScriptScrapeNamePrefixDelimiter()
Returns the delimiter to use between scrape name and script name.
|
static boolean |
getShouldHideWrapNotifications()
Gets the user's preference on whether or not screen-scraper should hide notifications when a ScrapeableFile's response can't be wrapped.
|
static int |
getSocketLinger()
The socket linger amount, or negative to use the default value.
|
static java.lang.String |
getStartPageURLPrepend()
Gets the URL to be pre-pended when displaying the start page.
|
static boolean |
getTrimWhiteSpaceByDefault()
Indicates whether or not the "Convert HTML entities" checkbox should be checked by default.
|
static int |
getTruncateWorkbenchRequestPOSTDataLength()
Gets the length at which to truncate POST data in the workbench, for display purposes
|
static boolean |
getUseGlobalExternalProxyForAllScrapingSessions()
Indicates whether or not the global proxy settings should be used for all scraping sessions.
|
static java.lang.String |
getWebInterfacePassword()
Returns the password that can access the web interface by login (rather than by being on the correct ip)
|
static java.lang.String |
getWebInterfaceUser()
Returns the username that can access the web interface by login (rather than by being on the correct ip)
|
static int |
getWebPort()
Gets the web port as an int.
|
static void |
incrementNumTimesCommandLineHasBeenRun()
Increments the number of times the command line has been run.
|
static void |
incrementNumTimesServerHasBeenRun()
Increments the number of times the server has been run.
|
static void |
incrementNumTimesWorkbenchHasBeenRun()
Increments the number of times the workbench has been run.
|
static boolean |
instrumentationEnabled()
Indicates whether or not instrumentation is enabled for memory profiling.
|
static boolean |
isActionAllowed(int requiredEdition,
int originatorEdition)
Indicates whether or not an action is allowed based on the required edition.
|
static boolean |
isEditionEnterpriseOrBetter()
Indicates whether or not the edition is Enterprise or better.
|
static boolean |
isEditionProOrBetter()
Indicates whether or not the edition is Professional or better.
|
static boolean |
isFalseEnterprise()
Ensures that someone hasn't tried to upgrade to enterprise simply by altering the property in the properties file.
|
static boolean |
isFalseProfessional()
Ensures that someone hasn't tried to upgrade from basic to professional simply by altering the property in the properties file.
|
static void |
load()
Loads the settings.
|
static void |
main(java.lang.String[] args)
An entry point for programmatically manipulating settings.
|
static void |
regenerateBatchAndShellScripts()
Regenerates the batch files and shell scripts.
|
static void |
reload()
Reloads the properties from the properties file.
|
static void |
save()
Saves the settings.
|
static void |
setDefaultCharacterSet(java.lang.String characterSet)
Sets the default character set.
|
static void |
setInstallDirectory(java.lang.String installDirectory)
Sets the install directory, including modifying the batch/shell scripts.
|
static void |
setLookAndFeel(java.lang.String lookAndFeel)
Sets the Look & Feel.
|
static void |
setMaximumMemoryAllocation(int heapSize)
Sets the maximum heap size the app will use when being run in GUI mode.
|
static void |
setRunMode(int runMode)
Sets the current run mode, as defined by one of the RUN_MODE constants defined in this class.
|
static void |
setShouldHideWrapNotifications(boolean wrap)
Sets the "HideTextWrapNotifications" property to the given value.
|
static void |
setSOAPPort(int port)
Sets the port that SOAP listens on in both the screen-scraper properties and in the LWS conf file.
|
static boolean |
shouldBackUpInternalDb()
Indicates whether or not the internal db should be automatically backed up.
|
static boolean |
shouldLogHighMemoryUse()
Returns whether high memory use information should be logged.
|
static boolean |
shouldWrapLastRequestText()
Indicates whether or not text in the last request text box should be wrapped.
|
static boolean |
shouldWrapLastResponseText()
Indicates whether or not text in the last response text box should be wrapped.
|
static boolean |
shouldWrapScriptText()
Indicates whether or not text in the script text box should be wrapped.
|
static boolean |
useFastWorkbenchLogging()
Returns whether or not fast workbench logging should be used.
|
static void |
userDoesNotWantToViewTutorials()
Indicates that the user does not want to view the tutorials.
|
static void |
userWantsToViewTutorials()
Indicates that the user wants to view the tutorials.
|
static void |
verifyMemoryAllocationSetting()
Verifies that the InstallAnywhere properties file has received the memory allocation setting.
|
public static final java.lang.String DEFAULT_USER_AGENT
public static org.apache.log4j.Logger log
@NotNull public static java.lang.String iaPropertiesFilePath
@NotNull public static java.lang.String wPropertiesFilePath
@NotNull public static java.lang.String lwsPropertiesFilePath
@NotNull public static java.lang.String ssVMOptionsFilePath
@NotNull public static java.lang.String serverVMOptionsFilePath
@NotNull public static java.lang.String ssInfoPlistFilePath
public static final java.lang.String DEFAULT_WEB_BROWSER
public static final java.lang.String BUILTIN_BROWSER
public static final int EDITION_BASIC
public static final int EDITION_PROFESSIONAL
public static final int EDITION_ENTERPRISE
public static final int IMPORT_YES
public static final int IMPORT_NO
public static final int IMPORT_YES_TO_ALL
public static final int IMPORT_CANCEL
public static final int EXPORT_YES
public static final int EXPORT_NO
public static final int EXPORT_YES_TO_ALL
public static final int EXPORT_CANCEL
public static final java.lang.String DEFAULT_CHARACTER_SET
public static final java.lang.String LOOK_AND_FEEL_NATIVE
public static final java.lang.String LOOK_AND_FEEL_SILVER
public static final java.lang.String DEFAULT_LOOK_AND_FEEL
public static final int RUN_MODE_COMMAND_LINE
public static final int RUN_MODE_SERVER
public static final int RUN_MODE_WORKBENCH
public static final int TIDY_HTML_DONT_TIDY
public static final int TIDY_HTML_JTIDY
public static final int TIDY_HTML_NEKO
public static final int TIDY_HTML_JERICHO
public static final int TIDY_HTML_JSOUP
public static final int TIDY_JSON
public static final int TIDY_XML
public static final int TIDY_DEFAULT_TIDIER
public static void load()
public static void reload()
public static int getMaxConcurrentScrapingSessions()
public static void save()
@NotNull public static java.util.Properties getProperties()
Properties
object.Properties
object.public static int getMaximumDisplayedLastResponseLength()
public static int getMaximumNumberOfRedirects()
public static int getAutoCompleteDelay()
public static int getMaximumProxyWaits()
public static boolean useFastWorkbenchLogging()
public static boolean getShouldHideWrapNotifications()
public static void setShouldHideWrapNotifications(boolean wrap)
wrap
- The value to set the "HideTextWrapNotifications" property to.@Nullable public static java.lang.String getLookAndFeel()
public static void setLookAndFeel(java.lang.String lookAndFeel)
lookAndFeel
- The Look & Feel to use.@Nullable public static java.lang.String getIPAddressesToAllow()
@NotNull public static java.lang.String getDefaultCharacterSet()
public static void setDefaultCharacterSet(java.lang.String characterSet)
characterSet
- The default character set to use.public static java.awt.Font getDefaultFont()
public static int getMaximumMemoryAllocation()
public static void verifyMemoryAllocationSetting()
@NotNull public static java.lang.Object[] getAllAvailableFontNames()
public static int getNumTimesWorkbenchHasBeenRun()
public static void incrementNumTimesWorkbenchHasBeenRun()
public static int getNumTimesServerHasBeenRun()
public static void incrementNumTimesServerHasBeenRun()
public static int getNumTimesCommandLineHasBeenRun()
public static int getMaxScrapingSessionLogFileSize()
public static void incrementNumTimesCommandLineHasBeenRun()
public static long getDataExtractorTimeout()
@NotNull public static java.lang.String getScriptScrapeNamePrefixDelimiter()
public static boolean doesUserWantToViewTutorials()
public static boolean allowNavigationActions()
public static boolean instrumentationEnabled()
public static boolean shouldBackUpInternalDb()
public static java.lang.String getStartPageURLPrepend()
public static boolean enableCachingAndFilteringDataSets()
public static boolean displayBreakpointWindowOutsideOfWorkbench()
public static boolean shouldWrapScriptText()
public static boolean shouldWrapLastResponseText()
public static boolean shouldWrapLastRequestText()
public static boolean filterHTTPTransactions()
public static void userDoesNotWantToViewTutorials()
public static void userWantsToViewTutorials()
public static void setMaximumMemoryAllocation(int heapSize)
heapSize
- The heap size, in mega-bytes.public static void setSOAPPort(int port)
port
- The port number that SOAP will listen on.public static int getWebPort()
public static java.lang.String getAPIURLPrepend()
public static java.lang.String getAnonymizationURLPrepend()
public static boolean getCheckForUpdatesOnStartup()
public static boolean getCheckLogAutoScroll()
public static boolean getForceOverwriteScripts()
public static boolean getConvertHTMLEntitiesByDefault()
public static java.lang.String getKeyManagerFactory()
public static boolean getTrimWhiteSpaceByDefault()
public static boolean getAllowProxyScripting()
public static boolean getAllowUnstableWindowsFeatures()
public static boolean getUseGlobalExternalProxyForAllScrapingSessions()
public static boolean getAllowMultipleSimultaneousInstances()
public static boolean getSaveLargeFields()
public static void setInstallDirectory(@NotNull java.lang.String installDirectory)
installDirectory
- The install directory.public static void regenerateBatchAndShellScripts()
public static int getEdition()
public static boolean isEditionProOrBetter()
public static boolean isEditionEnterpriseOrBetter()
public static java.lang.String getEditionAsString()
public static java.lang.String convertEditionNumberToString(int edition)
edition
- The edition value, as an intpublic static boolean isFalseProfessional()
public static boolean isFalseEnterprise()
@NotNull public static java.lang.String getALEFilePath()
public static int getRunMode()
public static int getNumRecentScriptsToShow()
public static void setRunMode(int runMode)
runMode
- The run mode.public static java.lang.String getRunModeAsString()
public static int getMaximumNumberOfScrapeableSessions()
public static boolean isActionAllowed(int requiredEdition, int originatorEdition)
requiredEdition
- The required edition.originatorEdition
- The edition under which the scraping session was developed.public static void main(@NotNull java.lang.String[] args)
args
- The command line arguments@Nullable public static java.lang.String getWebInterfaceUser()
@Nullable public static java.lang.String getWebInterfacePassword()
public static boolean getMarkScriptOccurrences()
public static int getConnectionTimeout()
public static int getRequestTimeout()
public static boolean enableCodeFoldingInLastResponse()
public static boolean shouldLogHighMemoryUse()
public static int getMinLoggingLevel()
public static int getTruncateWorkbenchRequestPOSTDataLength()
public static int getSocketLinger()
public static boolean allowScriptExport()