Examples of toIcalendar()


Examples of org.martinlaw.bo.MatterEvent.toIcalendar()

    MatterEvent matterEvent = getMatterDate(uid);
    String template = IOUtils.toString(MatterEvent.class.getResourceAsStream(MartinlawConstants.VCALENDAR_TEMPLATE_FILE));
    if (StringUtils.isEmpty(template)) {
      throw new RuntimeException("The vcalendar template has not been defined in '" + MartinlawConstants.VCALENDAR_TEMPLATE_FILE + "'");
    }
    String calendar = matterEvent.toIcalendar(template);
    InputStream is = new ByteArrayInputStream(calendar.getBytes());
    String fileName = matterEvent.getMatter().getLocalReference() + "-" + matterEvent.getType().getName();
    getDownloadUtils().downloadAsStream(response, is, "text/calendar", calendar.length(),  fileName + ".ics");
   
    return getUIFModelAndView(uifForm);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.