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    package org.apache.oozie.client;
019    
020    import java.util.Date;
021    import java.util.List;
022    
023    /**
024     * Bean that represents an Oozie application.
025     */
026    public interface CoordinatorJob extends Job {
027    
028        /**
029         * Defines the possible execution order of an Oozie application.
030         */
031        public static enum Execution {
032            FIFO, LIFO, LAST_ONLY
033        }
034    
035        /**
036         * Defines the possible frequency unit of an Oozie application.
037         */
038        public static enum Timeunit {
039            MINUTE, HOUR, DAY, WEEK, MONTH, END_OF_DAY, END_OF_MONTH, NONE
040        }
041    
042        /**
043         * Return the path to the Oozie application.
044         *
045         * @return the path to the Oozie application.
046         */
047        String getAppPath();
048    
049        /**
050         * Return the name of the Oozie application (from the application definition).
051         *
052         * @return the name of the Oozie application.
053         */
054        String getAppName();
055    
056        /**
057         * Return the application ID.
058         *
059         * @return the application ID.
060         */
061        String getId();
062    
063        /**
064         * Return the application configuration.
065         *
066         * @return the application configuration.
067         */
068        String getConf();
069    
070        /**
071         * Return the application status.
072         *
073         * @return the application status.
074         */
075        Status getStatus();
076    
077        /**
078         * Return the frequency for the coord job in unit of minute
079         *
080         * @return the frequency for the coord job in unit of minute
081         */
082        String getFrequency();
083    
084        /**
085         * Return the timeUnit for the coord job, it could be, Timeunit enum, e.g. MINUTE, HOUR, DAY, WEEK or MONTH
086         *
087         * @return the time unit for the coord job
088         */
089        Timeunit getTimeUnit();
090    
091        /**
092         * Return the time zone information for the coord job
093         *
094         * @return the time zone information for the coord job
095         */
096        String getTimeZone();
097    
098        /**
099         * Return the concurrency for the coord job
100         *
101         * @return the concurrency for the coord job
102         */
103        int getConcurrency();
104    
105        /**
106         * Return the execution order policy for the coord job
107         *
108         * @return the execution order policy for the coord job
109         */
110        Execution getExecutionOrder();
111    
112        /**
113         * Return the time out value for the coord job
114         *
115         * @return the time out value for the coord job
116         */
117        int getTimeout();
118    
119        /**
120         * Return the date for the last action of the coord job
121         *
122         * @return the date for the last action of the coord job
123         */
124        Date getLastActionTime();
125    
126        /**
127         * Return the application next materialized time.
128         *
129         * @return the application next materialized time.
130         */
131        Date getNextMaterializedTime();
132    
133        /**
134         * Return the application start time.
135         *
136         * @return the application start time.
137         */
138        Date getStartTime();
139    
140        /**
141         * Return the application end time.
142         *
143         * @return the application end time.
144         */
145        Date getEndTime();
146    
147        /**
148         * Return the application user owner.
149         *
150         * @return the application user owner.
151         */
152        String getUser();
153    
154        /**
155         * Return the application group.
156         * <p/>
157         * Use the {@link #getAcl()} method instead.
158         *
159         * @return the application group.
160         */
161        @Deprecated
162        String getGroup();
163    
164        /**
165         * Return the workflow job group.
166         *
167         * @return the workflow job group.
168         */
169        String getAcl();
170    
171        /**
172         * Return the BundleId.
173         *
174         * @return the BundleId.
175         */
176        String getBundleId();
177    
178        /**
179         * Return the application console URL.
180         *
181         * @return the application console URL.
182         */
183        String getConsoleUrl();
184    
185        /**
186         * Return list of coordinator actions.
187         *
188         * @return the list of coordinator actions.
189         */
190        List<CoordinatorAction> getActions();
191    }