Examples of Invitations


Examples of org.apache.openmeetings.persistence.beans.invitation.Invitations

      TypedQuery<Invitations> query = em.createQuery(hql, Invitations.class);
      query.setParameter("deleted", true);
      query.setParameter("invid", invId);

      Invitations inv = null;
      try {
        inv = query.getSingleResult();
      } catch (NoResultException ex) {
      }
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.invitation.Invitations

      TypedQuery<Invitations> query = em.createQuery(hql, Invitations.class);
      query.setParameter("deleted", true);
      query.setParameter("invid", invId);

      Invitations inv = null;
      try {
        inv = query.getSingleResult();
      } catch (NoResultException ex) {
      }
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.invitation.Invitations

          + "where c.hash LIKE :hashCode "
          + "AND c.deleted = :deleted";
      TypedQuery<Invitations> query = em.createQuery(hql, Invitations.class);
      query.setParameter("hashCode", hashCode);
      query.setParameter("deleted", false);
      Invitations invitation = null;
      try {
        invitation = query.getSingleResult();
      } catch (NoResultException ex) {
      }

      if (invitation == null) {
        // already deleted or does not exist
        return new Long(-31);
      } else {
        if (invitation.getCanBeUsedOnlyOneTime()) {

          // do this only if the user tries to get the Invitation, not
          // while checking the PWD
          if (hidePass) {
            // one-time invitation
            if (invitation.getInvitationWasUsed()) {
              // 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.setInvitationWasUsed(true);
              this.updateInvitation(invitation);
              // invitation.setInvitationpass(null);
              invitation.setAllowEntry(true);
              return invitation;
            }
          } else {
            invitation.setAllowEntry(true);
            return invitation;
          }

        } else if (invitation.getIsValidByTime()) {
          OmTimeZone tz = invitation.getOmTimeZone() == null
              ? omTimeZoneDaoImpl.getOmTimeZone(configurationDao.getConfValue("default.timezone", String.class, "Europe/Berlin"))
              : invitation.getOmTimeZone();
          Calendar now = Calendar.getInstance(TimeZone.getTimeZone(tz.getIcal()));
          Calendar start = Calendar.getInstance(TimeZone.getTimeZone(tz.getIcal()));
          start.setTime(invitation.getValidFrom());

          Calendar end = Calendar.getInstance(TimeZone.getTimeZone(tz.getIcal()));
          end.setTime(invitation.getValidTo());
          if (now.after(start) && now.before(end)) {
            this.updateInvitation(invitation);
            // invitation.setInvitationpass(null);
            invitation.setAllowEntry(true);
            return invitation;
          } 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);

            return invitation;
          }
        } else {
          // Invitation is not limited, neither time nor single-usage
          this.updateInvitation(invitation);

          invitation.setAllowEntry(true);
          // invitation.setInvitationpass(null);
          return invitation;
        }
      }

View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.invitation.Invitations

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

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

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

Examples of org.apache.openmeetings.persistence.beans.invitation.Invitations

                  .getDateWithTimeByMiliSeconds(dFrom));
          log.info("validToDate: "
              + CalendarPatterns
                  .getDateWithTimeByMiliSeconds(dTo));
        }
        Invitations invitation = invitationManager
            .addInvitationLink(user_level, username, username,
                username, username, username, room_id, "",
                isPasswordProtected, invitationpass, valid,
                dFrom, dTo, users_id, "", 1L, false, dFrom,
                dTo, null, username, userManager.getUserById(users_id).getOmTimeZone());

        if (invitation != null) {

          return invitation.getHash();

        } else {

          return "Sys - Error";
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.invitation.Invitations

          log.info("validToDate: "
              + CalendarPatterns
                  .getDateWithTimeByMiliSeconds(dTo));
        }

        Invitations invitation = invitationManager
            .addInvitationLink(user_level, username, message,
                baseurl, email, subject, room_id, "",
                isPasswordProtected, invitationpass, valid,
                dFrom, dTo, users_id, baseurl, language_id,
                sendMail, dFrom, dTo, null, username, userManager.getUserById(users_id).getOmTimeZone());

        if (invitation != null) {

          return invitation.getHash();

        } else {

          return "Sys - Error";
View Full Code Here

Examples of org.apache.openmeetings.persistence.beans.invitation.Invitations

        log.info("validFromDate: "
            + CalendarPatterns.getDateWithTimeByMiliSeconds(dFrom));
        log.info("validToDate: "
            + CalendarPatterns.getDateWithTimeByMiliSeconds(dTo));

        Invitations invitation = invitationManager
            .addInvitationLink(user_level, username, message,
                baseurl, email, subject, room_id, "",
                isPasswordProtected, invitationpass, valid,
                dFrom, dTo, users_id, baseurl, language_id,
                sendMail, dFrom, dTo, null, username, userManager.getUserById(users_id).getOmTimeZone());

        if (invitation != null) {

          return invitation.getHash();

        } else {

          return "Sys - Error";
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.invitation.Invitations

            dTo = calTo.getTime();
           
            log.info("validFromDate: "+CalendarPatterns.getDateWithTimeByMiliSeconds(dFrom));
            log.info("validToDate: "+CalendarPatterns.getDateWithTimeByMiliSeconds(dTo));
        }
          Invitations invitation =  Invitationmanagement.getInstance().addInvitationLink(user_level,
                          username, username,
                          username, username, username, room_id, "",
                          isPasswordProtected, invitationpass,
                          valid, dFrom, dTo, users_id, "",
                          1L, false, dFrom, dTo, null);
         
          if(invitation != null) {
           
            return invitation.getHash();
           
          } else {
           
            return "Sys - Error";
           
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.invitation.Invitations

           
            log.info("validFromDate: "+CalendarPatterns.getDateWithTimeByMiliSeconds(dFrom));
            log.info("validToDate: "+CalendarPatterns.getDateWithTimeByMiliSeconds(dTo));
        }
       
          Invitations invitation =  Invitationmanagement.getInstance().addInvitationLink(user_level, username, message,
                          baseurl, email, subject, room_id, "",
                          isPasswordProtected, invitationpass,
                          valid, dFrom, dTo, users_id, baseurl,
                          language_id, sendMail, dFrom, dTo, null);
         
          if(invitation != null) {
           
            return invitation.getHash();
           
          } else {
           
            return "Sys - Error";
           
View Full Code Here

Examples of org.openmeetings.app.persistence.beans.invitation.Invitations

          Date dTo = calTo.getTime();
         
          log.info("validFromDate: "+CalendarPatterns.getDateWithTimeByMiliSeconds(dFrom));
          log.info("validToDate: "+CalendarPatterns.getDateWithTimeByMiliSeconds(dTo));
         
          Invitations invitation =  Invitationmanagement.getInstance().addInvitationLink(user_level, username, message,
                          baseurl, email, subject, room_id, "",
                          isPasswordProtected, invitationpass,
                          valid, dFrom, dTo, users_id, baseurl,
                          language_id, sendMail, dFrom, dTo, null);
         
          if(invitation != null) {
           
            return invitation.getHash();
           
          } else {
           
            return "Sys - Error";
           
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.