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:
dsyer
2007-10-14 08:07:44 +00:00
parent fafc8bdd7a
commit b9c291328f
2 changed files with 2 additions and 22 deletions

View File

@@ -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();
}

View File

@@ -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) {