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