com.bea.portal.tools.im.controls.campaigns
Interface CampaignManagerControl


@ControlInterface
public interface CampaignManagerControl

A custom Java Control used to manage campaigns.


Method Summary
 void cleanupAdBuckets(String campaignId)
          Cleans up a campaign's ad buckets
 void cleanupAdCounts(String campaignId)
          Cleans up a campaign's ad count.
 void cleanupEndStates(String campaignId)
          Clears all of the user end states associated to a campaign.
 void cleanupMailBatches(String campaignId)
          Cleans up a campaign's mail batches.
 CampaignModel getCampaign(String campaignUri, ResourceContext context)
          Returns a CampaignModel object representing the campaign at the specified URI.
 SortableFilterablePagedResult<CampaignModel> getCampaigns(int pageSize, ResourceContext context)
          Returns a PagedResult of all the CampaignModel objects within the system representing campaigns, in arbitrary order.
 ScenarioModel getScenario(CampaignModel campaignModel, String scenarioName, ResourceContext context)
          Returns a ScenarioModel object representing the scenario within the specified campaign, and with the specified name.
 com.bea.p13n.rules.model.RuleModel getScenarioRuleModel(ScenarioModel scenarioModel, String ruleModelName, ResourceContext context)
          Returns a RuleModel object representing the rule model within the specified scenario, and with the specified name.
 SortableFilterablePagedResult<com.bea.p13n.rules.model.RuleModel> getScenarioRuleModels(ScenarioModel scenarioModel, int pageSize, ResourceContext context)
          Returns a PagedResult of all the RuleModel objects contained within the specified scenario.
 SortableFilterablePagedResult<ScenarioModel> getScenarios(CampaignModel campaignModel, int pageSize, ResourceContext context)
          Returns a PagedResult of all the ScenarioModel objects within the specified campaign.
 void resetCampaign(String campaignId)
          Resets any cached state information on the specified campaign
 void setCampaign(CampaignModel model, ResourceContext context)
          Persists the given CampaignModel.
 void setCampaign(String campaignUri, CampaignModel model, boolean create, ResourceContext context)
          Persists the given CampaignModel.
 

Method Detail

getCampaigns

SortableFilterablePagedResult<CampaignModel> getCampaigns(int pageSize,
                                                          ResourceContext context)
                                                          throws com.bea.p13n.management.data.repository.PersistenceException,
                                                                 com.bea.p13n.entitlements.common.PolicyRefException,
                                                                 org.apache.xmlbeans.XmlException
Returns a PagedResult of all the CampaignModel objects within the system representing campaigns, in arbitrary order. Returns an empty list if no campaigns are defined.

Parameters
pageSize - the int page size for the PagedResult
context - the resource context
Returns
a PagedResult of CampaignModel objects
Throws
com.bea.p13n.management.data.repository.PersistenceException - if an error occurs while trying to query for the model data
com.bea.p13n.entitlements.common.PolicyRefException - if an error occurs while trying to check DA of the campaigns
org.apache.xmlbeans.XmlException - if an error occurs while parsing the model data
See Also
PagedResult, CampaignModel

getCampaign

CampaignModel getCampaign(String campaignUri,
                          ResourceContext context)
                          throws com.bea.p13n.management.data.repository.PersistenceException,
                                 org.apache.xmlbeans.XmlException
Returns a CampaignModel object representing the campaign at the specified URI. Returns null if the campaign is not defined.

Parameters
campaignUri - the string URI for the desired campaign.
context - the resource context.
Returns
a CampaignModel representing the desired campaign
Throws
com.bea.p13n.management.data.repository.PersistenceException - if an error occurs while trying to query for the model data
org.apache.xmlbeans.XmlException - if an error occurs while parsing the model data
See Also
CampaignModel

getScenarios

SortableFilterablePagedResult<ScenarioModel> getScenarios(CampaignModel campaignModel,
                                                          int pageSize,
                                                          ResourceContext context)
                                                          throws com.bea.p13n.management.data.repository.PersistenceException,
                                                                 com.bea.p13n.entitlements.common.PolicyRefException,
                                                                 org.apache.xmlbeans.XmlException
Returns a PagedResult of all the ScenarioModel objects within the specified campaign. Returns an empty list if no scenarios are defined.

Parameters
campaignModel - the campaignModel containing containing the scenarios
pageSize - the int page size for the PagedResult
context - the resource context
Returns
a PagedResult of ScenarioModel objects
Throws
com.bea.p13n.management.data.repository.PersistenceException - if an error occurs while trying to query for the model data
org.apache.xmlbeans.XmlException - if an error occurs while parsing the model data
com.bea.p13n.entitlements.common.PolicyRefException
See Also
ScenarioModel

getScenario

ScenarioModel getScenario(CampaignModel campaignModel,
                          String scenarioName,
                          ResourceContext context)
                          throws com.bea.p13n.management.data.repository.PersistenceException,
                                 org.apache.xmlbeans.XmlException
Returns a ScenarioModel object representing the scenario within the specified campaign, and with the specified name. Returns null if the scenario is not defined.

Parameters
campaignModel - the actual campaignModel containing the scenario
scenarioName - the string name of the desired scenario
context - the resource context
Returns
a ScenarioModel representing the desired scenario
Throws
com.bea.p13n.management.data.repository.PersistenceException - if an error occurs while trying to query for the model data
org.apache.xmlbeans.XmlException - if an error occurs while parsing the model data
See Also
CampaignModel, ScenarioModel

getScenarioRuleModels

SortableFilterablePagedResult<com.bea.p13n.rules.model.RuleModel> getScenarioRuleModels(ScenarioModel scenarioModel,
                                                                                        int pageSize,
                                                                                        ResourceContext context)
                                                                                        throws com.bea.p13n.management.data.repository.PersistenceException,
                                                                                               com.bea.p13n.entitlements.common.PolicyRefException,
                                                                                               org.apache.xmlbeans.XmlException
Returns a PagedResult of all the RuleModel objects contained within the specified scenario. Returns an empty list if no rule models are defined.

Parameters
scenarioModel - a scenarioModel for the scenario that contains the rule models
pageSize - the int page size for the PagedResult
context - the resource context
Returns
a PagedResult of RuleModel objects
Throws
com.bea.p13n.management.data.repository.PersistenceException - if an error occurs while trying to query for the model data
org.apache.xmlbeans.XmlException - if an error occurs while parsing the model data
com.bea.p13n.entitlements.common.PolicyRefException
See Also
RuleModel

getScenarioRuleModel

com.bea.p13n.rules.model.RuleModel getScenarioRuleModel(ScenarioModel scenarioModel,
                                                        String ruleModelName,
                                                        ResourceContext context)
                                                        throws com.bea.p13n.management.data.repository.PersistenceException,
                                                               com.bea.p13n.entitlements.common.PolicyRefException,
                                                               org.apache.xmlbeans.XmlException
Returns a RuleModel object representing the rule model within the specified scenario, and with the specified name. Returns null if the rule model is not defined.

Parameters
scenarioModel - a scenarioModel for the scenario containing the rule model
ruleModelName - the string name of the desired rule model
context - the resource context
Returns
a RuleModel representing the desired rule
Throws
com.bea.p13n.management.data.repository.PersistenceException - if an error occurs while trying to query for the model data
org.apache.xmlbeans.XmlException - if an error occurs while parsing the model data
com.bea.p13n.entitlements.common.PolicyRefException
See Also
ScenarioModel, RuleModel

setCampaign

void setCampaign(CampaignModel model,
                 ResourceContext context)
                 throws IllegalArgumentException,
                        com.bea.p13n.management.data.repository.MessageException,
                        com.bea.p13n.management.data.repository.PersistenceException,
                        org.apache.xmlbeans.XmlException
Persists the given CampaignModel. Any existing campaign at the given campaignUri will be replaced by the new one.

Parameters
model - a CampaignModel representing the campaign
context - the resource context
Throws
IllegalArgumentException - if create=false and the campaign you are trying to replace does not exist at the given campaignUri.
com.bea.p13n.management.data.repository.MessageException - if an error occurs while persisting model data
com.bea.p13n.management.data.repository.PersistenceException - if an error occurs while trying to query for model data or persist model data
org.apache.xmlbeans.XmlException - if an error occurs while parsing the model data

setCampaign

void setCampaign(String campaignUri,
                 CampaignModel model,
                 boolean create,
                 ResourceContext context)
                 throws IllegalArgumentException,
                        com.bea.p13n.management.data.repository.MessageException,
                        com.bea.p13n.management.data.repository.PersistenceException,
                        org.apache.xmlbeans.XmlException
Persists the given CampaignModel. Any existing campaign at the given campaignUri will be replaced by the new one.

Parameters
campaignUri - the string URI of the campaign. Cannot be null.
model - a CampaignModel representing the campaign
create - if true then create the campaign if it does not exist. If false then do not create the campaign if it does not exist. In both cases, an existing campaign will be replaced with the new one.
context - the resource context
Throws
IllegalArgumentException - if create=false and the campaign you are trying to replace does not exist at the given campaignUri.
com.bea.p13n.management.data.repository.MessageException - if an error occurs while persisting model data
com.bea.p13n.management.data.repository.PersistenceException - if an error occurs while trying to query for model data or persist model data
org.apache.xmlbeans.XmlException - if an error occurs while parsing the model data

resetCampaign

void resetCampaign(String campaignId)
                   throws NamingException,
                          RemoteException,
                          javax.ejb.CreateException
Resets any cached state information on the specified campaign

Parameters
campaignId -
Throws
NamingException
RemoteException
javax.ejb.CreateException

cleanupEndStates

void cleanupEndStates(String campaignId)
                      throws NamingException,
                             RemoteException,
                             javax.ejb.CreateException
Clears all of the user end states associated to a campaign.

Parameters
campaignId -
Throws
NamingException
RemoteException
javax.ejb.CreateException

cleanupAdBuckets

void cleanupAdBuckets(String campaignId)
                      throws NamingException,
                             RemoteException,
                             javax.ejb.CreateException,
                             ContentException
Cleans up a campaign's ad buckets

Parameters
campaignId -
Throws
NamingException
RemoteException
javax.ejb.CreateException
ContentException

cleanupAdCounts

void cleanupAdCounts(String campaignId)
                     throws NamingException,
                            RemoteException,
                            javax.ejb.CreateException,
                            ContentException
Cleans up a campaign's ad count.

Parameters
campaignId -
Throws
NamingException
RemoteException
javax.ejb.CreateException
ContentException

cleanupMailBatches

void cleanupMailBatches(String campaignId)
                        throws NamingException,
                               RemoteException,
                               javax.ejb.CreateException,
                               MailServiceException
Cleans up a campaign's mail batches.

Parameters
campaignId -
Throws
NamingException
RemoteException
javax.ejb.CreateException
MailServiceException


Copyright © 2000, 2008, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.