{"action":"created","comment":{"url":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/comments/77984009","id":77984009,"diff_hunk":"@@ -521,11 +557,76 @@ public Driver getDriver(UnitOfWork transaction, String name) throws KException {\n         ArgCheck.isNotNull(transaction, \"transaction\"); //$NON-NLS-1$\n         ArgCheck.isTrue((transaction.getState() == State.NOT_STARTED), \"transaction state is not NOT_STARTED\"); //$NON-NLS-1$\n \n-        if (hasChild(transaction, name, DataVirtLexicon.ResourceFile.DRIVER_FILE_NODE_TYPE)) {\n-            KomodoObject kobject = getChild(transaction, name, DataVirtLexicon.ResourceFile.DRIVER_FILE_NODE_TYPE);\n+        KomodoObject folderNode = super.getChild(transaction, CachedTeiid.DRIVERS_FOLDER, DataVirtLexicon.ResourceFile.DRIVER_FILE_NODE_TYPE);\n+        if(folderNode==null) {\n+            return null;\n+        }\n+\n+        if (folderNode.hasChild(transaction, name, DataVirtLexicon.ResourceFile.DRIVER_FILE_NODE_TYPE)) {\n+            KomodoObject kobject = folderNode.getChild(transaction, name, DataVirtLexicon.ResourceFile.DRIVER_FILE_NODE_TYPE);\n             return new DriverImpl(transaction, getRepository(), kobject.getAbsolutePath());\n         }\n \n         return null;\n     }\n+\n+    /* (non-Javadoc)\n+     * @see org.komodo.relational.teiid.CachedTeiid#removeVdb(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)\n+     */\n+    @Override\n+    public void removeVdb(UnitOfWork transaction,\n+                          String name) throws KException {\n+        ArgCheck.isNotNull(transaction, \"transaction\"); //$NON-NLS-1$\n+        ArgCheck.isTrue((transaction.getState() == State.NOT_STARTED), \"transaction state is not NOT_STARTED\"); //$NON-NLS-1$\n+\n+        KomodoObject folderNode = super.getChild(transaction, CachedTeiid.VDBS_FOLDER, KomodoLexicon.Folder.NODE_TYPE);\n+        if(folderNode==null) {\n+            return;\n+        }\n+\n+        if (folderNode.hasChild(transaction, name, VdbLexicon.Vdb.VIRTUAL_DATABASE)) {\n+            KomodoObject kobject = folderNode.getChild(transaction, name, VdbLexicon.Vdb.VIRTUAL_DATABASE);\n+            kobject.remove(transaction);\n+        }\n+    }\n+\n+    /* (non-Javadoc)\n+     * @see org.komodo.relational.teiid.CachedTeiid#removeDataSource(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)\n+     */\n+    @Override\n+    public void removeDataSource(UnitOfWork transaction,\n+                                 String name) throws KException {\n+        ArgCheck.isNotNull(transaction, \"transaction\"); //$NON-NLS-1$\n+        ArgCheck.isTrue((transaction.getState() == State.NOT_STARTED), \"transaction state is not NOT_STARTED\"); //$NON-NLS-1$\n+\n+        KomodoObject folderNode = super.getChild(transaction, CachedTeiid.DATA_SOURCES_FOLDER, KomodoLexicon.Folder.NODE_TYPE);\n+        if(folderNode==null) {\n+            return;\n+        }\n+\n+        if (folderNode.hasChild(transaction, name, DataVirtLexicon.Connection.NODE_TYPE)) {\n+            KomodoObject kobject = folderNode.getChild(transaction, name, DataVirtLexicon.Connection.NODE_TYPE);\n+            kobject.remove(transaction);\n+        }\n+    }\n+\n+    /* (non-Javadoc)\n+     * @see org.komodo.relational.teiid.CachedTeiid#removeDriver(org.komodo.spi.repository.Repository.UnitOfWork, java.lang.String)\n+     */\n+    @Override\n+    public void removeDriver(UnitOfWork transaction,\n+                             String name) throws KException {\n+        ArgCheck.isNotNull(transaction, \"transaction\"); //$NON-NLS-1$\n+        ArgCheck.isTrue((transaction.getState() == State.NOT_STARTED), \"transaction state is not NOT_STARTED\"); //$NON-NLS-1$\n+\n+        KomodoObject folderNode = super.getChild(transaction, CachedTeiid.DRIVERS_FOLDER, KomodoLexicon.Folder.NODE_TYPE);\n+        if(folderNode==null) {\n+            return;\n+        }\n+\n+        if (folderNode.hasChild(transaction, name, DataVirtLexicon.ResourceFile.DRIVER_FILE_NODE_TYPE)) {\n+            KomodoObject kobject = folderNode.getChild(transaction, name, DataVirtLexicon.ResourceFile.DRIVER_FILE_NODE_TYPE);\n+            kobject.remove(transaction);\n+        }\n+    }","path":"komodo-relational/src/main/java/org/komodo/relational/teiid/internal/CachedTeiidImpl.java","position":200,"original_position":200,"commit_id":"fd7805371bb7786ccf7c986080d9132a8021d23b","original_commit_id":"fd7805371bb7786ccf7c986080d9132a8021d23b","user":{"login":"phantomjinx","id":1634180,"avatar_url":"https://avatars.githubusercontent.com/u/1634180?v=3","gravatar_id":"","url":"https://api.github.com/users/phantomjinx","html_url":"https://github.com/phantomjinx","followers_url":"https://api.github.com/users/phantomjinx/followers","following_url":"https://api.github.com/users/phantomjinx/following{/other_user}","gists_url":"https://api.github.com/users/phantomjinx/gists{/gist_id}","starred_url":"https://api.github.com/users/phantomjinx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phantomjinx/subscriptions","organizations_url":"https://api.github.com/users/phantomjinx/orgs","repos_url":"https://api.github.com/users/phantomjinx/repos","events_url":"https://api.github.com/users/phantomjinx/events{/privacy}","received_events_url":"https://api.github.com/users/phantomjinx/received_events","type":"User","site_admin":false},"body":"Sorry! Really don't like these methods. The CachedTeiid state is wholy dependent upon the state of the Teiid instance (otherwise its not a cache).","created_at":"2016-09-08T10:48:53Z","updated_at":"2016-09-08T10:48:53Z","html_url":"https://github.com/Teiid-Designer/komodo/pull/429#discussion_r77984009","pull_request_url":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/429","_links":{"self":{"href":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/comments/77984009"},"html":{"href":"https://github.com/Teiid-Designer/komodo/pull/429#discussion_r77984009"},"pull_request":{"href":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/429"}}},"pull_request":{"url":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/429","id":84387696,"html_url":"https://github.com/Teiid-Designer/komodo/pull/429","diff_url":"https://github.com/Teiid-Designer/komodo/pull/429.diff","patch_url":"https://github.com/Teiid-Designer/komodo/pull/429.patch","issue_url":"https://api.github.com/repos/Teiid-Designer/komodo/issues/429","number":429,"state":"open","locked":false,"title":"Sprint4 updates","user":{"login":"mdrillin","id":1820403,"avatar_url":"https://avatars.githubusercontent.com/u/1820403?v=3","gravatar_id":"","url":"https://api.github.com/users/mdrillin","html_url":"https://github.com/mdrillin","followers_url":"https://api.github.com/users/mdrillin/followers","following_url":"https://api.github.com/users/mdrillin/following{/other_user}","gists_url":"https://api.github.com/users/mdrillin/gists{/gist_id}","starred_url":"https://api.github.com/users/mdrillin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdrillin/subscriptions","organizations_url":"https://api.github.com/users/mdrillin/orgs","repos_url":"https://api.github.com/users/mdrillin/repos","events_url":"https://api.github.com/users/mdrillin/events{/privacy}","received_events_url":"https://api.github.com/users/mdrillin/received_events","type":"User","site_admin":false},"body":"Changes in support of UI work for sprint 4\r\n- allow drivers and translators to be placed under a folder node.\r\n- in CachedTeiid now placing the different object types under their own folder.  Intent is to eliminate name clashes when objects of all types are mixed together.\r\n- in CachedTeiid added methods to allow removing objects directly.  Also added methods for updating a specific entry from the server - rather than wait for timed update or forcing a full refresh.\r\n- added deploy method to Vdb\r\n- service additions and updates in support of ui functionality\r\n","created_at":"2016-09-07T22:52:37Z","updated_at":"2016-09-08T10:48:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01a8a368f310949bf91c06e8fab669acccd5f4a3","assignee":{"login":"phantomjinx","id":1634180,"avatar_url":"https://avatars.githubusercontent.com/u/1634180?v=3","gravatar_id":"","url":"https://api.github.com/users/phantomjinx","html_url":"https://github.com/phantomjinx","followers_url":"https://api.github.com/users/phantomjinx/followers","following_url":"https://api.github.com/users/phantomjinx/following{/other_user}","gists_url":"https://api.github.com/users/phantomjinx/gists{/gist_id}","starred_url":"https://api.github.com/users/phantomjinx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phantomjinx/subscriptions","organizations_url":"https://api.github.com/users/phantomjinx/orgs","repos_url":"https://api.github.com/users/phantomjinx/repos","events_url":"https://api.github.com/users/phantomjinx/events{/privacy}","received_events_url":"https://api.github.com/users/phantomjinx/received_events","type":"User","site_admin":false},"assignees":[{"login":"phantomjinx","id":1634180,"avatar_url":"https://avatars.githubusercontent.com/u/1634180?v=3","gravatar_id":"","url":"https://api.github.com/users/phantomjinx","html_url":"https://github.com/phantomjinx","followers_url":"https://api.github.com/users/phantomjinx/followers","following_url":"https://api.github.com/users/phantomjinx/following{/other_user}","gists_url":"https://api.github.com/users/phantomjinx/gists{/gist_id}","starred_url":"https://api.github.com/users/phantomjinx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phantomjinx/subscriptions","organizations_url":"https://api.github.com/users/phantomjinx/orgs","repos_url":"https://api.github.com/users/phantomjinx/repos","events_url":"https://api.github.com/users/phantomjinx/events{/privacy}","received_events_url":"https://api.github.com/users/phantomjinx/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/429/commits","review_comments_url":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/429/comments","review_comment_url":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Teiid-Designer/komodo/issues/429/comments","statuses_url":"https://api.github.com/repos/Teiid-Designer/komodo/statuses/fd7805371bb7786ccf7c986080d9132a8021d23b","head":{"label":"mdrillin:MarkSprint4","ref":"MarkSprint4","sha":"fd7805371bb7786ccf7c986080d9132a8021d23b","user":{"login":"mdrillin","id":1820403,"avatar_url":"https://avatars.githubusercontent.com/u/1820403?v=3","gravatar_id":"","url":"https://api.github.com/users/mdrillin","html_url":"https://github.com/mdrillin","followers_url":"https://api.github.com/users/mdrillin/followers","following_url":"https://api.github.com/users/mdrillin/following{/other_user}","gists_url":"https://api.github.com/users/mdrillin/gists{/gist_id}","starred_url":"https://api.github.com/users/mdrillin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdrillin/subscriptions","organizations_url":"https://api.github.com/users/mdrillin/orgs","repos_url":"https://api.github.com/users/mdrillin/repos","events_url":"https://api.github.com/users/mdrillin/events{/privacy}","received_events_url":"https://api.github.com/users/mdrillin/received_events","type":"User","site_admin":false},"repo":{"id":14595817,"name":"komodo","full_name":"mdrillin/komodo","owner":{"login":"mdrillin","id":1820403,"avatar_url":"https://avatars.githubusercontent.com/u/1820403?v=3","gravatar_id":"","url":"https://api.github.com/users/mdrillin","html_url":"https://github.com/mdrillin","followers_url":"https://api.github.com/users/mdrillin/followers","following_url":"https://api.github.com/users/mdrillin/following{/other_user}","gists_url":"https://api.github.com/users/mdrillin/gists{/gist_id}","starred_url":"https://api.github.com/users/mdrillin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdrillin/subscriptions","organizations_url":"https://api.github.com/users/mdrillin/orgs","repos_url":"https://api.github.com/users/mdrillin/repos","events_url":"https://api.github.com/users/mdrillin/events{/privacy}","received_events_url":"https://api.github.com/users/mdrillin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mdrillin/komodo","description":"teiid modeling tool development utilizing ddl-based metamodel","fork":true,"url":"https://api.github.com/repos/mdrillin/komodo","forks_url":"https://api.github.com/repos/mdrillin/komodo/forks","keys_url":"https://api.github.com/repos/mdrillin/komodo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdrillin/komodo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdrillin/komodo/teams","hooks_url":"https://api.github.com/repos/mdrillin/komodo/hooks","issue_events_url":"https://api.github.com/repos/mdrillin/komodo/issues/events{/number}","events_url":"https://api.github.com/repos/mdrillin/komodo/events","assignees_url":"https://api.github.com/repos/mdrillin/komodo/assignees{/user}","branches_url":"https://api.github.com/repos/mdrillin/komodo/branches{/branch}","tags_url":"https://api.github.com/repos/mdrillin/komodo/tags","blobs_url":"https://api.github.com/repos/mdrillin/komodo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdrillin/komodo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdrillin/komodo/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdrillin/komodo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdrillin/komodo/statuses/{sha}","languages_url":"https://api.github.com/repos/mdrillin/komodo/languages","stargazers_url":"https://api.github.com/repos/mdrillin/komodo/stargazers","contributors_url":"https://api.github.com/repos/mdrillin/komodo/contributors","subscribers_url":"https://api.github.com/repos/mdrillin/komodo/subscribers","subscription_url":"https://api.github.com/repos/mdrillin/komodo/subscription","commits_url":"https://api.github.com/repos/mdrillin/komodo/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdrillin/komodo/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdrillin/komodo/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdrillin/komodo/issues/comments{/number}","contents_url":"https://api.github.com/repos/mdrillin/komodo/contents/{+path}","compare_url":"https://api.github.com/repos/mdrillin/komodo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdrillin/komodo/merges","archive_url":"https://api.github.com/repos/mdrillin/komodo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdrillin/komodo/downloads","issues_url":"https://api.github.com/repos/mdrillin/komodo/issues{/number}","pulls_url":"https://api.github.com/repos/mdrillin/komodo/pulls{/number}","milestones_url":"https://api.github.com/repos/mdrillin/komodo/milestones{/number}","notifications_url":"https://api.github.com/repos/mdrillin/komodo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdrillin/komodo/labels{/name}","releases_url":"https://api.github.com/repos/mdrillin/komodo/releases{/id}","deployments_url":"https://api.github.com/repos/mdrillin/komodo/deployments","created_at":"2013-11-21T18:26:00Z","updated_at":"2015-05-06T20:26:40Z","pushed_at":"2016-09-07T22:39:08Z","git_url":"git://github.com/mdrillin/komodo.git","ssh_url":"git@github.com:mdrillin/komodo.git","clone_url":"https://github.com/mdrillin/komodo.git","svn_url":"https://github.com/mdrillin/komodo","homepage":null,"size":83746,"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":"Teiid-Designer:sprint-4","ref":"sprint-4","sha":"925c42e1897d7177b44264f668681e570c03855e","user":{"login":"Teiid-Designer","id":1641911,"avatar_url":"https://avatars.githubusercontent.com/u/1641911?v=3","gravatar_id":"","url":"https://api.github.com/users/Teiid-Designer","html_url":"https://github.com/Teiid-Designer","followers_url":"https://api.github.com/users/Teiid-Designer/followers","following_url":"https://api.github.com/users/Teiid-Designer/following{/other_user}","gists_url":"https://api.github.com/users/Teiid-Designer/gists{/gist_id}","starred_url":"https://api.github.com/users/Teiid-Designer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teiid-Designer/subscriptions","organizations_url":"https://api.github.com/users/Teiid-Designer/orgs","repos_url":"https://api.github.com/users/Teiid-Designer/repos","events_url":"https://api.github.com/users/Teiid-Designer/events{/privacy}","received_events_url":"https://api.github.com/users/Teiid-Designer/received_events","type":"Organization","site_admin":false},"repo":{"id":14528678,"name":"komodo","full_name":"Teiid-Designer/komodo","owner":{"login":"Teiid-Designer","id":1641911,"avatar_url":"https://avatars.githubusercontent.com/u/1641911?v=3","gravatar_id":"","url":"https://api.github.com/users/Teiid-Designer","html_url":"https://github.com/Teiid-Designer","followers_url":"https://api.github.com/users/Teiid-Designer/followers","following_url":"https://api.github.com/users/Teiid-Designer/following{/other_user}","gists_url":"https://api.github.com/users/Teiid-Designer/gists{/gist_id}","starred_url":"https://api.github.com/users/Teiid-Designer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teiid-Designer/subscriptions","organizations_url":"https://api.github.com/users/Teiid-Designer/orgs","repos_url":"https://api.github.com/users/Teiid-Designer/repos","events_url":"https://api.github.com/users/Teiid-Designer/events{/privacy}","received_events_url":"https://api.github.com/users/Teiid-Designer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Teiid-Designer/komodo","description":"teiid modeling tool development utilizing ddl-based metamodel","fork":false,"url":"https://api.github.com/repos/Teiid-Designer/komodo","forks_url":"https://api.github.com/repos/Teiid-Designer/komodo/forks","keys_url":"https://api.github.com/repos/Teiid-Designer/komodo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Teiid-Designer/komodo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Teiid-Designer/komodo/teams","hooks_url":"https://api.github.com/repos/Teiid-Designer/komodo/hooks","issue_events_url":"https://api.github.com/repos/Teiid-Designer/komodo/issues/events{/number}","events_url":"https://api.github.com/repos/Teiid-Designer/komodo/events","assignees_url":"https://api.github.com/repos/Teiid-Designer/komodo/assignees{/user}","branches_url":"https://api.github.com/repos/Teiid-Designer/komodo/branches{/branch}","tags_url":"https://api.github.com/repos/Teiid-Designer/komodo/tags","blobs_url":"https://api.github.com/repos/Teiid-Designer/komodo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Teiid-Designer/komodo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Teiid-Designer/komodo/git/refs{/sha}","trees_url":"https://api.github.com/repos/Teiid-Designer/komodo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Teiid-Designer/komodo/statuses/{sha}","languages_url":"https://api.github.com/repos/Teiid-Designer/komodo/languages","stargazers_url":"https://api.github.com/repos/Teiid-Designer/komodo/stargazers","contributors_url":"https://api.github.com/repos/Teiid-Designer/komodo/contributors","subscribers_url":"https://api.github.com/repos/Teiid-Designer/komodo/subscribers","subscription_url":"https://api.github.com/repos/Teiid-Designer/komodo/subscription","commits_url":"https://api.github.com/repos/Teiid-Designer/komodo/commits{/sha}","git_commits_url":"https://api.github.com/repos/Teiid-Designer/komodo/git/commits{/sha}","comments_url":"https://api.github.com/repos/Teiid-Designer/komodo/comments{/number}","issue_comment_url":"https://api.github.com/repos/Teiid-Designer/komodo/issues/comments{/number}","contents_url":"https://api.github.com/repos/Teiid-Designer/komodo/contents/{+path}","compare_url":"https://api.github.com/repos/Teiid-Designer/komodo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Teiid-Designer/komodo/merges","archive_url":"https://api.github.com/repos/Teiid-Designer/komodo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Teiid-Designer/komodo/downloads","issues_url":"https://api.github.com/repos/Teiid-Designer/komodo/issues{/number}","pulls_url":"https://api.github.com/repos/Teiid-Designer/komodo/pulls{/number}","milestones_url":"https://api.github.com/repos/Teiid-Designer/komodo/milestones{/number}","notifications_url":"https://api.github.com/repos/Teiid-Designer/komodo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Teiid-Designer/komodo/labels{/name}","releases_url":"https://api.github.com/repos/Teiid-Designer/komodo/releases{/id}","deployments_url":"https://api.github.com/repos/Teiid-Designer/komodo/deployments","created_at":"2013-11-19T15:32:23Z","updated_at":"2016-08-09T03:48:42Z","pushed_at":"2016-09-07T22:52:37Z","git_url":"git://github.com/Teiid-Designer/komodo.git","ssh_url":"git@github.com:Teiid-Designer/komodo.git","clone_url":"https://github.com/Teiid-Designer/komodo.git","svn_url":"https://github.com/Teiid-Designer/komodo","homepage":null,"size":84226,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":50,"forks":17,"open_issues":50,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/429"},"html":{"href":"https://github.com/Teiid-Designer/komodo/pull/429"},"issue":{"href":"https://api.github.com/repos/Teiid-Designer/komodo/issues/429"},"comments":{"href":"https://api.github.com/repos/Teiid-Designer/komodo/issues/429/comments"},"review_comments":{"href":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/429/comments"},"review_comment":{"href":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Teiid-Designer/komodo/pulls/429/commits"},"statuses":{"href":"https://api.github.com/repos/Teiid-Designer/komodo/statuses/fd7805371bb7786ccf7c986080d9132a8021d23b"}}}}
{"actor":{"display_login":"phantomjinx"}}