Package org.archive.cdxserver.filter

Examples of org.archive.cdxserver.filter.CDXAccessFilter


            end = url;
            host = "*";
        } else {
            AuthToken authToken = super.createAuthToken(request);
           
            CDXAccessFilter accessChecker = null;
           
      if (!authChecker.isAllUrlAccessAllowed(authToken)) {
        accessChecker = authChecker.createAccessFilter(authToken);
      }
           
            String[] startEnd = urlSurtRangeComputer.determineRange(url, matchType, from, to);
            start = startEnd[0];
            end = startEnd[1];
            host = startEnd[2];
           
            if (accessChecker != null && !accessChecker.includeUrl(start, url)) {
                restricted = true;
            }
        }

        String[] firstLastDate = null;
View Full Code Here


        } else {
          query.matchType = MatchType.exact;
        }
      }
     
      CDXAccessFilter accessChecker = null;
     
      if (!authChecker.isAllUrlAccessAllowed(authToken)) {
        accessChecker = authChecker.createAccessFilter(authToken);
      }
     
//      // For now, don't support domain or host output w/o key as access check is too slow
//      if (query.matchType == MatchType.domain || query.matchType == MatchType.host) {
//        if (!authChecker.isAllUrlAccessAllowed(authToken)) {
//          return;
//        }
//      }

      String startEndUrl[] = urlSurtRangeComputer.determineRange(query.url, query.matchType, "", "");

      if (startEndUrl == null) {
        responseWriter.printError("Sorry, matchType=" + query.matchType.name() + " is not supported by this server");
        return;
      }
     
      if ((accessChecker != null) && !accessChecker.includeUrl(startEndUrl[0], query.url)) {       
        if (query.showNumPages) {
          // Default to 1 page even if no results
          responseWriter.printNumPages(1, false);
        }
        return;
View Full Code Here

TOP

Related Classes of org.archive.cdxserver.filter.CDXAccessFilter

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.