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.dict.kuromoji;
17
18 import org.lastaflute.web.validation.Required;
19 import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
20
21 /**
22 * Form class for editing Kuromoji dictionary entries in the admin interface.
23 * This form extends CreateForm to include fields necessary for updating existing Kuromoji dictionary entries.
24 * Kuromoji is a Japanese morphological analyzer, and this dictionary manages custom tokenization rules.
25 */
26 public class EditForm extends CreateForm {
27
28 /**
29 * Creates a new EditForm instance.
30 */
31 public EditForm() {
32 super();
33 }
34
35 /**
36 * The unique identifier of the Kuromoji dictionary entry being edited.
37 * This is a required field for identifying which dictionary entry to update.
38 */
39 @Required
40 @ValidateTypeFailure
41 public Long id;
42
43 /**
44 * Returns a display-friendly identifier combining the dictionary ID and entry ID.
45 * This method creates a composite identifier for UI display purposes.
46 *
47 * @return A string in the format "dictId:id" for display purposes
48 */
49 public String getDisplayId() {
50 return dictId + ":" + id;
51 }
52 }