Skip to content
Snippets Groups Projects
Commit 084cc569 authored by srosse's avatar srosse
Browse files

FXOLAT-282: add/remove rooms in course building block and in administration

--HG--
branch : FXOLAT-282-virtualclassroom
parent 731dc055
No related branches found
No related tags found
No related merge requests found
Showing
with 464 additions and 408 deletions
......@@ -27,10 +27,12 @@ import org.olat.core.gui.UserRequest;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.generic.tabbable.TabbableController;
import org.olat.core.id.OLATResourceable;
import org.olat.core.id.Roles;
import org.olat.core.util.Util;
import org.olat.core.util.ValidationStatus;
import org.olat.core.util.resource.OresHelper;
import org.olat.course.CourseFactory;
import org.olat.course.CourseModule;
import org.olat.course.ICourse;
import org.olat.course.condition.ConditionEditController;
import org.olat.course.editor.CourseEditorEnv;
......@@ -46,7 +48,6 @@ import org.olat.course.run.userview.UserCourseEnvironment;
import org.olat.repository.RepositoryEntry;
import org.olat.repository.RepositoryManager;
import com.frentix.olat.course.nodes.vitero.ViteroBookingConfiguration;
import com.frentix.olat.course.nodes.vitero.ViteroEditController;
import com.frentix.olat.course.nodes.vitero.ViteroRunController;
import com.frentix.olat.vitero.manager.ViteroManager;
......@@ -73,24 +74,6 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
super(TYPE);
}
/**
* To support different virtual classroom implementations it's necessary to
* check whether the persisted configuration suits to the actual virtual
* classroom implementation or not. If not a new one will be created and
* persisted.
*
* @param provider
* @return the persisted configuration or a fresh one
*/
private ViteroBookingConfiguration handleConfig(final ViteroManager provider) {
ViteroBookingConfiguration config = (ViteroBookingConfiguration) getModuleConfiguration().get(CONF_VC_CONFIGURATION);
if (config == null) {
config = new ViteroBookingConfiguration();
}
getModuleConfiguration().set(CONF_VC_CONFIGURATION, config);
return config;
}
@Override
public void updateModuleConfigDefaults(boolean isNewNode) {
// no update to default config necessary
......@@ -101,12 +84,8 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
UserCourseEnvironment userCourseEnv) {
updateModuleConfigDefaults(false);
CourseNode chosenNode = course.getEditorTreeModel().getCourseNode(userCourseEnv.getCourseEditorEnv().getCurrentCourseNodeId());
// load and check configuration
ViteroManager provider = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
ViteroBookingConfiguration config = handleConfig(provider);
// create edit controller
ViteroEditController childTabCntrllr = new ViteroEditController(ureq, wControl, this, course, userCourseEnv, provider, config);
ViteroEditController childTabCntrllr = new ViteroEditController(ureq, wControl, this, course, userCourseEnv);
NodeEditController nodeEditCtr = new NodeEditController(ureq, wControl, course.getEditorTreeModel(), course, chosenNode,
course.getCourseEnvironment().getCourseGroupManager(), userCourseEnv, childTabCntrllr);
......@@ -135,11 +114,12 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
}
}
}
// load configuration
ViteroManager provider = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
ViteroBookingConfiguration config = handleConfig(provider);
// create run controller
Controller runCtr = new ViteroRunController(ureq, wControl, null);
Long resourceId = userCourseEnv.getCourseEnvironment().getCourseResourceableId();
OLATResourceable ores = OresHelper.createOLATResourceableInstance(CourseModule.class, resourceId);
Controller runCtr = new ViteroRunController(ureq, wControl, ores);
Controller controller = TitledWrapperHelper.getWrapper(ureq, wControl, runCtr, this, "o_vc_icon");
return new NodeRunConstructionResult(controller);
}
......@@ -157,31 +137,19 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
return StatusDescriptionHelper.sort(statusDescs);
}
@Override
public RepositoryEntry getReferencedRepositoryEntry() {
return null;
}
@Override
public StatusDescription isConfigValid() {
if (oneClickStatusCache != null) { return oneClickStatusCache[0]; }
StatusDescription status = StatusDescription.NOERROR;
// load configuration
ViteroManager provider = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
ViteroBookingConfiguration config = handleConfig(provider);
boolean invalid = !provider.isConfigValid(config);
if (invalid) {
String[] params = new String[] { this.getShortTitle() };
String shortKey = "error.config.short";
String longKey = "error.config.long";
String translationPackage = ViteroEditController.class.getPackage().getName();
status = new StatusDescription(ValidationStatus.ERROR, shortKey, longKey, params, translationPackage);
status.setDescriptionForUnit(getIdent());
status.setActivateableViewIdentifier(ViteroEditController.PANE_TAB_VCCONFIG);
}
return status;
}
@Override
public boolean needsReferenceToARepositoryEntry() {
return false;
}
......@@ -190,9 +158,8 @@ public class ViteroCourseNode extends AbstractAccessableCourseNode {
public void cleanupOnDelete(ICourse course) {
// load configuration
ViteroManager provider = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
ViteroBookingConfiguration config = handleConfig(provider);
// remove meeting
provider.removeTeaRoom(course.getResourceableId() + "_" + this.getIdent(), config);
OLATResourceable ores = OresHelper.createOLATResourceableInstance(course.getResourceableTypeName(), course.getResourceableId());
provider.deleteBookings(null, ores);
}
}
\ No newline at end of file
/**
* OLAT - Online Learning and Training<br>
* http://www.olat.org
* <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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <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>
* Copyright (c) frentix GmbH<br>
* http://www.frentix.com<br>
* <p>
*/
package com.frentix.olat.course.nodes.vitero;
import java.io.Serializable;
import java.util.List;
import com.frentix.olat.vitero.model.ViteroBooking;
/**
*
* Description:<br>
* TODO: srosse Class Description for ViteroBookingConfiguration
*
* <P>
* Initial Date: 26 sept. 2011 <br>
* @author srosse, stephane.rosse@frentix.com, http://www.frentix.com
*/
public class ViteroBookingConfiguration implements Serializable {
private static final long serialVersionUID = 7658813481281328834L;
private int bookingId;
private List<ViteroBooking> meetingDates;
private boolean createMeetingImmediately;
public int getBookingId() {
return bookingId;
}
public void setBookingId(int bookingId) {
this.bookingId = bookingId;
}
public List<ViteroBooking> getMeetingDates() {
return meetingDates;
}
public void setMeetingDates(List<ViteroBooking> meetingDates) {
this.meetingDates = meetingDates;
}
public boolean isCreateMeetingImmediately() {
return createMeetingImmediately;
}
public void setCreateMeetingImmediately(boolean createMeetingImmediately) {
this.createMeetingImmediately = createMeetingImmediately;
}
public boolean isUseMeetingDates() {
return true;
}
}
/**
* OLAT - Online Learning and Training<br>
* http://www.olat.org
* <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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <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>
* Copyright (c) frentix GmbH<br>
* http://www.frentix.com<br>
* <p>
*/
package com.frentix.olat.course.nodes.vitero;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component;
import org.olat.core.gui.components.velocity.VelocityContainer;
import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.controller.BasicController;
import com.frentix.olat.vitero.manager.ViteroManager;
import com.frentix.olat.vitero.model.ViteroBooking;
/**
*
* Description:<br>
* TODO: srosse Class Description for ViteroDisplayController
*
* <P>
* Initial Date: 26 sept. 2011 <br>
* @author srosse, stephane.rosse@frentix.com, http://www.frentix.com
*/
public class ViteroDisplayController extends BasicController {
// objects for run view
private VelocityContainer runVC;
// data
private List<ViteroBooking> dateList = new ArrayList<ViteroBooking>();
private ViteroBookingConfiguration config;
private ViteroBooking meeting;
private Date allBegin, allEnd;
private ViteroManager vitero;
public ViteroDisplayController(UserRequest ureq, WindowControl wControl, String roomId, String name, String description, boolean isModerator, ViteroBookingConfiguration config, ViteroManager provider) {
super(ureq, wControl);
this.vitero = provider;
this.config = config;
// The dates Table to the Course odes
if(config.getMeetingDates() != null) dateList.addAll(config.getMeetingDates());
// select actual meeting
if(config.isUseMeetingDates()) {
Date now = new Date((new Date()).getTime() + 15*60*1000); // allow to start meetings about 15 minutes before begin
for(ViteroBooking date : dateList) {
Date begin = date.getStart();
Date end = date.getEnd();
if(now.after(begin) & now.before(end)) {
meeting = date;
}
allBegin = allBegin == null ? begin : begin.before(allBegin) ? begin : allBegin;
allEnd = allEnd == null ? end : end.after(allEnd) ? end : allEnd;
}
} else {
allBegin = new Date();
allEnd = new Date(allBegin.getTime() + 365*24*60*60*1000); // preset one year
meeting = new ViteroBooking();
meeting.setStart(allBegin);
meeting.setEnd(allEnd);
}
runVC = createVelocityContainer("run");
putInitialPanel(runVC);
}
@Override
protected void event(UserRequest ureq, Component source, Event event) {
//
}
@Override
protected void doDispose() {
// nothing to dispose
}
}
\ No newline at end of file
......@@ -20,8 +20,6 @@
*/
package com.frentix.olat.course.nodes.vitero;
import java.util.Date;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component;
import org.olat.core.gui.components.tabbedpane.TabbedPane;
......@@ -33,6 +31,8 @@ import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.generic.modal.DialogBoxController;
import org.olat.core.gui.control.generic.modal.DialogBoxUIFactory;
import org.olat.core.gui.control.generic.tabbable.ActivateableTabbableDefaultController;
import org.olat.core.id.OLATResourceable;
import org.olat.core.util.resource.OresHelper;
import org.olat.course.ICourse;
import org.olat.course.assessment.AssessmentHelper;
import org.olat.course.condition.Condition;
......@@ -41,8 +41,6 @@ import org.olat.course.editor.NodeEditController;
import org.olat.course.run.userview.UserCourseEnvironment;
import com.frentix.olat.course.nodes.ViteroCourseNode;
import com.frentix.olat.vitero.manager.ViteroManager;
import com.frentix.olat.vitero.model.ViteroBooking;
import com.frentix.olat.vitero.ui.ViteroBookingsEditController;
/**
......@@ -70,13 +68,11 @@ public class ViteroEditController extends ActivateableTabbableDefaultController
// runtime data
private ViteroCourseNode courseNode;
private ViteroBookingConfiguration config;
public ViteroEditController(UserRequest ureq, WindowControl wControl, ViteroCourseNode courseNode,
ICourse course, UserCourseEnvironment userCourseEnv, ViteroManager provider, ViteroBookingConfiguration config) {
ICourse course, UserCourseEnvironment userCourseEnv) {
super(ureq, wControl);
this.courseNode = courseNode;
this.config = config;
editVc = this.createVelocityContainer("edit");
......@@ -84,9 +80,10 @@ public class ViteroEditController extends ActivateableTabbableDefaultController
accessibilityCondContr = new ConditionEditController(ureq, wControl, course.getCourseEnvironment().getCourseGroupManager(),
accessCondition, "accessabilityConditionForm", AssessmentHelper.getAssessableNodes(course.getEditorTreeModel(), courseNode),
userCourseEnv);
this.listenTo(accessibilityCondContr);
editForm = new ViteroBookingsEditController(ureq, wControl);
listenTo(accessibilityCondContr);
OLATResourceable ores = OresHelper.createOLATResourceableInstance(course.getResourceableTypeName(), course.getResourceableId());
editForm = new ViteroBookingsEditController(ureq, wControl, null, ores);
listenTo(editForm);
editVc.put("editForm", editForm.getInitialComponent());
}
......@@ -131,39 +128,11 @@ public class ViteroEditController extends ActivateableTabbableDefaultController
fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
}
} else if (source == editForm) {
courseNode.getModuleConfiguration().set(ViteroCourseNode.CONF_VC_CONFIGURATION, config);
fireEvent(ureq, NodeEditController.NODECONFIG_CHANGED_EVENT);
} else if (source == yesNoDelete) {
if(DialogBoxUIFactory.isYesEvent(event)) {
//provider.removeClassroom(null, config);
reset(ureq);
}
} else if(source == yesNoUpdate) {
if(DialogBoxUIFactory.isYesEvent(event)) {
Date allBegin = null, allEnd = null;
if(config.getMeetingDates() != null) {
for(ViteroBooking date : config.getMeetingDates()) {
Date begin = date.getStart();
Date end = date.getEnd();
allBegin = allBegin == null ? begin : begin.before(allBegin) ? begin : allBegin;
allEnd = allEnd == null ? end : end.after(allEnd) ? end : allEnd;
}
}
/*boolean success = provider.updateClassroom(roomId, courseNode.getShortTitle(), courseNode.getLongTitle(), allBegin, allEnd, config);
if(success) {
getWindowControl().setInfo(translate("success.update.room"));
} else {
getWindowControl().setError(translate("error.update.room"));
}*/
}
} else if(event == NodeEditController.NODECONFIG_CHANGED_EVENT) {
// something has changed, maybe the title or description, thus ask to update
/*if(provider.existsClassroom(roomId, config)) {
removeAsListenerAndDispose(yesNoUpdate);
yesNoUpdate = DialogBoxUIFactory.createYesNoDialog(ureq, getWindowControl(), translate("sync.meeting.title"), translate("sync.meeting.text"));
listenTo(yesNoUpdate);
yesNoUpdate.activate();
}*/
}
}
......
......@@ -25,7 +25,7 @@ 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.course.ICourse;
import org.olat.core.id.OLATResourceable;
import com.frentix.olat.vitero.ui.ViteroBookingsController;
......@@ -43,10 +43,10 @@ public class ViteroRunController extends BasicController {
private final ViteroBookingsController bookingsController;
public ViteroRunController(UserRequest ureq, WindowControl wControl, ICourse course) {
public ViteroRunController(UserRequest ureq, WindowControl wControl, OLATResourceable ores) {
super(ureq, wControl);
bookingsController = new ViteroBookingsController(ureq, wControl, null, course);
bookingsController = new ViteroBookingsController(ureq, wControl, null, ores);
listenTo(bookingsController);
putInitialPanel(bookingsController.getInitialComponent());
......
......@@ -28,6 +28,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
......@@ -43,8 +44,6 @@ import org.olat.core.id.User;
import org.olat.core.id.UserConstants;
import org.olat.core.manager.BasicManager;
import org.olat.core.util.StringHelper;
import org.olat.core.util.coordinate.CoordinatorManager;
import org.olat.core.util.coordinate.SyncerCallback;
import org.olat.core.util.xml.XStreamHelper;
import org.olat.group.BusinessGroup;
import org.olat.properties.Property;
......@@ -53,13 +52,13 @@ import org.olat.user.DisplayPortraitManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.frentix.olat.course.nodes.vitero.ViteroBookingConfiguration;
import com.frentix.olat.vitero.ViteroModule;
import com.frentix.olat.vitero.manager.stubs.BookingServiceStub;
import com.frentix.olat.vitero.manager.stubs.BookingServiceStub.Booking;
import com.frentix.olat.vitero.manager.stubs.BookingServiceStub.Bookinglist;
import com.frentix.olat.vitero.manager.stubs.BookingServiceStub.Bookingtype;
import com.frentix.olat.vitero.manager.stubs.CustomerServiceStub;
import com.frentix.olat.vitero.manager.stubs.GroupServiceStub;
import com.frentix.olat.vitero.manager.stubs.LicenceServiceStub;
import com.frentix.olat.vitero.manager.stubs.LicenceServiceStub.Rooms_type0;
import com.frentix.olat.vitero.manager.stubs.MtomServiceStub;
......@@ -83,19 +82,16 @@ import com.thoughtworks.xstream.XStream;
@Service
public class ViteroManager extends BasicManager {
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddhhmm");
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmm");
private static final String VMS_PROVIDER = "VMS";
private static final String VMS_CATEGORY = "vitero-category";
private static final String COLLABORATION_TOOL_PROP_NAME = "collaboration-tool";
@Autowired
private ViteroModule viteroModule;
@Autowired
private PropertyManager propertyManager;
@Autowired
private CoordinatorManager coordinatorManager;
@Autowired
private BaseSecurity securityManager;
private XStream xStream;
......@@ -134,12 +130,34 @@ public class ViteroManager extends BasicManager {
}
}
public List<ViteroBooking> getBookings(BusinessGroup group, OLATResourceable ores, Identity identity) {
public List<ViteroBooking> getBookingInFutures(Identity identity) {
int userId = getVmsUserId(identity);
Booking[] bookings = getBookingInFutureByCustomerId(userId);
return convert(bookings);
}
public List<ViteroBooking> getBookings() {
List<Property> properties = propertyManager.listProperties(null, null, null, VMS_CATEGORY, null);
List<ViteroBooking> bookings = new ArrayList<ViteroBooking>();
for(Property property:properties) {
String bookingStr = property.getTextValue();
ViteroBooking booking = deserializeViteroBooking(bookingStr);
bookings.add(booking);
}
return bookings;
}
public List<ViteroBooking> getBookings(BusinessGroup group, OLATResourceable ores) {
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);
bookings.add(booking);
}
return bookings;
}
public String getURLToBooking(Identity identity, ViteroBooking booking) {
String sessionCode = createSessionCode(identity, booking);
String url = getStartPoint(sessionCode);
......@@ -301,27 +319,116 @@ public class ViteroManager extends BasicManager {
return false;
}
}
public ViteroBooking createBooking() {
ViteroBooking booking = new ViteroBooking();
booking.setBookingId(-1);
booking.setGroupId(-1);
Calendar cal = Calendar.getInstance();
int minute = cal.get(Calendar.MINUTE);
if(minute < 10) {
cal.set(Calendar.MINUTE, 15);
} else if (minute < 25) {
cal.set(Calendar.MINUTE, 30);
} else if (minute < 40) {
cal.set(Calendar.MINUTE, 45);
} else {
cal.add(Calendar.HOUR, 1);
cal.set(Calendar.MINUTE, 0);
}
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
booking.setStart(cal.getTime());
booking.setStartBuffer(0);
cal.add(Calendar.HOUR, 1);
booking.setEnd(cal.getTime());
booking.setEndBuffer(0);
List<Integer> roomSizes = getLicencedRoomSizes();
if(!roomSizes.isEmpty()) {
booking.setRoomSize(roomSizes.get(0));
}
return booking;
}
public List<Integer> getLicencedRoomSizes() {
List<Integer> roomSizes = new ArrayList<Integer>();
try {
LicenceServiceStub licenceWs = getLicenceWebService();
LicenceServiceStub.GetModulesForCustomerRequest licenceRequest = new LicenceServiceStub.GetModulesForCustomerRequest();
licenceRequest.setCustomerid(viteroModule.getCustomerId());
LicenceServiceStub.GetModulesForCustomerResponse response = licenceWs.getModulesForCustomer(licenceRequest);
LicenceServiceStub.Modulestype modules = response.getGetModulesForCustomerResponse();
LicenceServiceStub.Modules_type0 modulesType = modules.getModules();
for(LicenceServiceStub.Module_type0 module:modulesType.getModule()) {
if("ROOM".equals(module.getType())) {
Integer roomSize = module.getRoomsize();
if(!roomSizes.contains(roomSize)) {
roomSizes.add(roomSize);
}
}
}
} catch (RemoteException e) {
logError("Cannot get licence for customer: " + viteroModule.getCustomerId(), e);
}
return roomSizes;
}
public int createGroup() {
try {
GroupServiceStub groupWs = getGroupWebService();
GroupServiceStub.CreateGroupRequest createRequest = new GroupServiceStub.CreateGroupRequest();
GroupServiceStub.Groupnamecustomerid groupInfos = new GroupServiceStub.Groupnamecustomerid();
groupInfos.setGroupname("OLAT-" + UUID.randomUUID().toString());
groupInfos.setCustomerid(viteroModule.getCustomerId());
createRequest.setGroup(groupInfos);
GroupServiceStub.CreateGroupResponse response = groupWs.createGroup(createRequest);
GroupServiceStub.Groupid groupId = response.getCreateGroupResponse();
return groupId.getGroupid();
} catch (RemoteException e) {
logError("Cannot create a group.", e);
return -1;
}
}
public boolean updateBooking(BusinessGroup group, OLATResourceable ores, ViteroBooking vBooking) {
//TODO
return false;
}
public boolean createRoom(BusinessGroup group, OLATResourceable ores, Date begin, Date end, ViteroBookingConfiguration config) {
ViteroBookingConfiguration vConfig = (ViteroBookingConfiguration)config;
Bookingtype booking = getBookingById(vConfig.getBookingId());
public boolean createBooking(BusinessGroup group, OLATResourceable ores, ViteroBooking vBooking) {
Bookingtype booking = getBookingById(vBooking.getBookingId());
if(booking != null) {
logInfo("Booking already exists: " + vConfig.getBookingId());
logInfo("Booking already exists: " + vBooking.getBookingId());
return true;
}
try {
//a group per meeting
int groupId = createGroup();
if(groupId < 0) {
return false;
}
vBooking.setGroupId(groupId);
//create the meeting with the new group
BookingServiceStub bookingWs = getBookingWebService();
BookingServiceStub.CreateBookingRequest createRequest = new BookingServiceStub.CreateBookingRequest();
BookingServiceStub.Newbookingtype newBooking = new BookingServiceStub.Newbookingtype();
//mandatory
newBooking.setStart(format(begin));
newBooking.setEnd(format(end));
newBooking.setStartbuffer(15);
newBooking.setEndbuffer(15);
newBooking.setGroupid(1);
newBooking.setRoomsize(20);
newBooking.setStart(format(vBooking.getStart()));
newBooking.setEnd(format(vBooking.getEnd()));
newBooking.setStartbuffer(vBooking.getStartBuffer());
newBooking.setEndbuffer(vBooking.getEndBuffer());
newBooking.setGroupid(groupId);
newBooking.setRoomsize(vBooking.getRoomSize());
//optional
/*
......@@ -348,10 +455,27 @@ public class ViteroManager extends BasicManager {
int bookingId = response.getBookingid();
if(!bookingCollision && !moduleCollision) {
vConfig.setBookingId(bookingId);
vBooking.setBookingId(bookingId);
getOrCreateProperty(group, ores, vBooking);
return true;
}
return false;
} catch(AxisFault f) {
String msg = f.getFaultDetailElement().toString();
if(msg.contains("<errorCode>502</errorCode>")) {
logError("Invalid module selection!", f);
} else if(msg.contains("<errorCode>505</errorCode>")) {
logError("Booking in the past!", f);
} else if(msg.contains("<errorCode>505</errorCode>")) {
logError("Booking in the past!", f);
} else if(msg.contains("<errorCode>501</errorCode>")) {
logError("Booking collision!", f);
} else if(msg.contains("<errorCode>703</errorCode>")) {
logError("License/customer expired!", f);
} else {
logError(msg, f);
}
return false;
} catch (RemoteException e) {
logError("", e);
return false;
......@@ -360,34 +484,64 @@ public class ViteroManager extends BasicManager {
public boolean deleteBooking(ViteroBooking vBooking) {
try {
Bookingtype booking = getBookingById(vBooking.getBookingId());
if(booking == null) {
//already deleted, do nothing
return true;
}
BookingServiceStub bookingWs = getBookingWebService();
BookingServiceStub.DeleteBookingRequest deleteRequest = new BookingServiceStub.DeleteBookingRequest();
deleteRequest.setBookingid(vBooking.getBookingId());
BookingServiceStub.DeleteBookingResponse response = bookingWs.deleteBooking(deleteRequest);
BigInteger state = response.getDeletestate();
deleteGroup(vBooking);
deleteProperty(vBooking);
return state != null;
} catch(AxisFault f) {
String msg = f.getFaultDetailElement().toString();
if(msg.contains("<errorCode>509</errorCode>") || msg.contains("<errorCode>506</errorCode>")) {
//why is vms sending this error if it deletes the room???
deleteGroup(vBooking);
deleteProperty(vBooking);
} else {
logError(f.getFaultDetailElement().toString(), f);
}
return false;
} catch (RemoteException e) {
logError("", e);
return false;
}
}
public boolean isConfigValid(ViteroBookingConfiguration config) {
return true;
public boolean deleteGroup(ViteroBooking vBooking) {
try {
GroupServiceStub groupWs = getGroupWebService();
GroupServiceStub.DeleteGroupRequest deleteRequest = new GroupServiceStub.DeleteGroupRequest();
GroupServiceStub.Groupid groupId = new GroupServiceStub.Groupid();
groupId.setGroupid(vBooking.getGroupId());
deleteRequest.setDeleteGroupRequest(groupId);
groupWs.deleteGroup(deleteRequest);
return true;
} catch(AxisFault f) {
String msg = f.getFaultDetailElement().toString();
if(msg.contains("<errorCode>151</errorCode>")) {
logError("Group doesn't exist!", f);
} else if(msg.contains("<errorCode>303</errorCode>")) {
logError("Group id <= 0!", f);
} else {
logError(msg, f);
}
return false;
} catch (RemoteException e) {
logError("Cannot delete group: " + vBooking.getGroupId(), e);
return false;
}
}
public boolean removeTeaRoom(String roomId, ViteroBookingConfiguration config) {
return false;
public void deleteBookings(BusinessGroup group, OLATResourceable ores) {
}
protected void deleteProperty(ViteroBooking vBooking) {
String bookingId = Integer.toString(vBooking.getBookingId());
propertyManager.deleteProperties(null, null, null, VMS_CATEGORY, bookingId);
}
protected Booking[] getBookingInFutureByCustomerId(int userId) {
......@@ -430,30 +584,19 @@ public class ViteroManager extends BasicManager {
return vb;
}
protected void createTeaRoom(final BusinessGroup group, final OLATResourceable courseResource) {
OLATResourceable ores = group == null ? courseResource : group;
Property prop = coordinatorManager.getCoordinator().getSyncer().doInSync(ores, new SyncerCallback<Property>() {
public Property execute() {
Property prop = null;
return prop;
}
});
protected Property getProperty(final BusinessGroup group, final OLATResourceable courseResource) {
return propertyManager.findProperty(null, group, courseResource, VMS_CATEGORY, null);
}
protected Property getProperty(final BusinessGroup group, final OLATResourceable courseResource, String subName) {
if(group != null && !StringHelper.containsNonWhitespace(subName)) {
subName = COLLABORATION_TOOL_PROP_NAME;
protected Property getOrCreateProperty(final BusinessGroup group, final OLATResourceable courseResource, ViteroBooking booking) {
Property property = getProperty(group, courseResource);
if(property == null) {
String serialized = serializeViteroBooking(booking);
String bookingId = Integer.toString(booking.getBookingId());
Long groupId = new Long(booking.getGroupId());
property = propertyManager.createPropertyInstance(null, group, courseResource, VMS_CATEGORY, bookingId, null, groupId, null, serialized);
propertyManager.saveProperty(property);
}
return propertyManager.findProperty(null, group, courseResource, VMS_CATEGORY, subName);
}
protected Property getOrCreateProperty(final BusinessGroup group, final OLATResourceable courseResource, String subName) {
Property property = getProperty(group, courseResource, subName);
return property;
}
......@@ -520,6 +663,17 @@ public class ViteroManager extends BasicManager {
}
}
protected GroupServiceStub getGroupWebService() {
try {
GroupServiceStub groupWs = new GroupServiceStub(getVmsEndPoint());
SecurityHeader.addAdminSecurityHeader(viteroModule, groupWs);
return groupWs;
} catch (AxisFault e) {
logError("Cannot create group ws.", e);
return null;
}
}
protected UserServiceStub getUserWebService() {
try {
UserServiceStub userWs = new UserServiceStub(getVmsEndPoint());
......
......@@ -20,13 +20,24 @@
*/
package com.frentix.olat.vitero.ui;
import java.util.Date;
import java.util.List;
import org.olat.core.CoreSpringFactory;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.form.flexible.FormItemContainer;
import org.olat.core.gui.components.form.flexible.elements.DateChooser;
import org.olat.core.gui.components.form.flexible.elements.SingleSelection;
import org.olat.core.gui.components.form.flexible.impl.FormBasicController;
import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.id.OLATResourceable;
import org.olat.group.BusinessGroup;
import com.frentix.olat.vitero.manager.ViteroManager;
import com.frentix.olat.vitero.model.ViteroBooking;
/**
*
......@@ -39,17 +50,69 @@ import org.olat.core.gui.control.WindowControl;
*/
public class ViteroBookingEditController extends FormBasicController {
public ViteroBookingEditController(UserRequest ureq, WindowControl wControl) {
private DateChooser beginChooser;
private DateChooser endChooser;
private SingleSelection beginBufferEl;
private SingleSelection endBufferEl;
private SingleSelection roomSizeEl;
private static final String[] bufferKeys = new String[]{"0", "15", "30", "45", "60"};
private static final String[] bufferValues = bufferKeys;
private final String[] roomSizes;
private final BusinessGroup group;
private final OLATResourceable ores;
private final ViteroBooking booking;
private final ViteroManager viteroManager;
public ViteroBookingEditController(UserRequest ureq, WindowControl wControl, BusinessGroup group, OLATResourceable ores, ViteroBooking booking) {
super(ureq, wControl);
this.group = group;
this.ores = ores;
this.booking = booking;
viteroManager = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
List<Integer> sizes = viteroManager.getLicencedRoomSizes();
roomSizes = new String[sizes.size()];
int i=0;
for(Integer size:sizes) {
roomSizes[i++] = size.toString();
}
initForm(ureq);
}
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
//
//begin
beginChooser = uifactory.addDateChooser("vc.table.begin", "", formLayout);
beginChooser.setDisplaySize(21);
beginChooser.setDateChooserTimeEnabled(true);
beginChooser.setMandatory(true);
beginChooser.setDate(booking.getStart());
//end
endChooser = uifactory.addDateChooser("vc.table.end", "", formLayout);
endChooser.setDisplaySize(21);
endChooser.setDateChooserTimeEnabled(true);
endChooser.setMandatory(true);
endChooser.setDate(booking.getEnd());
//buffer start
beginBufferEl = uifactory.addDropdownSingleselect("vc.table.beginBuffer", formLayout, bufferKeys, bufferValues, null);
beginBufferEl.select(Integer.toString(booking.getStartBuffer()), true);
//buffer end
endBufferEl = uifactory.addDropdownSingleselect("vc.table.endBuffer", formLayout, bufferKeys, bufferValues, null);
endBufferEl.select(Integer.toString(booking.getEndBuffer()), true);
//room size
roomSizeEl = uifactory.addDropdownSingleselect("vc.table.roomSize", formLayout, roomSizes, roomSizes, null);
if(booking.getRoomSize() > 0) {
roomSizeEl.select(Integer.toString(booking.getRoomSize()), true);
}
FormLayoutContainer buttonCont = FormLayoutContainer.createButtonLayout("buttons", getTranslator());
formLayout.add(buttonCont);
uifactory.addFormSubmitButton("ok", buttonCont);
......@@ -60,9 +123,59 @@ public class ViteroBookingEditController extends FormBasicController {
protected void doDispose() {
//
}
public ViteroBooking getUserObject() {
return booking;
}
@Override
protected boolean validateFormLogic(UserRequest ureq) {
boolean allOk = true;
Date begin = beginChooser.getDate();
Date end = endChooser.getDate();
return allOk && super.validateFormLogic(ureq);
}
@Override
protected void formOK(UserRequest ureq) {
Date begin = beginChooser.getDate();
booking.setStart(begin);
int beginBuffer = 0;
if(beginBufferEl.isOneSelected()) {
beginBuffer = Integer.parseInt(beginBufferEl.getSelectedKey());
}
booking.setStartBuffer(beginBuffer);
Date end = endChooser.getDate();
booking.setEnd(end);
int endBuffer = 0;
if(endBufferEl.isOneSelected()) {
endBuffer = Integer.parseInt(endBufferEl.getSelectedKey());
}
booking.setStartBuffer(endBuffer);
int roomSize = -1;
if(roomSizeEl.isOneSelected()) {
roomSize = Integer.parseInt(roomSizeEl.getSelectedKey());
}
booking.setRoomSize(roomSize);
if(booking.getBookingId() >= 0) {
viteroManager.updateBooking(group, ores, booking);
} else {
if(viteroManager.createBooking(group, ores, booking)) {
showInfo("vc.check.ok");
} else {
showError("vc.check.nok");
}
}
fireEvent(ureq, Event.DONE_EVENT);
}
......
......@@ -20,6 +20,8 @@
*/
package com.frentix.olat.vitero.ui;
import java.util.List;
import org.olat.core.CoreSpringFactory;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.Component;
......@@ -72,14 +74,13 @@ public class ViteroBookingsAdminController extends BasicController {
tableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator());
listenTo(tableCtr);
tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("vc.table.begin",
ViteroBookingDataModel.Column.begin.ordinal(), null, ureq.getLocale()));
tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("vc.table.begin", ViteroBookingDataModel.Column.begin.ordinal(), null, ureq.getLocale()));
tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("vc.table.end", ViteroBookingDataModel.Column.end.ordinal(), null, ureq.getLocale()));
tableCtr.addColumnDescriptor(new StaticColumnDescriptor("open", "vc.table.open", translate("vc.table.open")));
tableCtr.addColumnDescriptor(new StaticColumnDescriptor("delete", "vc.table.delete", translate("vc.table.delete")));
ViteroBookingDataModel tableModel = new ViteroBookingDataModel();
tableCtr.setTableDataModel(tableModel);
tableCtr.addColumnDescriptor(new StaticColumnDescriptor("start", "start", translate("start")));
tableCtr.addColumnDescriptor(new StaticColumnDescriptor("delete", "delete", translate("delete")));
reloadModel();
putInitialPanel(tableCtr.getInitialComponent());
}
......@@ -101,7 +102,7 @@ public class ViteroBookingsAdminController extends BasicController {
TableEvent e = (TableEvent)event;
int row = e.getRowId();
ViteroBooking booking = (ViteroBooking)tableCtr.getTableDataModel().getObject(row);
if("open".equals(e.getActionId())) {
if("start".equals(e.getActionId())) {
openVitero(ureq, booking);
} else if("delete".equals(e.getActionId())) {
confirmDeleteVitero(ureq, booking);
......@@ -121,6 +122,7 @@ public class ViteroBookingsAdminController extends BasicController {
} else {
showError("vc.table.delete");
}
reloadModel();
}
protected void confirmDeleteVitero(UserRequest ureq, ViteroBooking booking) {
......@@ -135,5 +137,10 @@ public class ViteroBookingsAdminController extends BasicController {
RedirectMediaResource redirect = new RedirectMediaResource(url);
ureq.getDispatchResult().setResultingMediaResource(redirect);
}
}
protected void reloadModel() {
List<ViteroBooking> bookings = viteroManager.getBookings();
ViteroBookingDataModel tableModel = new ViteroBookingDataModel(bookings);
tableCtr.setTableDataModel(tableModel);
}
}
\ No newline at end of file
......@@ -64,7 +64,7 @@ public class ViteroBookingsController extends BasicController {
viteroManager = (ViteroManager) CoreSpringFactory.getBean("viteroManager");
List<ViteroBooking> bookings = viteroManager.getBookings(group, ores, getIdentity());
List<ViteroBooking> bookings = viteroManager.getBookings(group, ores);
TableDataModel tableData = new ViteroBookingDataModel(bookings);
TableGuiConfiguration tableConfig = new TableGuiConfiguration();
......@@ -72,13 +72,12 @@ public class ViteroBookingsController extends BasicController {
tableConfig.setColumnMovingOffered(true);
tableConfig.setSortingEnabled(true);
tableCtr = new TableController(tableConfig, ureq, wControl, getTranslator());
tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("vc.table.begin",
ViteroBookingDataModel.Column.begin.ordinal(), null, ureq.getLocale()));
tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("vc.table.begin", ViteroBookingDataModel.Column.begin.ordinal(), null, ureq.getLocale()));
tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("vc.table.end", ViteroBookingDataModel.Column.end.ordinal(), null, ureq.getLocale()));
tableCtr.addColumnDescriptor(new StaticColumnDescriptor("open", "vc.table.open", translate("vc.table.open")));
tableCtr.addColumnDescriptor(new StaticColumnDescriptor("start", "start", translate("start")));
tableCtr.setTableDataModel(tableData);
tableCtr.setSortColumn(2, true);// timeframe
tableCtr.setSortColumn(1, true);// timeframe
listenTo(tableCtr);
runVC = createVelocityContainer("run");
......
......@@ -21,24 +21,28 @@
package com.frentix.olat.vitero.ui;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.olat.core.CoreSpringFactory;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.form.flexible.FormItem;
import org.olat.core.gui.components.form.flexible.FormItemContainer;
import org.olat.core.gui.components.form.flexible.elements.DateChooser;
import org.olat.core.gui.components.form.flexible.elements.FormLink;
import org.olat.core.gui.components.form.flexible.elements.TextElement;
import org.olat.core.gui.components.form.flexible.impl.FormBasicController;
import org.olat.core.gui.components.form.flexible.impl.FormEvent;
import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer;
import org.olat.core.gui.components.link.Link;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.generic.closablewrapper.CloseableModalController;
import org.olat.core.gui.control.generic.modal.DialogBoxController;
import org.olat.core.gui.control.generic.modal.DialogBoxUIFactory;
import org.olat.core.id.OLATResourceable;
import org.olat.course.editor.NodeEditController;
import org.olat.group.BusinessGroup;
import com.frentix.olat.vitero.manager.ViteroManager;
import com.frentix.olat.vitero.model.ViteroBooking;
/**
......@@ -56,20 +60,26 @@ public class ViteroBookingsEditController extends FormBasicController {
private final List<BookingDisplay> bookingDisplays = new ArrayList<BookingDisplay>();
private CloseableModalController cmc;
private DialogBoxController dialogCtr;
private ViteroBookingEditController bookingController;
private final BusinessGroup group;
private final OLATResourceable ores;
private final ViteroManager viteroManager;
public ViteroBookingsEditController(UserRequest ureq, WindowControl wControl) {
public ViteroBookingsEditController(UserRequest ureq, WindowControl wControl, BusinessGroup group, OLATResourceable ores) {
super(ureq, wControl, "edit");
this.group = group;
this.ores = ores;
viteroManager = (ViteroManager)CoreSpringFactory.getBean("viteroManager");
initForm(ureq);
}
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
if(formLayout instanceof FormLayoutContainer) {
FormLayoutContainer layoutContainer = (FormLayoutContainer)formLayout;
layoutContainer.contextPut("bookingDisplays", bookingDisplays);
}
reloadModel();
newButton = uifactory.addFormLink("vc.booking.new", formLayout, Link.BUTTON);
uifactory.addFormSubmitButton("subm", formLayout);
......@@ -79,6 +89,18 @@ public class ViteroBookingsEditController extends FormBasicController {
protected void doDispose() {
// nothing to dispose
}
protected void reloadModel() {
bookingDisplays.clear();
List<ViteroBooking> bookings = viteroManager.getBookings(group, ores);
for(ViteroBooking booking:bookings) {
BookingDisplay display = new BookingDisplay(booking);
display.setDeleteButton(uifactory.addFormLink("delete", flc, Link.BUTTON));
display.setEditButton(uifactory.addFormLink("edit", flc, Link.BUTTON));
bookingDisplays.add(display);
}
flc.contextPut("bookingDisplays", bookingDisplays);
}
@Override
protected void formOK(UserRequest ureq) {
......@@ -92,10 +114,15 @@ public class ViteroBookingsEditController extends FormBasicController {
} else if (source instanceof FormLink) {
for(BookingDisplay display: bookingDisplays) {
if(display.getDeleteButton() == source) {
removeBooking(ureq, display);
confirmDeleteBooking(ureq, display);
break;
} else if(display.getEditButton() == source) {
ViteroBooking viteroBooking = display.getMeeting();
editBooking(ureq, viteroBooking);
break;
}
}
reloadModel();
}
super.formInnerEvent(ureq, source, event);
}
......@@ -112,16 +139,35 @@ public class ViteroBookingsEditController extends FormBasicController {
cmc.deactivate();
removeAsListenerAndDispose(bookingController);
removeAsListenerAndDispose(cmc);
reloadModel();
} else if(source == dialogCtr) {
if (DialogBoxUIFactory.isOkEvent(event)) {
ViteroBooking booking = (ViteroBooking)dialogCtr.getUserObject();
deleteBooking(ureq, booking);
}
}
}
protected void removeBooking(UserRequest ureq, BookingDisplay bookingDisplay) {
protected void deleteBooking(UserRequest ureq, ViteroBooking booking) {
if( viteroManager.deleteBooking(booking)) {
showInfo("vc.table.delete");
} else {
showError("vc.table.delete");
}
reloadModel();
}
protected void newBooking(UserRequest ureq) {
protected void confirmDeleteBooking(UserRequest ureq, BookingDisplay bookingDisplay) {
String title = translate("vc.table.delete");
String text = translate("vc.table.delete.confirm");
dialogCtr = activateOkCancelDialog(ureq, title, text, dialogCtr);
dialogCtr.setUserObject(bookingDisplay.getMeeting());
}
protected void editBooking(UserRequest ureq, ViteroBooking viteroBooking) {
removeAsListenerAndDispose(bookingController);
bookingController = new ViteroBookingEditController(ureq, getWindowControl());
bookingController = new ViteroBookingEditController(ureq, getWindowControl(), group, ores, viteroBooking);
listenTo(bookingController);
removeAsListenerAndDispose(cmc);
......@@ -130,12 +176,15 @@ public class ViteroBookingsEditController extends FormBasicController {
cmc.activate();
}
public class BookingDisplay {
protected void newBooking(UserRequest ureq) {
ViteroBooking viteroBooking = viteroManager.createBooking();
editBooking(ureq, viteroBooking);
}
public class BookingDisplay {
private final ViteroBooking meeting;
private DateChooser calenderBegin;
private TextElement durationEl;
private FormLink deleteButton;
private FormLink editButton;
public BookingDisplay(ViteroBooking meeting) {
this.meeting = meeting;
......@@ -145,20 +194,12 @@ public class ViteroBookingsEditController extends FormBasicController {
return meeting;
}
public DateChooser getCalenderBegin() {
return calenderBegin;
}
public void setCalenderBegin(DateChooser calenderBegin) {
this.calenderBegin = calenderBegin;
public Date getBegin() {
return meeting.getStart();
}
public TextElement getDurationEl() {
return durationEl;
}
public void setDurationEl(TextElement durationEl) {
this.durationEl = durationEl;
public Date getEnd() {
return meeting.getEnd();
}
public FormLink getDeleteButton() {
......@@ -168,5 +209,13 @@ public class ViteroBookingsEditController extends FormBasicController {
public void setDeleteButton(FormLink deleteButton) {
this.deleteButton = deleteButton;
}
public FormLink getEditButton() {
return editButton;
}
public void setEditButton(FormLink editButton) {
this.editButton = editButton;
}
}
}
\ No newline at end of file
......@@ -8,20 +8,19 @@
</tr>
#foreach($bookingDisplay in $bookingDisplays)
#set( $begin = $bookingDisplay.calenderBegin.component.componentName)
#set( $beginErr = $begin + "_ERROR" )
#set( $duration = $bookingDisplay.durationEl.component.componentName)
#set( $durationErr = $duration + "_ERROR" )
<tr>
<td><div class="b_form_error">#if($f.hasError($begin))$r.render($beginErr)#end</div></td>
<td><div class="b_form_error">#if($f.hasError($begin))$r.formatDateAndTime($bookingDisplay.start)#end</div></td>
<td><div class="b_form_error">#if($f.hasError($duration))$r.render($durationErr)#end</div></td>
<td></td>
<td></td>
</tr>
<tr>
<td>$r.render($begin)</td>
<td>$r.render($duration)</td>
<td>$r.formatDateAndTime($bookingDisplay.begin)</td>
<td>$r.formatDateAndTime($bookingDisplay.end)</td>
<td>
$r.render($bookingDisplay.editButton.component.componentName)
</td>
<td>
$r.render($bookingDisplay.deleteButton.component.componentName)
</td>
......
Hello world (by Vitero)<br />
$r.render("bookings")
\ No newline at end of file
......@@ -22,9 +22,10 @@ vc.check.url.invalid=URL ist nicht g
vc.check.customer.invalid=Benutzer ID ist nicht gltig
vc.table.begin=Start
vc.table.beginBuffer=Start buffer
vc.table.end=Ende
vc.table.open=Starten
vc.table.delete=Lschen
vc.table.endBuffer=Ende buffer
vc.table.roomSize=Room size
vc.table.delete.confirm=Wollen Sie wirklich dieser Booking lschen?
vc.table.empty=Derzeit sind keine Meetings geplant.
......@@ -37,35 +38,9 @@ chelp.vitero1=Hilfe
vc.access.dates=Virtuelles Klassenzimmer soll nur zu bestimmten Terminen betreten werden k\u00f6nnen
vc.table.add=+
vc.table.begin.empty=Datumsangabe fehlt
vc.table.begin.error=Fehlerhafte Eingabe
vc.table.description=Beschreibung
vc.table.description.empty=Beschreibung fehlt
vc.table.delete=-
vc.table.duration=Dauer
vc.table.duration.empty=Dauer fehlt
vc.table.duration.error=Falsches Format
vc.table.duration.example=hh\:mm
vc.table.intro=Hier finden Sie eine Liste aller geplanten Meetings:
vc.table.title=Titel
vc.table.title.empty=Titel fehlt
vc.options=Zutrittsberechtigung
vc.options.intro=Zutrittsberechtigung
vc.options.label=Zutrittsberechtigung
......
......@@ -52,6 +52,10 @@ public class TaskExecutorManager extends BasicManager {
return INSTANCE;
}
public void destroy() {
taskExecutor.shutDown();
}
/**
* runs the task and wraps it in a new runnable to catch uncatched errors
* and may close db sessions used in the task.
......
......@@ -11,7 +11,7 @@
<context:property-placeholder location="classpath:serviceconfig/olat.properties, classpath:olat.local.properties" />
<context:annotation-config />
<bean id="taskExecutorManager" class="org.olat.core.commons.taskExecutor.TaskExecutorManager" >
<bean id="taskExecutorManager" class="org.olat.core.commons.taskExecutor.TaskExecutorManager" destroy-method="destroy">
<constructor-arg index="0">
<bean class="org.olat.core.commons.taskExecutor.ThreadPoolTaskExecutor">
<!-- poolSize -->
......
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