Package org.olat.group.context

Examples of org.olat.group.context.BGContext


   */
  private BGContext getDefaultBGContext() {
    CourseGroupManager courseGrpMngr = cev.getCourseGroupManager();
    List courseLGContextes = courseGrpMngr.getLearningGroupContexts();
    for (Iterator iter = courseLGContextes.iterator(); iter.hasNext();) {
      BGContext bctxt = (BGContext) iter.next();
      if (bctxt.isDefaultContext()) { return bctxt; }
    }
    return null;
    // not found! -> disable easy creation of groups! (no workflows for choosing
    // contexts

View Full Code Here


   */
  public boolean hasRight(Identity identity, String courseRight, String groupContextName) {
    BGRightManager rightManager = BGRightManagerImpl.getInstance();
    Iterator iter = rightGroupContexts.iterator();
    while (iter.hasNext()) {
      BGContext context = (BGContext) iter.next();
      if (groupContextName == null || context.getName().equals(groupContextName)) {
        boolean hasRight = rightManager.hasBGRight(courseRight, identity, context);
        if (hasRight) return true; // finished
      }
    }
    return false;
View Full Code Here

   */
  private boolean isIdentityInGroup(Identity identity, String groupName, String groupContextName, List contextList) {
    BusinessGroupManager groupManager = BusinessGroupManagerImpl.getInstance();
    Iterator iter = contextList.iterator();
    while (iter.hasNext()) {
      BGContext context = (BGContext) iter.next();
      if (groupContextName == null || context.getName().equals(groupContextName)) {
        boolean inGroup = groupManager.isIdentityInBusinessGroup(identity, groupName, context);
        if (inGroup) return true; // finished
      }
    }
    return false;
View Full Code Here

   */
  public boolean isIdentityInLearningArea(Identity identity, String areaName, String groupContextName) {
    BGAreaManager areaManager = BGAreaManagerImpl.getInstance();
    Iterator iter = learningGroupContexts.iterator();
    while (iter.hasNext()) {
      BGContext context = (BGContext) iter.next();
      if (groupContextName == null || context.getName().equals(groupContextName)) {
        boolean inArea = areaManager.isIdentityInBGArea(identity, areaName, context);
        if (inArea) return true; // finished
      }
    }
    return false;
View Full Code Here

   */
  public boolean isIdentityInGroupContext(Identity identity, String groupContextName) {
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    Iterator iter = learningGroupContexts.iterator();
    while (iter.hasNext()) {
      BGContext context = (BGContext) iter.next();
      if (groupContextName == null || context.getName().equals(groupContextName)) {
        boolean inContext = contextManager.isIdentityInBGContext(identity, context, true, true);
        if (inContext) return true; // finished
      }
    }
    iter = rightGroupContexts.iterator();
    while (iter.hasNext()) {
      BGContext context = (BGContext) iter.next();
      if (groupContextName == null || context.getName().equals(groupContextName)) {
        boolean inContext = contextManager.isIdentityInBGContext(identity, context, true, true);
        if (inContext) return true; // finished
      }
    }
    return false;
View Full Code Here

  public List getRightGroupsFromAllContexts(String groupName) {
    List groups = new ArrayList();
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    Iterator iterator = rightGroupContexts.iterator();
    while (iterator.hasNext()) {
      BGContext bgContext = (BGContext) iterator.next();
      BusinessGroup group = contextManager.findGroupOfBGContext(groupName, bgContext);
      if (group != null) groups.add(group);
    }
    return groups;
  }
View Full Code Here

  public List getAllLearningGroupsFromAllContexts() {
    List allGroups = new ArrayList();
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    Iterator iterator = learningGroupContexts.iterator();
    while (iterator.hasNext()) {
      BGContext bgContext = (BGContext) iterator.next();
      List contextGroups = contextManager.getGroupsOfBGContext(bgContext);
      allGroups.addAll(contextGroups);
    }
    return allGroups;
  }
View Full Code Here

  public List getLearningGroupsFromAllContexts(String groupName) {
    List groups = new ArrayList();
    BGContextManager contextManager = BGContextManagerImpl.getInstance();
    Iterator iterator = learningGroupContexts.iterator();
    while (iterator.hasNext()) {
      BGContext bgContext = (BGContext) iterator.next();
      BusinessGroup group = contextManager.findGroupOfBGContext(groupName, bgContext);
      if (group != null) groups.add(group);
    }
    return groups;
  }
View Full Code Here

  public List getAllAreasFromAllContexts() {
    List allAreas = new ArrayList();
    BGAreaManager areaManager = BGAreaManagerImpl.getInstance();
    Iterator iterator = learningGroupContexts.iterator();
    while (iterator.hasNext()) {
      BGContext bgContext = (BGContext) iterator.next();
      List contextAreas = areaManager.findBGAreasOfBGContext(bgContext);
      allAreas.addAll(contextAreas);
    }
    return allAreas;
View Full Code Here

  public List getLearningGroupsInAreaFromAllContexts(String areaName) {
    List groups = new ArrayList();
    BGAreaManager areaManager = BGAreaManagerImpl.getInstance();
    Iterator iterator = learningGroupContexts.iterator();
    while (iterator.hasNext()) {
      BGContext bgContext = (BGContext) iterator.next();
      BGArea area = areaManager.findBGArea(areaName, bgContext);
      if (area != null) {
        List areaGroups = areaManager.findBusinessGroupsOfArea(area);
        groups.addAll(areaGroups);
      }
View Full Code Here

TOP

Related Classes of org.olat.group.context.BGContext

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.