{"action":"created","comment":{"url":"https://api.github.com/repos/codice/alliance/pulls/comments/56162575","id":56162575,"diff_hunk":"@@ -0,0 +1,143 @@\n+/**\n+ * Copyright (c) Codice Foundation\n+ * <p>\n+ * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser\n+ * General Public License as published by the Free Software Foundation, either version 3 of the\n+ * License, or any later version.\n+ * <p>\n+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without\n+ * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details. A copy of the GNU Lesser General Public License\n+ * is distributed along with this program and can be found at\n+ * <http://www.gnu.org/licenses/lgpl.html>.\n+ */\n+package org.codice.alliance.nsili.endpoint.managers;\n+\n+import java.nio.charset.Charset;\n+\n+import org.codice.alliance.nsili.common.GIAS.CatalogMgrPOA;\n+import org.codice.alliance.nsili.common.GIAS.HitCountRequest;\n+import org.codice.alliance.nsili.common.GIAS.HitCountRequestHelper;\n+import org.codice.alliance.nsili.common.GIAS.Library;\n+import org.codice.alliance.nsili.common.GIAS.Query;\n+import org.codice.alliance.nsili.common.GIAS.Request;\n+import org.codice.alliance.nsili.common.GIAS.SortAttribute;\n+import org.codice.alliance.nsili.common.GIAS.SubmitQueryRequest;\n+import org.codice.alliance.nsili.common.GIAS.SubmitQueryRequestHelper;\n+import org.codice.alliance.nsili.common.UCO.InvalidInputParameter;\n+import org.codice.alliance.nsili.common.UCO.NameValue;\n+import org.codice.alliance.nsili.common.UCO.ProcessingFault;\n+import org.codice.alliance.nsili.common.UCO.SystemFault;\n+import org.codice.alliance.nsili.endpoint.requests.HitCountRequestImpl;\n+import org.codice.alliance.nsili.endpoint.requests.SubmitQueryRequestImpl;\n+import org.omg.CORBA.NO_IMPLEMENT;\n+import org.omg.PortableServer.POA;\n+import org.omg.PortableServer.POAPackage.ObjectAlreadyActive;\n+import org.omg.PortableServer.POAPackage.ServantAlreadyActive;\n+import org.omg.PortableServer.POAPackage.WrongPolicy;\n+\n+public class CatalogMgrImpl extends CatalogMgrPOA {\n+\n+    private static final String ENCODING = \"UTF-8\";\n+\n+    private static final int DEFAULT_TIMEOUT = 1;\n+\n+    private POA poa_;\n+\n+    public CatalogMgrImpl(POA poa) {\n+        this.poa_ = poa;\n+    }\n+\n+    @Override\n+    public Request[] get_active_requests() throws ProcessingFault, SystemFault {\n+        return new Request[0];\n+    }\n+\n+    @Override\n+    public int get_default_timeout() throws ProcessingFault, SystemFault {\n+        return DEFAULT_TIMEOUT;\n+    }\n+\n+    @Override\n+    public void set_default_timeout(int new_default)\n+            throws ProcessingFault, InvalidInputParameter, SystemFault {\n+        return;\n+    }\n+\n+    @Override\n+    public int get_timeout(Request aRequest)\n+            throws ProcessingFault, InvalidInputParameter, SystemFault {\n+        return DEFAULT_TIMEOUT;\n+    }\n+\n+    @Override\n+    public void set_timeout(Request aRequest, int new_lifetime)\n+            throws ProcessingFault, InvalidInputParameter, SystemFault {\n+        return;\n+    }\n+\n+    @Override\n+    public void delete_request(Request aRequest)\n+            throws ProcessingFault, InvalidInputParameter, SystemFault {\n+        return;\n+    }\n+\n+    @Override\n+    public SubmitQueryRequest submit_query(Query aQuery, String[] result_attributes,\n+            SortAttribute[] sort_attributes, NameValue[] properties)\n+            throws ProcessingFault, InvalidInputParameter, SystemFault {\n+\n+        SubmitQueryRequestImpl submitQueryRequest = new SubmitQueryRequestImpl();\n+\n+        try {\n+            poa_.activate_object_with_id(\"submit_query\".getBytes(Charset.forName(ENCODING)),\n+                    submitQueryRequest);\n+        } catch (ServantAlreadyActive | ObjectAlreadyActive | WrongPolicy e) {\n+            System.out.println(\"submit_query : Unable to activate submitQueryRequest object.\");\n+        }\n+\n+        org.omg.CORBA.Object obj =\n+                poa_.create_reference_with_id(\"submit_query\".getBytes(Charset.forName(ENCODING)),\n+                        SubmitQueryRequestHelper.id());\n+        SubmitQueryRequest queryRequest = SubmitQueryRequestHelper.narrow(obj);\n+\n+        return queryRequest;\n+    }\n+\n+    @Override\n+    public HitCountRequest hit_count(Query aQuery, NameValue[] properties)\n+            throws ProcessingFault, InvalidInputParameter, SystemFault {\n+        HitCountRequestImpl hitCountRequest = new HitCountRequestImpl();\n+\n+        try {\n+            poa_.activate_object_with_id(\"hit_count\".getBytes(Charset.forName(ENCODING)),\n+                    hitCountRequest);\n+        } catch (ServantAlreadyActive | ObjectAlreadyActive | WrongPolicy e) {\n+            System.out.println(\"hit_count : Unable to activate hitCountRequest object.\");","path":"catalog/nsili/catalog-nsili-endpoint/src/main/java/org/codice/alliance/nsili/endpoint/managers/CatalogMgrImpl.java","position":116,"original_position":116,"commit_id":"c28b18dd457386d088ea53e5bc27cda00f10efa8","original_commit_id":"c28b18dd457386d088ea53e5bc27cda00f10efa8","user":{"login":"bdeining","id":6551038,"avatar_url":"https://avatars.githubusercontent.com/u/6551038?v=3","gravatar_id":"","url":"https://api.github.com/users/bdeining","html_url":"https://github.com/bdeining","followers_url":"https://api.github.com/users/bdeining/followers","following_url":"https://api.github.com/users/bdeining/following{/other_user}","gists_url":"https://api.github.com/users/bdeining/gists{/gist_id}","starred_url":"https://api.github.com/users/bdeining/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdeining/subscriptions","organizations_url":"https://api.github.com/users/bdeining/orgs","repos_url":"https://api.github.com/users/bdeining/repos","events_url":"https://api.github.com/users/bdeining/events{/privacy}","received_events_url":"https://api.github.com/users/bdeining/received_events","type":"User","site_admin":false},"body":"Use LOGGER in favor of System.out.print","created_at":"2016-03-15T13:34:49Z","updated_at":"2016-03-15T13:34:49Z","html_url":"https://github.com/codice/alliance/pull/9#discussion_r56162575","pull_request_url":"https://api.github.com/repos/codice/alliance/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/codice/alliance/pulls/comments/56162575"},"html":{"href":"https://github.com/codice/alliance/pull/9#discussion_r56162575"},"pull_request":{"href":"https://api.github.com/repos/codice/alliance/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/codice/alliance/pulls/9","id":62424564,"html_url":"https://github.com/codice/alliance/pull/9","diff_url":"https://github.com/codice/alliance/pull/9.diff","patch_url":"https://github.com/codice/alliance/pull/9.patch","issue_url":"https://api.github.com/repos/codice/alliance/issues/9","number":9,"state":"open","locked":false,"title":"CAL-13 Added NSILI endpoint and updated unit tests to use assertThat.…","user":{"login":"troymohl","id":17255437,"avatar_url":"https://avatars.githubusercontent.com/u/17255437?v=3","gravatar_id":"","url":"https://api.github.com/users/troymohl","html_url":"https://github.com/troymohl","followers_url":"https://api.github.com/users/troymohl/followers","following_url":"https://api.github.com/users/troymohl/following{/other_user}","gists_url":"https://api.github.com/users/troymohl/gists{/gist_id}","starred_url":"https://api.github.com/users/troymohl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troymohl/subscriptions","organizations_url":"https://api.github.com/users/troymohl/orgs","repos_url":"https://api.github.com/users/troymohl/repos","events_url":"https://api.github.com/users/troymohl/events{/privacy}","received_events_url":"https://api.github.com/users/troymohl/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nAdded a base implementation of the NSILI-endpoint and NSILI-WebEndpoint. \r\nUpdated Unit Tests to use assertThat vs assertTrue, etc.\r\nUpdated NSILI MockClient to support testing endpoint.\r\n#### Who is reviewing it?\r\n@bdeining \r\n@jaymcnallie \r\n@jlcsmith \r\n@dcruver \r\n#### How should this be tested?\r\nJUnit and NSILI MockClient\r\n#### Any background context you want to provide?\r\nThis is the stubbed in classes that will be added for implementing the NSILI endpoint to expose DDF data via STANAG 4559. \r\n#### What are the relevant tickets?\r\nCAL-13\r\n#### Screenshots (if appropriate)\r\n#### Checklist:\r\n- [ ] Documentation Updated\r\n- [ X ] Update / Add Unit Tests\r\n- [ ] Update / Add Integration Tests","created_at":"2016-03-10T17:19:38Z","updated_at":"2016-03-15T13:34:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa09aa4a49c29f147b0b60209b3a1ba9649d3630","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codice/alliance/pulls/9/commits","review_comments_url":"https://api.github.com/repos/codice/alliance/pulls/9/comments","review_comment_url":"https://api.github.com/repos/codice/alliance/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/alliance/issues/9/comments","statuses_url":"https://api.github.com/repos/codice/alliance/statuses/c28b18dd457386d088ea53e5bc27cda00f10efa8","head":{"label":"troymohl:NSILI-endpoint","ref":"NSILI-endpoint","sha":"c28b18dd457386d088ea53e5bc27cda00f10efa8","user":{"login":"troymohl","id":17255437,"avatar_url":"https://avatars.githubusercontent.com/u/17255437?v=3","gravatar_id":"","url":"https://api.github.com/users/troymohl","html_url":"https://github.com/troymohl","followers_url":"https://api.github.com/users/troymohl/followers","following_url":"https://api.github.com/users/troymohl/following{/other_user}","gists_url":"https://api.github.com/users/troymohl/gists{/gist_id}","starred_url":"https://api.github.com/users/troymohl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troymohl/subscriptions","organizations_url":"https://api.github.com/users/troymohl/orgs","repos_url":"https://api.github.com/users/troymohl/repos","events_url":"https://api.github.com/users/troymohl/events{/privacy}","received_events_url":"https://api.github.com/users/troymohl/received_events","type":"User","site_admin":false},"repo":{"id":53149794,"name":"alliance","full_name":"troymohl/alliance","owner":{"login":"troymohl","id":17255437,"avatar_url":"https://avatars.githubusercontent.com/u/17255437?v=3","gravatar_id":"","url":"https://api.github.com/users/troymohl","html_url":"https://github.com/troymohl","followers_url":"https://api.github.com/users/troymohl/followers","following_url":"https://api.github.com/users/troymohl/following{/other_user}","gists_url":"https://api.github.com/users/troymohl/gists{/gist_id}","starred_url":"https://api.github.com/users/troymohl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troymohl/subscriptions","organizations_url":"https://api.github.com/users/troymohl/orgs","repos_url":"https://api.github.com/users/troymohl/repos","events_url":"https://api.github.com/users/troymohl/events{/privacy}","received_events_url":"https://api.github.com/users/troymohl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/troymohl/alliance","description":"","fork":true,"url":"https://api.github.com/repos/troymohl/alliance","forks_url":"https://api.github.com/repos/troymohl/alliance/forks","keys_url":"https://api.github.com/repos/troymohl/alliance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/troymohl/alliance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/troymohl/alliance/teams","hooks_url":"https://api.github.com/repos/troymohl/alliance/hooks","issue_events_url":"https://api.github.com/repos/troymohl/alliance/issues/events{/number}","events_url":"https://api.github.com/repos/troymohl/alliance/events","assignees_url":"https://api.github.com/repos/troymohl/alliance/assignees{/user}","branches_url":"https://api.github.com/repos/troymohl/alliance/branches{/branch}","tags_url":"https://api.github.com/repos/troymohl/alliance/tags","blobs_url":"https://api.github.com/repos/troymohl/alliance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/troymohl/alliance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/troymohl/alliance/git/refs{/sha}","trees_url":"https://api.github.com/repos/troymohl/alliance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/troymohl/alliance/statuses/{sha}","languages_url":"https://api.github.com/repos/troymohl/alliance/languages","stargazers_url":"https://api.github.com/repos/troymohl/alliance/stargazers","contributors_url":"https://api.github.com/repos/troymohl/alliance/contributors","subscribers_url":"https://api.github.com/repos/troymohl/alliance/subscribers","subscription_url":"https://api.github.com/repos/troymohl/alliance/subscription","commits_url":"https://api.github.com/repos/troymohl/alliance/commits{/sha}","git_commits_url":"https://api.github.com/repos/troymohl/alliance/git/commits{/sha}","comments_url":"https://api.github.com/repos/troymohl/alliance/comments{/number}","issue_comment_url":"https://api.github.com/repos/troymohl/alliance/issues/comments{/number}","contents_url":"https://api.github.com/repos/troymohl/alliance/contents/{+path}","compare_url":"https://api.github.com/repos/troymohl/alliance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/troymohl/alliance/merges","archive_url":"https://api.github.com/repos/troymohl/alliance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/troymohl/alliance/downloads","issues_url":"https://api.github.com/repos/troymohl/alliance/issues{/number}","pulls_url":"https://api.github.com/repos/troymohl/alliance/pulls{/number}","milestones_url":"https://api.github.com/repos/troymohl/alliance/milestones{/number}","notifications_url":"https://api.github.com/repos/troymohl/alliance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/troymohl/alliance/labels{/name}","releases_url":"https://api.github.com/repos/troymohl/alliance/releases{/id}","deployments_url":"https://api.github.com/repos/troymohl/alliance/deployments","created_at":"2016-03-04T16:39:28Z","updated_at":"2016-03-04T16:39:29Z","pushed_at":"2016-03-10T17:12:33Z","git_url":"git://github.com/troymohl/alliance.git","ssh_url":"git@github.com:troymohl/alliance.git","clone_url":"https://github.com/troymohl/alliance.git","svn_url":"https://github.com/troymohl/alliance","homepage":null,"size":169,"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":"codice:master","ref":"master","sha":"b002e6dbbfc7e72e8a0933a1ddcf4a069476a638","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"repo":{"id":52804523,"name":"alliance","full_name":"codice/alliance","owner":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codice/alliance","description":"","fork":false,"url":"https://api.github.com/repos/codice/alliance","forks_url":"https://api.github.com/repos/codice/alliance/forks","keys_url":"https://api.github.com/repos/codice/alliance/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codice/alliance/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codice/alliance/teams","hooks_url":"https://api.github.com/repos/codice/alliance/hooks","issue_events_url":"https://api.github.com/repos/codice/alliance/issues/events{/number}","events_url":"https://api.github.com/repos/codice/alliance/events","assignees_url":"https://api.github.com/repos/codice/alliance/assignees{/user}","branches_url":"https://api.github.com/repos/codice/alliance/branches{/branch}","tags_url":"https://api.github.com/repos/codice/alliance/tags","blobs_url":"https://api.github.com/repos/codice/alliance/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codice/alliance/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codice/alliance/git/refs{/sha}","trees_url":"https://api.github.com/repos/codice/alliance/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codice/alliance/statuses/{sha}","languages_url":"https://api.github.com/repos/codice/alliance/languages","stargazers_url":"https://api.github.com/repos/codice/alliance/stargazers","contributors_url":"https://api.github.com/repos/codice/alliance/contributors","subscribers_url":"https://api.github.com/repos/codice/alliance/subscribers","subscription_url":"https://api.github.com/repos/codice/alliance/subscription","commits_url":"https://api.github.com/repos/codice/alliance/commits{/sha}","git_commits_url":"https://api.github.com/repos/codice/alliance/git/commits{/sha}","comments_url":"https://api.github.com/repos/codice/alliance/comments{/number}","issue_comment_url":"https://api.github.com/repos/codice/alliance/issues/comments{/number}","contents_url":"https://api.github.com/repos/codice/alliance/contents/{+path}","compare_url":"https://api.github.com/repos/codice/alliance/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codice/alliance/merges","archive_url":"https://api.github.com/repos/codice/alliance/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codice/alliance/downloads","issues_url":"https://api.github.com/repos/codice/alliance/issues{/number}","pulls_url":"https://api.github.com/repos/codice/alliance/pulls{/number}","milestones_url":"https://api.github.com/repos/codice/alliance/milestones{/number}","notifications_url":"https://api.github.com/repos/codice/alliance/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codice/alliance/labels{/name}","releases_url":"https://api.github.com/repos/codice/alliance/releases{/id}","deployments_url":"https://api.github.com/repos/codice/alliance/deployments","created_at":"2016-02-29T16:10:33Z","updated_at":"2016-03-03T17:41:58Z","pushed_at":"2016-03-11T16:22:31Z","git_url":"git://github.com/codice/alliance.git","ssh_url":"git@github.com:codice/alliance.git","clone_url":"https://github.com/codice/alliance.git","svn_url":"https://github.com/codice/alliance","homepage":null,"size":1444,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/alliance/pulls/9"},"html":{"href":"https://github.com/codice/alliance/pull/9"},"issue":{"href":"https://api.github.com/repos/codice/alliance/issues/9"},"comments":{"href":"https://api.github.com/repos/codice/alliance/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/alliance/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/alliance/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/alliance/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/codice/alliance/statuses/c28b18dd457386d088ea53e5bc27cda00f10efa8"}}}}