LOGGER.log(Level.INFO, "\n-------------deleteMailboxDumpRequest-------------");
boolean isDeleted = service.deleteMailboxDumpRequest(user, createdId);
LOGGER.log(Level.INFO, "Deleted mailbox dump request - " + isDeleted);
MailMonitor monitor = new MailMonitor();
c = Calendar.getInstance();
c.add(Calendar.MONTH, 1);
monitor.setBeginDate(c.getTime());
c.add(Calendar.MONTH, 1);
monitor.setEndDate(c.getTime());
monitor.setDestUserName(destUser);
monitor.setIncomingEmailMonitorLevel("FULL_MESSAGE");
monitor.setOutgoingEmailMonitorLevel("HEADER_ONLY");
monitor.setChatMonitorLevel("FULL_MESSAGE");
monitor.setDraftMonitorLevel("FULL_MESSAGE");
LOGGER.log(Level.INFO, "\n-------------createMailMonitor-------------");
LOGGER.log(Level.INFO, "\nCreating mail monitor for the user: " + user);
service.createMailMonitor(user, monitor);
// Retrieve all monitors for the user
LOGGER.log(Level.INFO, "\n-------------retrieveMonitors-------------");
LOGGER.log(Level.INFO, "\nRetrieving monitors for the user: " + user);
GenericFeed feed = service.retrieveMonitors(user);
for (GenericEntry entry : feed.getEntries()) {
monitor = new MailMonitor(entry);
LOGGER.log(Level.INFO, "Request Id: " + monitor.getRequestId());
LOGGER.log(Level.INFO, "Destination User: " + monitor.getDestUserName());
LOGGER.log(Level.INFO, "Monitor Begin Date: " + monitor.getBeginDate());
LOGGER.log(Level.INFO, "Monitor End Date: " + monitor.getEndDate());
LOGGER.log(Level.INFO, "Outgoing Email Monitor Level: "
+ monitor.getOutgoingEmailMonitorLevel());
LOGGER.log(Level.INFO, "Incoming Email Monitor Level: "
+ monitor.getIncomingEmailMonitorLevel());
LOGGER.log(Level.INFO, "Draft Email Monitor Level: " + monitor.getDraftMonitorLevel());
LOGGER.log(Level.INFO, "Chat Monitor Level: " + monitor.getChatMonitorLevel());
}
// Delete the monitor for the user
LOGGER.log(Level.INFO, "\n-------------deleteMonitor-------------");
LOGGER.log(Level.INFO, "Deleting monitor for the user...");