Package org.olat.group.area

Examples of org.olat.group.area.BGArea


        doBack();
      }
    } else if (source == areaCreateController){
      if (event == Event.DONE_EVENT) {
        releaseAdminLockAndGroupMUE();
        BGArea createdArea = areaCreateController.getCreatedArea();
        if (createdArea != null) {
          this.currentArea = createdArea;
          doAreaEdit(ureq);
        } else {
          this.showInfo("error.area.name.exists");
View Full Code Here


    } else if (source == areasChoice) {
      if (event == Choice.EVNT_VALIDATION_OK) {
        updateGroupAreaRelations();
        // do loggin
        for (Iterator<BGArea> iter = selectedAreas.iterator(); iter.hasNext();) {
          BGArea area = iter.next();
          ThreadLocalUserActivityLogger.log(GroupLoggingAction.GROUP_AREA_UPDATED, getClass(),
              LoggingResourceable.wrap(area));
        }
        if (selectedAreas.size()==0) {
          ThreadLocalUserActivityLogger.log(GroupLoggingAction.GROUP_AREA_UPDATED_EMPTY, getClass());
View Full Code Here

    // 1) add areas to group
    List addedAreas = areasChoice.getAddedRows();
    Iterator iterator = addedAreas.iterator();
    while (iterator.hasNext()) {
      Integer position = (Integer) iterator.next();
      BGArea area = areaDataModel.getArea(position.intValue());
      areaManager.addBGToBGArea(this.currBusinessGroup, area);
      this.selectedAreas.add(area);
    }
    // 2) remove areas from group
    List removedAreas = areasChoice.getRemovedRows();
    iterator = removedAreas.iterator();
    while (iterator.hasNext()) {
      Integer position = (Integer) iterator.next();
      BGArea area = areaDataModel.getArea(position.intValue());
      areaManager.removeBGFromArea(this.currBusinessGroup, area);
      this.selectedAreas.remove(area);
    }
  }
View Full Code Here

 
  @Override
  protected void event(UserRequest ureq, Controller source, Event event) {
    if (source == this.areaController) {
      if (event == Event.DONE_EVENT) {
        BGArea updatedArea = doAreaUpdate();
        if (updatedArea == null) {
          this.areaController.resetAreaName();
          getWindowControl().setWarning(this.trans.translate("error.area.name.exists"));
        } else {
          this.area = updatedArea;
View Full Code Here

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

    if (copyAreas) {
      BGAreaManager areaManager = BGAreaManagerImpl.getInstance();
      List areas = areaManager.findBGAreasOfBusinessGroup(sourceBusinessGroup);
      Iterator iterator = areas.iterator();
      while (iterator.hasNext()) {
        BGArea area = (BGArea) iterator.next();
        if (areaLookupMap == null) {
          // reference target group to source groups areas
          areaManager.addBGToBGArea(newGroup, area);
        } else {
          // reference target group to mapped group areas
          BGArea mappedArea = (BGArea) areaLookupMap.get(area);
          areaManager.addBGToBGArea(newGroup, mappedArea);
        }
      }
    }
    // 5. copy owners
View Full Code Here

    // export areas
    MutableConfiguration confAreas = root.addChild(EXPORT_KEY_AREA_COLLECTION);
    BGAreaManager am = BGAreaManagerImpl.getInstance();
    List areas = am.findBGAreasOfBGContext(context);
    for (Iterator iter = areas.iterator(); iter.hasNext();) {
      BGArea area = (BGArea) iter.next();
      MutableConfiguration newArea = confAreas.addChild(EXPORT_KEY_AREA);
      newArea.addAttribute(EXPORT_ATTR_NAME, area.getName());
      newArea.addChild(EXPORT_KEY_DESCRIPTION, area.getDescription());
    }

    // TODO fg: export group rights

    // export groups
View Full Code Here

    Tracing.logDebug("fExportFile.getParent()=" + fExportFile.getParent(), this.getClass());
    ct.archive(fExportFile.getParent());
    // export membership
    List bgAreas = BGAreaManagerImpl.getInstance().findBGAreasOfBusinessGroup(group);
    for (Iterator iterator = bgAreas.iterator(); iterator.hasNext();) {
      BGArea areaRelation = (BGArea) iterator.next();
      MutableConfiguration newGroupAreaRel = newGroup.addChild(EXPORT_KEY_AREA_RELATION);
      newGroupAreaRel.setValue(areaRelation.getName());
    }
    //export properties
    BusinessGroupPropertyManager bgPropertyManager = new BusinessGroupPropertyManager(group);
    boolean showOwners = bgPropertyManager.showOwners();
    boolean showParticipants = bgPropertyManager.showPartips();
View Full Code Here

        // get memberships
        List memberships = group.getChildren(EXPORT_KEY_AREA_RELATION);
        for (Iterator iterator = memberships.iterator(); iterator.hasNext();) {
          Configuration areaRelation = (Configuration) iterator.next();
          BGArea area = am.findBGArea(areaRelation.getValue(), context);
          if (area == null) throw new AssertException("Group-Area-Relationship in export, but area was not created during import.");
          am.addBGToBGArea(newGroup, area);
        }
       
        //get properties
View Full Code Here

    List<Member> participants = new ArrayList<Member>();
    List<Member> waitings = new ArrayList<Member>();

    List areas = BGAreaManagerImpl.getInstance().findBGAreasOfBGContext(context);
    for (Iterator areaIterator = areas.iterator(); areaIterator.hasNext();) {
      BGArea area = (BGArea) areaIterator.next();
      if (areaList.contains(area)) { //rely on the equals() method of the BGArea impl
         List areaBusinessGroupList = BGAreaManagerImpl.getInstance().findBusinessGroupsOfArea(area);
        for (Iterator groupIterator = areaBusinessGroupList.iterator(); groupIterator.hasNext();) {
          BusinessGroup group = (BusinessGroup) groupIterator.next();
          if(group.getOwnerGroup()!=null) {
            Iterator ownerIterator = securityManager.getIdentitiesAndDateOfSecurityGroup(group.getOwnerGroup()).iterator();
            addMembers(area.getKey(), ownerIterator, owners, OWNER);
          }
          if(group.getPartipiciantGroup()!=null) {
            Iterator participantsIterator = securityManager.getIdentitiesAndDateOfSecurityGroup(group.getPartipiciantGroup()).iterator();
            addMembers(area.getKey(), participantsIterator, participants, PARTICIPANT);
          }
          if(group.getWaitingGroup()!=null) {
            Iterator waitingIterator = securityManager.getIdentitiesAndDateOfSecurityGroup(group.getWaitingGroup()).iterator();
            addMembers(area.getKey(), waitingIterator, waitings, WAITING);
          }
        }
      }
    }
    Locale userLocale = ureq.getLocale();
View Full Code Here

TOP

Related Classes of org.olat.group.area.BGArea

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.