{"action":"created","comment":{"url":"https://api.github.com/repos/zanata/zanata-api/pulls/comments/45014282","id":45014282,"diff_hunk":"@@ -0,0 +1,267 @@\n+/*\n+ * Copyright 2015, Red Hat, Inc. and individual contributors\n+ * as indicated by the @author tags. See the copyright.txt file in the\n+ * distribution for a full listing of individual contributors.\n+ *\n+ * This is free software; you can redistribute it and/or modify it\n+ * under the terms of the GNU Lesser General Public License as\n+ * published by the Free Software Foundation; either version 2.1 of\n+ * the License, or (at your option) any later version.\n+ *\n+ * This software is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with this software; if not, write to the Free\n+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n+ */\n+\n+package org.zanata.rest.service;\n+\n+import org.codehaus.enunciate.jaxrs.TypeHint;\n+import org.zanata.rest.MediaTypes;\n+import org.zanata.rest.dto.LocaleDetails;\n+import org.zanata.rest.dto.ProjectIteration;\n+import org.zanata.rest.dto.resource.ResourceMeta;\n+\n+import javax.ws.rs.Consumes;\n+import javax.ws.rs.GET;\n+import javax.ws.rs.HEAD;\n+import javax.ws.rs.PUT;\n+import javax.ws.rs.Path;\n+import javax.ws.rs.PathParam;\n+import javax.ws.rs.Produces;\n+import javax.ws.rs.core.MediaType;\n+import javax.ws.rs.core.Response;\n+\n+/**\n+ * Project version resource API, replacing {@link ProjectIterationResource}.\n+ *\n+ * @author Alex Eng <a href=\"mailto:aeng@redhat.com\">aeng@redhat.com</a>\n+ */\n+@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n+@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n+public interface ProjectVersionResource {\n+    public static final String PROJECT_SERVICE_PATH = \"/project\";\n+\n+    public static final String VERSION_SLUG_TEMPLATE = \"/{versionSlug:\"\n+            + RestConstants.SLUG_PATTERN + \"}\";\n+\n+    public static final String SERVICE_PATH = PROJECT_SERVICE_PATH\n+            + \"/\" + ProjectResource.PROJECT_SLUG_TEMPLATE\n+            + \"/version\";\n+\n+    /**\n+     * Returns header information for a project iteration.\n+     *\n+     * @param projectSlug\n+     *            Project identifier\n+     * @param versionSlug\n+     *            Project version identifier\n+     *\n+     * @return The following response status codes will be returned from this\n+     *         operation:<br>\n+     *         OK(200) - Response with an \"Etag\" header for the requested\n+     *         project iteration.<br>\n+     *         NOT FOUND(404) - If a project iteration could not be found for\n+     *         the given parameters.<br>\n+     *         INTERNAL SERVER ERROR(500) - If there is an unexpected error in\n+     *         the server while performing this operation.\n+     */\n+    @HEAD\n+    @Produces({ MediaTypes.APPLICATION_ZANATA_PROJECT_ITERATION_XML,\n+        MediaTypes.APPLICATION_ZANATA_PROJECT_ITERATION_JSON,\n+        MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n+    @Path(VERSION_SLUG_TEMPLATE)\n+    public Response head(@PathParam(\"projectSlug\") String projectSlug,\n+        @PathParam(\"versionSlug\") String versionSlug);\n+\n+    /**\n+     * Creates or modifies a Project iteration.\n+     *\n+     * @param projectVersion\n+     *            The project iteration information.\n+     * @return The following response status codes will be returned from this\n+     *         operation:<br>\n+     *         OK(200) - If an already existing project iteration was updated as\n+     *         a result of this operation.<br>\n+     *         CREATED(201) - If a new project iteration was added.<br>\n+     *         NOT FOUND(404) - If no project was found for the given project\n+     *         slug.<br>\n+     *         FORBIDDEN(403) - If the user was not allowed to create/modify the\n+     *         project iteration. In this case an error message is contained in\n+     *         the response.<br>\n+     *         UNAUTHORIZED(401) - If the user does not have the proper\n+     *         permissions to perform this operation.<br>\n+     *         INTERNAL SERVER ERROR(500) - If there is an unexpected error in\n+     *         the server while performing this operation.\n+     */\n+    @PUT\n+    @Consumes({ MediaTypes.APPLICATION_ZANATA_PROJECT_ITERATION_XML,\n+            MediaTypes.APPLICATION_ZANATA_PROJECT_ITERATION_JSON,\n+            MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })\n+    @Path(VERSION_SLUG_TEMPLATE)\n+    public Response put(@PathParam(\"projectSlug\") String projectSlug,\n+            @PathParam(\"versionSlug\") String versionSlug,\n+            ProjectIteration projectVersion);\n+\n+    /**\n+     * Get a project iteration's sample general configuration file(zanata.xml).\n+     * Note: this will only be a sample configuration which does not contain any\n+     * customization done on the client side, such as, locale mapping and/or\n+     * command hooks.\n+     *\n+     * @param projectSlug\n+     *            Project identifier\n+     * @param versionSlug\n+     *            Project version identifier\n+     *\n+     * @return The following response status codes will be returned from this\n+     *         operation:<br>\n+     *         OK(200) - Contains the Project iteration config xml. <br>\n+     *         NOT FOUND(404) - response, if a Project iteration could not be\n+     *         found for the given parameters.<br>\n+     *         INTERNAL SERVER ERROR(500) - If there is an unexpected error in\n+     *         the server while performing this operation.\n+     */\n+    @GET\n+    @Path(\"/config\")\n+    @Produces({ MediaType.APPLICATION_XML })\n+    public Response sampleConfiguration(\n+        @PathParam(\"projectSlug\") String projectSlug,\n+        @PathParam(\"versionSlug\") String versionSlug);","path":"zanata-common-api/src/main/java/org/zanata/rest/service/ProjectVersionResource.java","position":135,"original_position":135,"commit_id":"a4b6d0d6e6c131234cf4be888fa5262bf1f9d600","original_commit_id":"a4b6d0d6e6c131234cf4be888fa5262bf1f9d600","user":{"login":"huangp","id":1005842,"avatar_url":"https://avatars.githubusercontent.com/u/1005842?v=3","gravatar_id":"","url":"https://api.github.com/users/huangp","html_url":"https://github.com/huangp","followers_url":"https://api.github.com/users/huangp/followers","following_url":"https://api.github.com/users/huangp/following{/other_user}","gists_url":"https://api.github.com/users/huangp/gists{/gist_id}","starred_url":"https://api.github.com/users/huangp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangp/subscriptions","organizations_url":"https://api.github.com/users/huangp/orgs","repos_url":"https://api.github.com/users/huangp/repos","events_url":"https://api.github.com/users/huangp/events{/privacy}","received_events_url":"https://api.github.com/users/huangp/received_events","type":"User","site_admin":false},"body":"Where will these two path param fit into? path has only /config","created_at":"2015-11-17T02:08:34Z","updated_at":"2015-11-17T02:08:34Z","html_url":"https://github.com/zanata/zanata-api/pull/38#discussion_r45014282","pull_request_url":"https://api.github.com/repos/zanata/zanata-api/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/zanata/zanata-api/pulls/comments/45014282"},"html":{"href":"https://github.com/zanata/zanata-api/pull/38#discussion_r45014282"},"pull_request":{"href":"https://api.github.com/repos/zanata/zanata-api/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/zanata/zanata-api/pulls/38","id":50711267,"html_url":"https://github.com/zanata/zanata-api/pull/38","diff_url":"https://github.com/zanata/zanata-api/pull/38.diff","patch_url":"https://github.com/zanata/zanata-api/pull/38.patch","issue_url":"https://api.github.com/repos/zanata/zanata-api/issues/38","number":38,"state":"open","locked":false,"title":"feat(project version api):new project version api","user":{"login":"aeng","id":766762,"avatar_url":"https://avatars.githubusercontent.com/u/766762?v=3","gravatar_id":"","url":"https://api.github.com/users/aeng","html_url":"https://github.com/aeng","followers_url":"https://api.github.com/users/aeng/followers","following_url":"https://api.github.com/users/aeng/following{/other_user}","gists_url":"https://api.github.com/users/aeng/gists{/gist_id}","starred_url":"https://api.github.com/users/aeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeng/subscriptions","organizations_url":"https://api.github.com/users/aeng/orgs","repos_url":"https://api.github.com/users/aeng/repos","events_url":"https://api.github.com/users/aeng/events{/privacy}","received_events_url":"https://api.github.com/users/aeng/received_events","type":"User","site_admin":false},"body":"New project version API resource. Migrated from zanata-server for editor.","created_at":"2015-11-14T01:08:49Z","updated_at":"2015-11-17T02:08:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"637cbe0cb7acf065ac73a2c88af86bd903a36393","assignee":{"login":"huangp","id":1005842,"avatar_url":"https://avatars.githubusercontent.com/u/1005842?v=3","gravatar_id":"","url":"https://api.github.com/users/huangp","html_url":"https://github.com/huangp","followers_url":"https://api.github.com/users/huangp/followers","following_url":"https://api.github.com/users/huangp/following{/other_user}","gists_url":"https://api.github.com/users/huangp/gists{/gist_id}","starred_url":"https://api.github.com/users/huangp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huangp/subscriptions","organizations_url":"https://api.github.com/users/huangp/orgs","repos_url":"https://api.github.com/users/huangp/repos","events_url":"https://api.github.com/users/huangp/events{/privacy}","received_events_url":"https://api.github.com/users/huangp/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/zanata/zanata-api/pulls/38/commits","review_comments_url":"https://api.github.com/repos/zanata/zanata-api/pulls/38/comments","review_comment_url":"https://api.github.com/repos/zanata/zanata-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zanata/zanata-api/issues/38/comments","statuses_url":"https://api.github.com/repos/zanata/zanata-api/statuses/a4b6d0d6e6c131234cf4be888fa5262bf1f9d600","head":{"label":"zanata:new-project-version-resource","ref":"new-project-version-resource","sha":"a4b6d0d6e6c131234cf4be888fa5262bf1f9d600","user":{"login":"zanata","id":637455,"avatar_url":"https://avatars.githubusercontent.com/u/637455?v=3","gravatar_id":"","url":"https://api.github.com/users/zanata","html_url":"https://github.com/zanata","followers_url":"https://api.github.com/users/zanata/followers","following_url":"https://api.github.com/users/zanata/following{/other_user}","gists_url":"https://api.github.com/users/zanata/gists{/gist_id}","starred_url":"https://api.github.com/users/zanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanata/subscriptions","organizations_url":"https://api.github.com/users/zanata/orgs","repos_url":"https://api.github.com/users/zanata/repos","events_url":"https://api.github.com/users/zanata/events{/privacy}","received_events_url":"https://api.github.com/users/zanata/received_events","type":"Organization","site_admin":false},"repo":{"id":4110672,"name":"zanata-api","full_name":"zanata/zanata-api","owner":{"login":"zanata","id":637455,"avatar_url":"https://avatars.githubusercontent.com/u/637455?v=3","gravatar_id":"","url":"https://api.github.com/users/zanata","html_url":"https://github.com/zanata","followers_url":"https://api.github.com/users/zanata/followers","following_url":"https://api.github.com/users/zanata/following{/other_user}","gists_url":"https://api.github.com/users/zanata/gists{/gist_id}","starred_url":"https://api.github.com/users/zanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanata/subscriptions","organizations_url":"https://api.github.com/users/zanata/orgs","repos_url":"https://api.github.com/users/zanata/repos","events_url":"https://api.github.com/users/zanata/events{/privacy}","received_events_url":"https://api.github.com/users/zanata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zanata/zanata-api","description":"Zanata API modules","fork":false,"url":"https://api.github.com/repos/zanata/zanata-api","forks_url":"https://api.github.com/repos/zanata/zanata-api/forks","keys_url":"https://api.github.com/repos/zanata/zanata-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zanata/zanata-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zanata/zanata-api/teams","hooks_url":"https://api.github.com/repos/zanata/zanata-api/hooks","issue_events_url":"https://api.github.com/repos/zanata/zanata-api/issues/events{/number}","events_url":"https://api.github.com/repos/zanata/zanata-api/events","assignees_url":"https://api.github.com/repos/zanata/zanata-api/assignees{/user}","branches_url":"https://api.github.com/repos/zanata/zanata-api/branches{/branch}","tags_url":"https://api.github.com/repos/zanata/zanata-api/tags","blobs_url":"https://api.github.com/repos/zanata/zanata-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zanata/zanata-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zanata/zanata-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/zanata/zanata-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zanata/zanata-api/statuses/{sha}","languages_url":"https://api.github.com/repos/zanata/zanata-api/languages","stargazers_url":"https://api.github.com/repos/zanata/zanata-api/stargazers","contributors_url":"https://api.github.com/repos/zanata/zanata-api/contributors","subscribers_url":"https://api.github.com/repos/zanata/zanata-api/subscribers","subscription_url":"https://api.github.com/repos/zanata/zanata-api/subscription","commits_url":"https://api.github.com/repos/zanata/zanata-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/zanata/zanata-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/zanata/zanata-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/zanata/zanata-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/zanata/zanata-api/contents/{+path}","compare_url":"https://api.github.com/repos/zanata/zanata-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zanata/zanata-api/merges","archive_url":"https://api.github.com/repos/zanata/zanata-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zanata/zanata-api/downloads","issues_url":"https://api.github.com/repos/zanata/zanata-api/issues{/number}","pulls_url":"https://api.github.com/repos/zanata/zanata-api/pulls{/number}","milestones_url":"https://api.github.com/repos/zanata/zanata-api/milestones{/number}","notifications_url":"https://api.github.com/repos/zanata/zanata-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zanata/zanata-api/labels{/name}","releases_url":"https://api.github.com/repos/zanata/zanata-api/releases{/id}","created_at":"2012-04-23T07:44:31Z","updated_at":"2015-02-25T02:24:30Z","pushed_at":"2015-11-17T00:52:05Z","git_url":"git://github.com/zanata/zanata-api.git","ssh_url":"git@github.com:zanata/zanata-api.git","clone_url":"https://github.com/zanata/zanata-api.git","svn_url":"https://github.com/zanata/zanata-api","homepage":null,"size":744,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"zanata:integration/master","ref":"integration/master","sha":"59d898cd9f15d5484af5c9675ce984b0dc7f93e9","user":{"login":"zanata","id":637455,"avatar_url":"https://avatars.githubusercontent.com/u/637455?v=3","gravatar_id":"","url":"https://api.github.com/users/zanata","html_url":"https://github.com/zanata","followers_url":"https://api.github.com/users/zanata/followers","following_url":"https://api.github.com/users/zanata/following{/other_user}","gists_url":"https://api.github.com/users/zanata/gists{/gist_id}","starred_url":"https://api.github.com/users/zanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanata/subscriptions","organizations_url":"https://api.github.com/users/zanata/orgs","repos_url":"https://api.github.com/users/zanata/repos","events_url":"https://api.github.com/users/zanata/events{/privacy}","received_events_url":"https://api.github.com/users/zanata/received_events","type":"Organization","site_admin":false},"repo":{"id":4110672,"name":"zanata-api","full_name":"zanata/zanata-api","owner":{"login":"zanata","id":637455,"avatar_url":"https://avatars.githubusercontent.com/u/637455?v=3","gravatar_id":"","url":"https://api.github.com/users/zanata","html_url":"https://github.com/zanata","followers_url":"https://api.github.com/users/zanata/followers","following_url":"https://api.github.com/users/zanata/following{/other_user}","gists_url":"https://api.github.com/users/zanata/gists{/gist_id}","starred_url":"https://api.github.com/users/zanata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanata/subscriptions","organizations_url":"https://api.github.com/users/zanata/orgs","repos_url":"https://api.github.com/users/zanata/repos","events_url":"https://api.github.com/users/zanata/events{/privacy}","received_events_url":"https://api.github.com/users/zanata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zanata/zanata-api","description":"Zanata API modules","fork":false,"url":"https://api.github.com/repos/zanata/zanata-api","forks_url":"https://api.github.com/repos/zanata/zanata-api/forks","keys_url":"https://api.github.com/repos/zanata/zanata-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zanata/zanata-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zanata/zanata-api/teams","hooks_url":"https://api.github.com/repos/zanata/zanata-api/hooks","issue_events_url":"https://api.github.com/repos/zanata/zanata-api/issues/events{/number}","events_url":"https://api.github.com/repos/zanata/zanata-api/events","assignees_url":"https://api.github.com/repos/zanata/zanata-api/assignees{/user}","branches_url":"https://api.github.com/repos/zanata/zanata-api/branches{/branch}","tags_url":"https://api.github.com/repos/zanata/zanata-api/tags","blobs_url":"https://api.github.com/repos/zanata/zanata-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zanata/zanata-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zanata/zanata-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/zanata/zanata-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zanata/zanata-api/statuses/{sha}","languages_url":"https://api.github.com/repos/zanata/zanata-api/languages","stargazers_url":"https://api.github.com/repos/zanata/zanata-api/stargazers","contributors_url":"https://api.github.com/repos/zanata/zanata-api/contributors","subscribers_url":"https://api.github.com/repos/zanata/zanata-api/subscribers","subscription_url":"https://api.github.com/repos/zanata/zanata-api/subscription","commits_url":"https://api.github.com/repos/zanata/zanata-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/zanata/zanata-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/zanata/zanata-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/zanata/zanata-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/zanata/zanata-api/contents/{+path}","compare_url":"https://api.github.com/repos/zanata/zanata-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zanata/zanata-api/merges","archive_url":"https://api.github.com/repos/zanata/zanata-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zanata/zanata-api/downloads","issues_url":"https://api.github.com/repos/zanata/zanata-api/issues{/number}","pulls_url":"https://api.github.com/repos/zanata/zanata-api/pulls{/number}","milestones_url":"https://api.github.com/repos/zanata/zanata-api/milestones{/number}","notifications_url":"https://api.github.com/repos/zanata/zanata-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zanata/zanata-api/labels{/name}","releases_url":"https://api.github.com/repos/zanata/zanata-api/releases{/id}","created_at":"2012-04-23T07:44:31Z","updated_at":"2015-02-25T02:24:30Z","pushed_at":"2015-11-17T00:52:05Z","git_url":"git://github.com/zanata/zanata-api.git","ssh_url":"git@github.com:zanata/zanata-api.git","clone_url":"https://github.com/zanata/zanata-api.git","svn_url":"https://github.com/zanata/zanata-api","homepage":null,"size":744,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zanata/zanata-api/pulls/38"},"html":{"href":"https://github.com/zanata/zanata-api/pull/38"},"issue":{"href":"https://api.github.com/repos/zanata/zanata-api/issues/38"},"comments":{"href":"https://api.github.com/repos/zanata/zanata-api/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/zanata/zanata-api/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/zanata/zanata-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zanata/zanata-api/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/zanata/zanata-api/statuses/a4b6d0d6e6c131234cf4be888fa5262bf1f9d600"}}}}