git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270843 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -34,12 +34,25 @@ public interface TaskContext | |||||
| String NAME = "myrmidon.task.name"; | String NAME = "myrmidon.task.name"; | ||||
| /** | /** | ||||
| * Retrieve Name of tasklet. | |||||
| * Retrieve Name of task. | |||||
| * | * | ||||
| * @return the name | * @return the name | ||||
| */ | */ | ||||
| String getName(); | String getName(); | ||||
| /** | |||||
| * Retrieve a service that is offered by the runtime. | |||||
| * The actual services registered and in place for the | |||||
| * task is determined by the container. The returned service | |||||
| * <b>MUST</b> implement the specified interface. | |||||
| * | |||||
| * @param serviceClass the interface class that defines the service | |||||
| * @return an instance of the service implementing interface specified by parameter | |||||
| * @exception TaskException is thrown when the service is unavailable or not supported | |||||
| */ | |||||
| Object getService( Class serviceClass ) | |||||
| throws TaskException; | |||||
| /** | /** | ||||
| * Retrieve base directory. | * Retrieve base directory. | ||||
| * | * | ||||
| @@ -91,6 +91,22 @@ public class DefaultTaskContext | |||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * Retrieve a service that is offered by the runtime. | |||||
| * The actual services registered and in place for the | |||||
| * task is determined by the container. The returned service | |||||
| * <b>MUST</b> implement the specified interface. | |||||
| * | |||||
| * @param serviceClass the interface class that defines the service | |||||
| * @return an instance of the service implementing interface specified by parameter | |||||
| * @exception TaskException is thrown when the service is unavailable or not supported | |||||
| */ | |||||
| public Object getService( final Class serviceClass ) | |||||
| throws TaskException | |||||
| { | |||||
| throw new TaskException( "No services available atm" ); | |||||
| } | |||||
| /** | /** | ||||
| * Resolve filename. | * Resolve filename. | ||||
| * This involves resolving it against baseDirectory and | * This involves resolving it against baseDirectory and | ||||