use of org.rstudio.studio.client.rsconnect.model.RSConnectPublishResult in project rstudio by rstudio.
the class RSConnect method publishWithWizard.
private void publishWithWizard(final RSConnectPublishInput input) {
RSConnectPublishWizard wizard = new RSConnectPublishWizard(input, new ProgressOperationWithInput<RSConnectPublishResult>() {
@Override
public void execute(RSConnectPublishResult result, ProgressIndicator indicator) {
switch(result.getPublishType()) {
case RSConnectPublishResult.PUBLISH_STATIC:
case RSConnectPublishResult.PUBLISH_CODE:
// always launch the browser--the wizard implies we're
// doing a first-time publish, and we may need to do some
// post-publish configuration
fireRSConnectPublishEvent(result, true);
indicator.onCompleted();
break;
case RSConnectPublishResult.PUBLISH_RPUBS:
uploadToRPubs(input, result, indicator);
break;
}
}
});
wizard.showModal();
}
use of org.rstudio.studio.client.rsconnect.model.RSConnectPublishResult in project rstudio by rstudio.
the class RSConnectDeploy method getResult.
public RSConnectPublishResult getResult() {
// compose the list of files that have been manually added; we want to
// include all the ones the user added but didn't later uncheck, so
// cross-reference the list we kept with the one returned by the dialog
ArrayList<String> deployFiles = getFileList();
ArrayList<String> additionalFiles = new ArrayList<String>();
for (String filePath : filesAddedManually_) {
if (deployFiles.contains(filePath)) {
additionalFiles.add(filePath);
}
}
String appTitle = appName_.getTitle();
// if we're redeploying to the same account, use the previous app name;
// otherwise, read the new name the user's entered
String appName = isUpdate() ? fromPrevious_.getName() : appName_.getName();
// new content
if (fromPrevious_ == null && !getSelectedAccount().equals(prefs_.preferredPublishAccount().getGlobalValue())) {
prefs_.preferredPublishAccount().setGlobalValue(getSelectedAccount());
prefs_.writeUIPrefs();
}
return new RSConnectPublishResult(appName, isUpdate() ? null : appTitle, getSelectedAccount(), source_, new RSConnectPublishSettings(deployFiles, additionalFiles, getIgnoredFileList(), asMultipleRmd_, asStatic_), isUpdate());
}
Aggregations