001/* 002 * (C) Copyright 2007-2010 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Florent Guillaume 018 */ 019package org.nuxeo.ecm.core.scheduler; 020 021import java.io.Serializable; 022 023/** 024 * Schedule entry. 025 * <p> 026 * Holds information about a schedule, including the event to send, the username to use to open the session, and the 027 * periodicity for the schedule. 028 */ 029public interface Schedule extends Serializable { 030 031 /** 032 * Returns the schedule job id. 033 * 034 * @return the schedule job id. 035 */ 036 String getId(); 037 038 /** 039 * Returns the event id. 040 * 041 * @return the event id 042 */ 043 String getEventId(); 044 045 /** 046 * Returns the event category. 047 * 048 * @return the event category 049 */ 050 String getEventCategory(); 051 052 /** 053 * Returns the cron expression. 054 * 055 * @return the cron expression 056 */ 057 String getCronExpression(); 058 059 /** 060 * Returns the username. 061 * 062 * @return the username 063 */ 064 String getUsername(); 065 066 /** 067 * Returns true if the scheduler is enabled and the job scheduled for execution 068 * 069 * @since 5.7.3 070 * @return 071 */ 072 boolean isEnabled(); 073 074}