© 2001 BEA Systems, Inc.

com.bea.commerce.campaign
Interface CampaignService

All Superinterfaces:
AdStatus

public interface CampaignService
extends AdStatus

EJB object interface for the CampaignService session EJB.


Method Summary
 AdBucketService getAdBucketService()
          Get a reference to the AdBucketService being used.
 AdService getAdService()
          Get a reference to the AdService being used
 CampaignRepository getCampaignRepository()
          Get a reference to the campaign repository.
 MailService getMailService()
          Get a reference to the mail service being used.
 ScenarioService getScenarioService()
          Get a reference to the scenario service this uses.
 void handleEvent(Event event)
          Handle an event from the event service.
 boolean isActive(java.lang.String campaignId)
          Tell if the specified campaign is currently active.
 void loadAllCampaigns()
          Tell the campaign service to load all the campaigns from the data store.
 

Method Detail

handleEvent

public void handleEvent(Event event)
                 throws java.rmi.RemoteException,
                        javax.ejb.EJBException
Handle an event from the event service.
Parameters:
event - the event.
Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

isActive

public boolean isActive(java.lang.String campaignId)
                 throws java.rmi.RemoteException,
                        javax.ejb.EJBException
Tell if the specified campaign is currently active.
Specified by:
isActive in interface AdStatus
Parameters:
campaignId - the campaign's unique id.
Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

getCampaignRepository

public CampaignRepository getCampaignRepository()
                                         throws java.rmi.RemoteException,
                                                javax.ejb.EJBException
Get a reference to the campaign repository.
Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

getScenarioService

public ScenarioService getScenarioService()
                                   throws java.rmi.RemoteException,
                                          javax.ejb.EJBException
Get a reference to the scenario service this uses.
Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

getAdService

public AdService getAdService()
                       throws java.rmi.RemoteException,
                              javax.ejb.EJBException
Get a reference to the AdService being used
Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

getAdBucketService

public AdBucketService getAdBucketService()
                                   throws java.rmi.RemoteException,
                                          javax.ejb.EJBException
Get a reference to the AdBucketService being used.
Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

getMailService

public MailService getMailService()
                           throws java.rmi.RemoteException,
                                  javax.ejb.EJBException
Get a reference to the mail service being used.
Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

loadAllCampaigns

public void loadAllCampaigns()
                      throws java.rmi.RemoteException,
                             javax.ejb.EJBException
Tell the campaign service to load all the campaigns from the data store.

This could be a time-intensive operation and should only happen at server startup. Incremental changes and additions via the CampaignRepository will automatically update the CampaignService.

This will invoke loadAllCampaigns on the CampaignRepository.

Throws:
EJBException - thrown on an error.
java.rmi.RemoteException - thrown on a communications error.

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved