protected Void copyTemplateCallback(
AsyncCallbackDispatcher<TemplateInstallStrategyImpl, CopyCommandResult> callback,
CopyTemplateContext<CreateBaseImageResult> context) {
CopyCommandResult result = callback.getResult();
TemplateInfo templateOnPrimaryStoreObj = context.template;
if (result.isFailed()) {
CreateBaseImageResult res = new CreateBaseImageResult(
templateOnPrimaryStoreObj);
res.setResult(result.getResult());
context.getParentCallback().complete(res);
}
ObjectInDataStoreVO obj = objectInDataStoreMgr.findObject(
templateOnPrimaryStoreObj.getId(), templateOnPrimaryStoreObj
.getType(), templateOnPrimaryStoreObj.getDataStore()
.getId(), templateOnPrimaryStoreObj.getDataStore()
.getRole());
obj.setInstallPath(result.getPath());
CreateBaseImageResult res = new CreateBaseImageResult(
templateOnPrimaryStoreObj);