{"action":"created","comment":{"url":"https://api.github.com/repos/connexta/admin-console-beta/pulls/comments/102809722","pull_request_review_id":23578196,"id":102809722,"diff_hunk":"@@ -0,0 +1,36 @@\n+package org.codice.ddf.admin.api.handler;\n+\n+import java.util.Arrays;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+import com.google.common.collect.ImmutableMap;\n+\n+public class MessageBuilder {\n+\n+    private Map<String, String> successTypes;\n+    private Map<String, String> failureTypes;\n+    private Map<String, String> warningTypes;\n+    private Map<String, String> allTypes;\n+\n+    public MessageBuilder(Map<String, String> successTypes, Map<String, String> failureTypes, Map<String, String> warningTypes){\n+        this.successTypes = ImmutableMap.<String, String>builder().putAll(successTypes).build();\n+        this.failureTypes = ImmutableMap.<String, String>builder().putAll(failureTypes).build();\n+        this.warningTypes = ImmutableMap.<String, String>builder().putAll(warningTypes).build();\n+        this.allTypes = ImmutableMap.<String, String>builder().putAll(successTypes).putAll(failureTypes).putAll(warningTypes).build();\n+    }\n+\n+    public Map<String, String> getDescriptions(String... subtypeKeys) {\n+        Map<String, String> descriptions = new HashMap<>();","path":"api/src/main/java/org/codice/ddf/admin/api/handler/MessageBuilder.java","position":37,"original_position":24,"commit_id":"81cddc2dc28d942fc7c5a2e39c38aa609f3bcef8","original_commit_id":"2aa95adce6eba7a148a55b329cdeb63b171d716d","user":{"login":"adimka","id":10200041,"avatar_url":"https://avatars.githubusercontent.com/u/10200041?v=3","gravatar_id":"","url":"https://api.github.com/users/adimka","html_url":"https://github.com/adimka","followers_url":"https://api.github.com/users/adimka/followers","following_url":"https://api.github.com/users/adimka/following{/other_user}","gists_url":"https://api.github.com/users/adimka/gists{/gist_id}","starred_url":"https://api.github.com/users/adimka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adimka/subscriptions","organizations_url":"https://api.github.com/users/adimka/orgs","repos_url":"https://api.github.com/users/adimka/repos","events_url":"https://api.github.com/users/adimka/events{/privacy}","received_events_url":"https://api.github.com/users/adimka/received_events","type":"User","site_admin":false},"body":"I had an issue with this simplification blowing up. I'm going to leave it as is for now. I'm not sure if it's a issue with Function.identity or what, but it broke the entire deployment. I didn't figure out what was going on after about 45 minutes and decided it wasn't worth the time at the moment.","created_at":"2017-02-23T20:26:21Z","updated_at":"2017-02-23T20:26:21Z","html_url":"https://github.com/connexta/admin-console-beta/pull/12#discussion_r102809722","pull_request_url":"https://api.github.com/repos/connexta/admin-console-beta/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/connexta/admin-console-beta/pulls/comments/102809722"},"html":{"href":"https://github.com/connexta/admin-console-beta/pull/12#discussion_r102809722"},"pull_request":{"href":"https://api.github.com/repos/connexta/admin-console-beta/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/connexta/admin-console-beta/pulls/12","id":107069005,"html_url":"https://github.com/connexta/admin-console-beta/pull/12","diff_url":"https://github.com/connexta/admin-console-beta/pull/12.diff","patch_url":"https://github.com/connexta/admin-console-beta/pull/12.patch","issue_url":"https://api.github.com/repos/connexta/admin-console-beta/issues/12","number":12,"state":"open","locked":false,"title":"DDF-2773 Collapse discover source and manual URL probes into one, extract common source handler code","user":{"login":"adimka","id":10200041,"avatar_url":"https://avatars.githubusercontent.com/u/10200041?v=3","gravatar_id":"","url":"https://api.github.com/users/adimka","html_url":"https://github.com/adimka","followers_url":"https://api.github.com/users/adimka/followers","following_url":"https://api.github.com/users/adimka/following{/other_user}","gists_url":"https://api.github.com/users/adimka/gists{/gist_id}","starred_url":"https://api.github.com/users/adimka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adimka/subscriptions","organizations_url":"https://api.github.com/users/adimka/orgs","repos_url":"https://api.github.com/users/adimka/repos","events_url":"https://api.github.com/users/adimka/events{/privacy}","received_events_url":"https://api.github.com/users/adimka/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nReduces code duplication significantly among source Probe methods.\r\nMuch of the behavior of each handler has been extracted into Utility classes that provide safe closing of resources and general purpose HTTP requests for sources.\r\n\r\n#### Who is reviewing it (please choose AT LEAST two reviewers that need to approve the PR before it can get merged)?\r\n@tbatie @peterhuffer @coyotesqrl \r\n\r\n#### How should this be tested? (List steps with links to updated documentation)\r\nConfirm ability to configure each source type via discovery and via manual URL entry.\r\n\r\n#### Any background context you want to provide?\r\nThis should be the last MAJOR change to the structure of sources - there may be undiscovered quirks to behavior with some of these changes. We have tickets to check on known bugs, and if we run across something new, we should create tickets accordingly.\r\n\r\n#### What are the relevant tickets?\r\n[2773](https://codice.atlassian.net/browse/)\r\n\r\n#### Screenshots (if appropriate)\r\n\r\n#### Checklist:\r\n- [ ] Documentation Updated\r\n- [ ] Update / Add Unit Tests\r\n- [ ] Update / Add Integration Tests\r\n","created_at":"2017-02-20T20:04:31Z","updated_at":"2017-02-23T20:26:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aca29b15c3336d4176589c542ed6028fba6cb7b5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/connexta/admin-console-beta/pulls/12/commits","review_comments_url":"https://api.github.com/repos/connexta/admin-console-beta/pulls/12/comments","review_comment_url":"https://api.github.com/repos/connexta/admin-console-beta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/connexta/admin-console-beta/issues/12/comments","statuses_url":"https://api.github.com/repos/connexta/admin-console-beta/statuses/81cddc2dc28d942fc7c5a2e39c38aa609f3bcef8","head":{"label":"adimka:sources-refactor","ref":"sources-refactor","sha":"81cddc2dc28d942fc7c5a2e39c38aa609f3bcef8","user":{"login":"adimka","id":10200041,"avatar_url":"https://avatars.githubusercontent.com/u/10200041?v=3","gravatar_id":"","url":"https://api.github.com/users/adimka","html_url":"https://github.com/adimka","followers_url":"https://api.github.com/users/adimka/followers","following_url":"https://api.github.com/users/adimka/following{/other_user}","gists_url":"https://api.github.com/users/adimka/gists{/gist_id}","starred_url":"https://api.github.com/users/adimka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adimka/subscriptions","organizations_url":"https://api.github.com/users/adimka/orgs","repos_url":"https://api.github.com/users/adimka/repos","events_url":"https://api.github.com/users/adimka/events{/privacy}","received_events_url":"https://api.github.com/users/adimka/received_events","type":"User","site_admin":false},"repo":{"id":82594042,"name":"admin-console-beta","full_name":"adimka/admin-console-beta","owner":{"login":"adimka","id":10200041,"avatar_url":"https://avatars.githubusercontent.com/u/10200041?v=3","gravatar_id":"","url":"https://api.github.com/users/adimka","html_url":"https://github.com/adimka","followers_url":"https://api.github.com/users/adimka/followers","following_url":"https://api.github.com/users/adimka/following{/other_user}","gists_url":"https://api.github.com/users/adimka/gists{/gist_id}","starred_url":"https://api.github.com/users/adimka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adimka/subscriptions","organizations_url":"https://api.github.com/users/adimka/orgs","repos_url":"https://api.github.com/users/adimka/repos","events_url":"https://api.github.com/users/adimka/events{/privacy}","received_events_url":"https://api.github.com/users/adimka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/adimka/admin-console-beta","description":"Admin Console Beta application","fork":true,"url":"https://api.github.com/repos/adimka/admin-console-beta","forks_url":"https://api.github.com/repos/adimka/admin-console-beta/forks","keys_url":"https://api.github.com/repos/adimka/admin-console-beta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adimka/admin-console-beta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adimka/admin-console-beta/teams","hooks_url":"https://api.github.com/repos/adimka/admin-console-beta/hooks","issue_events_url":"https://api.github.com/repos/adimka/admin-console-beta/issues/events{/number}","events_url":"https://api.github.com/repos/adimka/admin-console-beta/events","assignees_url":"https://api.github.com/repos/adimka/admin-console-beta/assignees{/user}","branches_url":"https://api.github.com/repos/adimka/admin-console-beta/branches{/branch}","tags_url":"https://api.github.com/repos/adimka/admin-console-beta/tags","blobs_url":"https://api.github.com/repos/adimka/admin-console-beta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adimka/admin-console-beta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adimka/admin-console-beta/git/refs{/sha}","trees_url":"https://api.github.com/repos/adimka/admin-console-beta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adimka/admin-console-beta/statuses/{sha}","languages_url":"https://api.github.com/repos/adimka/admin-console-beta/languages","stargazers_url":"https://api.github.com/repos/adimka/admin-console-beta/stargazers","contributors_url":"https://api.github.com/repos/adimka/admin-console-beta/contributors","subscribers_url":"https://api.github.com/repos/adimka/admin-console-beta/subscribers","subscription_url":"https://api.github.com/repos/adimka/admin-console-beta/subscription","commits_url":"https://api.github.com/repos/adimka/admin-console-beta/commits{/sha}","git_commits_url":"https://api.github.com/repos/adimka/admin-console-beta/git/commits{/sha}","comments_url":"https://api.github.com/repos/adimka/admin-console-beta/comments{/number}","issue_comment_url":"https://api.github.com/repos/adimka/admin-console-beta/issues/comments{/number}","contents_url":"https://api.github.com/repos/adimka/admin-console-beta/contents/{+path}","compare_url":"https://api.github.com/repos/adimka/admin-console-beta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adimka/admin-console-beta/merges","archive_url":"https://api.github.com/repos/adimka/admin-console-beta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adimka/admin-console-beta/downloads","issues_url":"https://api.github.com/repos/adimka/admin-console-beta/issues{/number}","pulls_url":"https://api.github.com/repos/adimka/admin-console-beta/pulls{/number}","milestones_url":"https://api.github.com/repos/adimka/admin-console-beta/milestones{/number}","notifications_url":"https://api.github.com/repos/adimka/admin-console-beta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adimka/admin-console-beta/labels{/name}","releases_url":"https://api.github.com/repos/adimka/admin-console-beta/releases{/id}","deployments_url":"https://api.github.com/repos/adimka/admin-console-beta/deployments","created_at":"2017-02-20T19:26:21Z","updated_at":"2017-02-20T19:26:22Z","pushed_at":"2017-02-23T20:20:53Z","git_url":"git://github.com/adimka/admin-console-beta.git","ssh_url":"git@github.com:adimka/admin-console-beta.git","clone_url":"https://github.com/adimka/admin-console-beta.git","svn_url":"https://github.com/adimka/admin-console-beta","homepage":"","size":1022,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"connexta:master","ref":"master","sha":"2bd4904afa2834417c12484d2b76529a6db0fc3e","user":{"login":"connexta","id":6706726,"avatar_url":"https://avatars.githubusercontent.com/u/6706726?v=3","gravatar_id":"","url":"https://api.github.com/users/connexta","html_url":"https://github.com/connexta","followers_url":"https://api.github.com/users/connexta/followers","following_url":"https://api.github.com/users/connexta/following{/other_user}","gists_url":"https://api.github.com/users/connexta/gists{/gist_id}","starred_url":"https://api.github.com/users/connexta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connexta/subscriptions","organizations_url":"https://api.github.com/users/connexta/orgs","repos_url":"https://api.github.com/users/connexta/repos","events_url":"https://api.github.com/users/connexta/events{/privacy}","received_events_url":"https://api.github.com/users/connexta/received_events","type":"Organization","site_admin":false},"repo":{"id":80874891,"name":"admin-console-beta","full_name":"connexta/admin-console-beta","owner":{"login":"connexta","id":6706726,"avatar_url":"https://avatars.githubusercontent.com/u/6706726?v=3","gravatar_id":"","url":"https://api.github.com/users/connexta","html_url":"https://github.com/connexta","followers_url":"https://api.github.com/users/connexta/followers","following_url":"https://api.github.com/users/connexta/following{/other_user}","gists_url":"https://api.github.com/users/connexta/gists{/gist_id}","starred_url":"https://api.github.com/users/connexta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connexta/subscriptions","organizations_url":"https://api.github.com/users/connexta/orgs","repos_url":"https://api.github.com/users/connexta/repos","events_url":"https://api.github.com/users/connexta/events{/privacy}","received_events_url":"https://api.github.com/users/connexta/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/connexta/admin-console-beta","description":"Admin Console Beta application","fork":false,"url":"https://api.github.com/repos/connexta/admin-console-beta","forks_url":"https://api.github.com/repos/connexta/admin-console-beta/forks","keys_url":"https://api.github.com/repos/connexta/admin-console-beta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/connexta/admin-console-beta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/connexta/admin-console-beta/teams","hooks_url":"https://api.github.com/repos/connexta/admin-console-beta/hooks","issue_events_url":"https://api.github.com/repos/connexta/admin-console-beta/issues/events{/number}","events_url":"https://api.github.com/repos/connexta/admin-console-beta/events","assignees_url":"https://api.github.com/repos/connexta/admin-console-beta/assignees{/user}","branches_url":"https://api.github.com/repos/connexta/admin-console-beta/branches{/branch}","tags_url":"https://api.github.com/repos/connexta/admin-console-beta/tags","blobs_url":"https://api.github.com/repos/connexta/admin-console-beta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/connexta/admin-console-beta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/connexta/admin-console-beta/git/refs{/sha}","trees_url":"https://api.github.com/repos/connexta/admin-console-beta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/connexta/admin-console-beta/statuses/{sha}","languages_url":"https://api.github.com/repos/connexta/admin-console-beta/languages","stargazers_url":"https://api.github.com/repos/connexta/admin-console-beta/stargazers","contributors_url":"https://api.github.com/repos/connexta/admin-console-beta/contributors","subscribers_url":"https://api.github.com/repos/connexta/admin-console-beta/subscribers","subscription_url":"https://api.github.com/repos/connexta/admin-console-beta/subscription","commits_url":"https://api.github.com/repos/connexta/admin-console-beta/commits{/sha}","git_commits_url":"https://api.github.com/repos/connexta/admin-console-beta/git/commits{/sha}","comments_url":"https://api.github.com/repos/connexta/admin-console-beta/comments{/number}","issue_comment_url":"https://api.github.com/repos/connexta/admin-console-beta/issues/comments{/number}","contents_url":"https://api.github.com/repos/connexta/admin-console-beta/contents/{+path}","compare_url":"https://api.github.com/repos/connexta/admin-console-beta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/connexta/admin-console-beta/merges","archive_url":"https://api.github.com/repos/connexta/admin-console-beta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/connexta/admin-console-beta/downloads","issues_url":"https://api.github.com/repos/connexta/admin-console-beta/issues{/number}","pulls_url":"https://api.github.com/repos/connexta/admin-console-beta/pulls{/number}","milestones_url":"https://api.github.com/repos/connexta/admin-console-beta/milestones{/number}","notifications_url":"https://api.github.com/repos/connexta/admin-console-beta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/connexta/admin-console-beta/labels{/name}","releases_url":"https://api.github.com/repos/connexta/admin-console-beta/releases{/id}","deployments_url":"https://api.github.com/repos/connexta/admin-console-beta/deployments","created_at":"2017-02-03T22:29:48Z","updated_at":"2017-02-18T02:14:59Z","pushed_at":"2017-02-23T20:20:53Z","git_url":"git://github.com/connexta/admin-console-beta.git","ssh_url":"git@github.com:connexta/admin-console-beta.git","clone_url":"https://github.com/connexta/admin-console-beta.git","svn_url":"https://github.com/connexta/admin-console-beta","homepage":"","size":973,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/connexta/admin-console-beta/pulls/12"},"html":{"href":"https://github.com/connexta/admin-console-beta/pull/12"},"issue":{"href":"https://api.github.com/repos/connexta/admin-console-beta/issues/12"},"comments":{"href":"https://api.github.com/repos/connexta/admin-console-beta/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/connexta/admin-console-beta/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/connexta/admin-console-beta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/connexta/admin-console-beta/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/connexta/admin-console-beta/statuses/81cddc2dc28d942fc7c5a2e39c38aa609f3bcef8"}}}}
{"actor":{"display_login":"adimka"}}