001/**
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *      http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.apache.oozie.client;
020
021import java.util.Date;
022import java.util.List;
023
024/**
025 * Bean that represents an Oozie bundle.
026 */
027public interface BundleJob extends Job {
028
029    /**
030     * Defines the possible frequency unit of all Oozie applications in Bundle.
031     */
032    enum Timeunit {
033        MINUTE, HOUR, DAY, WEEK, MONTH, END_OF_DAY, END_OF_MONTH, NONE
034    }
035
036    /**
037     * Return the timeUnit for the Bundle job, it could be, Timeunit enum, e.g. MINUTE, HOUR, DAY, WEEK or MONTH
038     *
039     * @return the time unit for the Bundle job
040     */
041    Timeunit getTimeUnit();
042
043    /**
044     * Return the time out value for all the coord jobs within Bundle
045     *
046     * @return the time out value for the coord jobs within Bundle
047     */
048    int getTimeout();
049
050    /**
051     * Return the list of CoordinatorJob.
052     *
053     * @return the list of CoordinatorJob.
054     */
055    List<CoordinatorJob> getCoordinators();
056    
057    /**
058     * Return the JOB Kickoff time.
059     *
060     * @return the JOB Kickoff time.
061     */
062    Date getKickoffTime();
063
064    /**
065     * Get createdTime
066     *
067     * @return createdTime
068     */
069    Date getCreatedTime();
070
071}