FileDocCategorySizeDatePackage
CCMReconfigure.javaAPI DocApache Ant 1.704064Wed Dec 13 06:16:22 GMT 2006org.apache.tools.ant.taskdefs.optional.ccm

CCMReconfigure

public class CCMReconfigure extends Continuus
Task allows to reconfigure a project, recursively or not

Fields Summary
private String
ccmProject
private boolean
recurse
private boolean
verbose
public static final String
FLAG_RECURSE
/recurse --
public static final String
FLAG_VERBOSE
/recurse --
public static final String
FLAG_PROJECT
/project flag -- target project
Constructors Summary
public CCMReconfigure()
Constructor for CCMReconfigure.


        
      
        super();
        setCcmAction(COMMAND_RECONFIGURE);
    
Methods Summary
private voidcheckOptions(org.apache.tools.ant.types.Commandline cmd)
Check the command line options.


        if (isRecurse()) {
            cmd.createArgument().setValue(FLAG_RECURSE);
        } // end of if ()

        if (isVerbose()) {
            cmd.createArgument().setValue(FLAG_VERBOSE);
        } // end of if ()

        if (getCcmProject() != null) {
            cmd.createArgument().setValue(FLAG_PROJECT);
            cmd.createArgument().setValue(getCcmProject());
        }

    
public voidexecute()
Executes the task.

Builds a command line to execute ccm and then calls Exec's run method to execute the command line.

throws
BuildException on error

        Commandline commandLine = new Commandline();
        int result = 0;

        // build the command line from what we got the format
        // as specified in the CCM.EXE help
        commandLine.setExecutable(getCcmCommand());
        commandLine.createArgument().setValue(getCcmAction());

        checkOptions(commandLine);

        result = run(commandLine);
        if (Execute.isFailure(result)) {
            String msg = "Failed executing: " + commandLine.toString();
            throw new BuildException(msg, getLocation());
        }
    
public java.lang.StringgetCcmProject()
Get the value of project.

return
value of project.

        return ccmProject;
    
public booleanisRecurse()
Get the value of recurse.

return
value of recurse.

        return recurse;
    
public booleanisVerbose()
Get the value of verbose.

return
value of verbose.

        return verbose;
    
public voidsetCcmProject(java.lang.String v)
Sets the ccm project on which the operation is applied.

param
v Value to assign to project.

        this.ccmProject = v;
    
public voidsetRecurse(boolean v)
If true, recurse on subproject (default false).

param
v Value to assign to recurse.

        this.recurse = v;
    
public voidsetVerbose(boolean v)
If true, do a verbose reconfigure operation (default false).

param
v Value to assign to verbose.

        this.verbose = v;