{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-mediation/pulls/comments/45177920","id":45177920,"diff_hunk":"@@ -562,4 +659,138 @@ public int hashCode() {\n         }\n     }\n \n+    /**\n+     * @param synapseConfiguration Contains all the configuration includes CApp artifact configs\n+     * @return new Configuration which removes all the CApp related configs\n+     */\n+    public SynapseConfiguration removeCAppArtifactsBeforePersist(\n+            SynapseConfiguration synapseConfiguration) {\n+\n+        HashMap<String, SynapseConfiguration> returnMap = new HashMap<>();\n+        final Lock lock = getLock(synapseConfiguration.getAxisConfiguration());\n+        SynapseConfiguration cAppArtifactConfig = new SynapseConfiguration();\n+\n+        try {\n+            lock.lock();\n+            Map<String, Endpoint> endpoints = synapseConfiguration.getDefinedEndpoints();\n+            for (String name : endpoints.keySet()) {\n+                Endpoint ep = endpoints.get(name);\n+                if (ep != null && ep.getArtifactContainerName() != null) {\n+                    ep.setIsEdited(true);\n+                    cAppArtifactConfig.addEndpoint(name, ep);\n+                    synapseConfiguration.removeEndpoint(name);\n+                }\n+            }\n+\n+            Map<String, SequenceMediator> sequences = synapseConfiguration.getDefinedSequences();\n+            for (String name : sequences.keySet()) {\n+                SequenceMediator seq = sequences.get(name);\n+                if (seq != null && seq.getArtifactContainerName() != null) {\n+                    seq.setIsEdited(true);\n+                    cAppArtifactConfig.addSequence(name, seq);\n+                    synapseConfiguration.removeSequence(name);\n+                }\n+            }\n+\n+            Collection<ProxyService> proxyServices = synapseConfiguration.getProxyServices();\n+            for (ProxyService proxy : proxyServices) {\n+                if (proxy != null && proxy.getArtifactContainerName() != null) {\n+                    proxy.setIsEdited(true);\n+                    cAppArtifactConfig.addProxyService(proxy.getName(), proxy);\n+                    // Do not remove proxy service from the synapseConfiguration since the CGAgentAdminService will\n+                    // Throw an error while it try to find the service\n+                    // Therefore remove the persisted config xml after persisting\n+                }\n+            }\n+\n+            Map<String, Entry> localEntries = synapseConfiguration.getDefinedEntries();\n+            for (String name : localEntries.keySet()) {\n+                Entry e = localEntries.get(name);","path":"components/mediation-initializer/org.wso2.carbon.mediation.initializer/src/main/java/org/wso2/carbon/mediation/initializer/persistence/MediationPersistenceManager.java","position":183,"original_position":183,"commit_id":"8c1624dc746089bcba766663bbb3da93db68dc52","original_commit_id":"8c1624dc746089bcba766663bbb3da93db68dc52","user":{"login":"jagathsisira","id":11496067,"avatar_url":"https://avatars.githubusercontent.com/u/11496067?v=3","gravatar_id":"","url":"https://api.github.com/users/jagathsisira","html_url":"https://github.com/jagathsisira","followers_url":"https://api.github.com/users/jagathsisira/followers","following_url":"https://api.github.com/users/jagathsisira/following{/other_user}","gists_url":"https://api.github.com/users/jagathsisira/gists{/gist_id}","starred_url":"https://api.github.com/users/jagathsisira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jagathsisira/subscriptions","organizations_url":"https://api.github.com/users/jagathsisira/orgs","repos_url":"https://api.github.com/users/jagathsisira/repos","events_url":"https://api.github.com/users/jagathsisira/events{/privacy}","received_events_url":"https://api.github.com/users/jagathsisira/received_events","type":"User","site_admin":false},"body":"Avoid single character variable names. It will also conflict with exception.","created_at":"2015-11-18T09:42:12Z","updated_at":"2015-11-18T09:42:12Z","html_url":"https://github.com/wso2/carbon-mediation/pull/399#discussion_r45177920","pull_request_url":"https://api.github.com/repos/wso2/carbon-mediation/pulls/399","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-mediation/pulls/comments/45177920"},"html":{"href":"https://github.com/wso2/carbon-mediation/pull/399#discussion_r45177920"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-mediation/pulls/399"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-mediation/pulls/399","id":43109185,"html_url":"https://github.com/wso2/carbon-mediation/pull/399","diff_url":"https://github.com/wso2/carbon-mediation/pull/399.diff","patch_url":"https://github.com/wso2/carbon-mediation/pull/399.patch","issue_url":"https://api.github.com/repos/wso2/carbon-mediation/issues/399","number":399,"state":"closed","locked":false,"title":"Initial full source view update fix","user":{"login":"nadeeshaan","id":1329674,"avatar_url":"https://avatars.githubusercontent.com/u/1329674?v=3","gravatar_id":"","url":"https://api.github.com/users/nadeeshaan","html_url":"https://github.com/nadeeshaan","followers_url":"https://api.github.com/users/nadeeshaan/followers","following_url":"https://api.github.com/users/nadeeshaan/following{/other_user}","gists_url":"https://api.github.com/users/nadeeshaan/gists{/gist_id}","starred_url":"https://api.github.com/users/nadeeshaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadeeshaan/subscriptions","organizations_url":"https://api.github.com/users/nadeeshaan/orgs","repos_url":"https://api.github.com/users/nadeeshaan/repos","events_url":"https://api.github.com/users/nadeeshaan/events{/privacy}","received_events_url":"https://api.github.com/users/nadeeshaan/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-22T19:54:30Z","updated_at":"2015-11-18T09:42:12Z","closed_at":"2015-08-24T03:40:32Z","merged_at":"2015-08-24T03:40:32Z","merge_commit_sha":"c0a05e9f170d2116a7511d783de678b32ee00ffe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-mediation/pulls/399/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-mediation/pulls/399/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-mediation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-mediation/issues/399/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-mediation/statuses/8c1624dc746089bcba766663bbb3da93db68dc52","head":{"label":"nadeeshaan:Fix_full_source_view_issue","ref":"Fix_full_source_view_issue","sha":"8c1624dc746089bcba766663bbb3da93db68dc52","user":{"login":"nadeeshaan","id":1329674,"avatar_url":"https://avatars.githubusercontent.com/u/1329674?v=3","gravatar_id":"","url":"https://api.github.com/users/nadeeshaan","html_url":"https://github.com/nadeeshaan","followers_url":"https://api.github.com/users/nadeeshaan/followers","following_url":"https://api.github.com/users/nadeeshaan/following{/other_user}","gists_url":"https://api.github.com/users/nadeeshaan/gists{/gist_id}","starred_url":"https://api.github.com/users/nadeeshaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadeeshaan/subscriptions","organizations_url":"https://api.github.com/users/nadeeshaan/orgs","repos_url":"https://api.github.com/users/nadeeshaan/repos","events_url":"https://api.github.com/users/nadeeshaan/events{/privacy}","received_events_url":"https://api.github.com/users/nadeeshaan/received_events","type":"User","site_admin":false},"repo":{"id":35795537,"name":"carbon-mediation","full_name":"nadeeshaan/carbon-mediation","owner":{"login":"nadeeshaan","id":1329674,"avatar_url":"https://avatars.githubusercontent.com/u/1329674?v=3","gravatar_id":"","url":"https://api.github.com/users/nadeeshaan","html_url":"https://github.com/nadeeshaan","followers_url":"https://api.github.com/users/nadeeshaan/followers","following_url":"https://api.github.com/users/nadeeshaan/following{/other_user}","gists_url":"https://api.github.com/users/nadeeshaan/gists{/gist_id}","starred_url":"https://api.github.com/users/nadeeshaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadeeshaan/subscriptions","organizations_url":"https://api.github.com/users/nadeeshaan/orgs","repos_url":"https://api.github.com/users/nadeeshaan/repos","events_url":"https://api.github.com/users/nadeeshaan/events{/privacy}","received_events_url":"https://api.github.com/users/nadeeshaan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nadeeshaan/carbon-mediation","description":"","fork":true,"url":"https://api.github.com/repos/nadeeshaan/carbon-mediation","forks_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/forks","keys_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/teams","hooks_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/hooks","issue_events_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/issues/events{/number}","events_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/events","assignees_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/assignees{/user}","branches_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/branches{/branch}","tags_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/tags","blobs_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/git/refs{/sha}","trees_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/statuses/{sha}","languages_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/languages","stargazers_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/stargazers","contributors_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/contributors","subscribers_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/subscribers","subscription_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/subscription","commits_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/commits{/sha}","git_commits_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/git/commits{/sha}","comments_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/comments{/number}","issue_comment_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/issues/comments{/number}","contents_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/contents/{+path}","compare_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/merges","archive_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/downloads","issues_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/issues{/number}","pulls_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/pulls{/number}","milestones_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/milestones{/number}","notifications_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/labels{/name}","releases_url":"https://api.github.com/repos/nadeeshaan/carbon-mediation/releases{/id}","created_at":"2015-05-18T03:50:41Z","updated_at":"2015-05-18T03:50:47Z","pushed_at":"2015-11-18T05:03:21Z","git_url":"git://github.com/nadeeshaan/carbon-mediation.git","ssh_url":"git@github.com:nadeeshaan/carbon-mediation.git","clone_url":"https://github.com/nadeeshaan/carbon-mediation.git","svn_url":"https://github.com/nadeeshaan/carbon-mediation","homepage":null,"size":15399,"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":"wso2:master","ref":"master","sha":"65d052b163c67b0132bc2f02737c16629534f393","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":16429916,"name":"carbon-mediation","full_name":"wso2/carbon-mediation","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-mediation","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-mediation","forks_url":"https://api.github.com/repos/wso2/carbon-mediation/forks","keys_url":"https://api.github.com/repos/wso2/carbon-mediation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-mediation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-mediation/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-mediation/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-mediation/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-mediation/events","assignees_url":"https://api.github.com/repos/wso2/carbon-mediation/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-mediation/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-mediation/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-mediation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-mediation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-mediation/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-mediation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-mediation/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-mediation/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-mediation/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-mediation/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-mediation/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-mediation/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-mediation/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-mediation/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-mediation/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-mediation/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-mediation/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-mediation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-mediation/merges","archive_url":"https://api.github.com/repos/wso2/carbon-mediation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-mediation/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-mediation/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-mediation/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-mediation/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-mediation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-mediation/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-mediation/releases{/id}","created_at":"2014-02-01T07:01:29Z","updated_at":"2015-11-10T08:33:21Z","pushed_at":"2015-11-16T12:07:32Z","git_url":"git://github.com/wso2/carbon-mediation.git","ssh_url":"git@github.com:wso2/carbon-mediation.git","clone_url":"https://github.com/wso2/carbon-mediation.git","svn_url":"https://github.com/wso2/carbon-mediation","homepage":null,"size":21527,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":39,"forks":96,"open_issues":39,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-mediation/pulls/399"},"html":{"href":"https://github.com/wso2/carbon-mediation/pull/399"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-mediation/issues/399"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-mediation/issues/399/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-mediation/pulls/399/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-mediation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-mediation/pulls/399/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-mediation/statuses/8c1624dc746089bcba766663bbb3da93db68dc52"}}}}