001/*
002 * (C) Copyright 2007-2010 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Florent Guillaume
016 */
017package org.nuxeo.ecm.core.scheduler;
018
019import java.io.Serializable;
020
021/**
022 * Schedule entry.
023 * <p>
024 * Holds information about a schedule, including the event to send, the username to use to open the session, and the
025 * periodicity for the schedule.
026 */
027public interface Schedule extends Serializable {
028
029    /**
030     * Returns the schedule job id.
031     *
032     * @return the schedule job id.
033     */
034    String getId();
035
036    /**
037     * Returns the event id.
038     *
039     * @return the event id
040     */
041    String getEventId();
042
043    /**
044     * Returns the event category.
045     *
046     * @return the event category
047     */
048    String getEventCategory();
049
050    /**
051     * Returns the cron expression.
052     *
053     * @return the cron expression
054     */
055    String getCronExpression();
056
057    /**
058     * Returns the username.
059     *
060     * @return the username
061     */
062    String getUsername();
063
064    /**
065     * Returns true if the scheduler is enabled and the job scheduled for execution
066     *
067     * @since 5.7.3
068     * @return
069     */
070    boolean isEnabled();
071
072}