View Javadoc
1   /*
2    * Copyright 2012-2025 CodeLibs Project and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  package org.codelibs.fess.app.web.admin.wizard;
17  
18  import org.lastaflute.web.validation.Required;
19  import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
20  
21  import jakarta.validation.constraints.Max;
22  import jakarta.validation.constraints.Min;
23  import jakarta.validation.constraints.Size;
24  
25  /**
26   * Form class for crawling configuration wizard in the admin interface.
27   * Contains validation constraints for creating new crawling configurations.
28   */
29  public class CrawlingConfigForm {
30  
31      /**
32       * Creates a new form instance.
33       */
34      public CrawlingConfigForm() {
35          // Default constructor
36      }
37  
38      /**
39       * Name of the crawling configuration.
40       */
41      @Required
42      @Size(max = 200)
43      public String crawlingConfigName;
44  
45      /**
46       * Path or URL to be crawled by this configuration.
47       */
48      @Required
49      @Size(max = 1000)
50      public String crawlingConfigPath;
51  
52      /**
53       * Maximum depth for crawling (how many levels deep to follow links).
54       */
55      @Min(value = 0)
56      @Max(value = 2147483647)
57      @ValidateTypeFailure
58      public Integer depth;
59  
60      /**
61       * Maximum number of pages/documents to access during crawling.
62       */
63      @Min(value = 0)
64      @Max(value = 9223372036854775807L)
65      @ValidateTypeFailure
66      public Long maxAccessCount;
67  
68  }