Examples of CatalogEntry


Examples of org.apache.xml.resolver.CatalogEntry

  baseURIStack.push(baseURI);

  debug.message(4, "xml:base", baseURI);

  try {
    CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
    catalog.addEntry(ce);
  } catch (CatalogException cex) {
    if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
      debug.message(1, "Invalid catalog entry type", localName);
    } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
      debug.message(1, "Invalid catalog entry (base)", localName);
    }
  }

  entryType = -1;
  entryArgs = new Vector();
      } else {
  baseURIStack.push(baseURIStack.peek());
      }

      if (localName.equals("uriSuffix")) {
  if (checkAttributes(atts, "suffix", "uri")) {
    entryType = Resolver.URISUFFIX;
    entryArgs.add(atts.getValue("suffix"));
    entryArgs.add(atts.getValue("uri"));

    debug.message(4, "uriSuffix",
      atts.getValue("suffix"),
      atts.getValue("uri"));
  }
      } else if (localName.equals("systemSuffix")) {
  if (checkAttributes(atts, "suffix", "uri")) {
    entryType = Resolver.SYSTEMSUFFIX;
    entryArgs.add(atts.getValue("suffix"));
    entryArgs.add(atts.getValue("uri"));

    debug.message(4, "systemSuffix",
      atts.getValue("suffix"),
      atts.getValue("uri"));
  }
      } else {
  // This is equivalent to an invalid catalog entry type
  debug.message(1, "Invalid catalog entry type", localName);
      }

      if (entryType >= 0) {
  try {
    CatalogEntry ce = new CatalogEntry(entryType, entryArgs);
    catalog.addEntry(ce);
  } catch (CatalogException cex) {
    if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
      debug.message(1, "Invalid catalog entry type", localName);
    } else if (cex.getExceptionType() == CatalogException.INVALID_ENTRY) {
View Full Code Here

Examples of org.jboss.util.xml.catalog.CatalogEntry

  for (int count = 0; count < numArgs; count++) {
    args.addElement(nextToken());
  }

  catalog.addEntry(new CatalogEntry(entryToken, args));
      } catch (CatalogException cex) {
  if (cex.getExceptionType() == CatalogException.INVALID_ENTRY_TYPE) {
    if (unknownEntry == null) {
      unknownEntry = new Vector();
    }
View Full Code Here

Examples of org.olat.catalog.CatalogEntry

   * @see org.olat.core.gui.components.table.DefaultTableDataModel#getValueAt(int,
   *      int)
   */
  @Override
  public Object getValueAt(int row, int col) {
    CatalogEntry entry = (CatalogEntry) getObject(row);
    switch (col) {
      case 0:
        // calculate cat entry path: travel up to the root node
        String path = "";
        CatalogEntry tempEntry = entry;
        while (tempEntry != null) {
          path = "/" + tempEntry.getName() + path;
          tempEntry = tempEntry.getParent();
        }
        return path;

      default:
        return "error";
View Full Code Here

Examples of org.olat.catalog.CatalogEntry

    this.toBeMovedEntry = toBeMovedEntry;
    // Main view is a velocity container
    contentVC = createVelocityContainer("catalogentryajaxmove");
    contentVC.contextPut("entryname", toBeMovedEntry.getName());
    // build current path for gui
    CatalogEntry tempEntry = toBeMovedEntry;
    String path = "";
    while (tempEntry != null) {
      path = "/" + tempEntry.getName() + path;
      tempEntry = tempEntry.getParent();
    }
    contentVC.contextPut("path", path.toString());
   
    // Fetch all entries that can be accessed by this user. This is kept as a
    // local copy for performance reasons. This is only used when a node is
    // moved, when moving leafs we don't check for ownership of the category
    if (toBeMovedEntry.getType() == CatalogEntry.TYPE_NODE) {
      ownedEntries = getOwnedEntries(ureq);
    }
   
    CatalogManager cm = CatalogManager.getInstance();
    CatalogEntry rootce = (CatalogEntry) cm.getRootCatalogEntries().get(0);
    // Build tree model
    treeModel = new CatalogAjaxTreeModel(rootce, toBeMovedEntry, ownedEntries, false, false);
   
    // Create the ajax tree controller, add it to your main view
    treeCtr = new TreeController(ureq, getWindowControl(), rootce.getName(), treeModel, null);
    listenTo(treeCtr);
    contentVC.put("treeCtr", treeCtr.getInitialComponent());
   
    cancelLink = LinkFactory.createButton("cancel", contentVC, this);
    // select link is disabled until an item is selected
View Full Code Here

Examples of org.olat.catalog.CatalogEntry

        TreeNodeClickedEvent clickedEvent = (TreeNodeClickedEvent) event;
        // try to update the catalog
        CatalogManager cm = CatalogManager.getInstance();
        String nodeId = clickedEvent.getNodeId();
        Long newParentId = Long.parseLong(nodeId);
        CatalogEntry newParent = cm.loadCatalogEntry(newParentId);
        boolean hasAccess;
        if (toBeMovedEntry.getType() == CatalogEntry.TYPE_LEAF) {
          // Leafs can be attached anywhere in the catalog, no need to check for
          // category ownership
          hasAccess = true;
View Full Code Here

Examples of org.olat.catalog.CatalogEntry

    // Main view is a velocity container
    contentVC = createVelocityContainer("catalogentryajaxadd");
    contentVC.contextPut("entryname", toBeAddedEntry.getDisplayname());
   
    CatalogManager cm = CatalogManager.getInstance();
    CatalogEntry rootce = (CatalogEntry) cm.getRootCatalogEntries().get(0);
    // Build tree model
    treeModel = new CatalogAjaxTreeModel(rootce, null, null, false, false);
   
    // Create the ajax tree controller, add it to your main view
    treeCtr = new TreeController(ureq, getWindowControl(), rootce.getName(), treeModel, null);
    listenTo(treeCtr);
    contentVC.put("treeCtr", treeCtr.getInitialComponent());

    cancelLink = LinkFactory.createButton("cancel", contentVC, this);
    // select link is disabled until an item is selected
View Full Code Here

Examples of org.olat.catalog.CatalogEntry

        TreeNodeClickedEvent clickedEvent = (TreeNodeClickedEvent) event;
        // build new entry for this catalog level
        CatalogManager cm = CatalogManager.getInstance();
        String nodeId = clickedEvent.getNodeId();
        Long newParentId = Long.parseLong(nodeId);
        CatalogEntry newParent = cm.loadCatalogEntry(newParentId);
        // check first if this repo entry is already attached to this new parent
        List<CatalogEntry> existingChildren = cm.getChildrenOf(newParent);
        for (CatalogEntry existingChild : existingChildren) {
          RepositoryEntry existingRepoEntry = existingChild.getRepositoryEntry();
          if (existingRepoEntry != null && existingRepoEntry.equalsByPersistableKey(toBeAddedEntry)) {
View Full Code Here

Examples of org.olat.catalog.CatalogEntry

    if (source == cancelLink) {
      fireEvent(ureq, Event.CANCELLED_EVENT);         
    } else if (source == selectLink) {
      if (selectedParent != null) {
        CatalogManager cm = CatalogManager.getInstance();
        CatalogEntry newEntry = cm.createCatalogEntry();
        newEntry.setRepositoryEntry(toBeAddedEntry);
        newEntry.setName(toBeAddedEntry.getDisplayname());
        newEntry.setDescription(toBeAddedEntry.getDescription());
        newEntry.setType(CatalogEntry.TYPE_LEAF);
        newEntry.setOwnerGroup(ManagerFactory.getManager().createAndPersistSecurityGroup());
        // save entry
        cm.addCatalogEntry(selectedParent, newEntry);
        fireEvent(ureq, Event.DONE_EVENT);               
      }
    }
View Full Code Here

Examples of org.olat.catalog.CatalogEntry

      if (te.getCommand().equals(TreeEvent.COMMAND_TREENODE_CLICKED)) {

        GenericTreeNode node = (GenericTreeNode) selectionTree.getSelectedNode();
        CatalogManager cm = CatalogManager.getInstance();
        Long newParentId = Long.parseLong(node.getIdent());
        CatalogEntry newParent = cm.loadCatalogEntry(newParentId);
        if (!cm.moveCatalogEntry(moveMe, newParent)) {
          fireEvent(ureq, Event.FAILED_EVENT);
        } else {
          fireEvent(ureq, Event.DONE_EVENT);
        }
View Full Code Here

Examples of org.olat.catalog.CatalogEntry

    if (entryList == null || entryList.size() < 1) {
      rootNode = new GenericTreeNode("keine Node :(", null);
    }
    // build the tree - note that the entry list is not ordered in any way
    for (int cnt = 0; cnt < entryList.size(); cnt++) {
      CatalogEntry elem = entryList.get(cnt);
      // create a tree node and add it to the entry map
      GenericTreeNode n = addNode(elem);
      if (n != null) {
        // a node was created, keep it as a potential root node candidate
        rootNode = addNode(elem);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.