Examples of Invitation


Examples of org.apache.openmeetings.db.entity.room.Invitation

   * @param hidePass
   * @return
   */
  public Object getInvitationByHashCode(String hashCode, boolean hidePass) {
    try {
      Invitation invitation = invitationDao.getInvitationByHashCode(hashCode, hidePass);

      if (invitation == null) {
        // already deleted or does not exist
        return new Long(-31);
      } else {
        switch (invitation.getValid()) {
          case OneTime:
            // do this only if the user tries to get the Invitation, not
            // while checking the PWD
            if (hidePass) {
              // one-time invitation
              if (invitation.isUsed()) {
                // Invitation is of type *only-one-time* and was
                // already used
                return new Long(-32);
              } else {
                // set to true if this is the first time / a normal
                // getInvitation-Query
                invitation.setUsed(true);
                invitationDao.update(invitation);
                // invitation.setInvitationpass(null);
                invitation.setAllowEntry(true);
              }
            } else {
              invitation.setAllowEntry(true);
            }
            break;
          case Period:
            TimeZone tz = timezoneUtil.getTimeZone(invitation.getInvitee());
            Calendar now = Calendar.getInstance(tz);
            Calendar start = Calendar.getInstance(tz);
            start.setTime(invitation.getValidFrom());

            Calendar end = Calendar.getInstance(tz);
            end.setTime(invitation.getValidTo());
            if (now.after(start) && now.before(end)) {
              invitationDao.update(invitation);
              // invitation.setInvitationpass(null);
              invitation.setAllowEntry(true);
            } else {

              // Invitation is of type *period* and is not valid
              // anymore, this is an extra hook to display the time
              // correctly
              // in the method where it shows that the hash code does
              // not work anymore
              invitation.setAllowEntry(false);
            }
            break;
          case Endless:
          default:
            invitationDao.update(invitation);

            invitation.setAllowEntry(true);
            // invitation.setInvitationpass(null);
            break;
        }
        return invitation;
      }
View Full Code Here

Examples of org.apache.openmeetings.db.entity.room.Invitation

    }
    return null;
  }

  private void sendReminder(User u, Appointment a) throws Exception {
    Invitation i = new Invitation();
    i.setInvitedBy(u);
    i.setInvitee(u);
    i.setAppointment(a);
    sendReminder(u, a, i);
  }
View Full Code Here

Examples of org.apache.openmeetings.db.entity.room.Invitation

  public Object checkInvitationPass(String hashCode, String pass) {
    try {
      Object obj = this.getInvitationByHashCode(hashCode, false);
      log.debug("checkInvitationPass - obj: " + obj);
      if (obj instanceof Invitation) {
        Invitation invitation = (Invitation) obj;

        // log.debug("invitationId "+invitation.getInvitations_id());
        // log.debug("pass "+pass);
        // log.debug("getInvitationpass "+invitation.getInvitationpass());

        if (ManageCryptStyle.getInstanceOfCrypt().verifyPassword(pass, invitation.getPassword())) {
          return new Long(1);
        } else {
          return new Long(-34);
        }
      } else {
View Full Code Here

Examples of org.apache.openmeetings.db.entity.room.Invitation

      // Iterate through all MeetingMembers
      for (MeetingMember mm : members) {
        log.debug("doScheduledMeetingReminder : Member " + mm.getUser().getAdresses().getEmail());

        Invitation inv = mm.getInvitation();

        sendReminder(mm.getUser(), a, inv);
      }
    }
  }
View Full Code Here

Examples of org.apache.openmeetings.db.entity.room.Invitation

      if (to.getAdresses() != null) {
        String aLinkHTML =   (isPrivate && to.getType() == Type.user) ? "<br/><br/>" + "<a href='" + ContactsHelper.getLink() + "'>"
              + WebSession.getString(1302) + "</a><br/>" : "";
        String invitation_link = "";
        if (p.isBookedRoom()) {
          Invitation i = getBean(InvitationManager.class).getInvitation(to, p.getRoom(),
              false, null, Valid.Period
              , userDao.get(getUserId()), userDao.get(getUserId()).getLanguage_id(),
              modelStart.getObject(), modelEnd.getObject(), null);
         
          invitation_link = LinkHelper.getInvitationLink(getBean(ConfigurationDao.class).getBaseUrl(), i);
View Full Code Here

Examples of org.apache.openmeetings.db.entity.room.Invitation

    Long users_id = this.sessiondataDao.checkSession(SID);
    Long user_level = this.userManager.getUserLevelByID(users_id);
   
    if (AuthLevelUtil.checkUserLevel(user_level)) {
      User invitee = userDao.getContact(username, username, username, users_id);
      Invitation invitation = invitationManager.getInvitation(invitee, roomDao.get(room_id),
              false, "", Valid.OneTime
              , userDao.get(users_id), "", 1L,
              null, null, null);
 
      return ((invitation == null) ? null : invitation.getHash());
    } else {
      return "Need Admin Privileges to perfom the Action";
    }
  }
View Full Code Here

Examples of org.apache.openmeetings.db.entity.room.Invitation

 
        Date dFrom = calFrom.getTime();
        Date dTo = calTo.getTime();
 
        User invitee = userDao.getContact(email, users_id);
        Invitation invitation = invitationManager.getInvitation(invitee, roomDao.get(room_id),
                isPasswordProtected, invitationpass, Valid.fromInt(valid)
                , userDao.get(users_id), getBaseUrl(baseurl), language_id,
                dFrom, dTo, null);

        if (invitation != null) {
View Full Code Here

Examples of org.apache.openmeetings.db.entity.room.Invitation

      , Long language_id) throws Exception {
    Long users_id = sessiondataDao.checkSession(SID);
    Long user_level = userManager.getUserLevelByID(users_id);

    if (AuthLevelUtil.checkUserLevel(user_level)) {
      Invitation inv = (Invitation)invitationManager.getInvitationByHashCode(invitationHash, true);
      inv.setBaseUrl(getBaseUrl(baseurl));
      inv.getInvitee().setLanguage_id(language_id);
      invitationManager.sendInvitionLink(inv, MessageType.Create, subject, message, false);
    } else {
      return "Need User Privileges to perfom the Action";
    }
    return "Success";
View Full Code Here

Examples of org.apache.openmeetings.db.entity.room.Invitation

      // Iterate through all MeetingMembers
      for (MeetingMember mm : members) {
        log.debug("doScheduledMeetingReminder : Member " + mm.getUser().getAdresses().getEmail());

        Invitation inv = mm.getInvitation();

        if (inv == null) {
          log.error(String.format("Error retrieving Invitation for member %s in Appointment %s"
              , mm.getUser().getAdresses().getEmail(), a.getTitle()));
          continue;
        }

        if (inv.getBaseUrl() == null || inv.getBaseUrl().length() < 1) {
          log.error("Error retrieving baseUrl from Invitation ID : " + inv.getId());
          continue;
        }

        TimeZone tZone = timezoneUtil.getTimeZone(mm.getTimeZoneId());

        long language_id = mm.getUser().getLanguage_id();
        // Get the required labels one time for all meeting members. The
        // Language of the email will be the system default language
        String labelid1158 = fieldManager.getString(1158L, language_id);
        String labelid1153 = fieldManager.getString(1153L, language_id);
        String labelid1154 = fieldManager.getString(1154L, language_id);

        String subject = generateSubject(labelid1158, a, tZone);
        String smsSubject = generateSMSSubject(labelid1158, a);

        String message = generateMessage(labelid1158, a, language_id, labelid1153, labelid1154, tZone);

        invitationManager.sendInvitionLink(inv, MessageType.Create, subject, message, false);

        invitationManager.sendInvitationReminderSMS(mm.getUser().getAdresses().getPhone(), smsSubject, language_id);
        inv.setUpdated(new Date());
        invitationDao.update(inv);
      }
    }
  }
View Full Code Here

Examples of org.apache.openmeetings.db.entity.room.Invitation

          log.info("validToDate: "
              + CalendarPatterns
                  .getDateWithTimeByMiliSeconds(dTo));
        }
        User invitee = userDao.getContact(username, username, username, users_id);
        Invitation invitation = invitationManager.getInvitation(invitee, roomDao.get(room_id),
                isPasswordProtected, invitationpass, Valid.fromInt(valid)
                , userDao.get(users_id), "", 1L,
                dFrom, dTo, null);

        if (invitation != null) {
          return invitation.getHash();
        } else {
          return "Sys - Error";
        }
      } else {
        return "Need Admin Privileges to perfom the Action";
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.