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.cache;
17
18 import java.util.HashMap;
19 import java.util.Map;
20
21 import org.lastaflute.web.validation.Required;
22
23 import jakarta.validation.constraints.Size;
24
25 /**
26 * Form class for cache-related operations.
27 * Contains parameters for document caching and error page display.
28 */
29 public class CacheForm {
30
31 /** Document ID for cache operations. */
32 @Required
33 @Size(max = 100)
34 public String docId;
35
36 /** Highlight query parameters. */
37 public String[] hq;
38
39 /** Search query parameter for error page. */
40 public String q;
41
42 /** Number of results parameter for error page. */
43 public String num;
44
45 /** Sort parameter for error page. */
46 public String sort;
47
48 /** Language parameter for error page. */
49 public String lang;
50
51 /** Additional fields map for cache operations. */
52 public Map<String, String[]> fields = new HashMap<>();
53
54 /**
55 * Default constructor for CacheForm.
56 */
57 public CacheForm() {
58 super();
59 }
60 }