Package org.olat.search.service.indexer

Examples of org.olat.search.service.indexer.Indexer


          // Pass created-date & modified-date in context to child indexer because the child have no dates
          // TODO:chg: Check ob courseNode keine Daten hat
          searchResourceContext.setLastModified(repositoryEntry.getLastModified());
          searchResourceContext.setCreatedDate(repositoryEntry.getCreationDate());
          // go further with resource
          Indexer repositoryEntryIndexer = RepositoryEntryIndexerFactory.getInstance().getRepositoryEntryIndexer(repositoryEntry);
          if (repositoryEntryIndexer != null) {
            repositoryEntryIndexer.doIndex(searchResourceContext, repositoryEntry, indexWriter);
          } else {
            if (Tracing.isDebugEnabled(RepositoryIndexer.class)) Tracing.logDebug("No RepositoryEntryIndexer for " + repositoryEntry.getOlatResource(),RepositoryIndexer.class); // e.g. RepositoryEntry       
          }
        } else {
          Tracing.logWarn("RepositoryEntry is on black-list and excluded from search-index, repositoryEntry=" + repositoryEntry, RepositoryIndexer.class);
View Full Code Here


    if (indexerList == null)
      throw new AssertException("null value for indexerList not allowed.");

    try {
      for (Iterator iter = indexerList.iterator(); iter.hasNext();) {
        Indexer reporsitoryEntryIndexer = (Indexer) iter.next();
        RepositoryEntryIndexerFactory.getInstance().registerIndexer(reporsitoryEntryIndexer);
        if (Tracing.isDebugEnabled(RepositoryIndexer.class)) Tracing.logDebug("Adding indexer from configuraton:: ", RepositoryIndexer.class);
      }
    }  catch (ClassCastException cce) {
        throw new StartupException("Configured indexer is not of type RepositoryEntryIndexer", cce);
View Full Code Here

        }
        isAllowedToLaunch = repositoryManager.isAllowedToLaunch(identity, roles, repositoryEntry);
      }
      if (Tracing.isDebugEnabled(RepositoryIndexer.class)) Tracing.logDebug("isOwner=" + isOwner + "  isAllowedToLaunch=" + isAllowedToLaunch, RepositoryIndexer.class);
      if (isOwner || isAllowedToLaunch) {
        Indexer repositoryEntryIndexer = RepositoryEntryIndexerFactory.getInstance().getRepositoryEntryIndexer(repositoryEntry);
        if (Tracing.isDebugEnabled(RepositoryIndexer.class)) Tracing.logDebug("repositoryEntryIndexer=" + repositoryEntryIndexer, RepositoryIndexer.class);
        if (repositoryEntryIndexer != null) {
          return repositoryEntryIndexer.checkAccess(contextEntry, businessControl, identity, roles);
        } else {
          // No Indexer => no access
          return false;
        }
      } else {
View Full Code Here

    List<OlatDocument> filteredList = new ArrayList<OlatDocument>(maxToReturn);
    long startTime = 0;
    if ( log.isDebug() ) {
      startTime = System.currentTimeMillis();
    }
    Indexer mainIndexer = (Indexer)CoreSpringFactory.getBean("mainindexer");
    // loop over all results
    Iterator<OlatDocument> it_odocs = unFilteredList.iterator();
    int resultCount = 0;
    int loopCount = 0;
    while (it_odocs.hasNext() && resultCount < maxToReturn) {
      long elementStartTime = 0;
      if ( log.isDebug() ) {
        elementStartTime = System.currentTimeMillis();
      }
      OlatDocument odoc = it_odocs.next();
      String resourceUrl = odoc.getResourceUrl();
      BusinessControl businessControl = BusinessControlFactory.getInstance().createFromString(resourceUrl);
      boolean hasAccess = mainIndexer.checkAccess(null, businessControl, identity, roles);
      if (hasAccess) {
        filteredList.add(odoc);
        resultCount++;
      }
      loopCount++;
View Full Code Here

TOP

Related Classes of org.olat.search.service.indexer.Indexer

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.