OPEN - issue BATCH-891: Create Annotations

http://jira.springframework.org/browse/BATCH-891

I started creating some of the annotations we'll need.  I still have a few open questions, but I'll add them to the Jira issue.
This commit is contained in:
lucasward
2008-10-28 23:36:26 +00:00
parent 1fa38d4c20
commit 2843c17229
4 changed files with 111 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/**
*
*/
package org.springframework.batch.core.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;
/**
* Marks a method to be called after a {@link Job} has completed. Annotated methods
* will be called regardless of the status of the {@link JobExecution}.
*
* @author Lucas Ward
* @since 2.0
* @see JobExecutionListener
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface AfterJob {
}

View File

@@ -0,0 +1,27 @@
/**
*
*/
package org.springframework.batch.core.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepExecutionListener;
/**
* Marks a method to be called after a {@link Step} has completed. Annotated methods
* will be called regardless of the status of the {@link StepExecution}.
*
* @author Lucas Ward
* @since 2.0
* @see StepExecutionListener
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface AfterStep {
}

View File

@@ -0,0 +1,29 @@
/**
*
*/
package org.springframework.batch.core.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;
import org.springframework.batch.core.Step;
/**
* Marks a method to be called before a {@link Job} is executed, which comes
* after a {@link JobExecution} is created and persisted, but before the first
* {@link Step} is executed.
*
* @author Lucas Ward
* @since 2.0
* @see JobExecutionListener
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface BeforeJob {
}

View File

@@ -0,0 +1,28 @@
/**
*
*/
package org.springframework.batch.core.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepExecutionListener;
/**
* Marks a method to be called before a {@link Step} is executed, which comes
* after a {@link StepExecution} is created and persisted, but before the first
* item is read.
*
* @author Lucas Ward
* @since 2.0
* @see StepExecutionListener
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface BeforeStep {
}