use of org.apache.openmeetings.db.entity.user.User in project openmeetings by apache.
the class TestUserGroupAggregation method testitNow.
@Test
public void testitNow() {
User u = userDao.get(1L);
assertNotNull("Group list for default user must not be null", u.getGroupUsers());
assertTrue("Default user must belong to at least one group", u.getGroupUsers().size() > 0);
for (GroupUser orgUserObj : u.getGroupUsers()) {
log.error("testitNow: group Id: '" + orgUserObj.getGroup().getId() + "'; name: '" + orgUserObj.getGroup().getName() + "'");
}
}
use of org.apache.openmeetings.db.entity.user.User in project openmeetings by apache.
the class TestInvitation method testSendInvitationLink.
@Test
public void testSendInvitationLink() throws Exception {
User us = userDao.getByLogin(adminUsername, User.Type.user, null);
LocalDateTime from = LocalDateTime.now().plusDays(1).withHour(12).withMinute(0).withSecond(0);
User invitee = userDao.getContact("sebawagner@apache.org", "Testname", "Testlastname", us.getId());
Invitation i = invitationManager.getInvitation(invitee, roomDao.get(1L), false, "", Valid.OneTime, us, us.getLanguageId(), getDate(from, "GMT"), getDate(from.plusHours(2), "GMT"), null);
invitationManager.sendInvitationLink(i, MessageType.Create, "subject", "message", false);
}
use of org.apache.openmeetings.db.entity.user.User in project openmeetings by apache.
the class TestEmailTemplate method testNullLocale.
@Test
public void testNullLocale() {
User u = new User();
u.setLanguageId(666L);
checkTemplate(InvitationTemplate.getEmail(u, "testuser", "email", "message"));
}
use of org.apache.openmeetings.db.entity.user.User in project openmeetings by apache.
the class TestSubjTemplate method testTemplateGeneration.
@Test
public void testTemplateGeneration() {
Appointment a = getAppointment();
String[] ids = TimeZone.getAvailableIDs();
Recording rec = new Recording();
rec.setRoomId(5L);
for (User u : userDao.get(0, 100)) {
TimeZone tz = TimeZone.getTimeZone(ids[rnd.nextInt(ids.length)]);
checkTemplate(CreatedAppointmentTemplate.get(u, a, tz, u.getLogin()));
checkTemplate(CanceledAppointmentTemplate.get(u, a, tz, u.getLogin()));
checkTemplate(UpdatedAppointmentTemplate.get(u, a, tz, u.getLogin()));
checkTemplate(AppointmentReminderTemplate.get(u, a, tz));
checkTemplate(RecordingExpiringTemplate.get(u, rec, 1L));
}
}
use of org.apache.openmeetings.db.entity.user.User in project openmeetings by apache.
the class InviteUserMessageDialog method open.
public void open(IPartialPageRequestHandler handler, Long roomId, Long userId) {
Room r = roomDao.get(roomId);
User u = userDao.get(userId);
message.setModelObject(String.format("%s %s %s %s", u.getFirstname(), u.getLastname(), getString("1137"), r.getName()));
enterRoom.setModelObject(false);
handler.add(form);
open(handler);
}
Aggregations