use of org.olat.core.util.resource.OLATResourceableDeletedEvent in project OpenOLAT by OpenOLAT.
the class ProjectBrokerGroupDeleteManager method deleteGroupDataFor.
@Override
public boolean deleteGroupDataFor(BusinessGroup group) {
log.debug("deleteAllProjectGroupEntiresFor started.. group=" + group);
List<Project> projectList = projectBrokerManager.getProjectsWith(group);
for (Project project : projectList) {
// no course-env, no course-node
projectBrokerManager.deleteProject(project, false, null, null);
ProjectBroker projectBroker = project.getProjectBroker();
OLATResourceableDeletedEvent delEv = new OLATResourceableDeletedEvent(projectBroker);
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(delEv, projectBroker);
log.debug("deleteProjectWith: group=" + group + " , project=" + project);
}
return true;
}
use of org.olat.core.util.resource.OLATResourceableDeletedEvent in project OpenOLAT by OpenOLAT.
the class ProjectDetailsPanelController method openEditController.
private void openEditController(UserRequest ureq) {
if (projectBrokerManager.existsProject(project.getKey())) {
OLATResourceable projectOres = OresHelper.createOLATResourceableInstance(Project.class, project.getKey());
this.lock = CoordinatorManager.getInstance().getCoordinator().getLocker().acquireLock(projectOres, ureq.getIdentity(), null);
if (lock.isSuccess()) {
editController = new ProjectEditDetailsFormController(ureq, this.getWindowControl(), project, courseEnv, courseNode, projectBrokerModuleConfiguration, newCreatedProject);
editController.addControllerListener(this);
editVC.put("editController", editController.getInitialComponent());
detailsPanel.pushContent(editVC);
} else {
this.showInfo("info.project.already.edit", project.getTitle());
}
} else {
this.showInfo("info.project.nolonger.exist", project.getTitle());
// fire event to update project list
ProjectBroker projectBroker = project.getProjectBroker();
OLATResourceableDeletedEvent delEv = new OLATResourceableDeletedEvent(projectBroker);
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(delEv, projectBroker);
}
}
use of org.olat.core.util.resource.OLATResourceableDeletedEvent in project openolat by klemens.
the class ProjectBrokerGroupDeleteManager method deleteGroupDataFor.
@Override
public boolean deleteGroupDataFor(BusinessGroup group) {
log.debug("deleteAllProjectGroupEntiresFor started.. group=" + group);
List<Project> projectList = projectBrokerManager.getProjectsWith(group);
for (Project project : projectList) {
// no course-env, no course-node
projectBrokerManager.deleteProject(project, false, null, null);
ProjectBroker projectBroker = project.getProjectBroker();
OLATResourceableDeletedEvent delEv = new OLATResourceableDeletedEvent(projectBroker);
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(delEv, projectBroker);
log.debug("deleteProjectWith: group=" + group + " , project=" + project);
}
return true;
}
use of org.olat.core.util.resource.OLATResourceableDeletedEvent in project openolat by klemens.
the class ProjectDetailsPanelController method openEditController.
private void openEditController(UserRequest ureq) {
if (projectBrokerManager.existsProject(project.getKey())) {
OLATResourceable projectOres = OresHelper.createOLATResourceableInstance(Project.class, project.getKey());
this.lock = CoordinatorManager.getInstance().getCoordinator().getLocker().acquireLock(projectOres, ureq.getIdentity(), null);
if (lock.isSuccess()) {
editController = new ProjectEditDetailsFormController(ureq, this.getWindowControl(), project, courseEnv, courseNode, projectBrokerModuleConfiguration, newCreatedProject);
editController.addControllerListener(this);
editVC.put("editController", editController.getInitialComponent());
detailsPanel.pushContent(editVC);
} else {
this.showInfo("info.project.already.edit", project.getTitle());
}
} else {
this.showInfo("info.project.nolonger.exist", project.getTitle());
// fire event to update project list
ProjectBroker projectBroker = project.getProjectBroker();
OLATResourceableDeletedEvent delEv = new OLATResourceableDeletedEvent(projectBroker);
CoordinatorManager.getInstance().getCoordinator().getEventBus().fireEventToListenersOf(delEv, projectBroker);
}
}
Aggregations