Package org.apache.openmeetings.persistence.beans.user

Examples of org.apache.openmeetings.persistence.beans.user.User


        log.error("deleteUserFromOrganisation " + user_id + "  "
            + organisation_id);
        //user should be updated to have recent organisation_users list
        Long id = null;
        User u = usersDao.get(user_id);
        List<Organisation_Users> l = u.getOrganisation_users();
        for (Organisation_Users ou : l) {
          if (ou.getOrganisation().getOrganisation_id().equals(organisation_id)) {
            l.remove(ou);
            id = ou.getOrganisation_users_id();
            em.remove(ou);
            break;
          }
        }
        u.setOrganisation_users(l);
        usersDao.update(u, -1L);

        return id;
      } else {
        log.error("[deleteUserFromOrganisation] authorization required");
View Full Code Here


        "calendar.conference.rooms.default.size", Long.class, "50");

    try {

      // Adding creator as MeetingMember
      User user = userManager.getUserById(userId);
     
      Long room_id = roomId > 0 ? roomId : roomManager.addRoom(3, // user level
          appointmentName, // name
          roomType, // RoomType
          "", // Comment
          numberOfParticipants, // Number of participants
          true, // public
          null, // organizations
          true, // Appointment
          false, // Demo Room => Meeting Timer
          null, // Meeting Timer time in seconds
          false, // Is Moderated Room
          null, // Moderation List Room
          true, // Allow User Questions
          false, // isAudioOnly
          true, // allowFontStyles
          false, // isClosed
          "", // redirectURL
          "", // conferencePIN
          null, // ownerID
          null, null,
          false, // hideTopBar
          false, // hideChat
          false, // hideActivitiesAndActions
          false, // hideFilesExplorer
          false, // hideActionsMenu
          false, // hideScreenSharing
          false, // hideWhiteboard
          false, //showMicrophoneStatus
          false, // chatModerated
          false, // chatOpened
          false, // filesOpened
          false, // autoVideoSelect
          false //sipEnabled
        );

      log.debug("Appointmentlogic.saveAppointment : Room - " + room_id);
      log.debug("Appointmentlogic.saveAppointment : Reminder - " + remind);
 
      Room room = roomDao.get(room_id);

      // Re-factor the given time ignoring the Date is always UTC!
      TimeZone timezone = timezoneUtil.getTimezoneByUser(user);
     
      Long appointmentId = appointmentDao.addAppointment(appointmentName,
          userId, appointmentLocation, appointmentDescription,
          appointmentstart, appointmentend, isDaily, isWeekly,
          isMonthly, isYearly, categoryId, remind, room, language_id,
          isPasswordProtected, password, false, user.getOmTimeZone().getJname());

      String invitorName = user.getFirstname() + " " + user.getLastname()
          + " [" + user.getAdresses().getEmail() + "]";

      // Add the creator of the meeting calendar event
      meetingMemberLogic.addMeetingMember(user.getFirstname(), user
          .getLastname(), "", "", appointmentId, userId, user
          .getAdresses().getEmail(), user.getPhoneForSMS(), baseUrl, userId, true,
          language_id, isPasswordProtected, password, timezone, user.getOmTimeZone(),
          invitorName);

      // iterate through all members of this meeting and add them to the
      // event and send invitation
      if (mmClient != null) {

        for (int i = 0; i < mmClient.size(); i++) {

          @SuppressWarnings("rawtypes")
          Map clientMember = (Map) mmClient.get(i);

          log.debug("clientMember.get('userId') "
              + clientMember.get("userId"));
         
          for (Object tString : clientMember.entrySet()) {
            log.debug("tString " + tString);
          }
          log.debug("clientMember.get('meetingMemberId') "
              + clientMember.get("meetingMemberId"));

          // We need two different timeZones, the internal Java Object
          // TimeZone, and
          // the one for the UI display object to map to, cause the UI
          // only has around 24 timezones
          // and Java around 600++
          Long sendToUserId = 0L;
          TimeZone timezoneMember = null;
          OmTimeZone omTimeZone = null;
          if (clientMember.get("userId") != null) {
            sendToUserId = Long.valueOf(
                clientMember.get("userId").toString())
                .longValue();
          }

          String phone = "";
          // Check if this is an internal user, if yes use the
          // timezone from his profile otherwise get the timezones
          // from the variable jNameTimeZone
          if (sendToUserId > 0) {
            User interalUser = userManager
                .getUserById(sendToUserId);
            phone = interalUser.getPhoneForSMS();
            timezoneMember = timezoneUtil
                .getTimezoneByUser(interalUser);
            omTimeZone = interalUser.getOmTimeZone();
          } else {
            // Get the internal-name of the timezone set in the
            // client object and convert it to a real one
            Object jName = clientMember.get("jNameTimeZone");
            if (jName == null) {
View Full Code Here

        if (rooms_id <= 0) {
          return rooms_id;
        }

        User us = userManager.getUserById(users_id);

        appointmentDao.addAppointment("appointmentName", users_id,
            "appointmentLocation", "appointmentDescription", dFrom,
            dTo, // appointmentstart, appointmentend,
            false, false, false, false, // isDaily, isWeekly,
                          // isMonthly, isYearly,
            1L, // categoryId
            reminderTypeId, // 1=none, 2=simple mail, 3=ICAL
            roomDao.get(rooms_id), 1L, // language_id
            isPasswordProtected, // isPasswordProtected
            password, // password
            false, us.getOmTimeZone().getJname());

        return rooms_id;

      } else {
        return -2L;
View Full Code Here

    if (pbl != null) {
      result.addAll(pbl);
    }

    Long users_id = this.sessiondataDao.checkSession(SID);
    User u = this.userManager.getUserById(users_id);
    for (Organisation_Users ou : u.getOrganisation_users()) {
      List<RoomOrganisation> rol = this.conferenceService
          .getRoomsByOrganisationWithoutType(SID, ou
              .getOrganisation().getOrganisation_id().longValue());
      if (rol != null) {
        for (RoomOrganisation ro : rol) {
View Full Code Here

        URL url = new URL(path);
        URLConnection uc = url.openConnection();
        InputStream inputstream = new BufferedInputStream(
            uc.getInputStream());

        User externalUser = userManager.getUserByExternalIdAndType(
            externalUserId, externalType);

        LinkedHashMap<String, Object> hs = new LinkedHashMap<String, Object>();
        hs.put("user", externalUser);

        ConverterProcessResultList returnError = fileProcessor
            .processFile(externalUser.getUser_id(), room_id,
                isOwner, inputstream, parentFolderId,
                fileSystemName,
                externalFileId, externalType);

        // Flash cannot read the response of an upload
View Full Code Here

        URL url = new URL(path);
        URLConnection uc = url.openConnection();
        InputStream inputstream = new BufferedInputStream(
            uc.getInputStream());

        User internalUser = userManager.getUserById(internalUserId);

        LinkedHashMap<String, Object> hs = new LinkedHashMap<String, Object>();
        hs.put("user", internalUser);

        ConverterProcessResultList returnError = fileProcessor
            .processFile(internalUser.getUser_id(), room_id,
                isOwner, inputstream, parentFolderId,
                fileSystemName,
                externalFileId, externalType);

        // Flash cannot read the response of an upload
View Full Code Here

      Long users_id = sessiondataDao.checkSession(SID);
      Long User_level = userManager.getUserLevelByID(users_id);

      if (authLevelUtil.checkWebServiceLevel(User_level)) {

        User userExternal = userManager.getUserByExternalIdAndType(
            externalUserId, externalType);

        Long userId = userExternal.getUser_id();

        log.debug("addFolder " + parentFileExplorerItemId);

        if (parentFileExplorerItemId == -2 && isOwner) {
          // users_id (OwnerID) => only set if its directly root in
View Full Code Here

        if (user_id == null || user_id < 0) {
          return user_id;
        }

        User user = userManagement.getUserById(user_id);

        // activate the User
        user.setStatus(1);
        user.setUpdatetime(new Date());

        userManagement.updateUser(user);

        return user_id;
View Full Code Here

        if (user_id < 0) {
          return user_id;
        }

        User user = userManagement.getUserById(user_id);

        // activate the User
        user.setStatus(1);
        user.setUpdatetime(new Date());

        userManagement.updateUser(user);

        return user_id;
View Full Code Here

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManagement.getUserLevelByID(users_id);

      if (authLevelUtil.checkAdminLevel(user_level)) {

        User testUser = userManagement.getUserByExternalIdAndType(
            externalUserId, externalUserType);

        if (testUser != null) {
          throw new Exception("User does already exist!");
        }

        // This will send no email to the users
        Long user_id = userManagement.registerUserNoEmail(username,
            userpass, lastname, firstname, email, new Date(),
            street, additionalname, fax, zip, states_id, town,
            language_id, "", false, true, // generate SIP Data if the config is enabled
            jNameTimeZone);

        if (user_id < 0) {
          return user_id;
        }

        User user = userManagement.getUserById(user_id);

        // activate the User
        user.setStatus(1);
        user.setUpdatetime(new Date());
        user.setExternalUserId(externalUserId);
        user.setExternalUserType(externalUserType);

        userManagement.updateUser(user);

        return user_id;
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.persistence.beans.user.User

Copyright © 2018 www.massapicom. 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.