Skip to content
Snippets Groups Projects
Commit 6a29b988 authored by srosse's avatar srosse
Browse files

OO-387: link the vitero booking to a course node and not simply the course

parent 10134369
No related branches found
No related tags found
No related merge requests found
Showing
with 85 additions and 124 deletions
......@@ -42,7 +42,6 @@ import org.olat.course.editor.NodeEditController;
import org.olat.course.editor.StatusDescription;
import org.olat.course.nodes.vitero.ViteroEditController;
import org.olat.course.nodes.vitero.ViteroPeekViewController;
import org.olat.course.nodes.vitero.ViteroRunController;
import org.olat.course.run.navigation.NodeRunConstructionResult;
import org.olat.course.run.userview.NodeEvaluation;
import org.olat.course.run.userview.UserCourseEnvironment;
......@@ -99,7 +98,7 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
Controller runCtr;
Roles roles = ureq.getUserSession().getRoles();
if (roles.isGuestOnly()) {
Translator trans = Util.createPackageTranslator(ViteroRunController.class, ureq.getLocale());
Translator trans = Util.createPackageTranslator(ViteroPeekViewController.class, ureq.getLocale());
String title = trans.translate("guestnoaccess.title");
String message = trans.translate("guestnoaccess.message");
runCtr = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
......@@ -124,7 +123,7 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
Long resourceId = userCourseEnv.getCourseEnvironment().getCourseResourceableId();
OLATResourceable ores = OresHelper.createOLATResourceableInstance(CourseModule.class, resourceId);
String courseTitle = userCourseEnv.getCourseEnvironment().getCourseTitle();
runCtr = new ViteroBookingsRunController(ureq, wControl, null, ores, courseTitle, moderator);
runCtr = new ViteroBookingsRunController(ureq, wControl, null, ores, getIdent(), courseTitle, moderator);
}
Controller controller = TitledWrapperHelper.getWrapper(ureq, wControl, runCtr, this, "o_vitero_icon");
return new NodeRunConstructionResult(controller);
......@@ -132,7 +131,7 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
@Override
public Controller createPeekViewRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne) {
return new ViteroPeekViewController(ureq, wControl, userCourseEnv);
return new ViteroPeekViewController(ureq, wControl, userCourseEnv, getIdent());
}
@Override
......@@ -165,6 +164,6 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
ViteroManager provider = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
// remove meeting
OLATResourceable ores = OresHelper.createOLATResourceableInstance(course.getResourceableTypeName(), course.getResourceableId());
provider.deleteAll(null, ores);
provider.deleteAll(null, ores, getIdent());
}
}
\ No newline at end of file
......@@ -74,7 +74,7 @@ public class ViteroEditController extends ActivateableTabbableDefaultController
listenTo(accessibilityCondContr);
OLATResourceable ores = OresHelper.createOLATResourceableInstance(course.getResourceableTypeName(), course.getResourceableId());
editForm = new ViteroBookingsEditController(ureq, wControl, null, ores, course.getCourseTitle());
editForm = new ViteroBookingsEditController(ureq, wControl, null, ores, courseNode.getIdent(), course.getCourseTitle());
listenTo(editForm);
editVc = createVelocityContainer("edit");
......
......@@ -54,7 +54,8 @@ import org.olat.modules.vitero.ui.ViteroBookingDataModel;
public class ViteroPeekViewController extends BasicController {
public ViteroPeekViewController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv) {
public ViteroPeekViewController(UserRequest ureq, WindowControl wControl,
UserCourseEnvironment userCourseEnv, String subIdentifier) {
super(ureq, wControl);
ViteroManager viteroManager = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
......@@ -63,7 +64,7 @@ public class ViteroPeekViewController extends BasicController {
List<ViteroBooking> bookings;
try {
bookings = viteroManager.getBookings(null, ores);
bookings = viteroManager.getBookings(null, ores, subIdentifier);
List<ViteroBooking> myBookings = viteroManager.getBookingInFutures(getIdentity());
FilterBookings.filterMyFutureBookings(bookings, myBookings);
Collections.sort(bookings, new StartBookingComparator());
......
/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at the
* <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a>
* <p>
* Unless required by applicable law or agreed to in writing,<br>
* software distributed under the License is distributed on an "AS IS" BASIS, <br>
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br>
* See the License for the specific language governing permissions and <br>
* limitations under the License.
* <p>
* Initial code contributed and copyrighted by<br>
* 12.10.2011 by frentix GmbH, http://www.frentix.com
* <p>
*/
package org.olat.course.nodes.vitero;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component;
import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.controller.BasicController;
import org.olat.core.id.OLATResourceable;
import org.olat.modules.vitero.ui.ViteroBookingsRunController;
/**
*
* Description:<br>
*
* <P>
* Initial Date: 6 oct. 2011 <br>
*
* @author srosse, stephane.rosse@frentix.com, http://www.frentix.com
*/
public class ViteroRunController extends BasicController {
private final ViteroBookingsRunController bookingsController;
public ViteroRunController(UserRequest ureq, WindowControl wControl, OLATResourceable ores) {
super(ureq, wControl);
bookingsController = new ViteroBookingsRunController(ureq, wControl, null, ores, "Test", false);
listenTo(bookingsController);
putInitialPanel(bookingsController.getInitialComponent());
}
@Override
protected void event(UserRequest ureq, Component source, Event event) {
// nothing to do
}
@Override
protected void doDispose() {
// nothing to do
}
}
\ No newline at end of file
......@@ -962,7 +962,7 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
return booking;
}
public ViteroStatus createBooking(BusinessGroup group, OLATResourceable ores, ViteroBooking vBooking)
public ViteroStatus createBooking(BusinessGroup group, OLATResourceable ores, String subIdentifier, ViteroBooking vBooking)
throws VmsNotAvailableException {
Bookingtype booking = getBookingById(vBooking.getBookingId());
if(booking != null) {
......@@ -1022,7 +1022,7 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
return new ViteroStatus(ErrorCode.moduleCollision);
}
vBooking.setBookingId(bookingId);
getOrCreateProperty(group, ores, vBooking);
getOrCreateProperty(group, ores, subIdentifier, vBooking);
return new ViteroStatus();
} catch(AxisFault f) {
ErrorCode code = handleAxisFault(f);
......@@ -1049,7 +1049,7 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
* @return
* @throws VmsNotAvailableException
*/
public ViteroBooking updateBooking(BusinessGroup group, OLATResourceable ores, ViteroBooking vBooking)
public ViteroBooking updateBooking(BusinessGroup group, OLATResourceable ores, String subIdentifier, ViteroBooking vBooking)
throws VmsNotAvailableException {
Bookingtype bookingType = getBookingById(vBooking.getBookingId());
if(bookingType == null) {
......@@ -1061,7 +1061,7 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
//set the vms values
update(vBooking, booking);
//update the property
updateProperty(group, ores, vBooking);
updateProperty(group, ores, subIdentifier, vBooking);
return vBooking;
}
......@@ -1097,7 +1097,7 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
}
}
public void deleteAll(BusinessGroup group, OLATResourceable ores) {
public void deleteAll(BusinessGroup group, OLATResourceable ores, String subIdentifier) {
try {
List<Property> properties = propertyManager.listProperties(null, group, ores, VMS_CATEGORY, null);
for(Property property:properties) {
......@@ -1107,15 +1107,19 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
}
} catch (VmsNotAvailableException e) {
logError("", e);
markAsZombie(group, ores);
markAsZombie(group, ores, subIdentifier);
}
}
private final void markAsZombie(BusinessGroup group, OLATResourceable ores) {
private final void markAsZombie(BusinessGroup group, OLATResourceable ores, String subIdentifier) {
List<Property> properties = propertyManager.listProperties(null, group, ores, VMS_CATEGORY, null);
for(Property property:properties) {
property.setName(VMS_CATEGORY_ZOMBIE);
propertyManager.updateProperty(property);
String propIdentifier = property.getStringValue();
if((subIdentifier == null && propIdentifier == null)
|| (subIdentifier != null && subIdentifier.equals(propIdentifier))) {
property.setName(VMS_CATEGORY_ZOMBIE);
propertyManager.updateProperty(property);
}
}
}
......@@ -1152,19 +1156,25 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
* @param ores The OLAT resourceable (of the course) (optional)
* @return
*/
public List<ViteroBooking> getBookings(BusinessGroup group, OLATResourceable ores)
public List<ViteroBooking> getBookings(BusinessGroup group, OLATResourceable ores, String subIdentifier)
throws VmsNotAvailableException {
List<Property> properties = propertyManager.listProperties(null, group, ores, VMS_CATEGORY, null);
List<ViteroBooking> bookings = new ArrayList<ViteroBooking>();
for(Property property:properties) {
String bookingStr = property.getTextValue();
ViteroBooking booking = deserializeViteroBooking(bookingStr);
Bookingtype bookingType = getBookingById(booking.getBookingId());
if(bookingType != null) {
Booking vmsBooking = bookingType.getBooking();
booking.setProperty(property);
update(booking, vmsBooking);
bookings.add(booking);
String propIdentifier = property.getStringValue();
if((propIdentifier == null || subIdentifier == null)
|| (subIdentifier != null
&& (propIdentifier == null || subIdentifier.equals(propIdentifier))
)) {
String bookingStr = property.getTextValue();
ViteroBooking booking = deserializeViteroBooking(bookingStr);
Bookingtype bookingType = getBookingById(booking.getBookingId());
if(bookingType != null) {
Booking vmsBooking = bookingType.getBooking();
booking.setProperty(property);
update(booking, vmsBooking);
bookings.add(booking);
}
}
}
return bookings;
......@@ -1298,7 +1308,7 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
SecurityHeader.addAdminSecurityHeader(login, password, licenceWs);
LicenceServiceStub.GetModulesForCustomerRequest licenceRequest = new LicenceServiceStub.GetModulesForCustomerRequest();
licenceRequest.setCustomerid(viteroModule.getCustomerId());
licenceRequest.setCustomerid(customerId);
LicenceServiceStub.GetModulesForCustomerResponse response = licenceWs.getModulesForCustomer(licenceRequest);
LicenceServiceStub.Modulestype modules = response.getGetModulesForCustomerResponse();
......@@ -1409,24 +1419,24 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
}
//Properties
private final Property getProperty(final BusinessGroup group, final OLATResourceable courseResource, final ViteroBooking booking) {
private final Property getProperty(BusinessGroup group, OLATResourceable courseResource, ViteroBooking booking) {
String propertyName = Integer.toString(booking.getBookingId());
return propertyManager.findProperty(null, group, courseResource, VMS_CATEGORY, propertyName);
}
private final Property getOrCreateProperty(final BusinessGroup group, final OLATResourceable courseResource, final ViteroBooking booking) {
private final Property getOrCreateProperty(BusinessGroup group, OLATResourceable courseResource, String subIdentifier, ViteroBooking booking) {
Property property = getProperty(group, courseResource, booking);
if(property == null) {
property = createProperty(group, courseResource, booking);
property = createProperty(group, courseResource, subIdentifier, booking);
propertyManager.saveProperty(property);
}
return property;
}
private final Property updateProperty(final BusinessGroup group, final OLATResourceable courseResource, ViteroBooking booking) {
private final Property updateProperty(BusinessGroup group, OLATResourceable courseResource, String subIdentifier, ViteroBooking booking) {
Property property = getProperty(group, courseResource, booking);
if(property == null) {
property = createProperty(group, courseResource, booking);
property = createProperty(group, courseResource, subIdentifier, booking);
propertyManager.saveProperty(property);
} else {
String serialized = serializeViteroBooking(booking);
......@@ -1436,11 +1446,11 @@ public class ViteroManager extends BasicManager implements UserDataDeletable {
return property;
}
private final Property createProperty(final BusinessGroup group, final OLATResourceable courseResource, ViteroBooking booking) {
private final Property createProperty(final BusinessGroup group, final OLATResourceable courseResource, String subIdentifier, ViteroBooking booking) {
String serialized = serializeViteroBooking(booking);
String bookingId = Integer.toString(booking.getBookingId());
Long groupId = new Long(booking.getGroupId());
return propertyManager.createPropertyInstance(null, group, courseResource, VMS_CATEGORY, bookingId, null, groupId, null, serialized);
return propertyManager.createPropertyInstance(null, group, courseResource, VMS_CATEGORY, bookingId, null, groupId, subIdentifier, serialized);
}
private final void deleteProperty(ViteroBooking vBooking) {
......
......@@ -68,6 +68,7 @@ public class SignColumnDescriptor extends DefaultColumnDescriptor {
switch(sign) {
case signin: sb.append(translator.translate("signin")); break;
case signout: sb.append(translator.translate("signout")); break;
default:{ /*do nothing */}
}
}
}
......
......@@ -122,7 +122,7 @@ public class ViteroAdminBookingMembersController extends BasicController {
int row = e.getRowId();
ViteroUser identity = (ViteroUser)tableCtr.getTableDataModel().getObject(row);
if("signout".equals(e.getActionId())) {
signOut(ureq, Collections.singletonList(identity));
signOut(Collections.singletonList(identity));
}
} else if(event instanceof TableMultiSelectEvent) {
TableMultiSelectEvent e = (TableMultiSelectEvent)event;
......@@ -132,7 +132,7 @@ public class ViteroAdminBookingMembersController extends BasicController {
identities.add(identity);
}
if("signout".equals(e.getAction())) {
signOut(ureq, identities);
signOut(identities);
}
}
......@@ -140,7 +140,7 @@ public class ViteroAdminBookingMembersController extends BasicController {
super.event(ureq, source, event);
}
private void signOut(UserRequest ureq, List<ViteroUser> members) {
private void signOut(List<ViteroUser> members) {
try {
for(ViteroUser member:members) {
if(viteroManager.removeFromRoom(booking, member.getUserId())) {
......@@ -197,6 +197,7 @@ public class ViteroAdminBookingMembersController extends BasicController {
case firstName: return identity.getFirstName();
case lastName: return identity.getLastName();
case email: return identity.getEmail();
default: {/* do nothing */}
}
return null;
}
......
......@@ -71,14 +71,17 @@ public class ViteroBookingEditController extends FormBasicController {
private final BusinessGroup group;
private final OLATResourceable ores;
private final String subIdentifier;
private final ViteroBooking booking;
private final ViteroManager viteroManager;
public ViteroBookingEditController(UserRequest ureq, WindowControl wControl, BusinessGroup group, OLATResourceable ores, ViteroBooking booking) {
public ViteroBookingEditController(UserRequest ureq, WindowControl wControl, BusinessGroup group, OLATResourceable ores,
String subIdentifier, ViteroBooking booking) {
super(ureq, wControl);
this.group = group;
this.ores = ores;
this.subIdentifier = subIdentifier;
this.booking = booking;
viteroManager = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
......@@ -157,7 +160,7 @@ public class ViteroBookingEditController extends FormBasicController {
}
private boolean isRoomSizeAvailable(int roomSize) {
String roomSizeStr = Integer.toString(booking.getRoomSize());
String roomSizeStr = Integer.toString(roomSize);
for(int i=roomSizes.length; i-->0; ) {
if(roomSizes[i].equals(roomSizeStr)) {
return true;
......@@ -261,7 +264,7 @@ public class ViteroBookingEditController extends FormBasicController {
try {
if(booking.getBookingId() >= 0) {
ViteroBooking updatedBooking = viteroManager.updateBooking(group, ores, booking);
ViteroBooking updatedBooking = viteroManager.updateBooking(group, ores, subIdentifier, booking);
if(updatedBooking != null) {
showInfo("booking.ok");
fireEvent(ureq, Event.DONE_EVENT);
......@@ -269,7 +272,7 @@ public class ViteroBookingEditController extends FormBasicController {
showError("error.unkown");
}
} else {
ViteroStatus status = viteroManager.createBooking(group, ores, booking);
ViteroStatus status = viteroManager.createBooking(group, ores, subIdentifier, booking);
if(status.isOk()) {
showInfo("booking.ok");
fireEvent(ureq, Event.DONE_EVENT);
......
......@@ -128,7 +128,7 @@ public class ViteroBookingsAdminController extends BasicController {
} else if(source == dialogCtr) {
if (DialogBoxUIFactory.isOkEvent(event)) {
ViteroBooking booking = (ViteroBooking)dialogCtr.getUserObject();
deleteBooking(ureq, booking);
deleteBooking(booking);
}
} else if (source == cmc ) {
removeAsListenerAndDispose(infoController);
......@@ -180,7 +180,7 @@ public class ViteroBookingsAdminController extends BasicController {
}
}
protected void deleteBooking(UserRequest ureq, ViteroBooking booking) {
protected void deleteBooking(ViteroBooking booking) {
try {
if( viteroManager.deleteBooking(booking)) {
showInfo("delete.ok");
......@@ -202,7 +202,7 @@ public class ViteroBookingsAdminController extends BasicController {
protected void reloadModel() {
try {
List<ViteroBooking> bookings = viteroManager.getBookings(null, null);
List<ViteroBooking> bookings = viteroManager.getBookings(null, null, null);
ViteroBookingDataModel tableModel = new ViteroBookingDataModel(bookings);
tableCtr.setTableDataModel(tableModel);
} catch (VmsNotAvailableException e) {
......
......@@ -62,14 +62,16 @@ public class ViteroBookingsController extends BasicController {
private final BusinessGroup group;
private final OLATResourceable ores;
private final String subIdentifier;
private final ViteroManager viteroManager;
public ViteroBookingsController(UserRequest ureq, WindowControl wControl,
BusinessGroup group, OLATResourceable ores) {
BusinessGroup group, OLATResourceable ores, String subIdentifier) {
super(ureq, wControl);
this.ores = ores;
this.group = group;
this.subIdentifier = subIdentifier;
viteroManager = (ViteroManager) CoreSpringFactory.getBean("viteroManager");
TableGuiConfiguration tableConfig = new TableGuiConfiguration();
......@@ -136,7 +138,7 @@ public class ViteroBookingsController extends BasicController {
protected void loadModel() {
try {
List<ViteroBooking> bookings = viteroManager.getBookings(group, ores);
List<ViteroBooking> bookings = viteroManager.getBookings(group, ores, subIdentifier);
List<ViteroBooking> myBookings = viteroManager.getBookingInFutures(getIdentity());
FilterBookings.filterMyFutureBookings(bookings, myBookings);
Collections.sort(bookings, new StartBookingComparator());
......
......@@ -74,13 +74,16 @@ public class ViteroBookingsEditController extends FormBasicController {
private final String resourceName;
private final BusinessGroup group;
private final OLATResourceable ores;
private final String subIdentifier;
private final ViteroManager viteroManager;
public ViteroBookingsEditController(UserRequest ureq, WindowControl wControl, BusinessGroup group, OLATResourceable ores, String resourceName) {
public ViteroBookingsEditController(UserRequest ureq, WindowControl wControl, BusinessGroup group, OLATResourceable ores,
String subIdentifier, String resourceName) {
super(ureq, wControl, "edit");
this.group = group;
this.ores = ores;
this.subIdentifier = subIdentifier;
this.resourceName = resourceName;
viteroManager = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
......@@ -105,7 +108,7 @@ public class ViteroBookingsEditController extends FormBasicController {
protected void reloadModel() {
try {
bookingDisplays.clear();
List<ViteroBooking> bookings = viteroManager.getBookings(group, ores);
List<ViteroBooking> bookings = viteroManager.getBookings(group, ores, subIdentifier);
int i=0;
for(ViteroBooking booking:bookings) {
BookingDisplay display = new BookingDisplay(booking);
......@@ -172,7 +175,7 @@ public class ViteroBookingsEditController extends FormBasicController {
} else if(source == dialogCtr) {
if (DialogBoxUIFactory.isOkEvent(event)) {
ViteroBooking booking = (ViteroBooking)dialogCtr.getUserObject();
deleteBooking(ureq, booking);
deleteBooking(booking);
}
} else if (source == warningGroupCtr) {
removeAsListenerAndDispose(warningGroupCtr);
......@@ -221,7 +224,7 @@ public class ViteroBookingsEditController extends FormBasicController {
}
}
protected void deleteBooking(UserRequest ureq, ViteroBooking booking) {
protected void deleteBooking(ViteroBooking booking) {
try {
if(viteroManager.deleteBooking(booking)) {
showInfo("delete.ok");
......@@ -253,7 +256,7 @@ public class ViteroBookingsEditController extends FormBasicController {
protected void editBooking(UserRequest ureq, ViteroBooking viteroBooking) {
removeAsListenerAndDispose(bookingController);
bookingController = new ViteroBookingEditController(ureq, getWindowControl(), group, ores, viteroBooking);
bookingController = new ViteroBookingEditController(ureq, getWindowControl(), group, ores, subIdentifier, viteroBooking);
listenTo(bookingController);
removeAsListenerAndDispose(cmc);
......
......@@ -54,14 +54,16 @@ public class ViteroBookingsRunController extends BasicController {
private final BusinessGroup group;
private final OLATResourceable ores;
private final String subIdentifier;
private final String resourceName;
public ViteroBookingsRunController(UserRequest ureq, WindowControl wControl, BusinessGroup group, OLATResourceable ores,
String resourceName, boolean admin) {
String subIdentifier, String resourceName, boolean admin) {
super(ureq, wControl);
this.group = group;
this.ores = ores;
this.subIdentifier = subIdentifier;
this.resourceName = resourceName;
if(ureq.getUserSession().getRoles().isGuestOnly()) {
......@@ -80,7 +82,7 @@ public class ViteroBookingsRunController extends BasicController {
putInitialPanel(mainVC);
} else {
bookingsController = new ViteroBookingsController(ureq, wControl,group, ores);
bookingsController = new ViteroBookingsController(ureq, wControl,group, ores, subIdentifier);
listenTo(bookingsController);
putInitialPanel(bookingsController.getInitialComponent());
}
......@@ -109,7 +111,7 @@ public class ViteroBookingsRunController extends BasicController {
private void doOpenBookings(UserRequest ureq) {
if(bookingsController == null) {
bookingsController = new ViteroBookingsController(ureq, getWindowControl(), group, ores);
bookingsController = new ViteroBookingsController(ureq, getWindowControl(), group, ores, subIdentifier);
listenTo(bookingsController);
}
mainVC.put("segmentCmp", bookingsController.getInitialComponent());
......@@ -117,7 +119,7 @@ public class ViteroBookingsRunController extends BasicController {
private void doOpenAdmin(UserRequest ureq) {
if(adminController == null) {
adminController = new ViteroBookingsEditController(ureq, getWindowControl(), group, ores, resourceName);
adminController = new ViteroBookingsEditController(ureq, getWindowControl(), group, ores, subIdentifier, resourceName);
listenTo(adminController);
}
mainVC.put("segmentCmp", adminController.getInitialComponent());
......
......@@ -243,7 +243,7 @@ public class ViteroConfigurationController extends FormBasicController {
viteroModule.setEnabled(enabled);
} else if(source == checkLink) {
if(validateURL()) {
checkConnection(ureq);
checkConnection();
}
} else if(source == checkUserLink) {
if(validateURL()) {
......@@ -271,7 +271,7 @@ public class ViteroConfigurationController extends FormBasicController {
}
}
protected boolean checkConnection(UserRequest ureq) {
protected boolean checkConnection() {
String url = urlEl.getValue();
String login = loginEl.getValue();
String password = passwordEl.getValue();
......
......@@ -149,9 +149,9 @@ public class ViteroUserToGroupController extends BasicController {
int row = e.getRowId();
Identity identity = (Identity)tableCtr.getTableDataModel().getObject(row);
if("signin".equals(e.getActionId())) {
signIn(ureq, Collections.singletonList(identity));
signIn(Collections.singletonList(identity));
} else if("signout".equals(e.getActionId())) {
signOut(ureq, Collections.singletonList(identity));
signOut(Collections.singletonList(identity));
}
} else if(event instanceof TableMultiSelectEvent) {
TableMultiSelectEvent e = (TableMultiSelectEvent)event;
......@@ -161,9 +161,9 @@ public class ViteroUserToGroupController extends BasicController {
identities.add(identity);
}
if("signin".equals(e.getAction())) {
signIn(ureq, identities);
signIn(identities);
} else if("signout".equals(e.getAction())) {
signOut(ureq, identities);
signOut(identities);
} else if("reload".equals(e.getAction())) {
loadModel();
}
......@@ -173,7 +173,7 @@ public class ViteroUserToGroupController extends BasicController {
super.event(ureq, source, event);
}
private void signIn(UserRequest ureq, List<Identity> identities) {
private void signIn(List<Identity> identities) {
try {
ResourceMembers members = ((UserToGroupDataModel)tableCtr.getTableDataModel()).getMembers();
......@@ -194,7 +194,7 @@ public class ViteroUserToGroupController extends BasicController {
}
}
private void signOut(UserRequest ureq, List<Identity> identities) {
private void signOut(List<Identity> identities) {
try {
for(Identity identity:identities) {
if(viteroManager.removeFromRoom(booking, identity)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment