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.command.wf;
019
020 import org.apache.oozie.command.Command;
021 import org.apache.oozie.store.WorkflowStore;
022 import org.apache.oozie.store.Store;
023
024 public abstract class WorkflowCommand<T> extends Command<T, WorkflowStore> {
025
026 /**
027 * Create a command that uses a {@link WorkflowStore} instance. <p/> The current {@link XLog.Info} values are
028 * captured for execution.
029 *
030 * @param name command name.
031 * @param type command type.
032 * @param priority priority of the command, used when queuing for asynchronous execution.
033 * @param logMask log mask for the command logging calls.
034 */
035 public WorkflowCommand(String name, String type, int priority, int logMask) {
036 super(name, type, priority, logMask, true);
037 }
038
039 /**
040 * Create a command. <p/> The current {@link XLog.Info} values are captured for execution.
041 *
042 * @param name command name.
043 * @param type command type.
044 * @param priority priority of the command, used when queuing for asynchronous execution.
045 * @param logMask log mask for the command logging calls.
046 * @param withStore indicates if the command needs a {@link org.apache.oozie.store.WorkflowStore} instance or not.
047 */
048 public WorkflowCommand(String name, String type, int priority, int logMask, boolean withStore) {
049 super(name, type, priority, logMask, withStore);
050 }
051
052 /**
053 * Return the public interface of the Workflow Store.
054 *
055 * @return {@link WorkflowStore}
056 */
057 public Class<? extends Store> getStoreClass() {
058 return WorkflowStore.class;
059 }
060 }