Package org.olat.group

Examples of org.olat.group.BusinessGroup


    /*
     * this creates a BusinessGroup as BuddyGroup with the specified name and
     * description and also the CollaborationTools are enabled during creation.
     * The GroupContext is null in the case of BuddyGroups.
     */
    BusinessGroup newGroup = bgm.createAndPersistBusinessGroup(BusinessGroup.TYPE_BUDDYGROUP, identity, bgName, bgDesc, bgMin, bgMax, null, null, null);
    // create buddylist for group
    // 2. Add user to group, fire events, do loggin etc.
    BGConfigFlags flags = BGConfigFlags.createBuddyGroupDefaultFlags();
    addLoggingResourceable(LoggingResourceable.wrap(newGroup));
    bgm.addOwnerAndFireEvent(ureq.getIdentity(), ureq.getIdentity(), newGroup, flags, true);
View Full Code Here


    List wrapped = new ArrayList();
    // buddy groups
    List groups = bgm.findBusinessGroupsOwnedBy(BusinessGroup.TYPE_BUDDYGROUP, identity, null);
    Iterator iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, Boolean.TRUE, Boolean.TRUE));
    }
    groups = bgm.findBusinessGroupsAttendedBy(BusinessGroup.TYPE_BUDDYGROUP, identity, null);
    iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, Boolean.TRUE, null));
    }
    // learning groups
    groups = bgm.findBusinessGroupsOwnedBy(BusinessGroup.TYPE_LEARNINGROUP, identity, null);
    iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, null, null));
    }
    groups = bgm.findBusinessGroupsAttendedBy(BusinessGroup.TYPE_LEARNINGROUP, identity, null);
    iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, null, null));
    }
    // right groups
    groups = bgm.findBusinessGroupsAttendedBy(BusinessGroup.TYPE_RIGHTGROUP, identity, null);
    iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, null, null));
    }
    groupListModel.setEntries(wrapped);
    groupListCtr.modelChanged();
  }
View Full Code Here

    List wrapped = new ArrayList();
    // buddy groups
    List groups = bgm.findBusinessGroupsOwnedBy(BusinessGroup.TYPE_BUDDYGROUP, identity, null);
    Iterator iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, Boolean.TRUE, Boolean.TRUE));
    }
    groups = bgm.findBusinessGroupsAttendedBy(BusinessGroup.TYPE_BUDDYGROUP, identity, null);
    iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, Boolean.TRUE, null));
    }
    groupListModel.setEntries(wrapped);
    groupListCtr.modelChanged();
  }
View Full Code Here

    List wrapped = new ArrayList();
    // learning groups
    List groups = bgm.findBusinessGroupsOwnedBy(BusinessGroup.TYPE_LEARNINGROUP, identity, null);
    Iterator iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, null, null));
    }
    groups = bgm.findBusinessGroupsAttendedBy(BusinessGroup.TYPE_LEARNINGROUP, identity, null);
    iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, null, null));
    }
    groupListModel.setEntries(wrapped);
    groupListCtr.modelChanged();
  }
View Full Code Here

    // buddy groups
    // right groups
    List groups = bgm.findBusinessGroupsAttendedBy(BusinessGroup.TYPE_RIGHTGROUP, identity, null);
    Iterator iter = groups.iterator();
    while (iter.hasNext()) {
      BusinessGroup group = (BusinessGroup) iter.next();
      wrapped.add(wrapGroup(group, null, null));
    }
    groupListModel.setEntries(wrapped);
    groupListCtr.modelChanged();
  }
View Full Code Here

      String groupName = iterator.next();
      List<BusinessGroup> mygroups = cgm.getLearningGroupsFromAllContexts(groupName);
      // create a ContactList with the name of the group
      ContactList tmp = new ContactList(groupName);
      for (int i = 0; i < mygroups.size(); i++) {
        BusinessGroup bg = mygroups.get(i);
        List<Identity> ids = secManager.getIdentitiesOfSecurityGroup(bg.getPartipiciantGroup());
        ids.addAll(secManager.getIdentitiesOfSecurityGroup(bg.getOwnerGroup()));
        // add all identities to the ContactList
        tmp.addAllIdentites(ids);
      }
      // add the ContactList
      groupsCL.add(tmp);
View Full Code Here

      String areaName = iterator.next();
      List<BusinessGroup> mygroups = cgm.getLearningGroupsInAreaFromAllContexts(areaName);
      // create a ContactList with the name of the group
      ContactList tmp = new ContactList(areaName);
      for (int i = 0; i < mygroups.size(); i++) {
        BusinessGroup bg = mygroups.get(i);
        List<Identity> ids = secManager.getIdentitiesOfSecurityGroup(bg.getPartipiciantGroup());
        ids.addAll(secManager.getIdentitiesOfSecurityGroup(bg.getOwnerGroup()));
        // add all identities to the ContactList
        tmp.addAllIdentites(ids);
      }
      // add the ContactList
      groupsCL.add(tmp);
View Full Code Here

    /**
     * @see org.olat.core.gui.components.table.TableDataModel#getValueAt(int, int)
     */
    public Object getValueAt(int row, int col) {
        BusinessGroup businessGroup = (BusinessGroup) objects.get(row);
        switch (col) {
            case 0 :
                return StringEscapeUtils.escapeHtml(businessGroup.getName()).toString();
            case 1 :
              String tmp = businessGroup.getDescription();
              tmp = FilterFactory.getHtmlTagsFilter().filter(tmp);
                tmp = Formatter.truncate(tmp, 256);
                return tmp;
            case 2 :
              String name = DefaultContextTranslationHelper.translateIfDefaultContextName(businessGroup.getGroupContext(), trans);
              name = StringEscapeUtils.escapeHtml(name).toString();
              return name;
            default :
                return "ERROR";
        }
View Full Code Here

      }
    } else if (source == backButton){
      doUsersList(ureq, true); // for now init whole table models again
    } else if (source instanceof Link) {
      Link link = (Link) source;
      BusinessGroup group = (BusinessGroup) link.getUserObject();
      String groupKey = group.getKey().toString();
      if (link.getCommand().indexOf(CMD_USER_REMOVE_GROUP_PART) == 0) {
        doRemoveUserFromParticipatingGroup(ureq.getIdentity(), this.currentIdentity, groupKey);
        doUserDetails(ureq);
      } else if (link.getCommand().indexOf(CMD_USER_REMOVE_GROUP_OWN) == 0) {
        doRemoveUserFromOwnedGroup(ureq, groupKey);
View Full Code Here

      }

    } else if (event instanceof BusinessGroupModifiedEvent) {
      if (event.getCommand().equals(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT)) {
        // update reference to updated business group object
        BusinessGroup modifiedGroup = groupManager.loadBusinessGroup(this.currentGroup);
        if (groupListModel != null) {
          List groups = groupListModel.getObjects();
          if (groups.contains(this.currentGroup)) {
            int i = groups.indexOf(this.currentGroup);
            groups.set(i, modifiedGroup);
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.