public boolean deploy(File target) {
File source = FileUtil.toFile(fo);
if (!target.isDirectory()) {
OfficeSettings settings = OfficeSettings.getDefault();
String message = "If you already have this document open in " +
"Office, please close it before continuing. Click OK to " +
"continue deployment.";
if (settings.getWarnBeforeDocDeploy() == true) {
NagDialog warning = NagDialog.createConfirmationDialog(
message, "Show this message in future", true);
boolean result = warning.show();
if (warning.getState() == false)
settings.setWarnBeforeDocDeploy(false);
if (result == false)
return false;
}
}