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.storage;
17  
18  import java.util.HashMap;
19  import java.util.Map;
20  
21  import org.apache.logging.log4j.core.config.plugins.validation.constraints.Required;
22  
23  import jakarta.validation.constraints.Size;
24  
25  /**
26   * Form class for handling tag operations in storage management.
27   * This form represents tag data including path, name, and associated metadata.
28   */
29  public class TagForm {
30  
31      /**
32       * The file or directory path associated with this tag.
33       */
34      @Required
35      public String path;
36  
37      /**
38       * The name of the tag with a maximum length of 100 characters.
39       */
40      @Required
41      @Size(max = 100)
42      public String name;
43  
44      /**
45       * A map containing additional tag metadata as key-value pairs.
46       */
47      public Map<String, String> tags = new HashMap<>();
48  
49      /**
50       * Default constructor for TagForm.
51       */
52      public TagForm() {
53          // Default constructor
54      }
55  
56  }