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