Package org.apache.openmeetings.db.entity.user

Examples of org.apache.openmeetings.db.entity.user.UserContact


      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);
      // users only
      if (AuthLevelUtil.checkUserLevel(user_level)) {

        UserContact userContacts = userContactsDao
            .get(userContactId);

        if (userContacts == null) {
          return -49;
        }
View Full Code Here


      Long user_level = userManager.getUserLevelByID(users_id);

      // users only
      if (AuthLevelUtil.checkUserLevel(user_level)) {

        UserContact userContacts = userContactsDao
            .get(userContactId);

        userContacts.setShareCalendar(shareCalendar);

        userContactsDao.updateContact(userContacts);

      }
View Full Code Here

        return uc.getOwner().getFirstname() + " " + uc.getOwner().getLastname(); //FIXME salutation
      }
     
      @Override
      protected void populateItem(Item<UserContact> item) {
        UserContact uc = item.getModelObject();
        final long contactId = uc.getUserContactId();
        final long userId = uc.getOwner().getUser_id();
        if (uc.getPending()) {
          item.add(AttributeModifier.append("class", "unread"));
        }
        item.add(new Label("name", getName(uc)))
        item.add(new WebMarkupContainer("accept").add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = 7223188816617664993L;

          @Override
          protected void onEvent(AjaxRequestTarget target) {
            ContactsHelper.acceptUserContact(contactId);
            updateContacts(target);
          }
        }).setVisible(uc.getPending()));
        item.add(new WebMarkupContainer("decline").add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = 1L;

          @Override
          protected void onEvent(AjaxRequestTarget target) {
            getBean(UserContactsDao.class).deleteUserContact(contactId);
            updateContacts(target);
          }
        }).setVisible(uc.getPending()));
        item.add(new WebMarkupContainer("view").add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = 1L;

          @Override
          protected void onEvent(AjaxRequestTarget target) {
            d.open(target, userId);
          }
        }));
        item.add(new WebMarkupContainer("message").add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = 1L;

          @Override
          protected void onEvent(AjaxRequestTarget target) {
            newMessage.reset(true).open(target, userId);
          }
        }).setVisible(!uc.getPending()));
        item.add(new WebMarkupContainer("delete").add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = 1L;

          @Override
          protected void onEvent(AjaxRequestTarget target) {
            getBean(UserContactsDao.class).deleteUserContact(contactId);
            updateContacts(target);
          }
        }).setVisible(!uc.getPending()));
      }
    };
    updateContacts(null);
    add(d, contacts.add(dw, pendingContacts, allContacts).setOutputMarkupId(true));//TODO update
   
View Full Code Here

    try {
      Long users_id = sessiondataDao.checkSession(SID);
      // users only
      if (AuthLevelUtil.hasUserLevel(userDao.getRights(users_id))) {

        UserContact userContacts = userContactsDao
            .get(userContactId);

        if (userContacts == null) {
          return -49;
        }
View Full Code Here

      Long users_id = sessiondataDao.checkSession(SID);

      // users only
      if (AuthLevelUtil.hasUserLevel(userDao.getRights(users_id))) {

        UserContact userContacts = userContactsDao
            .get(userContactId);

        userContacts.setShareCalendar(shareCalendar);

        userContactsDao.updateContact(userContacts);

      }
View Full Code Here

      registry.bind(User.class, new UserConverter(usersDao, usersMap));
     
      List<UserContact> list = readList(serializer, f, "userContacts.xml", "usercontacts", UserContact.class, true);
      for (UserContact uc : list) {
        Long ucId = uc.getUserContactId();
        UserContact storedUC = userContactsDao.get(ucId);

        if (storedUC == null && uc.getContact() != null && uc.getContact().getUser_id() != null) {
          uc.setUserContactId(0);
          if (uc.getOwner() != null && uc.getOwner().getUser_id() == null) {
            uc.setOwner(null);
View Full Code Here

      registry.bind(User.class, new UserConverter(usersDao, usersMap));
     
      List<UserContact> list = readList(serializer, f, "userContacts.xml", "usercontacts", UserContact.class, true);
      for (UserContact uc : list) {
        Long ucId = uc.getUserContactId();
        UserContact storedUC = userContactsDao.get(ucId);

        if (storedUC == null && uc.getContact() != null && uc.getContact().getUser_id() != null) {
          uc.setUserContactId(0);
          if (uc.getOwner() != null && uc.getOwner().getUser_id() == null) {
            uc.setOwner(null);
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.user.UserContact

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.