All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.util
Class ParamObjectBase

    com.sas.util.ParamObjectBase

    public class ParamObjectBase

Base class for all Parameter objects. Parameter objects are used to store and retrieve parameters for both applications and applets. Applets: Applet parameters are passed to an applet via the HTML tag Applications: Application parameters are passed to an application via command line arguments as a name/value pair, such as =. If the name and/or value contains spaces they can be enclosed in quotes. A named parameter can also be preceeded with a '-', such as -name=value, or -name; in the latter case the value will be an empty string as opposed to a null value.

Field Summary
`static int` | `PARAM_TYPE_APPLET`
`static int` | `PARAM_TYPE_ARGS`

Constructor Summary
`ParamObjectBase()` Construct a new (empty) ParamObjectBase object.
`ParamObjectBase(java.applet.Applet applet)` Construct a new ParamObjectBase object using an applet.
`ParamObjectBase(java.lang.String[] args)` Construct a new ParamObjectBase object using application arguments.

Method Summary
`java.lang.String` | `getParam(java.lang.String param)` Returns the named parameter.
`java.lang.String` | `getParam(java.lang.String param, java.lang.String defaultValue)` Returns the named parameter.

Field Detail

### PARAM_TYPE_APPLET

    public static final int PARAM_TYPE_APPLET

See Also:
  Constant Field Values

### PARAM_TYPE_ARGS

    public static final int PARAM_TYPE_ARGS

See Also:
  Constant Field Values

Constructor Detail

### ParamObjectBase

    public ParamObjectBase()

  Construct a new (empty) ParamObjectBase object.

### ParamObjectBase

    public ParamObjectBase(java.applet.Applet applet)

  Construct a new ParamObjectBase object using an applet. The parameters will be read from the applet which set via HTML tags

  Parameters:
    `applet` - The applet

### ParamObjectBase

    public ParamObjectBase(java.lang.String[] args)

  Construct a new ParamObjectBase object using application arguments.

  Parameters:
    `args` - Command line arguments passed to the application main() method

Method Detail

### getParam

    public java.lang.String getParam(java.lang.String param)

  Returns the named parameter.

  Parameters:
    `param` - Parameter name
  Returns:
    The parameter value; null if not found

### getParam

    public java.lang.String getParam(java.lang.String param,
                                     java.lang.String defaultValue)

  Returns the named parameter. If the parameter is not found, the default value is returned.

  Parameters:
    `param` - Parameter name
    `defaultValue` - The default value if the parameter is not found
  Returns:
    The parameter value

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.