From b9c291328f83482343533ceae6e6b015563707b0 Mon Sep 17 00:00:00 2001 From: dsyer Date: Sun, 14 Oct 2007 08:07:44 +0000 Subject: [PATCH] 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 --- .../batch/core/domain/JobIdentifier.java | 10 ---------- .../batch/core/runtime/SimpleJobIdentifier.java | 14 ++------------ 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/core/src/main/java/org/springframework/batch/core/domain/JobIdentifier.java b/core/src/main/java/org/springframework/batch/core/domain/JobIdentifier.java index 61fff9b9a..cc3e0e6d1 100644 --- a/core/src/main/java/org/springframework/batch/core/domain/JobIdentifier.java +++ b/core/src/main/java/org/springframework/batch/core/domain/JobIdentifier.java @@ -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(); - } diff --git a/core/src/main/java/org/springframework/batch/core/runtime/SimpleJobIdentifier.java b/core/src/main/java/org/springframework/batch/core/runtime/SimpleJobIdentifier.java index c7457fa46..de00adaf9 100644 --- a/core/src/main/java/org/springframework/batch/core/runtime/SimpleJobIdentifier.java +++ b/core/src/main/java/org/springframework/batch/core/runtime/SimpleJobIdentifier.java @@ -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) {