Package org.rstudio.studio.client.common.rpubs.ui

Examples of org.rstudio.studio.client.common.rpubs.ui.RPubsUploadDialog$Resources


     * Converts the <code>Application</code> XMLBean into a <code>UnitActionPackage</code> object.
     * @param application  the <code>Application</code> XMLBean to convert.
     * @return the converted <code>UnitActionPackage</code> object.
     */
    public static UnitActionPackage convertWADLtoUnitActionPackage(final Application application) {
        Resources resources = application.getResources();
        String baseURL = resources.getBase();
        if (!baseURL.endsWith("/")) {
            baseURL += "/";
        }
        List<Resource> resourceList = resources.getResourceList();

        List<UnitAction> unitActionList = new ArrayList<UnitAction>();
        for (Resource resource : resourceList) {
            unitActionList.addAll(convertResourceToUnitAction(resource));
        }
View Full Code Here


    public static String generateWADLForMashupRESTService(String myCocktailPath, int mashupId) throws DAOException, IOException {
        Mashup mashup = getMashup(mashupId);
       
        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addResource(resource, "json""format=json",  mashup, "application/json");
        addResource(resource, "xml",   "format=xml",   mashup, "application/xml");
        addResource(resource, "jsonp", "format=jsonp", mashup, "application/javascript");
View Full Code Here

    public static String generateWADLForMashupRESTServiceJSON(String myCocktailPath, int mashupId) throws DAOException, IOException {
        Mashup mashup = getMashup(mashupId);
       
        ApplicationDocument applicationDocument = ApplicationDocument.Factory.newInstance();
        Application application = applicationDocument.addNewApplication();
        Resources resources = application.addNewResources();
        resources.setBase(myCocktailPath);
       
        Resource resource = resources.addNewResource();
        resource.setPath("RESTService/mashupId="+mashupId);
       
        addMethod(resource.addNewMethod(), "json", mashup, "application/json");
       
        return applicationDocument.xmlText(new XmlOptions().setSavePrettyPrint());
View Full Code Here

         new SimpleRequestCallback<PresentationRPubsSource>() {
           
            @Override
            public void onResponseReceived(PresentationRPubsSource source)
            {
               RPubsUploadDialog dlg = new RPubsUploadDialog(
                     "Presentation",
                     view_.getPresentationTitle(),
                     source.getSourceFilePath(),
                     source.isPublished());
               dlg.showModal();
            }
           
            @Override
            public void onError(ServerError error)
            {
View Full Code Here

      dependencyManager_.withRMarkdown("Publishing to RPubs",
        new Command() {
         @Override
         public void execute()
         {
            RPubsUploadDialog dlg = new RPubsUploadDialog(
               "Viewer",
               "",
               new RPubsHtmlGenerator() {

                  @Override
                  public void generateRPubsHtml(
                        String title,
                        String comment,
                        final CommandWithArg<String> onCompleted)
                  {
                     server_.viewerCreateRPubsHtml(
                           title, comment, new SimpleRequestCallback<String>(){

                        @Override
                        public void onResponseReceived(String rpubsHtmlFile)
                        {
                           onCompleted.execute(rpubsHtmlFile);
                        }
                     });
                  }
               },
               false);
            dlg.showModal()
         }
      });
   }
View Full Code Here

             final Size size = ZoomUtils.getZoomedSize(view_.getPlotFrameSize(),
                                                       new Size(400, 350),
                                                       new Size(750, 600));
            
             // show the dialog
             RPubsUploadDialog dlg = new RPubsUploadDialog(
                "Plots",
                "",
                new RPubsHtmlGenerator() {

                   @Override
                   public void generateRPubsHtml(
                         String title,
                         String comment,
                         final CommandWithArg<String> onCompleted)
                   {
                      server_.plotsCreateRPubsHtml(
                         title,
                         comment,
                         size.width,
                         size.height,
                         new SimpleRequestCallback<String>() {

                            @Override
                            public void onResponseReceived(String rpubsHtmlFile)
                            {
                               onCompleted.execute(rpubsHtmlFile);
                            }
                      });
                   }
                },
                false);
             dlg.showModal();
          }
      });
   }
View Full Code Here

   }
  
   @Handler
   public void onPublishHTML()
   {
      RPubsUploadDialog dlg = new RPubsUploadDialog(context_.getContextId(),
                                                    context_.getTitle(),
                                                    context_.getHtmlFile(),
                                                    context_.isPublished());
      dlg.showModal();
   }
View Full Code Here

TOP

Related Classes of org.rstudio.studio.client.common.rpubs.ui.RPubsUploadDialog$Resources

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.