{"action":"created","issue":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/861","labels_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/861/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/861/comments","events_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/861/events","html_url":"https://github.com/apache/incubator-brooklyn/pull/861","id":102236130,"number":861,"title":"Adds Entity.sensors() to group the sensor methods","user":{"login":"aledsage","id":593113,"avatar_url":"https://avatars.githubusercontent.com/u/593113?v=3","gravatar_id":"","url":"https://api.github.com/users/aledsage","html_url":"https://github.com/aledsage","followers_url":"https://api.github.com/users/aledsage/followers","following_url":"https://api.github.com/users/aledsage/following{/other_user}","gists_url":"https://api.github.com/users/aledsage/gists{/gist_id}","starred_url":"https://api.github.com/users/aledsage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aledsage/subscriptions","organizations_url":"https://api.github.com/users/aledsage/orgs","repos_url":"https://api.github.com/users/aledsage/repos","events_url":"https://api.github.com/users/aledsage/events{/privacy}","received_events_url":"https://api.github.com/users/aledsage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-20T21:00:50Z","updated_at":"2015-08-23T23:26:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/pulls/861","html_url":"https://github.com/apache/incubator-brooklyn/pull/861","diff_url":"https://github.com/apache/incubator-brooklyn/pull/861.diff","patch_url":"https://github.com/apache/incubator-brooklyn/pull/861.patch"},"body":"- The attribute/sensor methods are all in Entity.sensors().\r\n- Deprecates the previous things in Entity.* and EntityLocal.*,\r\n  except for getAttribute(AttributeSensor) which is left as a convenience.\r\n- In EntityInternal.sensors(), it returns SensorSupportInternal\r\n  which has more methods on it.\r\n\r\nThere are three big motivations for this:\r\n- Consistency with entity.config()\r\n- Simplification of the Entity class (which has way too many methods)\r\n  by grouping them.\r\n- Exposing the methods of EntityLocal on Entity, so we can \r\n  deprecate EntityLocal (this commit deals with just the attribute/sensor\r\n  methods of EntityLocal)\r\n\r\n\r\nNote that I haven't changed any of the uses of the old attribute methods. I wanted to get feedback first as to whether people agreed this was the right thing to do!\r\n\r\nDo people agree that `sensors()` is the best name? We could call it `attributes()`?"},"comment":{"url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/comments/133958189","html_url":"https://github.com/apache/incubator-brooklyn/pull/861#issuecomment-133958189","issue_url":"https://api.github.com/repos/apache/incubator-brooklyn/issues/861","id":133958189,"user":{"login":"hzbarcea","id":222984,"avatar_url":"https://avatars.githubusercontent.com/u/222984?v=3","gravatar_id":"","url":"https://api.github.com/users/hzbarcea","html_url":"https://github.com/hzbarcea","followers_url":"https://api.github.com/users/hzbarcea/followers","following_url":"https://api.github.com/users/hzbarcea/following{/other_user}","gists_url":"https://api.github.com/users/hzbarcea/gists{/gist_id}","starred_url":"https://api.github.com/users/hzbarcea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hzbarcea/subscriptions","organizations_url":"https://api.github.com/users/hzbarcea/orgs","repos_url":"https://api.github.com/users/hzbarcea/repos","events_url":"https://api.github.com/users/hzbarcea/events{/privacy}","received_events_url":"https://api.github.com/users/hzbarcea/received_events","type":"User","site_admin":false},"created_at":"2015-08-23T23:26:14Z","updated_at":"2015-08-23T23:26:14Z","body":"Lazy consensus. Merging."}}