- try {
- source = ParameterExpander.expandExpression( aValueMap, sourceExpression );
- destination = ParameterExpander.expandExpression( aValueMap, destinationExpression );
- FileRoutines.copy(
- new File(sourceBasePath, source),
- new File(destinationBasePath, destination));
- aLogger.info(source + " copied into " + destination);
- }
- catch (Throwable e) {
- aLogger.error("Copying " + source + " into " + destination + " failed: " + e.getMessage());
- }
- }
+ public void produce(Map aValueMap, String aVerb, LoggerWrapper aLogger) throws ProducerFailure {
+ String source = "";
+ String destination = "";
+
+ try {
+ source = ParameterExpander.expandExpression( aValueMap, sourceExpression );
+ destination = ParameterExpander.expandExpression( aValueMap, destinationExpression );
+ FileRoutines.copy(
+ new File(sourceBasePath, source),
+ new File(destinationBasePath, destination));
+ aLogger.info(source + " copied into " + destination);
+ // YOSS TODO: changed this puppy, is it correct?
+ reportChange(destinationBasePath + destination);
+ }
+ catch (Throwable e) {
+ aLogger.error("Copying " + source + " into " + destination + " failed: " + e.getMessage());
+ }
+ }
+
+ private void reportChange(String destination) {
+ ChangeTracker changeTracker = MirGlobal.getChangeEngine().getTracker();
+ changeTracker.addChange(destination, ChangeType.MODIFICATION);
+ }