GitHub PullRequestReviewCommentEvent at 2014-12-24 08:03:23
Repository: lambdalf
Actor: jarlah
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/lambdalf/lambdalf/pulls/comments/22248442","id":22248442,"diff_hunk":"@@ -45,6 +46,24 @@\n   ([parent child-name child-type]\n    (.getNodeRef (.create (file-folder-service) parent child-name child-type))))\n \n+(defn get-file-folder-writer","path":"src/clojure/alfresco/filefolder.clj","position":12,"original_position":12,"commit_id":"f3a35ca6f9329254271c13fefd08e05daf137604","original_commit_id":"f3a35ca6f9329254271c13fefd08e05daf137604","user":{"login":"jarlah","id":404102,"avatar_url":"https://avatars.githubusercontent.com/u/404102?v=3","gravatar_id":"","url":"https://api.github.com/users/jarlah","html_url":"https://github.com/jarlah","followers_url":"https://api.github.com/users/jarlah/followers","following_url":"https://api.github.com/users/jarlah/following{/other_user}","gists_url":"https://api.github.com/users/jarlah/gists{/gist_id}","starred_url":"https://api.github.com/users/jarlah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarlah/subscriptions","organizations_url":"https://api.github.com/users/jarlah/orgs","repos_url":"https://api.github.com/users/jarlah/repos","events_url":"https://api.github.com/users/jarlah/events{/privacy}","received_events_url":"https://api.github.com/users/jarlah/received_events","type":"User","site_admin":false},"body":"I agree about consistency. but I was thinking about making it more obvious what it was actually returning. But, switching from content to filefolder would then be a lot more easier and non intrusive if we go for equal method names. So I'll change it.","created_at":"2014-12-24T08:03:23Z","updated_at":"2014-12-24T08:03:23Z","html_url":"https://github.com/lambdalf/lambdalf/pull/8#discussion_r22248442","pull_request_url":"https://api.github.com/repos/lambdalf/lambdalf/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/lambdalf/lambdalf/pulls/comments/22248442"},"html":{"href":"https://github.com/lambdalf/lambdalf/pull/8#discussion_r22248442"},"pull_request":{"href":"https://api.github.com/repos/lambdalf/lambdalf/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/lambdalf/lambdalf/pulls/8","id":26175940,"html_url":"https://github.com/lambdalf/lambdalf/pull/8","diff_url":"https://github.com/lambdalf/lambdalf/pull/8.diff","patch_url":"https://github.com/lambdalf/lambdalf/pull/8.patch","issue_url":"https://api.github.com/repos/lambdalf/lambdalf/issues/8","number":8,"state":"open","locked":false,"title":"Adding writers to filefolder","user":{"login":"jarlah","id":404102,"avatar_url":"https://avatars.githubusercontent.com/u/404102?v=3","gravatar_id":"","url":"https://api.github.com/users/jarlah","html_url":"https://github.com/jarlah","followers_url":"https://api.github.com/users/jarlah/followers","following_url":"https://api.github.com/users/jarlah/following{/other_user}","gists_url":"https://api.github.com/users/jarlah/gists{/gist_id}","starred_url":"https://api.github.com/users/jarlah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarlah/subscriptions","organizations_url":"https://api.github.com/users/jarlah/orgs","repos_url":"https://api.github.com/users/jarlah/repos","events_url":"https://api.github.com/users/jarlah/events{/privacy}","received_events_url":"https://api.github.com/users/jarlah/received_events","type":"User","site_admin":false},"body":"I used the following to verify. Only real difference in putting the content to file is the af/write! instead of ac/write! The content.clj can still be used for advanced use cases. But as we already know now it doesnt handle mime type. Maybe, we could make a contentless document content url when we are creating the document, e.g. using the string write! below when we create the document with empty string. For example contentWriter.guessMimetype(filename) and then write! \"\".\r\n\r\nuser=> (at/in-tx-as (aa/admin)\r\n  #_=>   (let [test-folder-name \"test\"\r\n  #_=>         test-folder      (af/find-by-path test-folder-name (an/company-home))\r\n  #_=>         test-folder      (if test-folder\r\n  #_=>                            test-folder\r\n  #_=>                            (af/create! (an/company-home) test-folder-name org.alfresco.model.ContentModel/TYPE_FOLDER))\r\n  #_=>         test-file        (af/create! test-folder (str \"test-\" (.getTime (java.util.Date.)) \".txt\"))] \r\n  #_=>     (an/add-aspect! test-file \"cm:versionable\" nil)\r\n  #_=>     (af/write! \"The quick brown fox jumps over the lazy dog.\" test-file)\r\n  #_=>     nil))\r\nCustom behaviour called with 2 args:\r\n Type: class org.alfresco.service.cmr.repository.NodeRef, Value: workspace://SpacesStore/d28f6dbe-0822-4741-ace6-a62b6b0b0a73\r\nType: class org.alfresco.service.namespace.QName, Value: {http://www.alfresco.org/model/content/1.0}versionable\r\nnil\r\nuser=> (require '[alfresco.nodes :as n])\r\n\r\nuser=> (clojure.pprint/pprint\r\n  #_=>        (a/as-admin\r\n  #_=>         (n/properties (NodeRef. \"workspace://SpacesStore/d28f6dbe-0822-4741-ace6-a62b6b0b0a73\"))))\r\n{#<QName {http://www.alfresco.org/model/content/1.0}created>\r\n #inst \"2014-12-16T20:07:16.449-00:00\",\r\n.....\r\n....... contentUrl=store://2014/12/16/21/7/225020b8-351d-435e-9d17-91a98291b419.bin|mimetype=text/plain|size=44|encoding=UTF-8|locale=en_GB_|id=224....\r\n....\r\nnil","created_at":"2014-12-16T20:15:26Z","updated_at":"2014-12-24T08:03:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b026ae27d5c429e4817ec3b791d48a9de0a55e7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lambdalf/lambdalf/pulls/8/commits","review_comments_url":"https://api.github.com/repos/lambdalf/lambdalf/pulls/8/comments","review_comment_url":"https://api.github.com/repos/lambdalf/lambdalf/pulls/comments/{number}","comments_url":"https://api.github.com/repos/lambdalf/lambdalf/issues/8/comments","statuses_url":"https://api.github.com/repos/lambdalf/lambdalf/statuses/f3a35ca6f9329254271c13fefd08e05daf137604","head":{"label":"jarlah:master","ref":"master","sha":"f3a35ca6f9329254271c13fefd08e05daf137604","user":{"login":"jarlah","id":404102,"avatar_url":"https://avatars.githubusercontent.com/u/404102?v=3","gravatar_id":"","url":"https://api.github.com/users/jarlah","html_url":"https://github.com/jarlah","followers_url":"https://api.github.com/users/jarlah/followers","following_url":"https://api.github.com/users/jarlah/following{/other_user}","gists_url":"https://api.github.com/users/jarlah/gists{/gist_id}","starred_url":"https://api.github.com/users/jarlah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarlah/subscriptions","organizations_url":"https://api.github.com/users/jarlah/orgs","repos_url":"https://api.github.com/users/jarlah/repos","events_url":"https://api.github.com/users/jarlah/events{/privacy}","received_events_url":"https://api.github.com/users/jarlah/received_events","type":"User","site_admin":false},"repo":{"id":27609063,"name":"lambdalf","full_name":"jarlah/lambdalf","owner":{"login":"jarlah","id":404102,"avatar_url":"https://avatars.githubusercontent.com/u/404102?v=3","gravatar_id":"","url":"https://api.github.com/users/jarlah","html_url":"https://github.com/jarlah","followers_url":"https://api.github.com/users/jarlah/followers","following_url":"https://api.github.com/users/jarlah/following{/other_user}","gists_url":"https://api.github.com/users/jarlah/gists{/gist_id}","starred_url":"https://api.github.com/users/jarlah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarlah/subscriptions","organizations_url":"https://api.github.com/users/jarlah/orgs","repos_url":"https://api.github.com/users/jarlah/repos","events_url":"https://api.github.com/users/jarlah/events{/privacy}","received_events_url":"https://api.github.com/users/jarlah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jarlah/lambdalf","description":"Alfresco module that exposes a Clojure API to access the repository.","fork":true,"url":"https://api.github.com/repos/jarlah/lambdalf","forks_url":"https://api.github.com/repos/jarlah/lambdalf/forks","keys_url":"https://api.github.com/repos/jarlah/lambdalf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jarlah/lambdalf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jarlah/lambdalf/teams","hooks_url":"https://api.github.com/repos/jarlah/lambdalf/hooks","issue_events_url":"https://api.github.com/repos/jarlah/lambdalf/issues/events{/number}","events_url":"https://api.github.com/repos/jarlah/lambdalf/events","assignees_url":"https://api.github.com/repos/jarlah/lambdalf/assignees{/user}","branches_url":"https://api.github.com/repos/jarlah/lambdalf/branches{/branch}","tags_url":"https://api.github.com/repos/jarlah/lambdalf/tags","blobs_url":"https://api.github.com/repos/jarlah/lambdalf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jarlah/lambdalf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jarlah/lambdalf/git/refs{/sha}","trees_url":"https://api.github.com/repos/jarlah/lambdalf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jarlah/lambdalf/statuses/{sha}","languages_url":"https://api.github.com/repos/jarlah/lambdalf/languages","stargazers_url":"https://api.github.com/repos/jarlah/lambdalf/stargazers","contributors_url":"https://api.github.com/repos/jarlah/lambdalf/contributors","subscribers_url":"https://api.github.com/repos/jarlah/lambdalf/subscribers","subscription_url":"https://api.github.com/repos/jarlah/lambdalf/subscription","commits_url":"https://api.github.com/repos/jarlah/lambdalf/commits{/sha}","git_commits_url":"https://api.github.com/repos/jarlah/lambdalf/git/commits{/sha}","comments_url":"https://api.github.com/repos/jarlah/lambdalf/comments{/number}","issue_comment_url":"https://api.github.com/repos/jarlah/lambdalf/issues/comments/{number}","contents_url":"https://api.github.com/repos/jarlah/lambdalf/contents/{+path}","compare_url":"https://api.github.com/repos/jarlah/lambdalf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jarlah/lambdalf/merges","archive_url":"https://api.github.com/repos/jarlah/lambdalf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jarlah/lambdalf/downloads","issues_url":"https://api.github.com/repos/jarlah/lambdalf/issues{/number}","pulls_url":"https://api.github.com/repos/jarlah/lambdalf/pulls{/number}","milestones_url":"https://api.github.com/repos/jarlah/lambdalf/milestones{/number}","notifications_url":"https://api.github.com/repos/jarlah/lambdalf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jarlah/lambdalf/labels{/name}","releases_url":"https://api.github.com/repos/jarlah/lambdalf/releases{/id}","created_at":"2014-12-05T20:35:41Z","updated_at":"2014-12-16T20:10:28Z","pushed_at":"2014-12-16T20:10:28Z","git_url":"git://github.com/jarlah/lambdalf.git","ssh_url":"git@github.com:jarlah/lambdalf.git","clone_url":"https://github.com/jarlah/lambdalf.git","svn_url":"https://github.com/jarlah/lambdalf","homepage":"","size":1322,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lambdalf:master","ref":"master","sha":"2c935d39ade3147ab9473bef15fdb46752eb2c2d","user":{"login":"lambdalf","id":8080882,"avatar_url":"https://avatars.githubusercontent.com/u/8080882?v=3","gravatar_id":"","url":"https://api.github.com/users/lambdalf","html_url":"https://github.com/lambdalf","followers_url":"https://api.github.com/users/lambdalf/followers","following_url":"https://api.github.com/users/lambdalf/following{/other_user}","gists_url":"https://api.github.com/users/lambdalf/gists{/gist_id}","starred_url":"https://api.github.com/users/lambdalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambdalf/subscriptions","organizations_url":"https://api.github.com/users/lambdalf/orgs","repos_url":"https://api.github.com/users/lambdalf/repos","events_url":"https://api.github.com/users/lambdalf/events{/privacy}","received_events_url":"https://api.github.com/users/lambdalf/received_events","type":"Organization","site_admin":false},"repo":{"id":21540254,"name":"lambdalf","full_name":"lambdalf/lambdalf","owner":{"login":"lambdalf","id":8080882,"avatar_url":"https://avatars.githubusercontent.com/u/8080882?v=3","gravatar_id":"","url":"https://api.github.com/users/lambdalf","html_url":"https://github.com/lambdalf","followers_url":"https://api.github.com/users/lambdalf/followers","following_url":"https://api.github.com/users/lambdalf/following{/other_user}","gists_url":"https://api.github.com/users/lambdalf/gists{/gist_id}","starred_url":"https://api.github.com/users/lambdalf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambdalf/subscriptions","organizations_url":"https://api.github.com/users/lambdalf/orgs","repos_url":"https://api.github.com/users/lambdalf/repos","events_url":"https://api.github.com/users/lambdalf/events{/privacy}","received_events_url":"https://api.github.com/users/lambdalf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lambdalf/lambdalf","description":"Alfresco module that exposes a Clojure API to access the repository.","fork":true,"url":"https://api.github.com/repos/lambdalf/lambdalf","forks_url":"https://api.github.com/repos/lambdalf/lambdalf/forks","keys_url":"https://api.github.com/repos/lambdalf/lambdalf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lambdalf/lambdalf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lambdalf/lambdalf/teams","hooks_url":"https://api.github.com/repos/lambdalf/lambdalf/hooks","issue_events_url":"https://api.github.com/repos/lambdalf/lambdalf/issues/events{/number}","events_url":"https://api.github.com/repos/lambdalf/lambdalf/events","assignees_url":"https://api.github.com/repos/lambdalf/lambdalf/assignees{/user}","branches_url":"https://api.github.com/repos/lambdalf/lambdalf/branches{/branch}","tags_url":"https://api.github.com/repos/lambdalf/lambdalf/tags","blobs_url":"https://api.github.com/repos/lambdalf/lambdalf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lambdalf/lambdalf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lambdalf/lambdalf/git/refs{/sha}","trees_url":"https://api.github.com/repos/lambdalf/lambdalf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lambdalf/lambdalf/statuses/{sha}","languages_url":"https://api.github.com/repos/lambdalf/lambdalf/languages","stargazers_url":"https://api.github.com/repos/lambdalf/lambdalf/stargazers","contributors_url":"https://api.github.com/repos/lambdalf/lambdalf/contributors","subscribers_url":"https://api.github.com/repos/lambdalf/lambdalf/subscribers","subscription_url":"https://api.github.com/repos/lambdalf/lambdalf/subscription","commits_url":"https://api.github.com/repos/lambdalf/lambdalf/commits{/sha}","git_commits_url":"https://api.github.com/repos/lambdalf/lambdalf/git/commits{/sha}","comments_url":"https://api.github.com/repos/lambdalf/lambdalf/comments{/number}","issue_comment_url":"https://api.github.com/repos/lambdalf/lambdalf/issues/comments/{number}","contents_url":"https://api.github.com/repos/lambdalf/lambdalf/contents/{+path}","compare_url":"https://api.github.com/repos/lambdalf/lambdalf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lambdalf/lambdalf/merges","archive_url":"https://api.github.com/repos/lambdalf/lambdalf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lambdalf/lambdalf/downloads","issues_url":"https://api.github.com/repos/lambdalf/lambdalf/issues{/number}","pulls_url":"https://api.github.com/repos/lambdalf/lambdalf/pulls{/number}","milestones_url":"https://api.github.com/repos/lambdalf/lambdalf/milestones{/number}","notifications_url":"https://api.github.com/repos/lambdalf/lambdalf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lambdalf/lambdalf/labels{/name}","releases_url":"https://api.github.com/repos/lambdalf/lambdalf/releases{/id}","created_at":"2014-07-06T13:11:24Z","updated_at":"2014-12-15T16:53:16Z","pushed_at":"2014-12-04T03:45:03Z","git_url":"git://github.com/lambdalf/lambdalf.git","ssh_url":"git@github.com:lambdalf/lambdalf.git","clone_url":"https://github.com/lambdalf/lambdalf.git","svn_url":"https://github.com/lambdalf/lambdalf","homepage":"","size":1628,"stargazers_count":8,"watchers_count":8,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lambdalf/lambdalf/pulls/8"},"html":{"href":"https://github.com/lambdalf/lambdalf/pull/8"},"issue":{"href":"https://api.github.com/repos/lambdalf/lambdalf/issues/8"},"comments":{"href":"https://api.github.com/repos/lambdalf/lambdalf/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/lambdalf/lambdalf/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/lambdalf/lambdalf/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/lambdalf/lambdalf/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/lambdalf/lambdalf/statuses/f3a35ca6f9329254271c13fefd08e05daf137604"}}}}