com.bea.campaign
Interface CampaignService

All Superinterfaces
AdStatus, javax.ejb.EJBObject, Remote

public interface CampaignService
extends javax.ejb.EJBObject, AdStatus

EJB object interface for the CampaignService session EJB.

In general, users will interact with campaigns via the portal admin tools -- see documentation for Campaigns. However, in the case that one needs to deal directly with the CampaignService itself (eg, get a list of all active campaigns), use the CampaignService.

The CampaignService may be accessed like this: String appName= ApplicationHelper.getVersionedAppName(); InitialContext iCtx= new InitialContext(); String jndiName= appName + '.BEA_campaign.CampaignService'; CampaignServiceHome csh= (CampaignServiceHome)iCtx.lookup( jndiName ); CampaignService cSvc= csh.create(); Collection c= cSvc.getDeployedCampaigns(); for ( Object o : c ) { Campaign camp= (Campaign)o; String campName= camp.getName(); }


Method Summary
 void clearEndStates(String campaignId)
          Clear all of the user end states associated to a campaign.
 Collection getActiveCampaigns()
          Get back a list of the active Campaign objects.
 AdBucketService getAdBucketService()
          Get a reference to the AdBucketService being used.
 AdService getAdService()
          Get a reference to the AdService being used
 Campaign getCampaign(String id)
          Retrieve a deployed campaign.
 Collection getDeployedCampaigns()
          Get back a list of the deployed Campaign objects.
 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(String campaignId)
          Tell if the specified campaign is currently active.
 void resetCampaign(String campaignId)
          Reset any cached state on the specified campaign.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

handleEvent

void handleEvent(Event event)
                 throws RemoteException,
                        javax.ejb.EJBException
Handle an event from the event service.

Parameters
event - the event.
Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

isActive

boolean isActive(String campaignId)
                 throws 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.
Returns
true if the container is active, false otherwise
Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

getDeployedCampaigns

Collection getDeployedCampaigns()
                                throws RemoteException,
                                       javax.ejb.EJBException
Get back a list of the deployed Campaign objects.

Throws
RemoteException
javax.ejb.EJBException

getActiveCampaigns

Collection getActiveCampaigns()
                              throws RemoteException,
                                     javax.ejb.EJBException
Get back a list of the active Campaign objects.

Throws
RemoteException
javax.ejb.EJBException

getCampaign

Campaign getCampaign(String id)
                     throws RemoteException,
                            javax.ejb.EJBException
Retrieve a deployed campaign.

Throws
RemoteException
javax.ejb.EJBException

clearEndStates

void clearEndStates(String campaignId)
                    throws RemoteException,
                           javax.ejb.EJBException
Clear all of the user end states associated to a campaign.

Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.
See Also
ScenarioService.clearEndStates(com.bea.campaign.ScenarioContainer)

resetCampaign

void resetCampaign(String campaignId)
                   throws RemoteException,
                          javax.ejb.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.

Throws
RemoteException
javax.ejb.EJBException

getScenarioService

ScenarioService getScenarioService()
                                   throws RemoteException,
                                          javax.ejb.EJBException
Get a reference to the scenario service this uses.

Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

getAdService

AdService getAdService()
                       throws RemoteException,
                              javax.ejb.EJBException
Get a reference to the AdService being used

Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

getAdBucketService

AdBucketService getAdBucketService()
                                   throws RemoteException,
                                          javax.ejb.EJBException
Get a reference to the AdBucketService being used.

Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.

getMailService

MailService getMailService()
                           throws RemoteException,
                                  javax.ejb.EJBException
Get a reference to the mail service being used.

Throws
javax.ejb.EJBException - thrown on an error.
RemoteException - thrown on a communications error.


Copyright © 2011, Oracle. All rights reserved.