if(!CVUtility.isModuleVisible("Events",userID, this.dataSource))
throw new AuthorizationFailedException("Event - getEventDetails");
//System.out.println("In getEventDetails");
EventDetails eventDetails = new EventDetails();
CVDal cvdal = new CVDal(dataSource);
Collection colDetails = null;
try
{
cvdal.setSql("marketing.geteventdetails");
cvdal.setInt(1,eventID);
colDetails = cvdal.executeQuery();
cvdal.clearParameters();
Iterator it = colDetails.iterator();
while (it.hasNext())
{
HashMap mapResult = (HashMap)it.next();
eventDetails.setMaxattendees(Integer.parseInt(mapResult.get("maxattendees").toString()));
eventDetails.setModeratorid(Integer.parseInt(mapResult.get("ownerid").toString()));
eventDetails.setModeratorname((String)mapResult.get("ownername"));
eventDetails.setStartdate((Timestamp)mapResult.get("startdate"));
eventDetails.setEnddate((Timestamp)mapResult.get("enddate"));
eventDetails.setWhoshouldattend((String)mapResult.get("formember"));
eventDetails.setFormember((String)mapResult.get("formember"));
eventDetails.setDetail((String)mapResult.get("detail"));
eventDetails.setName((String)mapResult.get("title"));
eventDetails.setCreateddate((Timestamp)mapResult.get("createddate"));
eventDetails.setModifieddate((Timestamp)mapResult.get("modifieddate"));
}
ArrayList attachedFiles = new ArrayList();
cvdal.setSql("customer.events.getEventAttachments");
cvdal.setInt(1, eventID);
Collection filesResults = cvdal.executeQuery();
cvdal.clearParameters();
if (filesResults != null)
{
Iterator filesIter = filesResults.iterator();
while (filesIter.hasNext())
{
HashMap fileRow = (HashMap)filesIter.next();
attachedFiles.add(fileRow);
}
}
eventDetails.setAttachedFiles(attachedFiles);
cvdal.destroy();
}
catch(Exception exe)
{