src/org/ohmage/service/CampaignServices.java
public void deleteCampaign(final String campaignId) 
			throws ServiceException {
		// First, retrieve the path information for all of the images 
		// associated with this campaign.
		Collection<URL> imageUrls;
		try {
			imageUrls =
				campaignImageQueries.getImageUrlsFromCampaign(campaignId);
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
		
		try {
			campaignQueries.deleteCampaign(campaignId);
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
		
		// If the transaction succeeded, delete all of the images from the 
		// disk.
		for(URL imageUrl : imageUrls) {
			imageQueries.deleteImageDiskOnly(imageUrl);
		}
	}
/**
	 * Deletes a campaign and everything associated with it.
	 * 
	 * @param campaignId The unique identifier for the campaign.
	 * 
	 * @throws ServiceException Thrown if there is an error.
	 */
Deletes a campaign and everything associated with it.

@param campaignId The unique identifier for the campaign.

@throws ServiceException Thrown if there is an error.
Deletes a campaign and everything associated with it . @param campaignId The unique identifier for the campaign . @throws ServiceException Thrown if there is an error .
public void deleteCampaign(final String campaignId) 
			throws ServiceException {
		Collection<URL> imageUrls;
		try {
			imageUrls =
				campaignImageQueries.getImageUrlsFromCampaign(campaignId);
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
		try {
			campaignQueries.deleteCampaign(campaignId);
		}
		catch(DataAccessException e) {
			throw new ServiceException(e);
		}
		for(URL imageUrl : imageUrls) {
			imageQueries.deleteImageDiskOnly(imageUrl);
		}
	}
public void deleteCampaign ( final String campaignId ) throws ServiceException { Collection < URL > imageUrls ; try { imageUrls = campaignImageQueries . getImageUrlsFromCampaign ( campaignId ) ; } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } try { campaignQueries . deleteCampaign ( campaignId ) ; } catch ( DataAccessException e ) { throw new ServiceException ( e ) ; } for ( URL imageUrl : imageUrls ) { imageQueries . deleteImageDiskOnly ( imageUrl ) ; } }
Deletes a campaign and everything associated with it.
Deletes a campaign and everything associated with it .
// First, retrieve the path information for all of the images  // associated with this campaign. // If the transaction succeeded, delete all of the images from the  // disk.