com.dtolabs.rundeck.core.cli.project
Class BaseAction

java.lang.Object
  extended by com.dtolabs.rundeck.core.cli.project.BaseAction
All Implemented Interfaces:
Action
Direct Known Subclasses:
CreateAction, RemoveAction

public class BaseAction
extends java.lang.Object
implements Action

Base class for implementing project setup actions


Nested Class Summary
static interface BaseAction.BaseActionArgs
          Arguments for the BaseAction.
 
Field Summary
protected  Framework framework
           
protected  CLIToolLogger main
           
protected  java.lang.String project
           
 
Constructor Summary
BaseAction(CLIToolLogger main, Framework framework, BaseAction.BaseActionArgs args)
           
BaseAction(CLIToolLogger main, Framework framework, org.apache.commons.cli.CommandLine cli)
           
 
Method Summary
static BaseAction.BaseActionArgs createArgs(java.lang.String project, boolean verbose)
          Create BaseActionArgs instance
 void exec()
          Execute the action.
 boolean isVerbose()
           
protected static BaseAction.BaseActionArgs parseBaseActionArgs(org.apache.commons.cli.CommandLine cli)
           
 void setVerbose(boolean verbose)
           
protected  void validateInstall()
          Check if software was installed and setup process was run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

main

protected final CLIToolLogger main

framework

protected final Framework framework

project

protected java.lang.String project
Constructor Detail

BaseAction

public BaseAction(CLIToolLogger main,
                  Framework framework,
                  org.apache.commons.cli.CommandLine cli)

BaseAction

public BaseAction(CLIToolLogger main,
                  Framework framework,
                  BaseAction.BaseActionArgs args)
Method Detail

isVerbose

public boolean isVerbose()

setVerbose

public void setVerbose(boolean verbose)

parseBaseActionArgs

protected static BaseAction.BaseActionArgs parseBaseActionArgs(org.apache.commons.cli.CommandLine cli)

createArgs

public static BaseAction.BaseActionArgs createArgs(java.lang.String project,
                                                   boolean verbose)
Create BaseActionArgs instance

Parameters:
project - project name
verbose - true if verbose output is on
Returns:
args instance

validateInstall

protected void validateInstall()
Check if software was installed and setup process was run


exec

public void exec()
          throws java.lang.Throwable
Execute the action. Currently checks if installation is valid.

Specified by:
exec in interface Action
Throws:
java.lang.Throwable