protected void go ( ) throws CLIToolOptionsException { if ( null == action ) { throw new CLIToolOptionsException ( "Command expected. Choose one of: " + Arrays . asList ( Actions . values ( ) ) ) ; } try { switch ( action ) { case list : listAction ( ) ; break ; case test : testAction ( ) ; break ; case create : createAction ( ) ; break ; case validate : validateAction ( ) ; break ; default : throw new CLIToolOptionsException ( "Unrecognized action: " + action ) ; } } catch ( IOException | PoliciesParseException e ) { throw new CLIToolOptionsException ( e ) ; } }
Call the action