|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--com.bea.campaign.servlets.CampaignCleanupServlet
A servlet which can handle cleaning up campaigns.
This supports the following servlet parameters:
campaignId
: the id/uri of the campaign.
cleanup
: this multi-valued parameter can one or more of
the following values:
It alse expects the following ejb-refs:
If all the request cleanups succeed, a OK (200) status code will be returned. If one or more failed, a INTERNAL_ERROR (500) status code will be returned, plus the header 'BEA-CAMPAIGN-Cleanup-Failures' will be set to the comma-separate list of cleanUp values that failed.
Field Summary | |
protected static int |
CLEANUP_AD_BUCKETS
Mask signifying ad bucket cleanup. |
protected static int |
CLEANUP_AD_COUNTS
Mask signifying ad count cleanup. |
protected static int |
CLEANUP_ALL
Mask signifying all cleanup. |
protected static int |
CLEANUP_END_STATES
Mask signifying end state cleanup. |
protected static int |
CLEANUP_MAIL_BATCHES
Mask signifying mail batches cleanup. |
Constructor Summary | |
CampaignCleanupServlet()
|
Method Summary | |
protected void |
cleanupAdBuckets(java.lang.String campaignId)
Cleanup a campaign's ad buckets. |
protected void |
cleanupAdCounts(java.lang.String campaignId)
Cleanup a campaign's ad count. |
protected void |
cleanupEndStates(java.lang.String campaignId)
Cleanup a campaign's end states. |
protected void |
cleanupMailBatches(java.lang.String campaignId)
Cleanup a campaign's mail batches. |
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Service a request. |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
Service a request. |
protected AdBucketService |
getAdBucketService()
Get our java:comp/env/ejb/AdBucketService. |
protected AdService |
getAdService()
Get our java:comp/env/ejb/AdService. |
protected CampaignService |
getCampaignService()
Get our java:comp/env/ejb/CampaignService. |
protected MailService |
getMailService()
Get our java:comp/env/ejb/MailService. |
protected int |
handleCleanup(java.lang.String campaignId,
int options)
Handle the request cleanup options. |
void |
init()
Initialize this servlet. |
protected void |
resetCampaign(java.lang.String campaignId)
Reset a campaign's internal state. |
protected void |
sendError(javax.servlet.http.HttpServletResponse resp,
int status,
java.lang.String mesg)
Send an error message. |
protected static java.lang.String |
toHTML(java.lang.String in)
Convert a string to html. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete,
doHead,
doOptions,
doPut,
doTrace,
getLastModified,
service,
service |
Methods inherited from class javax.servlet.GenericServlet |
destroy,
getInitParameter,
getInitParameterNames,
getServletConfig,
getServletContext,
getServletInfo,
getServletName,
init,
log,
log |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final int CLEANUP_END_STATES
protected static final int CLEANUP_AD_BUCKETS
protected static final int CLEANUP_AD_COUNTS
protected static final int CLEANUP_MAIL_BATCHES
protected static final int CLEANUP_ALL
Constructor Detail |
public CampaignCleanupServlet()
Method Detail |
public void init() throws javax.servlet.ServletException
This will initialize the various services.
getCampaignService()
,
getAdBucketService()
,
getAdService()
,
getMailService()
public void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException
public void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, java.io.IOException
doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
protected int handleCleanup(java.lang.String campaignId, int options)
protected void resetCampaign(java.lang.String campaignId) throws javax.ejb.CreateException, javax.ejb.EJBException, java.rmi.RemoteException
CampaignService.resetCampaign(java.lang.String)
protected void cleanupEndStates(java.lang.String campaignId) throws javax.ejb.CreateException, javax.ejb.EJBException, java.rmi.RemoteException
CampaignService.clearEndStates(java.lang.String)
protected void cleanupAdBuckets(java.lang.String campaignId) throws javax.ejb.CreateException, javax.ejb.EJBException, java.rmi.RemoteException, ContentException
AdBucketService.cleanupAdBucket(java.lang.String)
protected void cleanupAdCounts(java.lang.String campaignId) throws javax.ejb.CreateException, javax.ejb.EJBException, java.rmi.RemoteException, ContentException
AdService.cleanupAdService(java.lang.String)
protected void cleanupMailBatches(java.lang.String campaignId) throws javax.ejb.CreateException, javax.ejb.EJBException, java.rmi.RemoteException, MailServiceException
MailService.deleteBatch(java.lang.String)
protected void sendError(javax.servlet.http.HttpServletResponse resp, int status, java.lang.String mesg) throws javax.servlet.ServletException, java.io.IOException
protected AdService getAdService() throws javax.ejb.CreateException, java.rmi.RemoteException
This will use the ejb-ref if getCampaignService().getAdService() fails.
protected AdBucketService getAdBucketService() throws javax.ejb.CreateException, java.rmi.RemoteException
This will use the ejb-ref if getCampaignService().getAdBucketService() fails.
protected CampaignService getCampaignService() throws javax.ejb.CreateException, java.rmi.RemoteException
protected MailService getMailService() throws javax.ejb.CreateException, java.rmi.RemoteException
This will use the ejb-ref if getCampaignService().getMailService() fails.
protected static java.lang.String toHTML(java.lang.String in)
ContentHelper.toHTML(java.lang.String)
|
© 2002 BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |