Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Change name to jobName
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Aug 7, 2013
1 parent 7691a6a commit 17b0fd7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Expand Up @@ -58,15 +58,15 @@ public class TMXStreamingOutput<T> implements StreamingOutput, Closeable
private final @Nonnull Iterator<T> tuIter;
private final TMXExportStrategy<T> exportStrategy;
private final Closeable closeable;
private final String name;
private final String jobName;

private TMXStreamingOutput(
String name,
String jobName,
Iterator<T> tuIter,
TMXExportStrategy<T> exportTUStrategy,
Closeable closeable)
{
this.name = name;
this.jobName = jobName;
this.tuIter = tuIter;
this.exportStrategy = exportTUStrategy;
this.closeable = (Closeable) (tuIter instanceof Closeable ? tuIter : NullCloseable.INSTANCE);
Expand All @@ -81,11 +81,11 @@ private TMXStreamingOutput(
* @param exportTUStrategy strategy to use when converting from translation units into TMX.
*/
public TMXStreamingOutput(
String name,
String jobName,
CloseableIterator<T> tuIter,
TMXExportStrategy<T> exportTUStrategy)
{
this(name, tuIter, exportTUStrategy, tuIter);
this(jobName, tuIter, exportTUStrategy, tuIter);
}

/**
Expand Down Expand Up @@ -124,7 +124,7 @@ public void write(OutputStream output) throws IOException, WebApplicationExcepti
int tuCount = 0;
try
{
log.info("streaming output started for: {}", name);
log.info("streaming output started for: {}", jobName);
@SuppressWarnings("null")
PeekingIterator<T> iter = Iterators.peekingIterator(tuIter);
// Fetch the first result, so that we can fail fast, before
Expand Down Expand Up @@ -162,7 +162,7 @@ public void write(OutputStream output) throws IOException, WebApplicationExcepti
finally
{
close();
log.info("streaming output stopped for: {}, TU count={}", name, tuCount);
log.info("streaming output stopped for: {}, TU count={}", jobName, tuCount);
}
}

Expand Down
Expand Up @@ -159,21 +159,21 @@ public Response deleteTranslationUnits(String slug)
}

private Response buildTMX(
String name,
String jobName,
@Nonnull CloseableIterator<? extends ITextFlow> iter,
@Nullable LocaleId locale, @Nonnull String filename)
{
TMXStreamingOutput<HTextFlow> output = new TMXStreamingOutput(
name, iter, new TranslationsTMXExportStrategy(locale));
jobName, iter, new TranslationsTMXExportStrategy(locale));
return okResponse(filename, output);
}

private Response buildTMX(
String name,
String jobName,
TransMemory tm, CloseableIterator<TransMemoryUnit> iter, String filename)
{
TMXStreamingOutput<TransMemoryUnit> output = new TMXStreamingOutput<TransMemoryUnit>(
name, iter, new TransMemoryTMXExportStrategy(tm));
jobName, iter, new TransMemoryTMXExportStrategy(tm));
return okResponse(filename, output);
}

Expand Down

0 comments on commit 17b0fd7

Please sign in to comment.