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.rest;
019    
020    /**
021     * Constansts used by Oozie REST WS API
022     */
023    public interface RestConstants {
024    
025        public static final String VERSIONS = "versions";
026    
027        public static final String JOB = "job";
028    
029        public static final String JOBS = "jobs";
030    
031        public static final String ADMIN = "admin";
032    
033        public static final String JSON_CONTENT_TYPE = "application/json";
034    
035        public static final String XML_CONTENT_TYPE = "application/xml";
036    
037        public static final String FORM_CONTENT_TYPE = "application/x-www-form-urlencoded";
038    
039        public static final String TEXT_CONTENT_TYPE = "text/plain";
040    
041        public static final String PNG_IMAGE_CONTENT_TYPE = "image/png";
042    
043        public static final String ACTION_PARAM = "action";
044    
045        public static final String OFFSET_PARAM = "offset";
046    
047        public static final String LEN_PARAM = "len";
048    
049        public static final String ORDER_PARAM = "order";
050    
051        public static final String JOB_FILTER_PARAM = "filter";
052    
053        public static final String JOB_RESOURCE = "/job";
054    
055        public static final String JOB_ACTION_START = "start";
056    
057        public static final String JOB_ACTION_DRYRUN = "dryrun";
058    
059        public static final String JOB_ACTION_SUSPEND = "suspend";
060    
061        public static final String JOB_ACTION_RESUME = "resume";
062    
063        public static final String JOB_ACTION_KILL = "kill";
064    
065        public static final String JOB_ACTION_CHANGE = "change";
066    
067        public static final String JOB_CHANGE_VALUE = "value";
068    
069        public static final String JOB_ACTION_RERUN = "rerun";
070    
071        public static final String JOB_COORD_ACTION_RERUN = "coord-rerun";
072    
073        public static final String JOB_BUNDLE_ACTION_RERUN = "bundle-rerun";
074    
075        public static final String JOB_SHOW_PARAM = "show";
076    
077        public static final String JOB_SHOW_CONFIG = "config";
078    
079        public static final String JOB_SHOW_INFO = "info";
080    
081        public static final String JOB_SHOW_LOG = "log";
082    
083        public static final String JOB_SHOW_DEFINITION = "definition";
084    
085        public static final String JOB_SHOW_GRAPH = "graph";
086    
087        public static final String JOB_SHOW_KILL_PARAM = "show-kill";
088    
089        public static final String JOB_BUNDLE_RERUN_COORD_SCOPE_PARAM = "coord-scope";
090    
091        public static final String JOB_BUNDLE_RERUN_DATE_SCOPE_PARAM = "date-scope";
092    
093        public static final String JOB_COORD_RERUN_TYPE_PARAM = "type";
094    
095        public static final String JOB_COORD_RERUN_DATE = "date";
096    
097        public static final String JOB_COORD_RERUN_ACTION = "action";
098    
099        public static final String JOB_COORD_RERUN_SCOPE_PARAM = "scope";
100    
101        public static final String JOB_COORD_RERUN_REFRESH_PARAM = "refresh";
102    
103        public static final String JOB_COORD_RERUN_NOCLEANUP_PARAM = "nocleanup";
104    
105        public static final String JOB_LOG_ACTION = "action";
106    
107        public static final String JOB_LOG_DATE = "date";
108    
109        public static final String JOB_LOG_SCOPE_PARAM = "scope";
110    
111        public static final String JOB_LOG_TYPE_PARAM = "type";
112    
113        public static final String JOBS_FILTER_PARAM = "filter";
114    
115        public static final String JOBS_BULK_PARAM = "bulk";
116    
117        public static final String JOBS_EXTERNAL_ID_PARAM = "external-id";
118    
119        public static final String ADMIN_STATUS_RESOURCE = "status";
120    
121        public static final String ADMIN_SAFE_MODE_PARAM = "safemode";
122    
123        public static final String ADMIN_SYSTEM_MODE_PARAM = "systemmode";
124    
125        public static final String ADMIN_LOG_RESOURCE = "log";
126    
127        public static final String ADMIN_OS_ENV_RESOURCE = "os-env";
128    
129        public static final String ADMIN_JAVA_SYS_PROPS_RESOURCE = "java-sys-properties";
130    
131        public static final String ADMIN_CONFIG_RESOURCE = "configuration";
132    
133        public static final String ADMIN_INSTRUMENTATION_RESOURCE = "instrumentation";
134    
135        public static final String ADMIN_BUILD_VERSION_RESOURCE = "build-version";
136    
137        public static final String ADMIN_QUEUE_DUMP_RESOURCE = "queue-dump";
138    
139        public static final String OOZIE_ERROR_CODE = "oozie-error-code";
140    
141        public static final String OOZIE_ERROR_MESSAGE = "oozie-error-message";
142    
143        public static final String JOBTYPE_PARAM = "jobtype";
144    
145        public static final String SLA_GT_SEQUENCE_ID = "gt-sequence-id";
146    
147        public static final String MAX_EVENTS = "max-events";
148    
149        public static final String SLA = "sla";
150    
151        public static final String DO_AS_PARAM = "doAs";
152    
153        public static final String TIME_ZONE_PARAM = "timezone";
154    
155        public static final String ADMIN_TIME_ZONES_RESOURCE = "available-timezones";
156    
157        public static final String ADMIN_JMS_INFO = "jmsinfo";
158    
159        public static final String JOB_SHOW_JMS_TOPIC = "jmstopic";
160    }