com.googlecode.svntask.Command Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of svntask-core Show documentation
Show all versions of svntask-core Show documentation
Contains the actual code for the svntask project.
The newest version!
package com.googlecode.svntask;
import org.apache.tools.ant.ProjectComponent;
/**
* Base class for a Command which represents an svn command
* such as svn info.
*
* @author jonstevens
*/
public abstract class Command extends ProjectComponent
{
private SvnTask task = null;
public abstract void execute() throws Exception;
protected abstract void validateAttributes() throws Exception;
/**
*
* @throws Exception
*/
public void executeCommand() throws Exception
{
try
{
this.validateAttributes();
this.execute();
}
catch (Exception e)
{
if (this.task.isFailonerror())
{
throw new Exception(e);
}
else
{
this.task.log(e.getMessage());
}
}
}
/**
* Sets the SvnTask
*/
public void setTask(SvnTask task)
{
this.task = task;
}
/**
* Gets the SvnTask
*/
public SvnTask getTask()
{
return this.task;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy