use of org.apache.openmeetings.web.room.RoomPanel in project openmeetings by apache.
the class OmUrlFragment method getPanel.
public static BasePanel getPanel(AreaKeys area, String type) {
BasePanel basePanel = null;
switch(area) {
case admin:
if (TYPE_USER.equals(type)) {
basePanel = new UsersPanel(CHILD_ID);
} else if (TYPE_CONNECTION.equals(type)) {
basePanel = new ConnectionsPanel(CHILD_ID);
} else if (TYPE_GROUP.equals(type)) {
basePanel = new GroupsPanel(CHILD_ID);
} else if (TYPE_ROOM.equals(type)) {
basePanel = new RoomsPanel(CHILD_ID);
} else if (TYPE_CONFIG.equals(type)) {
basePanel = new ConfigsPanel(CHILD_ID);
} else if (TYPE_LANG.equals(type)) {
basePanel = new LangPanel(CHILD_ID);
} else if (TYPE_LDAP.equals(type)) {
basePanel = new LdapsPanel(CHILD_ID);
} else if (TYPE_BACKUP.equals(type)) {
basePanel = new BackupPanel(CHILD_ID);
} else if (TYPE_OAUTH2.equals(type)) {
basePanel = new OAuthPanel(CHILD_ID);
} else if (TYPE_EMAIL.equals(type)) {
basePanel = new EmailPanel(CHILD_ID);
}
break;
case profile:
if (TYPE_MESSAGES.equals(type)) {
basePanel = new SettingsPanel(CHILD_ID, MESSAGES_TAB_ID);
} else if (TYPE_EDIT.equals(type)) {
basePanel = new SettingsPanel(CHILD_ID, EDIT_PROFILE_TAB_ID);
}
break;
case room:
try {
Long roomId = Long.valueOf(type);
Room r = Application.get().getBean(RoomDao.class).get(roomId);
if (r != null) {
basePanel = new RoomPanel(CHILD_ID, r);
}
} catch (NumberFormatException ne) {
// skip it, bad roomid passed
}
if (basePanel == null) {
basePanel = new OmDashboardPanel(CHILD_ID);
}
break;
case rooms:
MenuParams params = MenuParams.publicTabButton;
if (TYPE_GROUP.equals(type)) {
params = MenuParams.privateTabButton;
} else if (Application.get().getBean(ConfigurationDao.class).getBool(CONFIG_MYROOMS_ENABLED, true) && TYPE_MY.equals(type)) {
params = MenuParams.myTabButton;
}
basePanel = new RoomsSelectorPanel(CHILD_ID, params);
break;
case user:
if (TYPE_CALENDAR.equals(type)) {
basePanel = new CalendarPanel(CHILD_ID);
} else if (TYPE_RECORDINGS.equals(type)) {
basePanel = new RecordingsPanel(CHILD_ID);
} else {
basePanel = new OmDashboardPanel(CHILD_ID);
}
break;
default:
break;
}
return basePanel;
}
use of org.apache.openmeetings.web.room.RoomPanel in project openmeetings by apache.
the class TestMainAreas method testRoom.
private void testRoom(Long id) throws OmException {
checkArea(AreaKeys.room, String.valueOf(id), RoomPanel.class, p -> {
RoomPanel rp = (RoomPanel) p.get(PATH_CHILD);
// room enter
tester.executeBehavior((AbstractAjaxBehavior) rp.getBehaviorById(0));
AbstractWbPanel wb = (AbstractWbPanel) rp.get("roomContainer:wb-area:whiteboard");
// wb load
tester.executeBehavior((AbstractAjaxBehavior) wb.getBehaviorById(0));
}, regularUsername);
}
use of org.apache.openmeetings.web.room.RoomPanel in project openmeetings by apache.
the class HashPage method createRoom.
private void createRoom(Long roomId) {
getLoader().setVisible(true);
getHeader().setVisible(false);
// need to re-fetch Room object to initialize all collections
Room room = roomDao.get(roomId);
if (room != null && !room.isDeleted()) {
error = false;
rp = new RoomPanel(CHILD_ID, room);
mp = new MainPanel(PANEL_MAIN, rp);
replace(mp);
}
}
Aggregations