{"action":"created","comment":{"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments/65529895","id":65529895,"diff_hunk":"@@ -0,0 +1,38 @@\n+package uk.gov.justice.services.clients.rest.generator.strategy;\n+\n+import static java.lang.Boolean.parseBoolean;\n+\n+import uk.gov.justice.raml.core.GeneratorConfig;\n+\n+import java.util.Map;\n+\n+public final class ClientGenerationStrategyFactory {\n+\n+    private ClientGenerationStrategyFactory() {\n+    }\n+\n+    /**\n+     * Factory for creating a {@link ClientGenerationStrategy} from the GeneratorConfig properties\n+     * Returns either a {@link ClientActionMappingGeneration} or {@link ClientMediaTypeGeneration}\n+     * strategy. This is set using the actionMapping generator property.\n+     *\n+     * actionMapping set to true returns - {@link ClientActionMappingGeneration}\n+     *\n+     * actionMapping set to false or not set returns -  {@link ClientMediaTypeGeneration}\n+     *\n+     * @param generatorConfig the generator configuration to check\n+     * @return the selected ClientGenerationStrategy\n+     */\n+    public static ClientGenerationStrategy createFrom(final GeneratorConfig generatorConfig) {\n+        if (isActionMapping(generatorConfig)) {\n+            return new ClientActionMappingGeneration();\n+        }\n+        return new ClientMediaTypeGeneration();\n+    }\n+\n+    private static boolean isActionMapping(final GeneratorConfig configuration) {\n+        final Map<String, String> generatorProperties = configuration.getGeneratorProperties();","path":"clients/rest-client-generator/src/main/java/uk/gov/justice/services/clients/rest/generator/strategy/ClientGenerationStrategyFactory.java","position":34,"original_position":34,"commit_id":"a10aa49c842507b0ed83a561984c0d8ad8430423","original_commit_id":"a10aa49c842507b0ed83a561984c0d8ad8430423","user":{"login":"matt-rich","id":17124628,"avatar_url":"https://avatars.githubusercontent.com/u/17124628?v=3","gravatar_id":"","url":"https://api.github.com/users/matt-rich","html_url":"https://github.com/matt-rich","followers_url":"https://api.github.com/users/matt-rich/followers","following_url":"https://api.github.com/users/matt-rich/following{/other_user}","gists_url":"https://api.github.com/users/matt-rich/gists{/gist_id}","starred_url":"https://api.github.com/users/matt-rich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matt-rich/subscriptions","organizations_url":"https://api.github.com/users/matt-rich/orgs","repos_url":"https://api.github.com/users/matt-rich/repos","events_url":"https://api.github.com/users/matt-rich/events{/privacy}","received_events_url":"https://api.github.com/users/matt-rich/received_events","type":"User","site_admin":false},"body":"is this duplicated code?","created_at":"2016-06-02T12:29:56Z","updated_at":"2016-06-02T12:29:56Z","html_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/84#discussion_r65529895","pull_request_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/84","_links":{"self":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments/65529895"},"html":{"href":"https://github.com/CJSCommonPlatform/microservice_framework/pull/84#discussion_r65529895"},"pull_request":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/84"}}},"pull_request":{"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/84","id":72161384,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/84","diff_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/84.diff","patch_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/84.patch","issue_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/84","number":84,"state":"open","locked":false,"title":"Implement action mapping","user":{"login":"mapingo","id":11291215,"avatar_url":"https://avatars.githubusercontent.com/u/11291215?v=3","gravatar_id":"","url":"https://api.github.com/users/mapingo","html_url":"https://github.com/mapingo","followers_url":"https://api.github.com/users/mapingo/followers","following_url":"https://api.github.com/users/mapingo/following{/other_user}","gists_url":"https://api.github.com/users/mapingo/gists{/gist_id}","starred_url":"https://api.github.com/users/mapingo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapingo/subscriptions","organizations_url":"https://api.github.com/users/mapingo/orgs","repos_url":"https://api.github.com/users/mapingo/repos","events_url":"https://api.github.com/users/mapingo/events{/privacy}","received_events_url":"https://api.github.com/users/mapingo/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-01T11:03:43Z","updated_at":"2016-06-02T12:29:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f18a7c19f6df9f8191037d1d9f372aa4f96f466","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/84/commits","review_comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/84/comments","review_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/84/comments","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/a10aa49c842507b0ed83a561984c0d8ad8430423","head":{"label":"CJSCommonPlatform:tie-handlers-actions","ref":"tie-handlers-actions","sha":"a10aa49c842507b0ed83a561984c0d8ad8430423","user":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":51292541,"name":"microservice_framework","full_name":"CJSCommonPlatform/microservice_framework","owner":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework","description":"","fork":false,"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework","forks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/forks","keys_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/teams","hooks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/hooks","issue_events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/events{/number}","events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/events","assignees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/assignees{/user}","branches_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/branches{/branch}","tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/tags","blobs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/languages","stargazers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/stargazers","contributors_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contributors","subscribers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscribers","subscription_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscription","commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contents/{+path}","compare_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/merges","archive_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/downloads","issues_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues{/number}","pulls_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/labels{/name}","releases_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/releases{/id}","deployments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/deployments","created_at":"2016-02-08T10:51:31Z","updated_at":"2016-05-13T10:36:46Z","pushed_at":"2016-06-02T12:26:35Z","git_url":"git://github.com/CJSCommonPlatform/microservice_framework.git","ssh_url":"git@github.com:CJSCommonPlatform/microservice_framework.git","clone_url":"https://github.com/CJSCommonPlatform/microservice_framework.git","svn_url":"https://github.com/CJSCommonPlatform/microservice_framework","homepage":null,"size":1456,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":5,"default_branch":"master"}},"base":{"label":"CJSCommonPlatform:master","ref":"master","sha":"fc3a62347685468e26be60ae4898475a4912135c","user":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":51292541,"name":"microservice_framework","full_name":"CJSCommonPlatform/microservice_framework","owner":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars.githubusercontent.com/u/16131145?v=3","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework","description":"","fork":false,"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework","forks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/forks","keys_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/teams","hooks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/hooks","issue_events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/events{/number}","events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/events","assignees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/assignees{/user}","branches_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/branches{/branch}","tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/tags","blobs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/languages","stargazers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/stargazers","contributors_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contributors","subscribers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscribers","subscription_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscription","commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contents/{+path}","compare_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/merges","archive_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/downloads","issues_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues{/number}","pulls_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/labels{/name}","releases_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/releases{/id}","deployments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/deployments","created_at":"2016-02-08T10:51:31Z","updated_at":"2016-05-13T10:36:46Z","pushed_at":"2016-06-02T12:26:35Z","git_url":"git://github.com/CJSCommonPlatform/microservice_framework.git","ssh_url":"git@github.com:CJSCommonPlatform/microservice_framework.git","clone_url":"https://github.com/CJSCommonPlatform/microservice_framework.git","svn_url":"https://github.com/CJSCommonPlatform/microservice_framework","homepage":null,"size":1456,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/84"},"html":{"href":"https://github.com/CJSCommonPlatform/microservice_framework/pull/84"},"issue":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/84"},"comments":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/84/comments"},"review_comments":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/84/comments"},"review_comment":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/84/commits"},"statuses":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/a10aa49c842507b0ed83a561984c0d8ad8430423"}}}}
{"actor":{"display_login":"matt-rich"}}