Beispiel #1
0
        static public String ping(RProjectDetails details, RClient client, String uri)
        {
            StringBuilder data = new StringBuilder();

            //create the input String
            data.Append(Constants.FORMAT_JSON);
            data.Append("&project=" + HttpUtility.UrlEncode(details.id));

            //call the server
            JSONResponse jresponse = HTTPUtilities.callRESTGet(uri, data.ToString(), ref client);

            RProjectDetails projectDetails = default(RProjectDetails);

            RProjectBaseImpl.parseProject(jresponse, ref projectDetails);
            String returnValue = "";

            if (!(projectDetails == null))
            {
                returnValue = System.Convert.ToString(projectDetails.islive);
            }
            else
            {
                returnValue = System.Convert.ToString(false);
            }

            return(returnValue);
        }
        /// <summary>
        /// Gets the details associated with this project
        /// </summary>
        /// <returns>RProjectDetails object</returns>
        /// <remarks></remarks>
        public RProjectDetails about()
        {
            RProjectDetails returnValue = default(RProjectDetails);

            returnValue = RProjectBaseImpl.about(m_projectDetails, m_client, Constants.RPROJECTABOUT);

            return(returnValue);
        }
Beispiel #3
0
 private void parseScriptExecution(JSONResponse jresponse, ref RProjectExecutionDetails executionDetails, ref RProjectDetails projectDetails)
 {
     RProjectBaseImpl.parseProjectExecution(jresponse, ref executionDetails, ref projectDetails, m_client);
 }
        /// <summary>
        /// Exports the project
        /// </summary>
        /// <returns>A URL to the project location</returns>
        /// <remarks></remarks>
        public String export()
        {
            String returnValue = System.Convert.ToString(RProjectBaseImpl.export(m_projectDetails, m_client, Constants.RPROJECTEXPORT));

            return(returnValue);
        }
 /// <summary>
 /// Deletes the project
 /// </summary>
 /// <remarks></remarks>
 public void delete()
 {
     RProjectBaseImpl.delete(m_projectDetails, m_client, Constants.RPROJECTDELETE);
 }
 private void parseProject(JSONResponse jresponse, ref RProjectDetails m_projectDetails)
 {
     RProjectBaseImpl.parseProject(jresponse, ref m_projectDetails);
 }
 /// <summary>
 /// Closes the project
 /// </summary>
 /// <param name="options">ProjectCloseOptions object describing additional actions upon closing the project</param>
 /// <remarks></remarks>
 public void close(ProjectCloseOptions options)
 {
     RProjectBaseImpl.close(m_projectDetails, options, m_client, Constants.RPROJECTCLOSE);
 }
 /// <summary>
 /// Closes the project
 /// </summary>
 /// <remarks></remarks>
 public void close()
 {
     RProjectBaseImpl.close(m_projectDetails, null, m_client, Constants.RPROJECTCLOSE);
 }
        /// <summary>
        /// Updates the project
        /// </summary>
        /// <param name="details">RProjectDetails object describing the project</param>
        /// <returns>A RProjectDetails object with the updated project information</returns>
        /// <remarks></remarks>
        public RProjectDetails update(RProjectDetails details)
        {
            m_projectDetails = RProjectBaseImpl.update(details, m_client, Constants.RPROJECTABOUTUPDATE);

            return(m_projectDetails);
        }
        /// <summary>
        /// Saves a copy the project
        /// </summary>
        /// <param name="details">RProjectDetails object describing the project</param>
        /// <param name="dropOptions">ProjectDropOptions object describing what to drop from the project</param>
        /// <returns>RProject object</returns>
        /// <remarks></remarks>
        public RProject saveAs(RProjectDetails details, ProjectDropOptions dropOptions)
        {
            RProject returnValue = RProjectBaseImpl.saveAs(details, dropOptions, m_client, Constants.RPROJECTSAVEAS);

            return(returnValue);
        }
        /// <summary>
        /// Saves the project
        /// </summary>
        /// <param name="details">RProjectDetails object describing the project</param>
        /// <param name="dropOptions">ProjectDropOptions object describing what to drop from the project</param>
        /// <returns>RProjectDetails object</returns>
        /// <remarks></remarks>
        public RProjectDetails save(RProjectDetails details, ProjectDropOptions dropOptions)
        {
            m_projectDetails = RProjectBaseImpl.save(details, dropOptions, m_client, Constants.RPROJECTSAVE);

            return(m_projectDetails);
        }
        /// <summary>
        /// Saves the project
        /// </summary>
        /// <param name="details">RProjectDetails object describing the project</param>
        /// <returns>RProjectDetails object</returns>
        /// <remarks></remarks>
        public RProjectDetails save(RProjectDetails details)
        {
            m_projectDetails = RProjectBaseImpl.save(details, null, m_client, Constants.RPROJECTSAVE);

            return(m_projectDetails);
        }
        /// <summary>
        /// Recycles the R session associated with the project by deleting all
        /// R objects from the workspace and all files from the working directory.
        /// Recycling a project is a convenient and efficient alternative to
        /// starting over by closing an existing project and then creating a new project.
        ///
        /// Recommended for temporary and blackbox projects. Recycle persistent projects
        /// with caution as this operation can not be reversed.
        /// </summary>
        /// <returns>RProjectDetails object</returns>
        /// <remarks></remarks>
        public RProjectDetails recycle()
        {
            RProjectDetails returnValue = RProjectBaseImpl.recycle(m_projectDetails, m_client, Constants.RPROJECTRECYCLE);

            return(returnValue);
        }
        /// <summary>
        /// Pings the project
        /// </summary>
        /// <returns>true if project is alive</returns>
        /// <remarks></remarks>
        public Boolean ping()
        {
            Boolean returnValue = System.Convert.ToBoolean(RProjectBaseImpl.ping(m_projectDetails, m_client, Constants.RPROJECTPING));

            return(returnValue);
        }
        /// <summary>
        /// Grant authorship rights on the project
        /// </summary>
        /// <param name="author">The author that is being granted permissions</param>
        /// <returns>A URL to the project location</returns>
        /// <remarks></remarks>
        public RProjectDetails grant(String author)
        {
            RProjectDetails returnValue = RProjectBaseImpl.grant(author, m_projectDetails, m_client, Constants.RPROJECTGRANT);

            return(returnValue);
        }