{"action":"created","comment":{"url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/comments/50145715","id":50145715,"diff_hunk":"@@ -162,4 +168,109 @@ String readFile(File f) throws IOException {\n \tResourceBundle getRessource(){\n \t\treturn resourceBundle;\n \t}\n+\n+\tContact gsonContactToContact(GsonContact gc, Identity i) throws URISyntaxException, QblDropInvalidURL {\n+\n+\t\tArrayList<DropURL> collection = generateDropURLs(gc.getDropUrls());\n+\t\tQblECPublicKey pubKey = new QblECPublicKey(gc.getPublicKey());\n+\t\tContact c = new Contact(i, gc.getAlias(), collection, pubKey);\n+\t\tc.setPhone(gc.getPhone());\n+\t\tc.setEmail(gc.getEmail());\n+\n+\t\treturn c;\n+\t}\n+\n+\tIdentity gsonIdentityToIdentiy(GsonIdentity gi) throws URISyntaxException, QblDropInvalidURL {\n+\n+\t\tgi.buildKeyPair();\n+\t\tArrayList<DropURL> collection = generateDropURLs(gi.getDropUrls());\n+\t\tQblECKeyPair qblECKeyPair = new QblECKeyPair(gi.getPrivateKey());\n+\n+\t\treturn new Identity(gi.getAlias(), collection, qblECKeyPair);\n+\t}\n+\n+\tprivate GsonContact createGsonContact(Identity identity) {\n+\t\tGsonContact gc = new GsonContact();\n+\t\tgc.setEmail(identity.getEmail());\n+\t\tgc.setPhone(identity.getPhone());\n+\t\tgc.setAlias(identity.getAlias());\n+\t\tgc.setCreated(identity.getCreated());\n+\t\tgc.setUpdated(identity.getUpdated());\n+\t\tgc.setDeleted(identity.getDeleted());\n+\t\tgc.setPublicKey(identity.getEcPublicKey().getKey());\n+\t\tfor (DropURL d : identity.getDropUrls()) {\n+\t\t\tgc.addDropUrl(d.getUri().toString());\n+\t\t}\n+\t\treturn gc;\n+\t}\n+\n+\tprivate GsonIdentity createGsonIdentity(Identity i) {\n+\t\tGsonIdentity gi = new GsonIdentity();\n+\t\tgi.setEmail(i.getEmail());\n+\t\tgi.setPhone(i.getPhone());\n+\t\tgi.setAlias(i.getAlias());\n+\t\tgi.setCreated(i.getCreated());\n+\t\tgi.setUpdated(i.getUpdated());\n+\t\tgi.setDeleted(i.getDeleted());\n+\t\tgi.setPublicKey(i.getEcPublicKey().getKey());\n+\t\tgi.setPrivateKey(i.getPrimaryKeyPair().getPrivateKey());\n+\t\tfor (DropURL d : i.getDropUrls()) {\n+\t\t\tgi.addDropUrl(d.getUri().toString());\n+\t\t}\n+\t\tgi.generateKeyStructure();\n+\t\treturn gi;\n+\t}\n+\n+\tprivate void writeJsonInFile(String json, File dir) throws IOException {\n+\t\tInputStream stream = new ByteArrayInputStream(json.getBytes(StandardCharsets.UTF_8));\n+\t\tbyte[] buffer = new byte[stream.available()];\n+\t\tstream.read(buffer);\n+\n+\t\tFile targetFile = new File(dir.getPath());\n+\t\ttargetFile.createNewFile();\n+\t\tOutputStream outStream = new FileOutputStream(targetFile);\n+\t\toutStream.write(buffer);\n+\t}\n+\n+\tprivate ArrayList<DropURL> generateDropURLs(JsonArray drops) throws URISyntaxException, QblDropInvalidURL {\n+\t\tArrayList<DropURL> collection = new ArrayList<>();\n+\n+\t\tfor (int j = 0; j < drops.size(); j++) {","path":"src/main/java/de/qabel/desktop/ui/accounting/AccountingController.java","position":245,"original_position":245,"commit_id":"1257c0187ed20b186bb7da54993ddf8feeceb934","original_commit_id":"1257c0187ed20b186bb7da54993ddf8feeceb934","user":{"login":"julianseeger","id":3258762,"avatar_url":"https://avatars.githubusercontent.com/u/3258762?v=3","gravatar_id":"","url":"https://api.github.com/users/julianseeger","html_url":"https://github.com/julianseeger","followers_url":"https://api.github.com/users/julianseeger/followers","following_url":"https://api.github.com/users/julianseeger/following{/other_user}","gists_url":"https://api.github.com/users/julianseeger/gists{/gist_id}","starred_url":"https://api.github.com/users/julianseeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianseeger/subscriptions","organizations_url":"https://api.github.com/users/julianseeger/orgs","repos_url":"https://api.github.com/users/julianseeger/repos","events_url":"https://api.github.com/users/julianseeger/events{/privacy}","received_events_url":"https://api.github.com/users/julianseeger/received_events","type":"User","site_admin":false},"body":"hint: `for (JsonElement uri : drops) {`","created_at":"2016-01-19T17:38:58Z","updated_at":"2016-01-19T17:38:58Z","html_url":"https://github.com/Qabel/qabel-desktop/pull/103#discussion_r50145715","pull_request_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/103","_links":{"self":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/comments/50145715"},"html":{"href":"https://github.com/Qabel/qabel-desktop/pull/103#discussion_r50145715"},"pull_request":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/103"}}},"pull_request":{"url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/103","id":56358752,"html_url":"https://github.com/Qabel/qabel-desktop/pull/103","diff_url":"https://github.com/Qabel/qabel-desktop/pull/103.diff","patch_url":"https://github.com/Qabel/qabel-desktop/pull/103.patch","issue_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues/103","number":103,"state":"open","locked":false,"title":"Contact","user":{"login":"jmt85","id":4853105,"avatar_url":"https://avatars.githubusercontent.com/u/4853105?v=3","gravatar_id":"","url":"https://api.github.com/users/jmt85","html_url":"https://github.com/jmt85","followers_url":"https://api.github.com/users/jmt85/followers","following_url":"https://api.github.com/users/jmt85/following{/other_user}","gists_url":"https://api.github.com/users/jmt85/gists{/gist_id}","starred_url":"https://api.github.com/users/jmt85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmt85/subscriptions","organizations_url":"https://api.github.com/users/jmt85/orgs","repos_url":"https://api.github.com/users/jmt85/repos","events_url":"https://api.github.com/users/jmt85/events{/privacy}","received_events_url":"https://api.github.com/users/jmt85/received_events","type":"User","site_admin":false},"body":"see #62 ","created_at":"2016-01-18T15:48:47Z","updated_at":"2016-01-19T17:38:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5b0f5a01a7e02bc90dd5c3a7d7ed11a56ad67b4","assignee":{"login":"julianseeger","id":3258762,"avatar_url":"https://avatars.githubusercontent.com/u/3258762?v=3","gravatar_id":"","url":"https://api.github.com/users/julianseeger","html_url":"https://github.com/julianseeger","followers_url":"https://api.github.com/users/julianseeger/followers","following_url":"https://api.github.com/users/julianseeger/following{/other_user}","gists_url":"https://api.github.com/users/julianseeger/gists{/gist_id}","starred_url":"https://api.github.com/users/julianseeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianseeger/subscriptions","organizations_url":"https://api.github.com/users/julianseeger/orgs","repos_url":"https://api.github.com/users/julianseeger/repos","events_url":"https://api.github.com/users/julianseeger/events{/privacy}","received_events_url":"https://api.github.com/users/julianseeger/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/103/commits","review_comments_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/103/comments","review_comment_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues/103/comments","statuses_url":"https://api.github.com/repos/Qabel/qabel-desktop/statuses/1257c0187ed20b186bb7da54993ddf8feeceb934","head":{"label":"jmt85:contact","ref":"contact","sha":"1257c0187ed20b186bb7da54993ddf8feeceb934","user":{"login":"jmt85","id":4853105,"avatar_url":"https://avatars.githubusercontent.com/u/4853105?v=3","gravatar_id":"","url":"https://api.github.com/users/jmt85","html_url":"https://github.com/jmt85","followers_url":"https://api.github.com/users/jmt85/followers","following_url":"https://api.github.com/users/jmt85/following{/other_user}","gists_url":"https://api.github.com/users/jmt85/gists{/gist_id}","starred_url":"https://api.github.com/users/jmt85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmt85/subscriptions","organizations_url":"https://api.github.com/users/jmt85/orgs","repos_url":"https://api.github.com/users/jmt85/repos","events_url":"https://api.github.com/users/jmt85/events{/privacy}","received_events_url":"https://api.github.com/users/jmt85/received_events","type":"User","site_admin":false},"repo":{"id":48989612,"name":"qabel-desktop","full_name":"jmt85/qabel-desktop","owner":{"login":"jmt85","id":4853105,"avatar_url":"https://avatars.githubusercontent.com/u/4853105?v=3","gravatar_id":"","url":"https://api.github.com/users/jmt85","html_url":"https://github.com/jmt85","followers_url":"https://api.github.com/users/jmt85/followers","following_url":"https://api.github.com/users/jmt85/following{/other_user}","gists_url":"https://api.github.com/users/jmt85/gists{/gist_id}","starred_url":"https://api.github.com/users/jmt85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmt85/subscriptions","organizations_url":"https://api.github.com/users/jmt85/orgs","repos_url":"https://api.github.com/users/jmt85/repos","events_url":"https://api.github.com/users/jmt85/events{/privacy}","received_events_url":"https://api.github.com/users/jmt85/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmt85/qabel-desktop","description":"Desktop Frontend of Qabel","fork":true,"url":"https://api.github.com/repos/jmt85/qabel-desktop","forks_url":"https://api.github.com/repos/jmt85/qabel-desktop/forks","keys_url":"https://api.github.com/repos/jmt85/qabel-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmt85/qabel-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmt85/qabel-desktop/teams","hooks_url":"https://api.github.com/repos/jmt85/qabel-desktop/hooks","issue_events_url":"https://api.github.com/repos/jmt85/qabel-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/jmt85/qabel-desktop/events","assignees_url":"https://api.github.com/repos/jmt85/qabel-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/jmt85/qabel-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/jmt85/qabel-desktop/tags","blobs_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmt85/qabel-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/jmt85/qabel-desktop/languages","stargazers_url":"https://api.github.com/repos/jmt85/qabel-desktop/stargazers","contributors_url":"https://api.github.com/repos/jmt85/qabel-desktop/contributors","subscribers_url":"https://api.github.com/repos/jmt85/qabel-desktop/subscribers","subscription_url":"https://api.github.com/repos/jmt85/qabel-desktop/subscription","commits_url":"https://api.github.com/repos/jmt85/qabel-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmt85/qabel-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmt85/qabel-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmt85/qabel-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmt85/qabel-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/jmt85/qabel-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmt85/qabel-desktop/merges","archive_url":"https://api.github.com/repos/jmt85/qabel-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmt85/qabel-desktop/downloads","issues_url":"https://api.github.com/repos/jmt85/qabel-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/jmt85/qabel-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/jmt85/qabel-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/jmt85/qabel-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmt85/qabel-desktop/labels{/name}","releases_url":"https://api.github.com/repos/jmt85/qabel-desktop/releases{/id}","created_at":"2016-01-04T10:15:18Z","updated_at":"2016-01-15T13:54:01Z","pushed_at":"2016-01-19T15:38:35Z","git_url":"git://github.com/jmt85/qabel-desktop.git","ssh_url":"git@github.com:jmt85/qabel-desktop.git","clone_url":"https://github.com/jmt85/qabel-desktop.git","svn_url":"https://github.com/jmt85/qabel-desktop","homepage":null,"size":1136,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"Qabel:master","ref":"master","sha":"04dd11edb8c94e63e5c4c5da141d17a1f3b0065d","user":{"login":"Qabel","id":7711470,"avatar_url":"https://avatars.githubusercontent.com/u/7711470?v=3","gravatar_id":"","url":"https://api.github.com/users/Qabel","html_url":"https://github.com/Qabel","followers_url":"https://api.github.com/users/Qabel/followers","following_url":"https://api.github.com/users/Qabel/following{/other_user}","gists_url":"https://api.github.com/users/Qabel/gists{/gist_id}","starred_url":"https://api.github.com/users/Qabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qabel/subscriptions","organizations_url":"https://api.github.com/users/Qabel/orgs","repos_url":"https://api.github.com/users/Qabel/repos","events_url":"https://api.github.com/users/Qabel/events{/privacy}","received_events_url":"https://api.github.com/users/Qabel/received_events","type":"Organization","site_admin":false},"repo":{"id":25461792,"name":"qabel-desktop","full_name":"Qabel/qabel-desktop","owner":{"login":"Qabel","id":7711470,"avatar_url":"https://avatars.githubusercontent.com/u/7711470?v=3","gravatar_id":"","url":"https://api.github.com/users/Qabel","html_url":"https://github.com/Qabel","followers_url":"https://api.github.com/users/Qabel/followers","following_url":"https://api.github.com/users/Qabel/following{/other_user}","gists_url":"https://api.github.com/users/Qabel/gists{/gist_id}","starred_url":"https://api.github.com/users/Qabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qabel/subscriptions","organizations_url":"https://api.github.com/users/Qabel/orgs","repos_url":"https://api.github.com/users/Qabel/repos","events_url":"https://api.github.com/users/Qabel/events{/privacy}","received_events_url":"https://api.github.com/users/Qabel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Qabel/qabel-desktop","description":"Desktop Frontend of Qabel","fork":false,"url":"https://api.github.com/repos/Qabel/qabel-desktop","forks_url":"https://api.github.com/repos/Qabel/qabel-desktop/forks","keys_url":"https://api.github.com/repos/Qabel/qabel-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Qabel/qabel-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Qabel/qabel-desktop/teams","hooks_url":"https://api.github.com/repos/Qabel/qabel-desktop/hooks","issue_events_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/Qabel/qabel-desktop/events","assignees_url":"https://api.github.com/repos/Qabel/qabel-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/Qabel/qabel-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/Qabel/qabel-desktop/tags","blobs_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Qabel/qabel-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/Qabel/qabel-desktop/languages","stargazers_url":"https://api.github.com/repos/Qabel/qabel-desktop/stargazers","contributors_url":"https://api.github.com/repos/Qabel/qabel-desktop/contributors","subscribers_url":"https://api.github.com/repos/Qabel/qabel-desktop/subscribers","subscription_url":"https://api.github.com/repos/Qabel/qabel-desktop/subscription","commits_url":"https://api.github.com/repos/Qabel/qabel-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/Qabel/qabel-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/Qabel/qabel-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/Qabel/qabel-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/Qabel/qabel-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Qabel/qabel-desktop/merges","archive_url":"https://api.github.com/repos/Qabel/qabel-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Qabel/qabel-desktop/downloads","issues_url":"https://api.github.com/repos/Qabel/qabel-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/Qabel/qabel-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/Qabel/qabel-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/Qabel/qabel-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Qabel/qabel-desktop/labels{/name}","releases_url":"https://api.github.com/repos/Qabel/qabel-desktop/releases{/id}","created_at":"2014-10-20T10:38:47Z","updated_at":"2016-01-11T11:57:38Z","pushed_at":"2016-01-19T15:44:12Z","git_url":"git://github.com/Qabel/qabel-desktop.git","ssh_url":"git@github.com:Qabel/qabel-desktop.git","clone_url":"https://github.com/Qabel/qabel-desktop.git","svn_url":"https://github.com/Qabel/qabel-desktop","homepage":null,"size":1114,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":37,"forks":9,"open_issues":37,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/103"},"html":{"href":"https://github.com/Qabel/qabel-desktop/pull/103"},"issue":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/issues/103"},"comments":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/issues/103/comments"},"review_comments":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/103/comments"},"review_comment":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/pulls/103/commits"},"statuses":{"href":"https://api.github.com/repos/Qabel/qabel-desktop/statuses/1257c0187ed20b186bb7da54993ddf8feeceb934"}}}}