From d7bc09f9501affee77700541289da4ff112b8475 Mon Sep 17 00:00:00 2001 From: Edison Su Date: Thu, 3 Jan 2013 11:35:41 -0800 Subject: [PATCH] fix build --- .../storage/image/motion/DefaultImageMotionStrategy.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java index 015d009ab44..91cacdb527d 100644 --- a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java +++ b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java @@ -30,6 +30,8 @@ import org.apache.cloudstack.storage.to.ImageOnPrimayDataStoreTO; import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo; import org.springframework.stereotype.Component; +import com.cloud.agent.api.Answer; + @Component public class DefaultImageMotionStrategy implements ImageMotionStrategy { @@ -71,16 +73,16 @@ public class DefaultImageMotionStrategy implements ImageMotionStrategy { ImageOnPrimayDataStoreTO imageTo = new ImageOnPrimayDataStoreTO(templateStore); CopyTemplateToPrimaryStorageCmd copyCommand = new CopyTemplateToPrimaryStorageCmd(imageTo); CreateTemplateContext context = new CreateTemplateContext(callback, templateStore); - AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); caller.setCallback(caller.getTarget().copyTemplateCallBack(null, null)) .setContext(context); ep.sendMessageAsync(copyCommand, caller); } - public Object copyTemplateCallBack(AsyncCallbackDispatcher callback, CreateTemplateContext context) { + public Object copyTemplateCallBack(AsyncCallbackDispatcher callback, CreateTemplateContext context) { AsyncCompletionCallback parentCall = context.getParentCallback(); - CopyTemplateToPrimaryStorageAnswer answer = callback.getResult(); + CopyTemplateToPrimaryStorageAnswer answer = (CopyTemplateToPrimaryStorageAnswer)callback.getResult(); CommandResult result = new CommandResult(); if (!answer.getResult()) {