# com.bea.campaign
CampaignService Interface

public interface CampaignService
extends `AdStatus`, `EJBObject`

EJB object interface for the CampaignService session EJB.

All Superinterfaces
  `AdStatus`, `EJBObject`, `Remote`

## Method Summary

`public void` | `clearEndStates`(`String` campaignId) Clear all of the user end states associated to a campaign.
`public `Collection`` | `getActiveCampaigns`() Get back a list of the active Campaign objects.
`public `AdBucketService`` | `getAdBucketService`() Get a reference to the AdBucketService being used.
`public `AdService`` | `getAdService`() Get a reference to the AdService being used
`public `Campaign`` | `getCampaign`(`String` id) Retrieve a deployed campaign.
`public `Collection`` | `getDeployedCampaigns`() Get back a list of the deployed Campaign objects.
`public `MailService`` | `getMailService`() Get a reference to the mail service being used.
`public `ScenarioService`` | `getScenarioService`() Get a reference to the scenario service this uses.
`public void` | `handleEvent`(`Event` event) Handle an event from the event service.
`public boolean` | `isActive`(`String` campaignId) Tell if the specified campaign is currently active.
`public void` | `resetCampaign`(`String` campaignId) Reset any cached state on the specified campaign.

Methods from interface `javax.ejb.`EJBObject``
`getEJBHome, getHandle, getPrimaryKey, isIdentical, remove`

## Method Detail

### clearEndStates(String) Method

    public void clearEndStates(String campaignId)
         throws RemoteException, EJBException

Clear all of the user end states associated to a campaign.

#### Exceptions

``RemoteException``
  thrown on a communications error.
``EJBException``
  thrown on an error.

Related Topics

``ScenarioService.clearEndStates(ScenarioContainer)``

### getActiveCampaigns() Method

    public Collection getActiveCampaigns()
         throws RemoteException, EJBException

Get back a list of the active Campaign objects.

#### Exceptions

``RemoteException``
``EJBException``

### getAdBucketService() Method

    public AdBucketService getAdBucketService()
         throws RemoteException, EJBException

Get a reference to the AdBucketService being used.

#### Exceptions

``RemoteException``
  thrown on a communications error.
``EJBException``
  thrown on an error.

### getAdService() Method

    public AdService getAdService()
         throws RemoteException, EJBException

Get a reference to the AdService being used

#### Exceptions

``RemoteException``
  thrown on a communications error.
``EJBException``
  thrown on an error.

### getCampaign(String) Method

    public Campaign getCampaign(String id)
         throws RemoteException, EJBException

Retrieve a deployed campaign.

#### Exceptions

``RemoteException``
``EJBException``

### getDeployedCampaigns() Method

    public Collection getDeployedCampaigns()
         throws RemoteException, EJBException

Get back a list of the deployed Campaign objects.

#### Exceptions

``RemoteException``
``EJBException``

### getMailService() Method

    public MailService getMailService()
         throws RemoteException, EJBException

Get a reference to the mail service being used.

#### Exceptions

``RemoteException``
  thrown on a communications error.
``EJBException``
  thrown on an error.

### getScenarioService() Method

    public ScenarioService getScenarioService()
         throws RemoteException, EJBException

Get a reference to the scenario service this uses.

#### Exceptions

``RemoteException``
  thrown on a communications error.
``EJBException``
  thrown on an error.

### handleEvent(Event) Method

    public void handleEvent(Event event)
         throws RemoteException, EJBException

Handle an event from the event service.

#### Parameters

event
  the event.

#### Exceptions

``RemoteException``
  thrown on a communications error.
``EJBException``
  thrown on an error.

### isActive(String) Method

    public boolean isActive(String campaignId)
         throws RemoteException, EJBException

Tell if the specified campaign is currently active.

#### Parameters

campaignId
  the campaign's unique id.

#### Returns

true if the container is active, false otherwise

#### Exceptions

``RemoteException``
  thrown on a communications error.
``EJBException``
  thrown on an error.

### resetCampaign(String) Method

    public void resetCampaign(String campaignId)
         throws RemoteException, EJBException

Reset any cached state on the specified campaign.

This will cause the Campaign to redetermine it's state the next time it's accessed.

This includes: reseting the goal achieved state.

#### Exceptions

``RemoteException``
``EJBException``