{"action":"created","comment":{"url":"https://api.github.com/repos/codenvy/cdec/pulls/comments/56133052","id":56133052,"diff_hunk":"@@ -81,6 +83,36 @@ public LicenseType getLicenseType() {\n         return (LicenseType)doGetFeature(TYPE);\n     }\n \n+    /**\n+     * @return true:\n+     * 1) if (EVALUATION_PRODUCT_KEY IS NOT expired) AND (actual number of users <= allowed by license)\n+     * 2) if (PRODUCT_KEY            IS NOT expired) AND (actual number of users <= allowed by license)\n+     * 3) if (EVALUATION_PRODUCT_KEY IS     expired) AND ((actual number of users <= MIN_NUMBER_OF_FREE_USERS) AND (number of nodes <= MIN_NUMBER_OF_FREE_SERVERS))\n+     * 4) if (PRODUCT_KEY            IS     expired) AND (actual number of users <= MIN_NUMBER_OF_FREE_USERS)\n+     */\n+    public boolean isLicenseUsageLegal(long actualUsers, int actualServers) {\n+        if (isExpired()) {\n+            switch (getLicenseType()) {\n+                case EVALUATION_PRODUCT_KEY:\n+                default:\n+                    return isFreeUsageLegal(actualUsers, actualServers);\n+\n+                case PRODUCT_KEY:","path":"installation-manager-core/src/main/java/com/codenvy/im/license/CodenvyLicense.java","position":29,"original_position":29,"commit_id":"77feb9b8448ae3a1f4a4ece16d5df043cd365a10","original_commit_id":"77feb9b8448ae3a1f4a4ece16d5df043cd365a10","user":{"login":"dmytro-ndp","id":1197777,"avatar_url":"https://avatars.githubusercontent.com/u/1197777?v=3","gravatar_id":"","url":"https://api.github.com/users/dmytro-ndp","html_url":"https://github.com/dmytro-ndp","followers_url":"https://api.github.com/users/dmytro-ndp/followers","following_url":"https://api.github.com/users/dmytro-ndp/following{/other_user}","gists_url":"https://api.github.com/users/dmytro-ndp/gists{/gist_id}","starred_url":"https://api.github.com/users/dmytro-ndp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmytro-ndp/subscriptions","organizations_url":"https://api.github.com/users/dmytro-ndp/orgs","repos_url":"https://api.github.com/users/dmytro-ndp/repos","events_url":"https://api.github.com/users/dmytro-ndp/events{/privacy}","received_events_url":"https://api.github.com/users/dmytro-ndp/received_events","type":"User","site_admin":false},"body":"I will fix it.","created_at":"2016-03-15T09:12:14Z","updated_at":"2016-03-15T09:12:14Z","html_url":"https://github.com/codenvy/cdec/pull/27#discussion_r56133052","pull_request_url":"https://api.github.com/repos/codenvy/cdec/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/codenvy/cdec/pulls/comments/56133052"},"html":{"href":"https://github.com/codenvy/cdec/pull/27#discussion_r56133052"},"pull_request":{"href":"https://api.github.com/repos/codenvy/cdec/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/codenvy/cdec/pulls/27","id":62776038,"html_url":"https://github.com/codenvy/cdec/pull/27","diff_url":"https://github.com/codenvy/cdec/pull/27.diff","patch_url":"https://github.com/codenvy/cdec/pull/27.patch","issue_url":"https://api.github.com/repos/codenvy/cdec/issues/27","number":27,"state":"open","locked":false,"title":"CODENVY-70: add service to check if Codenvy usage is legal","user":{"login":"dmytro-ndp","id":1197777,"avatar_url":"https://avatars.githubusercontent.com/u/1197777?v=3","gravatar_id":"","url":"https://api.github.com/users/dmytro-ndp","html_url":"https://github.com/dmytro-ndp","followers_url":"https://api.github.com/users/dmytro-ndp/followers","following_url":"https://api.github.com/users/dmytro-ndp/following{/other_user}","gists_url":"https://api.github.com/users/dmytro-ndp/gists{/gist_id}","starred_url":"https://api.github.com/users/dmytro-ndp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmytro-ndp/subscriptions","organizations_url":"https://api.github.com/users/dmytro-ndp/orgs","repos_url":"https://api.github.com/users/dmytro-ndp/repos","events_url":"https://api.github.com/users/dmytro-ndp/events{/privacy}","received_events_url":"https://api.github.com/users/dmytro-ndp/received_events","type":"User","site_admin":false},"body":"@tolusha: please, review this request.","created_at":"2016-03-14T16:26:58Z","updated_at":"2016-03-15T09:12:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c621655ba905eacf53f6a86e1a5e0b6ed2ee672","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codenvy/cdec/pulls/27/commits","review_comments_url":"https://api.github.com/repos/codenvy/cdec/pulls/27/comments","review_comment_url":"https://api.github.com/repos/codenvy/cdec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codenvy/cdec/issues/27/comments","statuses_url":"https://api.github.com/repos/codenvy/cdec/statuses/77feb9b8448ae3a1f4a4ece16d5df043cd365a10","head":{"label":"codenvy:CODENVY-70","ref":"CODENVY-70","sha":"77feb9b8448ae3a1f4a4ece16d5df043cd365a10","user":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"repo":{"id":21941161,"name":"cdec","full_name":"codenvy/cdec","owner":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codenvy/cdec","description":"Codenvy Developer Environment Cloud","fork":false,"url":"https://api.github.com/repos/codenvy/cdec","forks_url":"https://api.github.com/repos/codenvy/cdec/forks","keys_url":"https://api.github.com/repos/codenvy/cdec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codenvy/cdec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codenvy/cdec/teams","hooks_url":"https://api.github.com/repos/codenvy/cdec/hooks","issue_events_url":"https://api.github.com/repos/codenvy/cdec/issues/events{/number}","events_url":"https://api.github.com/repos/codenvy/cdec/events","assignees_url":"https://api.github.com/repos/codenvy/cdec/assignees{/user}","branches_url":"https://api.github.com/repos/codenvy/cdec/branches{/branch}","tags_url":"https://api.github.com/repos/codenvy/cdec/tags","blobs_url":"https://api.github.com/repos/codenvy/cdec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codenvy/cdec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codenvy/cdec/git/refs{/sha}","trees_url":"https://api.github.com/repos/codenvy/cdec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codenvy/cdec/statuses/{sha}","languages_url":"https://api.github.com/repos/codenvy/cdec/languages","stargazers_url":"https://api.github.com/repos/codenvy/cdec/stargazers","contributors_url":"https://api.github.com/repos/codenvy/cdec/contributors","subscribers_url":"https://api.github.com/repos/codenvy/cdec/subscribers","subscription_url":"https://api.github.com/repos/codenvy/cdec/subscription","commits_url":"https://api.github.com/repos/codenvy/cdec/commits{/sha}","git_commits_url":"https://api.github.com/repos/codenvy/cdec/git/commits{/sha}","comments_url":"https://api.github.com/repos/codenvy/cdec/comments{/number}","issue_comment_url":"https://api.github.com/repos/codenvy/cdec/issues/comments{/number}","contents_url":"https://api.github.com/repos/codenvy/cdec/contents/{+path}","compare_url":"https://api.github.com/repos/codenvy/cdec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codenvy/cdec/merges","archive_url":"https://api.github.com/repos/codenvy/cdec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codenvy/cdec/downloads","issues_url":"https://api.github.com/repos/codenvy/cdec/issues{/number}","pulls_url":"https://api.github.com/repos/codenvy/cdec/pulls{/number}","milestones_url":"https://api.github.com/repos/codenvy/cdec/milestones{/number}","notifications_url":"https://api.github.com/repos/codenvy/cdec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codenvy/cdec/labels{/name}","releases_url":"https://api.github.com/repos/codenvy/cdec/releases{/id}","deployments_url":"https://api.github.com/repos/codenvy/cdec/deployments","created_at":"2014-07-17T12:32:23Z","updated_at":"2016-03-10T01:07:52Z","pushed_at":"2016-03-14T16:26:59Z","git_url":"git://github.com/codenvy/cdec.git","ssh_url":"git@github.com:codenvy/cdec.git","clone_url":"https://github.com/codenvy/cdec.git","svn_url":"https://github.com/codenvy/cdec","homepage":null,"size":6050,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":1,"forks":8,"open_issues":1,"watchers":7,"default_branch":"master"}},"base":{"label":"codenvy:master","ref":"master","sha":"07d62d26b037095ec804e2a433e640d92834b402","user":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"repo":{"id":21941161,"name":"cdec","full_name":"codenvy/cdec","owner":{"login":"codenvy","id":2736247,"avatar_url":"https://avatars.githubusercontent.com/u/2736247?v=3","gravatar_id":"","url":"https://api.github.com/users/codenvy","html_url":"https://github.com/codenvy","followers_url":"https://api.github.com/users/codenvy/followers","following_url":"https://api.github.com/users/codenvy/following{/other_user}","gists_url":"https://api.github.com/users/codenvy/gists{/gist_id}","starred_url":"https://api.github.com/users/codenvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codenvy/subscriptions","organizations_url":"https://api.github.com/users/codenvy/orgs","repos_url":"https://api.github.com/users/codenvy/repos","events_url":"https://api.github.com/users/codenvy/events{/privacy}","received_events_url":"https://api.github.com/users/codenvy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codenvy/cdec","description":"Codenvy Developer Environment Cloud","fork":false,"url":"https://api.github.com/repos/codenvy/cdec","forks_url":"https://api.github.com/repos/codenvy/cdec/forks","keys_url":"https://api.github.com/repos/codenvy/cdec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codenvy/cdec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codenvy/cdec/teams","hooks_url":"https://api.github.com/repos/codenvy/cdec/hooks","issue_events_url":"https://api.github.com/repos/codenvy/cdec/issues/events{/number}","events_url":"https://api.github.com/repos/codenvy/cdec/events","assignees_url":"https://api.github.com/repos/codenvy/cdec/assignees{/user}","branches_url":"https://api.github.com/repos/codenvy/cdec/branches{/branch}","tags_url":"https://api.github.com/repos/codenvy/cdec/tags","blobs_url":"https://api.github.com/repos/codenvy/cdec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codenvy/cdec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codenvy/cdec/git/refs{/sha}","trees_url":"https://api.github.com/repos/codenvy/cdec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codenvy/cdec/statuses/{sha}","languages_url":"https://api.github.com/repos/codenvy/cdec/languages","stargazers_url":"https://api.github.com/repos/codenvy/cdec/stargazers","contributors_url":"https://api.github.com/repos/codenvy/cdec/contributors","subscribers_url":"https://api.github.com/repos/codenvy/cdec/subscribers","subscription_url":"https://api.github.com/repos/codenvy/cdec/subscription","commits_url":"https://api.github.com/repos/codenvy/cdec/commits{/sha}","git_commits_url":"https://api.github.com/repos/codenvy/cdec/git/commits{/sha}","comments_url":"https://api.github.com/repos/codenvy/cdec/comments{/number}","issue_comment_url":"https://api.github.com/repos/codenvy/cdec/issues/comments{/number}","contents_url":"https://api.github.com/repos/codenvy/cdec/contents/{+path}","compare_url":"https://api.github.com/repos/codenvy/cdec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codenvy/cdec/merges","archive_url":"https://api.github.com/repos/codenvy/cdec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codenvy/cdec/downloads","issues_url":"https://api.github.com/repos/codenvy/cdec/issues{/number}","pulls_url":"https://api.github.com/repos/codenvy/cdec/pulls{/number}","milestones_url":"https://api.github.com/repos/codenvy/cdec/milestones{/number}","notifications_url":"https://api.github.com/repos/codenvy/cdec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codenvy/cdec/labels{/name}","releases_url":"https://api.github.com/repos/codenvy/cdec/releases{/id}","deployments_url":"https://api.github.com/repos/codenvy/cdec/deployments","created_at":"2014-07-17T12:32:23Z","updated_at":"2016-03-10T01:07:52Z","pushed_at":"2016-03-14T16:26:59Z","git_url":"git://github.com/codenvy/cdec.git","ssh_url":"git@github.com:codenvy/cdec.git","clone_url":"https://github.com/codenvy/cdec.git","svn_url":"https://github.com/codenvy/cdec","homepage":null,"size":6050,"stargazers_count":7,"watchers_count":7,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":1,"forks":8,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codenvy/cdec/pulls/27"},"html":{"href":"https://github.com/codenvy/cdec/pull/27"},"issue":{"href":"https://api.github.com/repos/codenvy/cdec/issues/27"},"comments":{"href":"https://api.github.com/repos/codenvy/cdec/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/codenvy/cdec/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/codenvy/cdec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codenvy/cdec/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/codenvy/cdec/statuses/77feb9b8448ae3a1f4a4ece16d5df043cd365a10"}}}}