Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for getOptionalRequest (0.19 sec)

  1. src/main/java/org/codelibs/fess/util/WebApiUtil.java

         *
         * @param name The attribute name
         * @param value The attribute value
         */
        public static void setObject(final String name, final Object value) {
            LaRequestUtil.getOptionalRequest().ifPresent(req -> req.setAttribute(name, value));
        }
    
        /**
         * Gets an object from the current request attributes.
         *
         * @param <T> The type of the object
         * @param name The attribute name
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/fess/helper/VirtualHostHelper.java

         */
        public String getVirtualHostKey() {
            return LaRequestUtil.getOptionalRequest().map(req -> (String) req.getAttribute(FessConfig.VIRTUAL_HOST_VALUE)).orElseGet(() -> {
                final String value = processVirtualHost(s -> s, StringUtil.EMPTY);
                LaRequestUtil.getOptionalRequest().ifPresent(req -> req.setAttribute(FessConfig.VIRTUAL_HOST_VALUE, value));
                return value;
            });
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/fess/app/web/base/SearchForm.java

            return stream(lang).get(stream -> stream.filter(StringUtil::isNotBlank).distinct().toArray(n -> new String[n]));
        }
    
        @Override
        public GeoInfo getGeoInfo() {
            return LaRequestUtil.getOptionalRequest()
                    .map(this::createGeoInfo)
                    .orElseGet(() -> ComponentUtil.getQueryHelper().getDefaultGeoInfo());
        }
    
        @Override
        public FacetInfo getFacetInfo() {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/helper/UserAgentHelper.java

         *
         * @return the detected user agent type, or OTHER if no specific type is detected
         */
        public UserAgentType getUserAgentType() {
            return LaRequestUtil.getOptionalRequest().map(request -> {
                UserAgentType uaType = (UserAgentType) request.getAttribute(USER_AGENT_TYPE);
                if (uaType == null) {
                    final String userAgent = request.getHeader(USER_AGENT);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 3.5K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/fess/api/BaseApiManager.java

            } else {
                buf.append(contentType);
            }
            buf.append("; charset=");
            final String enc;
            if (encoding == null) {
                enc = LaRequestUtil.getOptionalRequest().map(HttpServletRequest::getCharacterEncoding).orElse(Constants.UTF_8);
            } else {
                enc = encoding;
            }
            buf.append(enc);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/fess/helper/PathMappingHelper.java

            if (!pathMapping.hasUAMathcer()) {
                return true;
            }
    
            if (SingletonLaContainerFactory.getExternalContext().getRequest() != null) {
                return LaRequestUtil.getOptionalRequest().map(request -> {
                    final String userAgent = request.getHeader("user-agent");
                    if (StringUtil.isBlank(userAgent)) {
                        return false;
                    }
    
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/app/web/admin/searchlist/ListForm.java

                num = fessConfig.getPagingSearchPageMaxSizeAsInteger();
            }
        }
    
        @Override
        public Object getAttribute(final String name) {
            return LaRequestUtil.getOptionalRequest().map(req -> req.getAttribute(name)).orElse(null);
        }
    
        @Override
        public Locale getLocale() {
            return ComponentUtil.getRequestManager().getUserLocale();
        }
    
        @Override
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Jul 17 08:28:31 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/entity/QueryContext.java

                this.queryString = queryString;
            }
            if (StringUtil.isBlank(this.queryString)) {
                this.queryString = "*";
            }
            if (isQuery) {
                LaRequestUtil.getOptionalRequest().ifPresent(request -> {
                    highlightedQuerySet = new HashSet<>();
                    request.setAttribute(Constants.HIGHLIGHT_QUERIES, highlightedQuerySet);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/query/QueryCommand.java

         * @return An optional containing the query languages array, or empty if not available.
         */
        protected OptionalThing<String[]> getQueryLanguages() {
            return LaRequestUtil.getOptionalRequest()
                    .map(request -> ComponentUtil.getFessConfig()
                            .getQueryLanguages(request.getLocales(), (String[]) request.getAttribute(Constants.REQUEST_LANGUAGES)));
        }
    
        /**
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/util/DocumentUtil.java

         * @param url the URL to encode
         * @return the encoded URL with non-URL-safe characters properly encoded
         */
        public static String encodeUrl(final String url) {
            final String enc = LaRequestUtil.getOptionalRequest()
                    .filter(req -> req.getCharacterEncoding() != null)
                    .map(HttpServletRequest::getCharacterEncoding)
                    .orElse(Constants.UTF_8);
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 7.2K bytes
    - Viewed (0)
Back to top