GitHub PullRequestReviewCommentEvent at 2014-10-30 17:32:59
Repository: stormpath-sdk-java
Actor: lhazlewood
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/comments/19621404","id":19621404,"diff_hunk":"@@ -1252,4 +1260,69 @@\n      * @since 1.0.RC2\n      */\n     IdSiteCallbackHandler newIdSiteCallbackHandler(Object httpRequest);\n+\n+    /**\n+     * Convenience method to add a {@link Directory} as an {@link AccountStore} to this application.\n+     * <p/>\n+     * The given directory must have either its href or name property set. Having that information, this method will\n+     * look for a directory in this {@link Tenant} that matches either the href or the name given. Once it is found, it will\n+     * then delegate the creation to {@link #addAccountStore(AccountStore)} with the found directory in order to fulfill its task.\n+     * </p>\n+     * Example providing a Directory href:\n+     * <p/>\n+     * <pre>\n+     *      Directory directory = client.getResource(\"https://api.stormpath.com/v1/directory/3xwt06QyMt6u2DhKLfzvie\", Directory.class);\n+     *      AccountStoreMapping accountStoreMapping = application.addDirectory(directory);\n+     * </pre>\n+     * Example providing a Directory name:\n+     * <p/>\n+     * <pre>\n+     *      Directory directory = client.instantiate(Directory.class);\n+     *      directory.setName(\"Foo Directory\");\n+     *      AccountStoreMapping accountStoreMapping = application.addDirectory(directory);\n+     * </pre>\n+     * <b>Usage NOTE:</b> Unlike other methods in this class that require the {@link #save()} method to be called to\n+     * persist changes, this is a convenience method and will call the server immediately.\n+     *\n+     * @param directory the given {@link Directory} instance having either the href or the name specified.\n+     * @return the {@link AccountStoreMapping} created after finding the actual directory pertaining to this tenant\n+     *          that matches either the given Href or name. It returns null if there is no directory matching the href or name.\n+     * @throws ResourceException if the given directory already exists as an account store in this application.\n+     * @since 1.0.0\n+     */\n+    AccountStoreMapping addDirectory(Directory directory);\n+\n+    /**\n+     * Convenience method to add a {@link Group} as an {@link AccountStore} to this application.\n+     * <p/>\n+     * The given group must have either its href or name property set. Having that information, this method will\n+     * look for a group iterating through every {@link Directory} existing in this {@link Tenant}. Once a matching group\n+     * is found, it will then delegate the creation to {@link #addAccountStore(AccountStore)} in order to fulfill its task.\n+     * </p>\n+     * Example providing a Group href:\n+     * <p/>\n+     * <pre>\n+     *      Group group = client.getResource(\"https://api.stormpath.com/v1/groups/2rwq022yMt4u2DwKLfzriP\", Group.class);\n+     *      AccountStoreMapping accountStoreMapping = application.adGroup(group);\n+     * </pre>\n+     * Example providing a Group name:\n+     * <p/>\n+     * <pre>\n+     *      Group group = client.instantiate(Group.class);","path":"api/src/main/java/com/stormpath/sdk/application/Application.java","position":76,"original_position":76,"commit_id":"30975fb84d0e800f5fdfcd314c6e5c2a2170a828","original_commit_id":"30975fb84d0e800f5fdfcd314c6e5c2a2170a828","user":{"login":"lhazlewood","id":121180,"avatar_url":"https://avatars.githubusercontent.com/u/121180?v=2","gravatar_id":"","url":"https://api.github.com/users/lhazlewood","html_url":"https://github.com/lhazlewood","followers_url":"https://api.github.com/users/lhazlewood/followers","following_url":"https://api.github.com/users/lhazlewood/following{/other_user}","gists_url":"https://api.github.com/users/lhazlewood/gists{/gist_id}","starred_url":"https://api.github.com/users/lhazlewood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhazlewood/subscriptions","organizations_url":"https://api.github.com/users/lhazlewood/orgs","repos_url":"https://api.github.com/users/lhazlewood/repos","events_url":"https://api.github.com/users/lhazlewood/events{/privacy}","received_events_url":"https://api.github.com/users/lhazlewood/received_events","type":"User","site_admin":false},"body":"Same comment as the directory-related one above: we're not creating a new group for them, just searching for and referencing an existing one.","created_at":"2014-10-30T17:32:59Z","updated_at":"2014-10-30T17:32:59Z","html_url":"https://github.com/stormpath/stormpath-sdk-java/pull/104#discussion_r19621404","pull_request_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/104","_links":{"self":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/comments/19621404"},"html":{"href":"https://github.com/stormpath/stormpath-sdk-java/pull/104#discussion_r19621404"},"pull_request":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/104"}}},"pull_request":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/104","id":21722231,"html_url":"https://github.com/stormpath/stormpath-sdk-java/pull/104","diff_url":"https://github.com/stormpath/stormpath-sdk-java/pull/104.diff","patch_url":"https://github.com/stormpath/stormpath-sdk-java/pull/104.patch","issue_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues/104","number":104,"state":"open","locked":false,"title":"Convenience Methods for Account Stores","user":{"login":"antollinim","id":717498,"avatar_url":"https://avatars.githubusercontent.com/u/717498?v=2","gravatar_id":"","url":"https://api.github.com/users/antollinim","html_url":"https://github.com/antollinim","followers_url":"https://api.github.com/users/antollinim/followers","following_url":"https://api.github.com/users/antollinim/following{/other_user}","gists_url":"https://api.github.com/users/antollinim/gists{/gist_id}","starred_url":"https://api.github.com/users/antollinim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antollinim/subscriptions","organizations_url":"https://api.github.com/users/antollinim/orgs","repos_url":"https://api.github.com/users/antollinim/repos","events_url":"https://api.github.com/users/antollinim/events{/privacy}","received_events_url":"https://api.github.com/users/antollinim/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-24T15:29:42Z","updated_at":"2014-10-30T17:32:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7469db7bbddc3a035d5c7d3f0bdbfc3c7f276203","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/104/commits","review_comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/104/comments","review_comment_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/comments/{number}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues/104/comments","statuses_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/statuses/30975fb84d0e800f5fdfcd314c6e5c2a2170a828","head":{"label":"stormpath:account_store_convenience_methods","ref":"account_store_convenience_methods","sha":"30975fb84d0e800f5fdfcd314c6e5c2a2170a828","user":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=2","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"repo":{"id":3913468,"name":"stormpath-sdk-java","full_name":"stormpath/stormpath-sdk-java","owner":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=2","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stormpath/stormpath-sdk-java","description":"Official Java SDK for the Stormpath User Management REST API","fork":false,"url":"https://api.github.com/repos/stormpath/stormpath-sdk-java","forks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/forks","keys_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/teams","hooks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/hooks","issue_events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues/events{/number}","events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/events","assignees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/assignees{/user}","branches_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/branches{/branch}","tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/tags","blobs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/statuses/{sha}","languages_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/languages","stargazers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/stargazers","contributors_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/contributors","subscribers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/subscribers","subscription_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/subscription","commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues/comments/{number}","contents_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/contents/{+path}","compare_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/merges","archive_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/downloads","issues_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues{/number}","pulls_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls{/number}","milestones_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/milestones{/number}","notifications_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/labels{/name}","releases_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/releases{/id}","created_at":"2012-04-03T01:22:09Z","updated_at":"2014-10-10T17:51:37Z","pushed_at":"2014-10-29T04:05:44Z","git_url":"git://github.com/stormpath/stormpath-sdk-java.git","ssh_url":"git@github.com:stormpath/stormpath-sdk-java.git","clone_url":"https://github.com/stormpath/stormpath-sdk-java.git","svn_url":"https://github.com/stormpath/stormpath-sdk-java","homepage":"","size":9539,"stargazers_count":31,"watchers_count":31,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":38,"forks":16,"open_issues":38,"watchers":31,"default_branch":"master"}},"base":{"label":"stormpath:dev","ref":"dev","sha":"0ce5e31363310263ca960077b7554ce3a53ade86","user":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=2","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"repo":{"id":3913468,"name":"stormpath-sdk-java","full_name":"stormpath/stormpath-sdk-java","owner":{"login":"stormpath","id":1377453,"avatar_url":"https://avatars.githubusercontent.com/u/1377453?v=2","gravatar_id":"","url":"https://api.github.com/users/stormpath","html_url":"https://github.com/stormpath","followers_url":"https://api.github.com/users/stormpath/followers","following_url":"https://api.github.com/users/stormpath/following{/other_user}","gists_url":"https://api.github.com/users/stormpath/gists{/gist_id}","starred_url":"https://api.github.com/users/stormpath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stormpath/subscriptions","organizations_url":"https://api.github.com/users/stormpath/orgs","repos_url":"https://api.github.com/users/stormpath/repos","events_url":"https://api.github.com/users/stormpath/events{/privacy}","received_events_url":"https://api.github.com/users/stormpath/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stormpath/stormpath-sdk-java","description":"Official Java SDK for the Stormpath User Management REST API","fork":false,"url":"https://api.github.com/repos/stormpath/stormpath-sdk-java","forks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/forks","keys_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/teams","hooks_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/hooks","issue_events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues/events{/number}","events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/events","assignees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/assignees{/user}","branches_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/branches{/branch}","tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/tags","blobs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/statuses/{sha}","languages_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/languages","stargazers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/stargazers","contributors_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/contributors","subscribers_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/subscribers","subscription_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/subscription","commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues/comments/{number}","contents_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/contents/{+path}","compare_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/merges","archive_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/downloads","issues_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues{/number}","pulls_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls{/number}","milestones_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/milestones{/number}","notifications_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/labels{/name}","releases_url":"https://api.github.com/repos/stormpath/stormpath-sdk-java/releases{/id}","created_at":"2012-04-03T01:22:09Z","updated_at":"2014-10-10T17:51:37Z","pushed_at":"2014-10-29T04:05:44Z","git_url":"git://github.com/stormpath/stormpath-sdk-java.git","ssh_url":"git@github.com:stormpath/stormpath-sdk-java.git","clone_url":"https://github.com/stormpath/stormpath-sdk-java.git","svn_url":"https://github.com/stormpath/stormpath-sdk-java","homepage":"","size":9539,"stargazers_count":31,"watchers_count":31,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":38,"forks":16,"open_issues":38,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/104"},"html":{"href":"https://github.com/stormpath/stormpath-sdk-java/pull/104"},"issue":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues/104"},"comments":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-java/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-java/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/stormpath/stormpath-sdk-java/statuses/30975fb84d0e800f5fdfcd314c6e5c2a2170a828"}}}}