@Override
public abstract void run();
-
+
+ /**
+ * Subclasses should override this method. See DRYD-878
+ */
@Override
public void run(BatchCommon batchCommon) {
- throw new UnsupportedOperationException("This CollectionSpace batch-job/data-update class does not support the 'public void run(BatchCommon batchCommon)' method.");
+ String errMsg = String.format("%s class does not support run(BatchCommon batchCommon) method.", getClass().getName());
+ throw new java.lang.UnsupportedOperationException(errMsg);
}
-
}
return (Set<T>) list.stream().collect(Collectors.toSet());
}
- /**
- * Subclasses should override this method. See DRYD-878
- */
- @Override
- public void run(BatchCommon batchCommon) {
- String errMsg = String.format("%s class does not support run(BatchCommon batchCommon) method.", getClass().getName());
- throw new java.lang.UnsupportedOperationException(errMsg);
- }
-
protected String getFieldXml(Map<String, String> fields, String fieldName) {
return getFieldXml(fieldName, fields.get(fieldName));
}
batchInstance.run(batchCommon);
} catch (UnsupportedOperationException t) {
// Support for run() will be deprecated in a future release. See DRYD-878
- logger.debug(t.getMessage());
+ logger.info(t.getMessage());
batchInstance.run();
}
import java.util.Arrays;
import org.collectionspace.services.batch.AbstractBatchInvocable;
-import org.collectionspace.services.batch.BatchCommon;
public class TestBatchJob extends AbstractBatchInvocable {
@Override
public void run() {
// An empty batch job used just for testing.
- }
-
- @Override
- public void run(BatchCommon batchCommon) {
- // An empty batch job used just for testing.
- }
+ }
}