use of org.rstudio.studio.client.rsconnect.model.RSConnectPublishSettings 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());
}
use of org.rstudio.studio.client.rsconnect.model.RSConnectPublishSettings in project rstudio by rstudio.
the class RSConnect method deployToRSConnect.
private void deployToRSConnect(String sourceFile, String deployDir, String deployFile, String websiteDir, String description, JsArrayString deployFiles, JsArrayString additionalFiles, JsArrayString ignoredFiles, boolean isSelfContained, boolean isShiny, boolean asMultiple, boolean asStatic, boolean launch, JavaScriptObject jsoRecord) {
// front if we can
if (Desktop.isDesktop())
Desktop.getFrame().bringMainFrameToFront();
else
WindowEx.get().focus();
ArrayList<String> deployFilesList = JsArrayUtil.fromJsArrayString(deployFiles);
ArrayList<String> additionalFilesList = JsArrayUtil.fromJsArrayString(additionalFiles);
ArrayList<String> ignoredFilesList = JsArrayUtil.fromJsArrayString(ignoredFiles);
RSConnectDeploymentRecord record = jsoRecord.cast();
events_.fireEvent(new RSConnectDeployInitiatedEvent(new RSConnectPublishSource(sourceFile, deployDir, deployFile, websiteDir, isSelfContained, asStatic, isShiny, description), new RSConnectPublishSettings(deployFilesList, additionalFilesList, ignoredFilesList, asMultiple, asStatic), launch, record));
}
Aggregations