Package org.olat.ims.cp.objects

Examples of org.olat.ims.cp.objects.CPOrganization


  protected int referencesCount(CPResource resource) {

    int linkCount = 0;
    Vector<CPItem> items = new Vector<CPItem>();
    for (Iterator<CPOrganization> it = rootNode.getOrganizations().getOrganizationIterator(); it.hasNext();) {
      CPOrganization org = it.next();
      items.addAll(org.getAllItems());
    }

    for (CPItem item : items) {
      if (item.getIdentifierRef().equals(resource.getIdentifier())) linkCount++;
    }
View Full Code Here


   */
  public DefaultElement findReferencesToResource(String resourceIdentifier) {

    // search for <item identifierref="resourceIdentifier" >
    for (Iterator<CPOrganization> it = rootNode.getOrganizations().getOrganizationIterator(); it.hasNext();) {
      CPOrganization org = it.next();
      for (Iterator<CPItem> itO = org.getItems().iterator(); itO.hasNext();) {
        CPItem item = itO.next();
        CPItem found = _findReferencesToRes(item, resourceIdentifier);
        if (found != null) return found;
      }
    }
View Full Code Here

   * page found (empty organization)
   *
   * @return
   */
  public CPItem getFirstPageToDisplay() {
    CPOrganization orga = getFirstOrganizationInManifest();
    return orga.getFirstItem();
  }
View Full Code Here

      } else {// this item has already a linked resource
        // this is not supported, we don't change linked resources...
      }

    } else if (ele instanceof CPOrganization) {
      CPOrganization organization = (CPOrganization) ele;
      organization.setTitle(page.getTitle());

    } else {
      // ERROR: this shouldn't be
      throw new OLATRuntimeException("Error while updating manifest with new Page-Data. Invalid identifier " + page.getIdentifier(), null);
    }
View Full Code Here

TOP

Related Classes of org.olat.ims.cp.objects.CPOrganization

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.