public static Invite invite(Task task, Map<String, String> emails) {
    Invite invite = new Invite();
    invite.setMessage(factory.getStrategy().getStringValue());
    invite.setSubject(factory.getStrategy().getStringValue());
    invite.setShareId(task.getId());
    invite.setShareClassName(Task.class.getName());
    invite.setInviter(task.getTaskCreator().getMember());

    invite.setDirectLink("http://reminded.me");
    invite.setNotificationType(NotificationTypeEnum.EMAIL.ordinal());

    invite.setEmailAddresses(emails);

    return invite;
  }
 public static Alarm alarm(Task task, DateTime alarmTime) {
   return alarm(task, task.getTaskCreator().getMember(), alarmTime);
 }