{"action":"created","comment":{"url":"https://api.github.com/repos/codice/ddf/pulls/comments/55210416","id":55210416,"diff_hunk":"@@ -63,48 +63,57 @@\n     public ApplicationImpl(Repository repo) {\n         location = repo.getURI();\n         try {\n+            String[] parts = repo.getName().split(\"-[0-9]\");\n+            if (parts.length != 0){\n+                name = parts[0];\n+                version = repo.getName().substring(name.length()+1);\n+            } else {\n+                name = repo.getName();\n+                version = \"0.0.0\";\n+            }\n             features = new HashSet<>(Arrays.asList(repo.getFeatures()));\n         } catch (Exception e) {\n             logger.warn(\n                     \"Error occured while trying to parse information for application. Application created but may have missing information.\");\n             features = new HashSet<>();\n         }\n-        List<Feature> autoFeatures = new ArrayList<>();\n+        autoInstallFeatures = new HashSet<>();\n         if (features.size() == 1) {\n-            autoFeatures.add(features.iterator()\n+            autoInstallFeatures.add(features.iterator()\n                     .next());\n         } else {\n-            for (Feature curFeature : features) {\n-                if (StringUtils.equalsIgnoreCase(Feature.DEFAULT_INSTALL_MODE,\n-                        curFeature.getInstall())) {\n-                    autoFeatures.add(curFeature);\n-                }\n-            }\n+            autoInstallFeatures.addAll(features.stream()\n+                    .filter(curFeature -> StringUtils.equalsIgnoreCase(Feature.DEFAULT_INSTALL_MODE,\n+                            curFeature.getInstall()))\n+                    .collect(Collectors.toList()));\n         }\n-        if (autoFeatures.size() == 1) {\n-            mainFeature = autoFeatures.get(0);\n+        // Determine mainFeature\n+        if (autoInstallFeatures.size() == 1) {\n+            mainFeature = autoInstallFeatures.iterator()\n+                    .next();\n             name = mainFeature.getName();\n             version = mainFeature.getVersion();\n             description = mainFeature.getDescription();\n         } else {\n-            try {\n-                if (repo.getName() == null) {\n-                    logger.warn(\n-                            \"No information available inside the repository, cannot create application instance.\");\n-                    throw new IllegalArgumentException(\n-                            \"No identifying information available inside the repository, cannot create application instance.\");\n+            for (Feature feature : autoInstallFeatures) {","path":"platform/admin/core/admin-core-appservice/src/main/java/org/codice/ddf/admin/application/service/impl/ApplicationImpl.java","position":80,"original_position":80,"commit_id":"8087db69d43e0ce6c7cce5e0f617233a7154843c","original_commit_id":"8087db69d43e0ce6c7cce5e0f617233a7154843c","user":{"login":"coyotesqrl","id":1469860,"avatar_url":"https://avatars.githubusercontent.com/u/1469860?v=3","gravatar_id":"","url":"https://api.github.com/users/coyotesqrl","html_url":"https://github.com/coyotesqrl","followers_url":"https://api.github.com/users/coyotesqrl/followers","following_url":"https://api.github.com/users/coyotesqrl/following{/other_user}","gists_url":"https://api.github.com/users/coyotesqrl/gists{/gist_id}","starred_url":"https://api.github.com/users/coyotesqrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coyotesqrl/subscriptions","organizations_url":"https://api.github.com/users/coyotesqrl/orgs","repos_url":"https://api.github.com/users/coyotesqrl/repos","events_url":"https://api.github.com/users/coyotesqrl/events{/privacy}","received_events_url":"https://api.github.com/users/coyotesqrl/received_events","type":"User","site_admin":false},"body":"A stream/filter might be cleaner here to get the one and only one feature you want and then set the values if it's not null. Might not be cleaner; I'm not sure.","created_at":"2016-03-07T14:33:47Z","updated_at":"2016-03-07T14:33:47Z","html_url":"https://github.com/codice/ddf/pull/597#discussion_r55210416","pull_request_url":"https://api.github.com/repos/codice/ddf/pulls/597","_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments/55210416"},"html":{"href":"https://github.com/codice/ddf/pull/597#discussion_r55210416"},"pull_request":{"href":"https://api.github.com/repos/codice/ddf/pulls/597"}}},"pull_request":{"url":"https://api.github.com/repos/codice/ddf/pulls/597","id":61801644,"html_url":"https://github.com/codice/ddf/pull/597","diff_url":"https://github.com/codice/ddf/pull/597.diff","patch_url":"https://github.com/codice/ddf/pull/597.patch","issue_url":"https://api.github.com/repos/codice/ddf/issues/597","number":597,"state":"open","locked":false,"title":"DDF-1648 - updated AppService to start all install=auto apps instead …","user":{"login":"kcwire","id":4631300,"avatar_url":"https://avatars.githubusercontent.com/u/4631300?v=3","gravatar_id":"","url":"https://api.github.com/users/kcwire","html_url":"https://github.com/kcwire","followers_url":"https://api.github.com/users/kcwire/followers","following_url":"https://api.github.com/users/kcwire/following{/other_user}","gists_url":"https://api.github.com/users/kcwire/gists{/gist_id}","starred_url":"https://api.github.com/users/kcwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcwire/subscriptions","organizations_url":"https://api.github.com/users/kcwire/orgs","repos_url":"https://api.github.com/users/kcwire/repos","events_url":"https://api.github.com/users/kcwire/events{/privacy}","received_events_url":"https://api.github.com/users/kcwire/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nUpdates the ApplicationServiceImpl to install all features marked with install=\"auto\" instead of only the \"main feature\".  It also updates the catalog-app, search-ui-app, content-app, spatial-app, & solr-app features files.\r\n#### Who is reviewing it?\r\n@coyotesqrl @pklinef @jaymcnallie \r\n#### How should this be tested?\r\nVerify Admin UI Installer.\r\nVerify Apps install from the command line.\r\n#### Any background context you want to provide?\r\nThis changed was required to accommodate how karaf 4 wires features & bundles together. The wiring now traverses the entire feature dependency digraph which requires us to not have a single feature to control an entire app.  By breaking each feature out of the root app it still allows individual control to start & stop features. \r\n#### What are the relevant tickets?\r\nDDF-1648\r\n#### Screenshots (if appropriate)\r\n#### Checklist:\r\n- [x] Documentation Updated\r\n- [x] Update / Add Unit Tests\r\n- [x] Update / Add Integration Tests\r\n\r\n…of only main app","created_at":"2016-03-05T05:08:32Z","updated_at":"2016-03-07T14:33:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68ac78531709de23a3d163b7291c1804e4988bc0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codice/ddf/pulls/597/commits","review_comments_url":"https://api.github.com/repos/codice/ddf/pulls/597/comments","review_comment_url":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codice/ddf/issues/597/comments","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/8087db69d43e0ce6c7cce5e0f617233a7154843c","head":{"label":"kcwire:apps-restructure","ref":"apps-restructure","sha":"8087db69d43e0ce6c7cce5e0f617233a7154843c","user":{"login":"kcwire","id":4631300,"avatar_url":"https://avatars.githubusercontent.com/u/4631300?v=3","gravatar_id":"","url":"https://api.github.com/users/kcwire","html_url":"https://github.com/kcwire","followers_url":"https://api.github.com/users/kcwire/followers","following_url":"https://api.github.com/users/kcwire/following{/other_user}","gists_url":"https://api.github.com/users/kcwire/gists{/gist_id}","starred_url":"https://api.github.com/users/kcwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcwire/subscriptions","organizations_url":"https://api.github.com/users/kcwire/orgs","repos_url":"https://api.github.com/users/kcwire/repos","events_url":"https://api.github.com/users/kcwire/events{/privacy}","received_events_url":"https://api.github.com/users/kcwire/received_events","type":"User","site_admin":false},"repo":{"id":39475870,"name":"ddf","full_name":"kcwire/ddf","owner":{"login":"kcwire","id":4631300,"avatar_url":"https://avatars.githubusercontent.com/u/4631300?v=3","gravatar_id":"","url":"https://api.github.com/users/kcwire","html_url":"https://github.com/kcwire","followers_url":"https://api.github.com/users/kcwire/followers","following_url":"https://api.github.com/users/kcwire/following{/other_user}","gists_url":"https://api.github.com/users/kcwire/gists{/gist_id}","starred_url":"https://api.github.com/users/kcwire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcwire/subscriptions","organizations_url":"https://api.github.com/users/kcwire/orgs","repos_url":"https://api.github.com/users/kcwire/repos","events_url":"https://api.github.com/users/kcwire/events{/privacy}","received_events_url":"https://api.github.com/users/kcwire/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kcwire/ddf","description":"The Distributed Data Framework - Distribution, SDK, and Test","fork":true,"url":"https://api.github.com/repos/kcwire/ddf","forks_url":"https://api.github.com/repos/kcwire/ddf/forks","keys_url":"https://api.github.com/repos/kcwire/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kcwire/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kcwire/ddf/teams","hooks_url":"https://api.github.com/repos/kcwire/ddf/hooks","issue_events_url":"https://api.github.com/repos/kcwire/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/kcwire/ddf/events","assignees_url":"https://api.github.com/repos/kcwire/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/kcwire/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/kcwire/ddf/tags","blobs_url":"https://api.github.com/repos/kcwire/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kcwire/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kcwire/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/kcwire/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kcwire/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/kcwire/ddf/languages","stargazers_url":"https://api.github.com/repos/kcwire/ddf/stargazers","contributors_url":"https://api.github.com/repos/kcwire/ddf/contributors","subscribers_url":"https://api.github.com/repos/kcwire/ddf/subscribers","subscription_url":"https://api.github.com/repos/kcwire/ddf/subscription","commits_url":"https://api.github.com/repos/kcwire/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/kcwire/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/kcwire/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/kcwire/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/kcwire/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/kcwire/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kcwire/ddf/merges","archive_url":"https://api.github.com/repos/kcwire/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kcwire/ddf/downloads","issues_url":"https://api.github.com/repos/kcwire/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/kcwire/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/kcwire/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/kcwire/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kcwire/ddf/labels{/name}","releases_url":"https://api.github.com/repos/kcwire/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/kcwire/ddf/deployments","created_at":"2015-07-22T00:02:09Z","updated_at":"2015-07-22T00:04:00Z","pushed_at":"2016-03-05T05:03:09Z","git_url":"git://github.com/kcwire/ddf.git","ssh_url":"git@github.com:kcwire/ddf.git","clone_url":"https://github.com/kcwire/ddf.git","svn_url":"https://github.com/kcwire/ddf","homepage":"","size":132371,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"codice:master","ref":"master","sha":"674f5d22fcda6e8b3203a35c035dba6b92d6f6ec","user":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"repo":{"id":15173563,"name":"ddf","full_name":"codice/ddf","owner":{"login":"codice","id":2386734,"avatar_url":"https://avatars.githubusercontent.com/u/2386734?v=3","gravatar_id":"","url":"https://api.github.com/users/codice","html_url":"https://github.com/codice","followers_url":"https://api.github.com/users/codice/followers","following_url":"https://api.github.com/users/codice/following{/other_user}","gists_url":"https://api.github.com/users/codice/gists{/gist_id}","starred_url":"https://api.github.com/users/codice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codice/subscriptions","organizations_url":"https://api.github.com/users/codice/orgs","repos_url":"https://api.github.com/users/codice/repos","events_url":"https://api.github.com/users/codice/events{/privacy}","received_events_url":"https://api.github.com/users/codice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codice/ddf","description":"The Distributed Data Framework - Federated Open Geospatial Consortium (OGC) filter powered metadata catalog with SAML Web SSO secured container","fork":false,"url":"https://api.github.com/repos/codice/ddf","forks_url":"https://api.github.com/repos/codice/ddf/forks","keys_url":"https://api.github.com/repos/codice/ddf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codice/ddf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codice/ddf/teams","hooks_url":"https://api.github.com/repos/codice/ddf/hooks","issue_events_url":"https://api.github.com/repos/codice/ddf/issues/events{/number}","events_url":"https://api.github.com/repos/codice/ddf/events","assignees_url":"https://api.github.com/repos/codice/ddf/assignees{/user}","branches_url":"https://api.github.com/repos/codice/ddf/branches{/branch}","tags_url":"https://api.github.com/repos/codice/ddf/tags","blobs_url":"https://api.github.com/repos/codice/ddf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codice/ddf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codice/ddf/git/refs{/sha}","trees_url":"https://api.github.com/repos/codice/ddf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codice/ddf/statuses/{sha}","languages_url":"https://api.github.com/repos/codice/ddf/languages","stargazers_url":"https://api.github.com/repos/codice/ddf/stargazers","contributors_url":"https://api.github.com/repos/codice/ddf/contributors","subscribers_url":"https://api.github.com/repos/codice/ddf/subscribers","subscription_url":"https://api.github.com/repos/codice/ddf/subscription","commits_url":"https://api.github.com/repos/codice/ddf/commits{/sha}","git_commits_url":"https://api.github.com/repos/codice/ddf/git/commits{/sha}","comments_url":"https://api.github.com/repos/codice/ddf/comments{/number}","issue_comment_url":"https://api.github.com/repos/codice/ddf/issues/comments{/number}","contents_url":"https://api.github.com/repos/codice/ddf/contents/{+path}","compare_url":"https://api.github.com/repos/codice/ddf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codice/ddf/merges","archive_url":"https://api.github.com/repos/codice/ddf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codice/ddf/downloads","issues_url":"https://api.github.com/repos/codice/ddf/issues{/number}","pulls_url":"https://api.github.com/repos/codice/ddf/pulls{/number}","milestones_url":"https://api.github.com/repos/codice/ddf/milestones{/number}","notifications_url":"https://api.github.com/repos/codice/ddf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codice/ddf/labels{/name}","releases_url":"https://api.github.com/repos/codice/ddf/releases{/id}","deployments_url":"https://api.github.com/repos/codice/ddf/deployments","created_at":"2013-12-13T20:38:28Z","updated_at":"2016-03-06T12:38:48Z","pushed_at":"2016-03-07T04:19:13Z","git_url":"git://github.com/codice/ddf.git","ssh_url":"git@github.com:codice/ddf.git","clone_url":"https://github.com/codice/ddf.git","svn_url":"https://github.com/codice/ddf","homepage":"","size":146152,"stargazers_count":34,"watchers_count":34,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":71,"mirror_url":null,"open_issues_count":17,"forks":71,"open_issues":17,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codice/ddf/pulls/597"},"html":{"href":"https://github.com/codice/ddf/pull/597"},"issue":{"href":"https://api.github.com/repos/codice/ddf/issues/597"},"comments":{"href":"https://api.github.com/repos/codice/ddf/issues/597/comments"},"review_comments":{"href":"https://api.github.com/repos/codice/ddf/pulls/597/comments"},"review_comment":{"href":"https://api.github.com/repos/codice/ddf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codice/ddf/pulls/597/commits"},"statuses":{"href":"https://api.github.com/repos/codice/ddf/statuses/8087db69d43e0ce6c7cce5e0f617233a7154843c"}}}}