{"action":"created","comment":{"url":"https://api.github.com/repos/trellis-ldp/trellis/pulls/comments/175910298","pull_request_review_id":105520792,"id":175910298,"diff_hunk":"@@ -127,4 +146,55 @@ public void run(final TrellisConfiguration config,\n                 new CrossOriginResourceSharingFilter(cors.getAllowOrigin(), cors.getAllowMethods(),\n                     cors.getAllowHeaders(), cors.getExposeHeaders(), cors.getAllowCredentials(), cors.getMaxAge())));\n     }\n+\n+    protected <T extends ResourceService> T buildResourceService(final IdentifierService idService,\n+                    final MementoService mementoService, final EventService notificationService) {\n+        final RDFConnection rdfConnection = getRDFConnection(config);\n+        // Health checks\n+        environment.healthChecks().register(\"rdfconnection\", new RDFConnectionHealthCheck(rdfConnection));\n+        return (T) new TriplestoreResourceService(rdfConnection, idService, mementoService, notificationService);\n+    }\n+\n+    protected AuditService buildAuditService() {\n+        return resourceService != null && resourceService instanceof AuditService\n+                        ? (AuditService) resourceService\n+                        : new DefaultAuditService();\n+    }\n+\n+    protected TrellisCache<String, String> buildCacheService() {\n+        final Long cacheSize = config.getJsonld().getCacheSize();\n+        final Long hours = config.getJsonld().getCacheExpireHours();\n+        final Cache<String, String> cache = newBuilder().maximumSize(cacheSize).expireAfterAccess(hours, HOURS).build();\n+        return new TrellisCache<>(cache);\n+    }\n+\n+    protected JenaIOService buildIoService(final NamespaceService namespaceService,\n+                    final CacheService<String, String> profileCache) {\n+        return new JenaIOService(namespaceService, profileCache, TrellisUtils.getAssetConfiguration(config));\n+    }\n+\n+    protected FileBinaryService buildBinaryService(final IdentifierService idService) {\n+        return new FileBinaryService(idService, config.getBinaries(), config.getBinaryHierarchyLevels(),\n+                        config.getBinaryHierarchyLength());\n+    }\n+\n+    protected NamespacesJsonContext buildNamespaceService() {\n+        return new NamespacesJsonContext(config.getNamespaces());\n+    }\n+\n+    protected FileMementoService buildMementoService() {\n+        return new FileMementoService(config.getMementos());\n+    }\n+\n+    protected UUIDGenerator buildIdService() {","path":"trellis-app/src/main/java/org/trellisldp/app/TrellisApplication.java","position":161,"original_position":161,"commit_id":"37442498e0484f53600d77557be43d2b9feb1755","original_commit_id":"37442498e0484f53600d77557be43d2b9feb1755","user":{"login":"acoburn","id":1265883,"avatar_url":"https://avatars2.githubusercontent.com/u/1265883?v=4","gravatar_id":"","url":"https://api.github.com/users/acoburn","html_url":"https://github.com/acoburn","followers_url":"https://api.github.com/users/acoburn/followers","following_url":"https://api.github.com/users/acoburn/following{/other_user}","gists_url":"https://api.github.com/users/acoburn/gists{/gist_id}","starred_url":"https://api.github.com/users/acoburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acoburn/subscriptions","organizations_url":"https://api.github.com/users/acoburn/orgs","repos_url":"https://api.github.com/users/acoburn/repos","events_url":"https://api.github.com/users/acoburn/events{/privacy}","received_events_url":"https://api.github.com/users/acoburn/received_events","type":"User","site_admin":false},"body":"`UUIDGenerator` => `IdentifierService`","created_at":"2018-03-20T20:24:15Z","updated_at":"2018-03-20T20:26:02Z","html_url":"https://github.com/trellis-ldp/trellis/pull/74#discussion_r175910298","pull_request_url":"https://api.github.com/repos/trellis-ldp/trellis/pulls/74","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/trellis-ldp/trellis/pulls/comments/175910298"},"html":{"href":"https://github.com/trellis-ldp/trellis/pull/74#discussion_r175910298"},"pull_request":{"href":"https://api.github.com/repos/trellis-ldp/trellis/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/trellis-ldp/trellis/pulls/74","id":176254596,"html_url":"https://github.com/trellis-ldp/trellis/pull/74","diff_url":"https://github.com/trellis-ldp/trellis/pull/74.diff","patch_url":"https://github.com/trellis-ldp/trellis/pull/74.patch","issue_url":"https://api.github.com/repos/trellis-ldp/trellis/issues/74","number":74,"state":"open","locked":false,"title":"Factoring apart component builds for easier overriding","user":{"login":"ajs6f","id":110994,"avatar_url":"https://avatars1.githubusercontent.com/u/110994?v=4","gravatar_id":"","url":"https://api.github.com/users/ajs6f","html_url":"https://github.com/ajs6f","followers_url":"https://api.github.com/users/ajs6f/followers","following_url":"https://api.github.com/users/ajs6f/following{/other_user}","gists_url":"https://api.github.com/users/ajs6f/gists{/gist_id}","starred_url":"https://api.github.com/users/ajs6f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajs6f/subscriptions","organizations_url":"https://api.github.com/users/ajs6f/orgs","repos_url":"https://api.github.com/users/ajs6f/repos","events_url":"https://api.github.com/users/ajs6f/events{/privacy}","received_events_url":"https://api.github.com/users/ajs6f/received_events","type":"User","site_admin":false},"body":"This commit introduces `protected` methods for most of the parts of a running Trellis instance, in order to make subclassing `TrellisApplication` less filled with cut-and-paste.","created_at":"2018-03-20T16:47:55Z","updated_at":"2018-03-20T20:26:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6256a621311c02dd3a7eaf1a9cf251a9bbf949b1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/trellis-ldp/trellis/pulls/74/commits","review_comments_url":"https://api.github.com/repos/trellis-ldp/trellis/pulls/74/comments","review_comment_url":"https://api.github.com/repos/trellis-ldp/trellis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trellis-ldp/trellis/issues/74/comments","statuses_url":"https://api.github.com/repos/trellis-ldp/trellis/statuses/37442498e0484f53600d77557be43d2b9feb1755","head":{"label":"ajs6f:FactorAppBits","ref":"FactorAppBits","sha":"37442498e0484f53600d77557be43d2b9feb1755","user":{"login":"ajs6f","id":110994,"avatar_url":"https://avatars1.githubusercontent.com/u/110994?v=4","gravatar_id":"","url":"https://api.github.com/users/ajs6f","html_url":"https://github.com/ajs6f","followers_url":"https://api.github.com/users/ajs6f/followers","following_url":"https://api.github.com/users/ajs6f/following{/other_user}","gists_url":"https://api.github.com/users/ajs6f/gists{/gist_id}","starred_url":"https://api.github.com/users/ajs6f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajs6f/subscriptions","organizations_url":"https://api.github.com/users/ajs6f/orgs","repos_url":"https://api.github.com/users/ajs6f/repos","events_url":"https://api.github.com/users/ajs6f/events{/privacy}","received_events_url":"https://api.github.com/users/ajs6f/received_events","type":"User","site_admin":false},"repo":{"id":118954770,"name":"trellis","full_name":"ajs6f/trellis","owner":{"login":"ajs6f","id":110994,"avatar_url":"https://avatars1.githubusercontent.com/u/110994?v=4","gravatar_id":"","url":"https://api.github.com/users/ajs6f","html_url":"https://github.com/ajs6f","followers_url":"https://api.github.com/users/ajs6f/followers","following_url":"https://api.github.com/users/ajs6f/following{/other_user}","gists_url":"https://api.github.com/users/ajs6f/gists{/gist_id}","starred_url":"https://api.github.com/users/ajs6f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajs6f/subscriptions","organizations_url":"https://api.github.com/users/ajs6f/orgs","repos_url":"https://api.github.com/users/ajs6f/repos","events_url":"https://api.github.com/users/ajs6f/events{/privacy}","received_events_url":"https://api.github.com/users/ajs6f/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajs6f/trellis","description":"Trellis is a platform for building scalable Linked Data applications","fork":true,"url":"https://api.github.com/repos/ajs6f/trellis","forks_url":"https://api.github.com/repos/ajs6f/trellis/forks","keys_url":"https://api.github.com/repos/ajs6f/trellis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajs6f/trellis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajs6f/trellis/teams","hooks_url":"https://api.github.com/repos/ajs6f/trellis/hooks","issue_events_url":"https://api.github.com/repos/ajs6f/trellis/issues/events{/number}","events_url":"https://api.github.com/repos/ajs6f/trellis/events","assignees_url":"https://api.github.com/repos/ajs6f/trellis/assignees{/user}","branches_url":"https://api.github.com/repos/ajs6f/trellis/branches{/branch}","tags_url":"https://api.github.com/repos/ajs6f/trellis/tags","blobs_url":"https://api.github.com/repos/ajs6f/trellis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajs6f/trellis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajs6f/trellis/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajs6f/trellis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajs6f/trellis/statuses/{sha}","languages_url":"https://api.github.com/repos/ajs6f/trellis/languages","stargazers_url":"https://api.github.com/repos/ajs6f/trellis/stargazers","contributors_url":"https://api.github.com/repos/ajs6f/trellis/contributors","subscribers_url":"https://api.github.com/repos/ajs6f/trellis/subscribers","subscription_url":"https://api.github.com/repos/ajs6f/trellis/subscription","commits_url":"https://api.github.com/repos/ajs6f/trellis/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajs6f/trellis/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajs6f/trellis/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajs6f/trellis/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajs6f/trellis/contents/{+path}","compare_url":"https://api.github.com/repos/ajs6f/trellis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajs6f/trellis/merges","archive_url":"https://api.github.com/repos/ajs6f/trellis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajs6f/trellis/downloads","issues_url":"https://api.github.com/repos/ajs6f/trellis/issues{/number}","pulls_url":"https://api.github.com/repos/ajs6f/trellis/pulls{/number}","milestones_url":"https://api.github.com/repos/ajs6f/trellis/milestones{/number}","notifications_url":"https://api.github.com/repos/ajs6f/trellis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajs6f/trellis/labels{/name}","releases_url":"https://api.github.com/repos/ajs6f/trellis/releases{/id}","deployments_url":"https://api.github.com/repos/ajs6f/trellis/deployments","created_at":"2018-01-25T18:59:31Z","updated_at":"2018-03-20T19:48:36Z","pushed_at":"2018-03-20T19:58:00Z","git_url":"git://github.com/ajs6f/trellis.git","ssh_url":"git@github.com:ajs6f/trellis.git","clone_url":"https://github.com/ajs6f/trellis.git","svn_url":"https://github.com/ajs6f/trellis","homepage":"https://www.trellisldp.org","size":1764,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"trellis-ldp:master","ref":"master","sha":"4ceeb231b502b37395c32fc9974f2aaa30f658f0","user":{"login":"trellis-ldp","id":25465334,"avatar_url":"https://avatars2.githubusercontent.com/u/25465334?v=4","gravatar_id":"","url":"https://api.github.com/users/trellis-ldp","html_url":"https://github.com/trellis-ldp","followers_url":"https://api.github.com/users/trellis-ldp/followers","following_url":"https://api.github.com/users/trellis-ldp/following{/other_user}","gists_url":"https://api.github.com/users/trellis-ldp/gists{/gist_id}","starred_url":"https://api.github.com/users/trellis-ldp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trellis-ldp/subscriptions","organizations_url":"https://api.github.com/users/trellis-ldp/orgs","repos_url":"https://api.github.com/users/trellis-ldp/repos","events_url":"https://api.github.com/users/trellis-ldp/events{/privacy}","received_events_url":"https://api.github.com/users/trellis-ldp/received_events","type":"Organization","site_admin":false},"repo":{"id":77492072,"name":"trellis","full_name":"trellis-ldp/trellis","owner":{"login":"trellis-ldp","id":25465334,"avatar_url":"https://avatars2.githubusercontent.com/u/25465334?v=4","gravatar_id":"","url":"https://api.github.com/users/trellis-ldp","html_url":"https://github.com/trellis-ldp","followers_url":"https://api.github.com/users/trellis-ldp/followers","following_url":"https://api.github.com/users/trellis-ldp/following{/other_user}","gists_url":"https://api.github.com/users/trellis-ldp/gists{/gist_id}","starred_url":"https://api.github.com/users/trellis-ldp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trellis-ldp/subscriptions","organizations_url":"https://api.github.com/users/trellis-ldp/orgs","repos_url":"https://api.github.com/users/trellis-ldp/repos","events_url":"https://api.github.com/users/trellis-ldp/events{/privacy}","received_events_url":"https://api.github.com/users/trellis-ldp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trellis-ldp/trellis","description":"Trellis is a platform for building scalable Linked Data applications","fork":false,"url":"https://api.github.com/repos/trellis-ldp/trellis","forks_url":"https://api.github.com/repos/trellis-ldp/trellis/forks","keys_url":"https://api.github.com/repos/trellis-ldp/trellis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trellis-ldp/trellis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trellis-ldp/trellis/teams","hooks_url":"https://api.github.com/repos/trellis-ldp/trellis/hooks","issue_events_url":"https://api.github.com/repos/trellis-ldp/trellis/issues/events{/number}","events_url":"https://api.github.com/repos/trellis-ldp/trellis/events","assignees_url":"https://api.github.com/repos/trellis-ldp/trellis/assignees{/user}","branches_url":"https://api.github.com/repos/trellis-ldp/trellis/branches{/branch}","tags_url":"https://api.github.com/repos/trellis-ldp/trellis/tags","blobs_url":"https://api.github.com/repos/trellis-ldp/trellis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trellis-ldp/trellis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trellis-ldp/trellis/git/refs{/sha}","trees_url":"https://api.github.com/repos/trellis-ldp/trellis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trellis-ldp/trellis/statuses/{sha}","languages_url":"https://api.github.com/repos/trellis-ldp/trellis/languages","stargazers_url":"https://api.github.com/repos/trellis-ldp/trellis/stargazers","contributors_url":"https://api.github.com/repos/trellis-ldp/trellis/contributors","subscribers_url":"https://api.github.com/repos/trellis-ldp/trellis/subscribers","subscription_url":"https://api.github.com/repos/trellis-ldp/trellis/subscription","commits_url":"https://api.github.com/repos/trellis-ldp/trellis/commits{/sha}","git_commits_url":"https://api.github.com/repos/trellis-ldp/trellis/git/commits{/sha}","comments_url":"https://api.github.com/repos/trellis-ldp/trellis/comments{/number}","issue_comment_url":"https://api.github.com/repos/trellis-ldp/trellis/issues/comments{/number}","contents_url":"https://api.github.com/repos/trellis-ldp/trellis/contents/{+path}","compare_url":"https://api.github.com/repos/trellis-ldp/trellis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trellis-ldp/trellis/merges","archive_url":"https://api.github.com/repos/trellis-ldp/trellis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trellis-ldp/trellis/downloads","issues_url":"https://api.github.com/repos/trellis-ldp/trellis/issues{/number}","pulls_url":"https://api.github.com/repos/trellis-ldp/trellis/pulls{/number}","milestones_url":"https://api.github.com/repos/trellis-ldp/trellis/milestones{/number}","notifications_url":"https://api.github.com/repos/trellis-ldp/trellis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trellis-ldp/trellis/labels{/name}","releases_url":"https://api.github.com/repos/trellis-ldp/trellis/releases{/id}","deployments_url":"https://api.github.com/repos/trellis-ldp/trellis/deployments","created_at":"2016-12-28T01:05:25Z","updated_at":"2018-03-20T18:04:48Z","pushed_at":"2018-03-20T19:58:02Z","git_url":"git://github.com/trellis-ldp/trellis.git","ssh_url":"git@github.com:trellis-ldp/trellis.git","clone_url":"https://github.com/trellis-ldp/trellis.git","svn_url":"https://github.com/trellis-ldp/trellis","homepage":"https://www.trellisldp.org","size":1770,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4,"open_issues":13,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trellis-ldp/trellis/pulls/74"},"html":{"href":"https://github.com/trellis-ldp/trellis/pull/74"},"issue":{"href":"https://api.github.com/repos/trellis-ldp/trellis/issues/74"},"comments":{"href":"https://api.github.com/repos/trellis-ldp/trellis/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/trellis-ldp/trellis/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/trellis-ldp/trellis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trellis-ldp/trellis/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/trellis-ldp/trellis/statuses/37442498e0484f53600d77557be43d2b9feb1755"}},"author_association":"OWNER"}}
{"actor":{"display_login":"acoburn"}}