|
© 2001 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Campaign repository EJB object interface.
Method Summary | |
void |
clearEndStates(java.lang.String campaignId)
Clear all of the user end states associated to a campaign. |
boolean |
deleteCampaign(java.lang.String campaignId)
Permanently delete a campaign. |
java.util.Collection |
findCampaignInfo(java.lang.String query,
java.lang.String sortBy,
int max)
Get a list of CampaignInfos that match the query. |
java.util.Collection |
findCampaignInfo(java.lang.String query,
java.lang.String sortBy,
int max,
java.util.Collection attributeNames)
Get a list of CampaignInfos that match the query. |
java.lang.String |
getCampaign(java.lang.String campaignId)
Get the XML of the named campaign. |
CampaignService |
getCampaignService()
Return the campaign service this is tied to. |
void |
loadAllCampaigns()
Tell the campaign repository to load all the campaigns from the data store. |
boolean |
setCampaign(java.lang.String campaign)
Set the XML of the named campaign. |
Method Detail |
public java.util.Collection findCampaignInfo(java.lang.String query, java.lang.String sortBy, int max, java.util.Collection attributeNames) throws java.lang.IllegalArgumentException, javax.ejb.EJBException, java.rmi.RemoteException
The following property names are allowed in the query string:
id
: the String unique campaign id
name
: the String campaign name
startDate
: the Date/Time campaign start time
stopDate
: the Date/Time campaign start time
validClassifications
: the multi-valued String
classification names.
sponsorName
: the String campaign sponsor name.
description
: the String campaign description.
valueProposition
: the String campaign value
proposition.
goalDescription
: the String campaign goal description.
activeFlag
: the Boolean campaign active flag.
shutdownFlag
: the Boolean campaign shutdown flag.
Example Queries:
The sortBy may reference any of the previously listed property names, except for 'validClassifications'.
The CampaignInfos that are returned from this method will always have the 'id', 'name', 'description', 'activeFlag', and 'shutdownFlag' attributes set. The attributeNames collection should be the String attributes names to also include. The supported attribute names are 'startDate', 'stopDate', 'sponsorName', 'valueProposition', and 'goalDescription'. Anyother attributes names will be ignored. If the attribute name is not listed, it's value in the CampaignInfo will be null.
query
- the query string
.sortBy
- the sorting clause.max
- the maximum number to return (<= 0 for all).attributeNames
- the list of additional attribute names to
include in the CampaignInfo objects.java.lang.IllegalArgumentException
- thrown on an invalid query or sortBy
string.EJBException
- thrown on an error.java.rmi.RemoteException
- thrown on a communications error.public java.util.Collection findCampaignInfo(java.lang.String query, java.lang.String sortBy, int max) throws java.lang.IllegalArgumentException, javax.ejb.EJBException, java.rmi.RemoteException
This will return CampaignInfo object with only the default attributes set ('id', 'name', 'description', 'activeFlag', and 'shutdownFlag').
query
- the query string
.sortBy
- the sorting clause.max
- the maximum number to return (<= 0 for all).java.lang.IllegalArgumentException
- thrown on an invalid query or sortBy
string.EJBException
- thrown on an error.java.rmi.RemoteException
- thrown on a communications error.findCampaignInfo(java.lang.String, java.lang.String, int, java.util.Collection)
public java.lang.String getCampaign(java.lang.String campaignId) throws javax.ejb.EJBException, java.rmi.RemoteException
campaignId
- the id of the campaign.EJBException
- thrown on an error.java.rmi.RemoteException
- thrown on a communications error.public boolean setCampaign(java.lang.String campaign) throws java.lang.IllegalArgumentException, javax.ejb.EJBException, java.rmi.RemoteException
The campaign XML should be in UTF-8. Additionally, the top-level campaign tag should have an xsi:schemaLocation for 'campaign.xsd'.
campaignName
- the name of the campaign.campaign
- the XML of the campaign.java.lang.IllegalArgumentException
- throw on invalid XML.EJBException
- thrown on an error.java.rmi.RemoteException
- thrown on a communications error.public boolean deleteCampaign(java.lang.String campaignId) throws javax.ejb.EJBException, java.rmi.RemoteException
This will remove the campaign definition from the repository, making the campaign no longer available. If the campaign had not previosly been shutdown, it will be now.
campaignId
- the id of the campaign.EJBException
- thrown on an error.java.rmi.RemoteException
- thrown on a communications error.public void loadAllCampaigns() throws java.rmi.RemoteException, javax.ejb.EJBException
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.
EJBException
- thrown on an error.java.rmi.RemoteException
- thrown on a communications error.public CampaignService getCampaignService() throws java.rmi.RemoteException, javax.ejb.EJBException
This will be used for cleaning up campaigns.
EJBException
- thrown on an error.java.rmi.RemoteException
- thrown on a communications error.public void clearEndStates(java.lang.String campaignId) throws java.rmi.RemoteException, javax.ejb.EJBException
EJBException
- thrown on an error.java.rmi.RemoteException
- thrown on a communications error.ScenarioService.clearEndStates(com.bea.commerce.campaign.ScenarioContainer)
|
© 2001 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |