This project has retired. For details please refer to its
Attic page.
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 a workflow job.
025 */
026 public interface WorkflowJob {
027
028 /**
029 * Defines the possible stati of a workflow.
030 */
031 public static enum Status {
032 PREP, RUNNING, SUCCEEDED, KILLED, FAILED, SUSPENDED
033 }
034
035 //add NAME
036
037 /**
038 * Return the path to the workflow application for the workflow job.
039 *
040 * @return the path to the workflow application for the workflow job.
041 */
042 String getAppPath();
043
044 /**
045 * Return the name of the workflow application (from the workflow definition).
046 *
047 * @return the name of the workflow application.
048 */
049 String getAppName();
050
051 /**
052 * Return the workflow job ID.
053 *
054 * @return the workflow job ID.
055 */
056 String getId();
057
058 /**
059 * Return the job configuration.
060 *
061 * @return the job configuration.
062 */
063 String getConf();
064
065 /**
066 * Return the workflow job status.
067 *
068 * @return the workflow job status.
069 */
070 Status getStatus();
071
072 /**
073 * Return the workflow job last modified time.
074 *
075 * @return the workflow job last modified time.
076 */
077 Date getLastModifiedTime();
078
079 /**
080 * Return the workflow job creation time.
081 *
082 * @return the workflow job creation time.
083 */
084 Date getCreatedTime();
085
086 /**
087 * Return the workflow job start time.
088 *
089 * @return the workflow job start time.
090 */
091 Date getStartTime();
092
093 /**
094 * Return the workflow job end time.
095 *
096 * @return the workflow job end time.
097 */
098 Date getEndTime();
099
100 /**
101 * Return the workflow job user owner.
102 *
103 * @return the workflow job user owner.
104 */
105 String getUser();
106
107 /**
108 * Return the workflow job group.
109 * <p/>
110 * Use the {@link #getAcl()} method instead.
111 *
112 * @return the workflow job group.
113 */
114 @Deprecated
115 String getGroup();
116
117 /**
118 * Return the workflow job group.
119 *
120 * @return the workflow job group.
121 */
122 String getAcl();
123
124 /**
125 * Return the workflow job run number. <p/> Except for reruns, this property is always 1.
126 *
127 * @return the workflow job run number.
128 */
129 int getRun();
130
131 /**
132 * Return the workflow job console URL.
133 *
134 * @return the workflow job console URL.
135 */
136 String getConsoleUrl();
137
138 /**
139 * Return the coordinator action ID.
140 *
141 * @return the coordinator action ID.
142 */
143 String getParentId();
144
145 /**
146 * Return the workflow nodes that already executed and are executing.
147 *
148 * @return the workflow nodes that already executed and are executing.
149 */
150 List<WorkflowAction> getActions();
151
152 /**
153 * Returns the external id for the workflow
154 *
155 * @return external id for the workflow
156 */
157 String getExternalId();
158
159 }