# com.bea.commerce.ebusiness.campaign
AddUserDiscountAction Class

public class AddUserDiscountAction
extends `Action`

Action object to associate a discount to a user.

This action understands the following action parameters:

- set (optional): the discount set name (if not specified, will use the `default name```.
- name (required): the discount name.
- description (optional): a textual description of the association.

Hierarchy
  `Object`
  `Action`
  `AddUserDiscountAction`

All Implemented Interfaces
  `Serializable`

## Field Summary

`public static final `String`` | `DEFAULT_DISCOUNT_SET_NAME` The default discount set name ("DefaultDiscountSet").

## Constructor Summary

AddUserDiscountAction()

## Method Summary

`public `DiscountAssociationMgr`` | `getAssociationMgr`() Get the discount association manager this should use.
`public void` | `init`(`Map` params) Initialize this action from a map of parameters.
`public void` | `run`() Execute this action.
`public `String`` | `toString`()

Methods from `com.bea.campaign.action.`Action``
``getEvent`, `getRandom`, `getRequest`, `getScenario`, `getScenarioContainer`, `getScenarioContainerName`, `getScenarioId`, `getScenarioName`, `getServiceLocator`, `getSession`, `getTimestamp`, `getUser`, `getUserId`, `locateService`, `setEvent`, `setRandom`, `setRequest`, `setScenario`, `setScenarioContainer`, `setServiceLocator`, `setSession`, `setTimestamp`, `setUser``

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Detail

### DEFAULT_DISCOUNT_SET_NAME

    public static final String DEFAULT_DISCOUNT_SET_NAME

  The default discount set name ("DefaultDiscountSet").

## Constructor Detail

### AddUserDiscountAction

    public AddUserDiscountAction()

## Method Detail

### getAssociationMgr() Method

    public DiscountAssociationMgr getAssociationMgr()
         throws CreateException, RemoteException

Get the discount association manager this should use.

#### Exceptions

``CreateException``
  thrown if the system cannot get a manager.
``RemoteException``
  thrown on a general error.

### init(Map) Method

    public void init(Map params)
         throws IllegalArgumentException

Initialize this action from a map of parameters.

See the class notes about the understood and required action parameters.

Overrides
  `Action.init(Map)`

#### Parameters

params
  A map of name/value pairs

#### Exceptions

``IllegalArgumentException``

### run() Method

    public void run()
         throws ActionException

Execute this action.

This will associate the named discount to the user.

Overrides
  `Action.run()`

#### Exceptions

``ActionException``
  thrown on an error.

### toString() Method

    public String toString()

Overrides
  `Object.toString()`