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

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


        } else {

          log.debug("user_id, organisation_id" + user_id + ", "
              + organisation_id);

          Organisation_Users ou = organisationManager
              .getOrganisation_UserByUserAndOrganisation(user_id,
                  organisation_id);

          log.debug("ou: " + ou);

          if (ou != null) {
            if (ou.getIsModerator() != null && ou.getIsModerator()) {
              return 2L;
            } else {
              return us.getLevel_id();
            }
          } else {
View Full Code Here


    try {
      Long users_id = sessiondataDao.checkSession(SID);
      if (AuthLevelUtil.hasWebServiceLevel(userDao.getRights(users_id))) {
        if (!orgUserDao.isUserInOrganization(organisation_id, user_id)) {
          User u = userDao.get(user_id);
          u.getOrganisation_users().add(new Organisation_Users(orgDao.get(organisation_id)));
          userDao.update(u, users_id);
        }
        return user_id;
      } else {
        return new Long(-26);
View Full Code Here

    User us = usersDao.get(1L);
    assertNotNull("User should exist", us);
   
    assertNotNull("Organisation User list should exist", us.getOrganisation_users());
    us.getOrganisation_users().add(new Organisation_Users(o));
    us = usersDao.update(us, null);

    log.error(us.getLastname());
    log.error(us.getAdresses().getTown());
  }
View Full Code Here

    User u = getValidUser();
    Long orgId = u.getOrganisation_users().get(0).getOrganisation().getOrganisation_id();
    List<User> ul = orgManagement.getUsersByOrganisationId(orgId, 0, 9999, "login", true);
    assertTrue("Default Organisation should contain at least 1 user: " + ul.size(), ul.size() > 0);
   
    Organisation_Users ou = orgManagement.getOrganisation_UserByUserAndOrganisation(u.getUser_id(), orgId);
    assertNotNull("Unable to found [organisation, user] pair - [" + orgId + "," + u.getUser_id() + "]", ou);
  }
View Full Code Here

  public void delete(Organisation_Users entity, Long userId) {
    if (entity.getOrganisation_users_id() != null) {
      User u = usersDao.get(entity.getUser_id());
      int idx = u.getOrganisation_users().indexOf(entity);
      //entity has been detached need to re-fetch
      Organisation_Users ou = u.getOrganisation_users().remove(idx);
      em.remove(ou);
      usersDao.update(u, userId);
    }
  }
View Full Code Here

    }) {
      private static final long serialVersionUID = 8715559628755439596L;

      @Override
      protected void populateItem(Item<Organisation_Users> item) {
        final Organisation_Users orgUser = item.getModelObject();
        User u = orgUser.getUser();
        if (u != null) {
          item.add(new Label("label", Model.of(getUser(u))));
        } else {
          item.add(new Label("label", Model.of("")));
        }
View Full Code Here

          found = true;
          break;
        }
      }
      if (!found) {
        Organisation_Users orgUser = new Organisation_Users(organisation);
        orgUser.setDeleted(false);
        orgUsers.add(orgUser);
        userDao.update(u, WebSession.getUserId());
      }
    }
    target.add(usersPanel);
View Full Code Here

    List<Organisation_Users> orgUsers;
    if (isAdminForm) {
      List<Organisation> orgList = getBean(OrganisationDao.class).get(0, Integer.MAX_VALUE);
      orgUsers = new ArrayList<Organisation_Users>(orgList.size());
      for (Organisation org : orgList) {
        orgUsers.add(new Organisation_Users(org));
      }
    } else {
      orgUsers = getModelObject().getOrganisation_users();
    }
    ListMultipleChoice<Organisation_Users> orgChoiceList = new ListMultipleChoice<Organisation_Users>(
View Full Code Here

    return null;
  }
 
  public Organisation_Users getOrgUser(Long organisation_id, Long insertedby) {
   
    Organisation_Users orgUser = new Organisation_Users(
        orgDao.get(organisation_id));
    orgUser.setDeleted(false);
   
    return orgUser;
  }
View Full Code Here

      User us = usersDao.get(user_id);
      List<Organisation_Users> s = us.getOrganisation_users();

      for (Iterator<Organisation_Users> it = s.iterator(); it.hasNext();) {
        Organisation_Users orgUsers = it.next();
        long organisation_id = orgUsers.getOrganisation()
            .getOrganisation_id();
        List<RoomOrganisation> ll = this
            .getRoomsOrganisationByOrganisationId(3,
                organisation_id);
        for (Iterator<RoomOrganisation> it2 = ll.iterator(); it2
View Full Code Here

TOP

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

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.