polishing, made getTemporaryFileSuffix() protected

This commit is contained in:
Oleg Zhurakousky
2011-05-06 12:26:26 -04:00
parent a98a71ee2b
commit 2872aceeb7
8 changed files with 8 additions and 8 deletions

View File

@@ -93,7 +93,7 @@ public class FileWritingMessageHandler extends AbstractReplyProducingMessageHand
this.temporaryFileSuffix = temporaryFileSuffix;
}
public String getTemporaryFileSuffix() {
protected String getTemporaryFileSuffix() {
return temporaryFileSuffix;
}

View File

@@ -81,7 +81,7 @@ public class FileTransferringMessageHandler extends AbstractMessageHandler {
this.directoryExpressionProcessor = new ExpressionEvaluatingMessageProcessor<String>(remoteDirectoryExpression, String.class);
}
public String getTemporaryFileSuffix() {
protected String getTemporaryFileSuffix() {
return temporaryFileSuffix;
}

View File

@@ -121,7 +121,7 @@ public abstract class AbstractInboundFileSynchronizer<F> implements InboundFileS
return (this.filter != null) ? this.filter.filterFiles(files) : Arrays.asList(files);
}
public String getTemporaryFileSuffix() {
protected String getTemporaryFileSuffix() {
return temporaryFileSuffix;
}

View File

@@ -69,7 +69,7 @@ public class FileOutboundChannelAdapterParserTests {
DirectFieldAccessor handlerAccessor = new DirectFieldAccessor(handler);
File expected = new File(System.getProperty("java.io.tmpdir"));
File actual = (File) handlerAccessor.getPropertyValue("destinationDirectory");
assertEquals(".foo", handler.getTemporaryFileSuffix());
assertEquals(".foo", TestUtils.getPropertyValue(handler, "temporaryFileSuffix", String.class));
assertThat(actual, is(expected));
DefaultFileNameGenerator fileNameGenerator = (DefaultFileNameGenerator) handlerAccessor.getPropertyValue("fileNameGenerator");
assertNotNull(fileNameGenerator);

View File

@@ -58,7 +58,7 @@ public class FtpInboundChannelAdapterParserTests {
FtpInboundFileSynchronizer fisync =
(FtpInboundFileSynchronizer) TestUtils.getPropertyValue(inbound, "synchronizer");
assertEquals(".foo", fisync.getTemporaryFileSuffix());
assertEquals(".foo", TestUtils.getPropertyValue(fisync, "temporaryFileSuffix", String.class));
String remoteFileSeparator = (String) TestUtils.getPropertyValue(fisync, "remoteFileSeparator");
assertNotNull(remoteFileSeparator);
assertEquals("", remoteFileSeparator);

View File

@@ -54,7 +54,7 @@ public class FtpOutboundChannelAdapterParserTests {
FileTransferringMessageHandler handler = (FileTransferringMessageHandler) TestUtils.getPropertyValue(consumer, "handler");
String remoteFileSeparator = (String) TestUtils.getPropertyValue(handler, "remoteFileSeparator");
assertNotNull(remoteFileSeparator);
assertEquals(".foo", handler.getTemporaryFileSuffix());
assertEquals(".foo", TestUtils.getPropertyValue(handler, "temporaryFileSuffix", String.class));
assertEquals(".", remoteFileSeparator);
assertEquals(ac.getBean("fileNameGenerator"), TestUtils.getPropertyValue(handler, "fileNameGenerator"));
assertEquals("UTF-8", TestUtils.getPropertyValue(handler, "charset"));

View File

@@ -62,7 +62,7 @@ public class InboundChannelAdapterParserTests {
SftpInboundFileSynchronizer synchronizer = (SftpInboundFileSynchronizer) TestUtils.getPropertyValue(source, "synchronizer");
String remoteFileSeparator = (String) TestUtils.getPropertyValue(synchronizer, "remoteFileSeparator");
assertEquals(".bar", synchronizer.getTemporaryFileSuffix());
assertEquals(".bar", TestUtils.getPropertyValue(synchronizer, "temporaryFileSuffix", String.class));
assertNotNull(remoteFileSeparator);
assertEquals(".", remoteFileSeparator);
PollableChannel requestChannel = context.getBean("requestChannel", PollableChannel.class);

View File

@@ -61,7 +61,7 @@ public class OutboundChannelAdapterParserTests {
String remoteFileSeparator = (String) TestUtils.getPropertyValue(handler, "remoteFileSeparator");
assertNotNull(remoteFileSeparator);
assertEquals(".", remoteFileSeparator);
assertEquals(".bar", handler.getTemporaryFileSuffix());
assertEquals(".bar", TestUtils.getPropertyValue(handler, "temporaryFileSuffix", String.class));
Expression remoteDirectoryExpression = (Expression) TestUtils.getPropertyValue(handler, "directoryExpressionProcessor.expression");
assertNotNull(remoteDirectoryExpression);
assertTrue(remoteDirectoryExpression instanceof LiteralExpression);