{"action":"created","comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/comments/35651951","id":35651951,"diff_hunk":"@@ -0,0 +1,417 @@\n+/*\n+ * Copyright 2015 the original author or authors.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package org.springframework.cloud.data.core;\n+\n+\n+import java.util.Collections;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+import org.springframework.core.style.ToStringCreator;\n+import org.springframework.util.Assert;\n+\n+/**\n+ * Representation of a module in the context of a defined stream.\n+ * This includes module options provided in a stream definition.\n+ * This does not include module information required at deployment\n+ * time (such as the number of module instances).\n+ *\n+ * @author Mark Fisher\n+ * @author Gary Russell\n+ * @author Luke Taylor\n+ * @author Ilayaperumal Gopinathan\n+ * @author Patrick Peralta\n+ */\n+public class ModuleDefinition implements Comparable<ModuleDefinition> {\n+\n+\t/**\n+\t * Name of module.\n+\t */\n+\tprivate final String name;\n+\n+\t/**\n+\t * Symbolic name of a module. This may be generated to a default\n+\t * value or specified in the DSL string.\n+\t */\n+\tprivate final String moduleLabel;\n+\n+\t/**\n+\t * Name of deployable unit this module instance belongs to (such as a stream or job).\n+\t */\n+\tprivate final String group;\n+\n+\t/**\n+\t * Position in stream definition relative to the other modules\n+\t * in the definition. 0 indicates the first/leftmost position.\n+\t */\n+\tprivate final int index;\n+\n+\t/**\n+\t * Map of channel bindings for this module (such as input and/or output channels).\n+\t */\n+\tprivate final Map<String, String> bindings;\n+\n+\t/**\n+\t * Parameters for module. This is specific to the type of module - for\n+\t * instance an http module would include a port number as a parameter.\n+\t */\n+\tprivate final Map<String, String> parameters;\n+\n+\n+\t/**\n+\t * Construct a {@code ModuleDescriptor}. This constructor is private; use\n+\t * {@link ModuleDefinition.Builder} to create a new instance.\n+\t *\n+\t * @param name name of module\n+\t * @param moduleLabel label used for module in stream/job definition\n+\t * @param group group this module belongs to (stream/job)\n+\t * @param index position of module in stream/job definition\n+\t * @param bindings map of channel bindings; may not be {@code null}\n+\t * @param parameters module parameters; may be {@code null}\n+\t */\n+\tprivate ModuleDefinition(String name, String moduleLabel, String group,\n+\t\t\tint index, Map<String, String> bindings, Map<String, String> parameters) {\n+\t\tAssert.notNull(name, \"name must not be null\");\n+\t\tAssert.notNull(moduleLabel, \"moduleLabel must not be null\");\n+\t\tAssert.notNull(group, \"group must not be null\");\n+\t\tAssert.notNull(bindings, \"bindings must not be null\");\n+\t\tAssert.notEmpty(bindings, \"bindings must not be empty\");\n+\t\tthis.name = name;\n+\t\tthis.moduleLabel = moduleLabel;\n+\t\tthis.group = group;\n+\t\tthis.index = index;\n+\t\tthis.bindings = Collections.unmodifiableMap(new HashMap<String, String>(bindings));\n+\t\tthis.parameters = parameters == null\n+\t\t\t\t? Collections.<String, String>emptyMap()\n+\t\t\t\t: Collections.unmodifiableMap(new HashMap<String, String>(parameters));\n+\t}\n+\n+\t/**\n+\t * Return the name of this module.\n+\t *\n+\t * @return module name\n+\t */\n+\tpublic String getModuleName() {\n+\t\treturn name;\n+\t}\n+\n+\t/**\n+\t * Return symbolic name of a module. This may be explicitly specified in\n+\t * the DSL string, which is required if the stream contains another module\n+\t * with the same name. Otherwise, it will be the same as the module name.\n+\t *\n+\t * @return module label\n+\t */\n+\tpublic String getModuleLabel() {","path":"spring-cloud-data-core/src/main/java/org/springframework/cloud/data/core/ModuleDefinition.java","position":119,"original_position":119,"commit_id":"7dc8911a2e353fe8af279fb2bd87add9ddd85ab9","original_commit_id":"7dc8911a2e353fe8af279fb2bd87add9ddd85ab9","user":{"login":"pperalta","id":394956,"avatar_url":"https://avatars.githubusercontent.com/u/394956?v=3","gravatar_id":"","url":"https://api.github.com/users/pperalta","html_url":"https://github.com/pperalta","followers_url":"https://api.github.com/users/pperalta/followers","following_url":"https://api.github.com/users/pperalta/following{/other_user}","gists_url":"https://api.github.com/users/pperalta/gists{/gist_id}","starred_url":"https://api.github.com/users/pperalta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pperalta/subscriptions","organizations_url":"https://api.github.com/users/pperalta/orgs","repos_url":"https://api.github.com/users/pperalta/repos","events_url":"https://api.github.com/users/pperalta/events{/privacy}","received_events_url":"https://api.github.com/users/pperalta/received_events","type":"User","site_admin":false},"body":"+1","created_at":"2015-07-28T14:16:02Z","updated_at":"2015-07-28T14:16:02Z","html_url":"https://github.com/spring-cloud/spring-cloud-data/pull/4#discussion_r35651951","pull_request_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/comments/35651951"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-data/pull/4#discussion_r35651951"},"pull_request":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/4","id":40939263,"html_url":"https://github.com/spring-cloud/spring-cloud-data/pull/4","diff_url":"https://github.com/spring-cloud/spring-cloud-data/pull/4.diff","patch_url":"https://github.com/spring-cloud/spring-cloud-data/pull/4.patch","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/4","number":4,"state":"open","locked":false,"title":"Initial commit of the domain model","user":{"login":"pperalta","id":394956,"avatar_url":"https://avatars.githubusercontent.com/u/394956?v=3","gravatar_id":"","url":"https://api.github.com/users/pperalta","html_url":"https://github.com/pperalta","followers_url":"https://api.github.com/users/pperalta/followers","following_url":"https://api.github.com/users/pperalta/following{/other_user}","gists_url":"https://api.github.com/users/pperalta/gists{/gist_id}","starred_url":"https://api.github.com/users/pperalta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pperalta/subscriptions","organizations_url":"https://api.github.com/users/pperalta/orgs","repos_url":"https://api.github.com/users/pperalta/repos","events_url":"https://api.github.com/users/pperalta/events{/privacy}","received_events_url":"https://api.github.com/users/pperalta/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-27T19:22:07Z","updated_at":"2015-07-28T14:16:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2848a3c3bf081fe38b8ec588d4363fc36746090e","assignee":{"login":"markfisher","id":140784,"avatar_url":"https://avatars.githubusercontent.com/u/140784?v=3","gravatar_id":"","url":"https://api.github.com/users/markfisher","html_url":"https://github.com/markfisher","followers_url":"https://api.github.com/users/markfisher/followers","following_url":"https://api.github.com/users/markfisher/following{/other_user}","gists_url":"https://api.github.com/users/markfisher/gists{/gist_id}","starred_url":"https://api.github.com/users/markfisher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markfisher/subscriptions","organizations_url":"https://api.github.com/users/markfisher/orgs","repos_url":"https://api.github.com/users/markfisher/repos","events_url":"https://api.github.com/users/markfisher/events{/privacy}","received_events_url":"https://api.github.com/users/markfisher/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/4/commits","review_comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/4/comments","review_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/4/comments","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/statuses/7dc8911a2e353fe8af279fb2bd87add9ddd85ab9","head":{"label":"pperalta:initial-domain-model","ref":"initial-domain-model","sha":"7dc8911a2e353fe8af279fb2bd87add9ddd85ab9","user":{"login":"pperalta","id":394956,"avatar_url":"https://avatars.githubusercontent.com/u/394956?v=3","gravatar_id":"","url":"https://api.github.com/users/pperalta","html_url":"https://github.com/pperalta","followers_url":"https://api.github.com/users/pperalta/followers","following_url":"https://api.github.com/users/pperalta/following{/other_user}","gists_url":"https://api.github.com/users/pperalta/gists{/gist_id}","starred_url":"https://api.github.com/users/pperalta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pperalta/subscriptions","organizations_url":"https://api.github.com/users/pperalta/orgs","repos_url":"https://api.github.com/users/pperalta/repos","events_url":"https://api.github.com/users/pperalta/events{/privacy}","received_events_url":"https://api.github.com/users/pperalta/received_events","type":"User","site_admin":false},"repo":{"id":39509430,"name":"spring-cloud-data","full_name":"pperalta/spring-cloud-data","owner":{"login":"pperalta","id":394956,"avatar_url":"https://avatars.githubusercontent.com/u/394956?v=3","gravatar_id":"","url":"https://api.github.com/users/pperalta","html_url":"https://github.com/pperalta","followers_url":"https://api.github.com/users/pperalta/followers","following_url":"https://api.github.com/users/pperalta/following{/other_user}","gists_url":"https://api.github.com/users/pperalta/gists{/gist_id}","starred_url":"https://api.github.com/users/pperalta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pperalta/subscriptions","organizations_url":"https://api.github.com/users/pperalta/orgs","repos_url":"https://api.github.com/users/pperalta/repos","events_url":"https://api.github.com/users/pperalta/events{/privacy}","received_events_url":"https://api.github.com/users/pperalta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pperalta/spring-cloud-data","description":"","fork":true,"url":"https://api.github.com/repos/pperalta/spring-cloud-data","forks_url":"https://api.github.com/repos/pperalta/spring-cloud-data/forks","keys_url":"https://api.github.com/repos/pperalta/spring-cloud-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pperalta/spring-cloud-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pperalta/spring-cloud-data/teams","hooks_url":"https://api.github.com/repos/pperalta/spring-cloud-data/hooks","issue_events_url":"https://api.github.com/repos/pperalta/spring-cloud-data/issues/events{/number}","events_url":"https://api.github.com/repos/pperalta/spring-cloud-data/events","assignees_url":"https://api.github.com/repos/pperalta/spring-cloud-data/assignees{/user}","branches_url":"https://api.github.com/repos/pperalta/spring-cloud-data/branches{/branch}","tags_url":"https://api.github.com/repos/pperalta/spring-cloud-data/tags","blobs_url":"https://api.github.com/repos/pperalta/spring-cloud-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pperalta/spring-cloud-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pperalta/spring-cloud-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/pperalta/spring-cloud-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pperalta/spring-cloud-data/statuses/{sha}","languages_url":"https://api.github.com/repos/pperalta/spring-cloud-data/languages","stargazers_url":"https://api.github.com/repos/pperalta/spring-cloud-data/stargazers","contributors_url":"https://api.github.com/repos/pperalta/spring-cloud-data/contributors","subscribers_url":"https://api.github.com/repos/pperalta/spring-cloud-data/subscribers","subscription_url":"https://api.github.com/repos/pperalta/spring-cloud-data/subscription","commits_url":"https://api.github.com/repos/pperalta/spring-cloud-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/pperalta/spring-cloud-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/pperalta/spring-cloud-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/pperalta/spring-cloud-data/issues/comments{/number}","contents_url":"https://api.github.com/repos/pperalta/spring-cloud-data/contents/{+path}","compare_url":"https://api.github.com/repos/pperalta/spring-cloud-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pperalta/spring-cloud-data/merges","archive_url":"https://api.github.com/repos/pperalta/spring-cloud-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pperalta/spring-cloud-data/downloads","issues_url":"https://api.github.com/repos/pperalta/spring-cloud-data/issues{/number}","pulls_url":"https://api.github.com/repos/pperalta/spring-cloud-data/pulls{/number}","milestones_url":"https://api.github.com/repos/pperalta/spring-cloud-data/milestones{/number}","notifications_url":"https://api.github.com/repos/pperalta/spring-cloud-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pperalta/spring-cloud-data/labels{/name}","releases_url":"https://api.github.com/repos/pperalta/spring-cloud-data/releases{/id}","created_at":"2015-07-22T14:02:13Z","updated_at":"2015-07-22T19:45:08Z","pushed_at":"2015-07-27T19:21:47Z","git_url":"git://github.com/pperalta/spring-cloud-data.git","ssh_url":"git@github.com:pperalta/spring-cloud-data.git","clone_url":"https://github.com/pperalta/spring-cloud-data.git","svn_url":"https://github.com/pperalta/spring-cloud-data","homepage":null,"size":0,"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":"spring-cloud:master","ref":"master","sha":"ffe506bd9935c3fc0dca1e15116c6db25a375e79","user":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"repo":{"id":39469487,"name":"spring-cloud-data","full_name":"spring-cloud/spring-cloud-data","owner":{"login":"spring-cloud","id":7815877,"avatar_url":"https://avatars.githubusercontent.com/u/7815877?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-cloud","html_url":"https://github.com/spring-cloud","followers_url":"https://api.github.com/users/spring-cloud/followers","following_url":"https://api.github.com/users/spring-cloud/following{/other_user}","gists_url":"https://api.github.com/users/spring-cloud/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-cloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-cloud/subscriptions","organizations_url":"https://api.github.com/users/spring-cloud/orgs","repos_url":"https://api.github.com/users/spring-cloud/repos","events_url":"https://api.github.com/users/spring-cloud/events{/privacy}","received_events_url":"https://api.github.com/users/spring-cloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-cloud/spring-cloud-data","description":"","fork":false,"url":"https://api.github.com/repos/spring-cloud/spring-cloud-data","forks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/forks","keys_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/teams","hooks_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/hooks","issue_events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/events{/number}","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/events","assignees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/assignees{/user}","branches_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/branches{/branch}","tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/tags","blobs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/languages","stargazers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/stargazers","contributors_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/contributors","subscribers_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/subscribers","subscription_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/subscription","commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/contents/{+path}","compare_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/merges","archive_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/downloads","issues_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues{/number}","pulls_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/labels{/name}","releases_url":"https://api.github.com/repos/spring-cloud/spring-cloud-data/releases{/id}","created_at":"2015-07-21T20:56:11Z","updated_at":"2015-07-22T19:38:16Z","pushed_at":"2015-07-27T19:22:07Z","git_url":"git://github.com/spring-cloud/spring-cloud-data.git","ssh_url":"git@github.com:spring-cloud/spring-cloud-data.git","clone_url":"https://github.com/spring-cloud/spring-cloud-data.git","svn_url":"https://github.com/spring-cloud/spring-cloud-data","homepage":null,"size":0,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/4"},"html":{"href":"https://github.com/spring-cloud/spring-cloud-data/pull/4"},"issue":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/4"},"comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/spring-cloud/spring-cloud-data/statuses/7dc8911a2e353fe8af279fb2bd87add9ddd85ab9"}}}}