Package org.olat.group

Examples of org.olat.group.BusinessGroup


        if (type.equals(CalendarController.ACTION_CALENDAR_COURSE)) {
          String displayName = RepositoryManager.getInstance().lookupDisplayNameByOLATResourceableId(id);
          calType = CalendarManager.TYPE_COURSE;
          title = translator.translate("cal.notifications.header.course", new String[]{displayName});
        } else if (type.equals(CalendarController.ACTION_CALENDAR_GROUP)) {
          BusinessGroup group = BusinessGroupManagerImpl.getInstance().loadBusinessGroup(id, false);
          calType = CalendarManager.TYPE_GROUP;
          title = translator.translate("cal.notifications.header.group", new String[]{group.getName()});
        }

        if (calType != null) {
          Formatter form = Formatter.getInstance(locale);
          si = new SubscriptionInfo(new TitleItem(title, CSS_CLASS_CALENDAR_ICON), null);
View Full Code Here


  }
 
  private void checkPublisher(Publisher p) {
    try {
      if(CalendarController.ACTION_CALENDAR_GROUP.equals(p.getSubidentifier())) {
        BusinessGroup bg = BusinessGroupManagerImpl.getInstance().loadBusinessGroup(p.getResId(), false);
        if(bg == null) {
          logInfo("deactivating publisher with key; " + p.getKey(), null);
          NotificationsManager.getInstance().deactivate(p);
        }
      } else if (CalendarController.ACTION_CALENDAR_COURSE.equals(p.getSubidentifier())) {
View Full Code Here

      String type = subscriber.getPublisher().getSubidentifier();
      if (type.equals(CalendarController.ACTION_CALENDAR_COURSE)) {
        ICourse course = CourseFactory.loadCourse(id);
        title = translator.translate("cal.notifications.header.course", new String[]{course.getCourseTitle()});
      } else if (type.equals(CalendarController.ACTION_CALENDAR_GROUP)) {
        BusinessGroup group = BusinessGroupManagerImpl.getInstance().loadBusinessGroup(id, false);
        title = translator.translate("cal.notifications.header.group", new String[]{group.getName()});
      }
      return title;
    } catch (Exception e) {
      logError("Error while creating calendar notifications for subscriber: " + subscriber.getKey(), e);
      checkPublisher(subscriber.getPublisher());
View Full Code Here

      return BGControllerFactory.getInstance().createBuddyGroupMainController(ureq, wControl, initialViewIdentifier);

    } else if (OresHelper.isOfType(olatResourceable, BusinessGroup.class)) {
      if (roles.isGuestOnly()) throw new OLATSecurityException("Tried to launch a BusinessGroup, but is in guest group " + roles);
      BusinessGroupManager bgm = BusinessGroupManagerImpl.getInstance();
      BusinessGroup bg = bgm.loadBusinessGroup(olatResourceable.getResourceableId(), exceptIfNoneFound);
      boolean isOlatAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
      // check if allowed to start (must be member or admin)
      if (isOlatAdmin || bgm.isIdentityInBusinessGroup(ureq.getIdentity(), bg)) { 
        // only olatadmins or admins of this group can administer this group
        return BGControllerFactory.getInstance().createRunControllerFor(ureq, wControl, bg, isOlatAdmin,
View Full Code Here

   
  }


private Project createProject(String name, Identity creator, Long projectBrokerId, Long courseId) {
  BusinessGroup projectGroup = ProjectBrokerManagerFactory.getProjectGroupManager().createProjectGroupFor(projectBrokerId, creator, name + "_Group", name + "GroupDescription", courseId);
  Project project = ProjectBrokerManagerFactory.getProjectBrokerManager().createAndSaveProjectFor(name + "title", name + "description1", projectBrokerId, projectGroup);
  return project;
}
View Full Code Here

TOP

Related Classes of org.olat.group.BusinessGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.