1 /*
2  * @(#) $Id: JSTKCommandAdapter.java,v 1.3 2003/07/08 08:13:52 pankaj Exp $
3  *
4  * Copyright (c) 2002-03 by Pankaj Kumar (http://www.pankaj-k.net). 
5  * All rights reserved.
6  *
7  * The license governing the use of this file can be found in the 
8  * root directory of the containing software.
9  */
10package org.jstk;
11
12public abstract class JSTKCommandAdapter implements JSTKCommand{
13
14    protected String briefDesc = "Unspecified";
15    protected String optionsDesc = "Unspecified";
16    protected String[] sampleUses = { "Unspecified" };
17    protected String[] useForms = { "Unspecified" };
18
19    protected JSTKResult result;
20    protected JSTKPerfData perfData = new JSTKPerfData();
21    protected String resultDesc = "Failed";
22    protected boolean success = false;
23    public Object execute(JSTKArgs args) throws JSTKException {
24        return null;
25    }
26    public String briefDescription(){
27        return briefDesc;
28    }
29    public String optionsDescription(){
30        return optionsDesc;
31    }
32    public String[] sampleUses(){
33        return sampleUses;
34    }
35    public String[] useForms(){
36        return useForms;
37    }
38    public String getResultDescription(){
39        return resultDesc;
40    }
41    public boolean succeeded(){
42        return success;
43    }
44    public boolean failed(){
45        return !success;
46    }
47
48    public void setPerfData(JSTKPerfData pData){
49        perfData = pData;
50    }
51    public JSTKPerfData getPerfData(){
52        return perfData;
53    }
54}