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.exception;
17  
18  import org.codelibs.fess.opensearch.config.exentity.ScheduledJob;
19  
20  /**
21   * Exception thrown when a scheduled job cannot be found.
22   * This exception is typically thrown when attempting to access or
23   * manipulate a job that does not exist in the system.
24   */
25  public class JobNotFoundException extends FessSystemException {
26  
27      private static final long serialVersionUID = 1L;
28  
29      /**
30       * Constructs a new JobNotFoundException with a message derived from the scheduled job.
31       *
32       * @param scheduledJob the scheduled job that was not found
33       */
34      public JobNotFoundException(final ScheduledJob scheduledJob) {
35          super(scheduledJob.toString());
36      }
37  
38      /**
39       * Constructs a new JobNotFoundException with the specified detail message.
40       *
41       * @param message the detail message explaining why the job was not found
42       */
43      public JobNotFoundException(final String message) {
44          super(message);
45      }
46  
47  }