RESOLVED - issue BATCH-121: BatchResourceFactoryBean - needs to be aware of JobIdentifier strategy
http://opensource.atlassian.com/projects/spring/browse/BATCH-121 Factored label generation out of job identifier into a separate strategy for resource factory
This commit is contained in:
@@ -35,14 +35,4 @@ public interface JobIdentifier {
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
/**
|
||||
* Dynamic property that uniquely identifies this object in human-readable
|
||||
* form. Might be used to construct a filename or database column value, so
|
||||
* generally implementations should stick to succinct strings containing all
|
||||
* the information available without whitespace or special characters.
|
||||
*
|
||||
* @return a label that identifies this object
|
||||
*/
|
||||
public String getLabel();
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.springframework.batch.core.runtime;
|
||||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.springframework.batch.core.domain.JobIdentifier;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
|
||||
/**
|
||||
@@ -61,19 +62,8 @@ public class SimpleJobIdentifier implements JobIdentifier {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Just uses the name as a label.
|
||||
*
|
||||
* @see org.springframework.batch.core.domain.JobIdentifier#getLabel()
|
||||
*/
|
||||
public String getLabel() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "name=" + name;
|
||||
return ClassUtils.getShortName(getClass())+": name=" + name;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
|
||||
Reference in New Issue
Block a user