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.design;
17  
18  import org.lastaflute.web.ruts.multipart.MultipartFormFile;
19  import org.lastaflute.web.validation.Required;
20  
21  import jakarta.validation.constraints.Pattern;
22  
23  /**
24   * Form for uploading design files to customize the appearance of the Fess search interface.
25   * This form is used in the admin interface to upload CSS, JSP, and other design-related files
26   * that customize the look and feel of the search application.
27   */
28  public class UploadForm {
29  
30      /**
31       * The multipart file containing design resources to be uploaded.
32       * This can include CSS files, JSP templates, images, or other design assets.
33       */
34      @Required
35      public MultipartFormFile designFile;
36  
37      /**
38       * The name for the design file being uploaded.
39       * Must not contain invalid file system characters like backslash, colon, asterisk, etc.
40       */
41      @Pattern(regexp = "^[^\\\\|/|:|\\*|?|\"|<|>|\\|]+$", message = "{errors.design_file_name_is_invalid}")
42      public String designFileName;
43  
44      /**
45       * Default constructor for UploadForm.
46       * Creates a new instance with default values.
47       */
48      public UploadForm() {
49          // Default constructor
50      }
51  }