com.getsnappy.w20
Class Options

java.lang.Object
  extended by com.getsnappy.w20.Options

public class Options
extends java.lang.Object

This class provides central documentation to all options applicable to the web 2.0 framework library. Currenly you can define:
-Dcom.getsnappy.ServletForwarderUrl="/servletForwarder" - specify the location of the ServletForwarder servlet
-Dcom.getsnappy.ClassNamePrefix="" - specify a prefix thats prepended to any className passed through the API

Author:
Brian Gardner
See Also:
ServletForwarder

Constructor Summary
Options()
           
 
Method Summary
static java.lang.String DEBUG(java.lang.String js)
          Used to wrap JavaScript statements that are useful for debugging issues with the library.
static java.lang.String getCompleteClassName(java.lang.String className)
          If -Dcom.getsnappy.ClassNamePrefix is defined, it will prefix this value to className (adding a "." in between them if necessary).
static java.lang.String getErrorHandlerClass()
          This class contains the functionality to alert a user when something unexpected happens.
static java.lang.String getServletForwarderUrl()
          If -Dcom.getsnappy.ServletForwarder is defined, it returns this value, otherwise it default /servletForwarder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Options

public Options()
Method Detail

getCompleteClassName

public static java.lang.String getCompleteClassName(java.lang.String className)
If -Dcom.getsnappy.ClassNamePrefix is defined, it will prefix this value to className (adding a "." in between them if necessary). For example we set Dcom.getsnappy.ClassNamePrefix="com.getsnappy". Then when we specify a className to either a StaticContext or a CategoryChooserBean we would simply pass "report.ReportWizard" and this className would resolve to "com.getsnappy.report.ReportWizard"

Parameters:
className -
Returns:
the param className prepended by -Dcom.getsnappy.ClassNamePrefix

getServletForwarderUrl

public static java.lang.String getServletForwarderUrl()
If -Dcom.getsnappy.ServletForwarder is defined, it returns this value, otherwise it default /servletForwarder. You must define entries for com.getsnappy.w20.ServletForwarder, only if you intend to use web 2.0 loading method functionality.

See Also:
Web20Environment

DEBUG

public static java.lang.String DEBUG(java.lang.String js)
Used to wrap JavaScript statements that are useful for debugging issues with the library. Returns "" if errorHandlerClass is null, otherwise returns the String js without modifying it. Example: out.write(Options.DEBUG("if (e == undefined) { w20.handleError('The var e is undefined'); }"))"

Parameters:
js -
Returns:

getErrorHandlerClass

public static java.lang.String getErrorHandlerClass()
This class contains the functionality to alert a user when something unexpected happens.

Returns: