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.joblog;
17
18 import org.lastaflute.web.validation.Required;
19 import org.lastaflute.web.validation.theme.conversion.ValidateTypeFailure;
20
21 /**
22 * Form class for editing job log entries in the admin interface.
23 * This form handles the editing of system job execution logs,
24 * providing details about scheduled tasks and their execution status.
25 */
26 public class EditForm {
27
28 /**
29 * Creates a new EditForm instance.
30 */
31 public EditForm() {
32 // Default constructor
33 }
34
35 /**
36 * The CRUD operation mode for this form.
37 * Indicates whether this is a create, read, update, or delete operation.
38 */
39 @ValidateTypeFailure
40 public int crudMode;
41
42 /**
43 * The unique identifier of the job log entry being edited.
44 * This is a required field for identifying which job log to update.
45 */
46 @Required
47 @ValidateTypeFailure
48 public String id;
49
50 /**
51 * The name of the job that was executed.
52 * This is a required field identifying the specific job type.
53 */
54 @Required
55 public String jobName;
56
57 /**
58 * The execution status of the job.
59 * This is a required field indicating success, failure, or running status.
60 */
61 @Required
62 public String jobStatus;
63
64 /**
65 * The target or scope of the job execution.
66 * This is a required field describing what the job operated on.
67 */
68 @Required
69 public String target;
70
71 /**
72 * The type of script that was executed for this job.
73 * This is a required field indicating the script engine or type used.
74 */
75 @Required
76 public String scriptType;
77
78 /**
79 * The script data or code that was executed.
80 * This field contains the actual script content that was run.
81 */
82 public String scriptData;
83
84 /**
85 * The result or output from the script execution.
86 * This field contains any output or result data from the script.
87 */
88 public String scriptResult;
89
90 /**
91 * The timestamp when the job started execution.
92 * This is a required field indicating when the job began.
93 */
94 @Required
95 public String startTime;
96
97 /**
98 * The timestamp when the job completed execution.
99 * This field indicates when the job finished, if it has completed.
100 */
101 public String endTime;
102
103 /**
104 * Initializes the form with default null values.
105 * This method resets all fields to their default state for creating a new entry.
106 */
107 public void initialize() {
108 id = null;
109 jobName = null;
110 jobStatus = null;
111 target = null;
112 scriptType = null;
113 scriptData = null;
114 scriptResult = null;
115 startTime = null;
116 endTime = null;
117 }
118 }