예제 #1
0
        static public RProject saveAs(RProjectDetails details, ProjectDropOptions options, RClient client, String uri)
        {
            StringBuilder data = new StringBuilder();

            //create the input String
            data.Append(Constants.FORMAT_JSON);
            data.Append("&project=" + HttpUtility.UrlEncode(details.id));
            data.Append("&name=" + HttpUtility.UrlEncode(details.name));
            data.Append("&descr=" + HttpUtility.UrlEncode(details.descr));
            data.Append("&longdescr=" + HttpUtility.UrlEncode(details.longdescr));
            data.Append("&projectcookie=" + HttpUtility.UrlEncode(details.cookie));
            data.Append("&shared=" + details.sharedUsers.ToString());

            if (!(options == null))
            {
                data.Append("&dropworkspace=" + options.dropWorkspace.ToString());
                data.Append("&dropdirectory=" + options.dropDirectory.ToString());
                data.Append("&drophistory=" + options.dropHistory.ToString());
            }

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

            RProject returnValue = default(RProject);

            returnValue = new RProject(jresponse, client);
            return(returnValue);
        }
        /// <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;
        }
        public static RProject saveAs(RProjectDetails details, ProjectDropOptions options, RClient client, String uri)
        {
            StringBuilder data = new StringBuilder();

            //create the input String
            data.Append(Constants.FORMAT_JSON);
            data.Append("&project=" + HttpUtility.UrlEncode(details.id));
            data.Append("&name=" + HttpUtility.UrlEncode(details.name));
            data.Append("&descr=" + HttpUtility.UrlEncode(details.descr));
            data.Append("&longdescr=" + HttpUtility.UrlEncode(details.longdescr));
            data.Append("&projectcookie=" + HttpUtility.UrlEncode(details.cookie));
            data.Append("&shared=" + details.sharedUsers.ToString());

            if (!(options == null))
            {
                data.Append("&dropworkspace=" + options.dropWorkspace.ToString());
                data.Append("&dropdirectory=" + options.dropDirectory.ToString());
                data.Append("&drophistory=" + options.dropHistory.ToString());
            }

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

            RProject returnValue = default(RProject);
            returnValue = new RProject(jresponse, client);
            return returnValue;
        }
예제 #5
0
        /// <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);
        }
예제 #6
0
        /// <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);
        }