Title: Reusing code between resources · Issue #335 · aws-cloudformation/cloudformation-cli-java-plugin · GitHub
Open Graph Title: Reusing code between resources · Issue #335 · aws-cloudformation/cloudformation-cli-java-plugin
X Title: Reusing code between resources · Issue #335 · aws-cloudformation/cloudformation-cli-java-plugin
Description: Hi, I'm from AWS IoT, we have a question/feature request. Our handlers across different resources use the same code for exception translations and listing resource tags. These resources reside in the same GitHub repository, yet, since ea...
Open Graph Description: Hi, I'm from AWS IoT, we have a question/feature request. Our handlers across different resources use the same code for exception translations and listing resource tags. These resources reside in t...
X Description: Hi, I'm from AWS IoT, we have a question/feature request. Our handlers across different resources use the same code for exception translations and listing resource tags. These resources reside ...
Opengraph URL: https://github.com/aws-cloudformation/cloudformation-cli-java-plugin/issues/335
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Reusing code between resources","articleBody":"Hi, I'm from AWS IoT, we have a question/feature request. \r\n\r\nOur handlers across different resources use the same code for exception translations and listing resource tags. These resources reside in the same GitHub repository, yet, since each resource has its own Maven project, we're unable to reuse that common code and haven't seen solutions in other repositories.\r\n\r\nSpecific examples from our AWS IoT repo (code is still in PRs):\r\n1. Exception translation code - [link](https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-iot/blob/09e62a47f99448c366eb7eaceb8c8ea76f8d6d36/aws-iot-securityprofile/src/main/java/com/amazonaws/iot/securityprofile/Translator.java#L295). We have this method in the Translator class for each resource.\r\n1. `listTags` method (calls IoT::ListTagsForResource) - [link](https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-iot/blob/09e62a47f99448c366eb7eaceb8c8ea76f8d6d36/aws-iot-securityprofile/src/main/java/com/amazonaws/iot/securityprofile/HandlerUtils.java#L46).\r\n\r\nFor both of these, we're able to reuse the code between handlers for the same resource, but we had to copy paste this piece of code for each resource.\r\n\r\nIs there a solution available for our use case?","author":{"url":"https://github.com/anton-aws","@type":"Person","name":"anton-aws"},"datePublished":"2020-12-04T22:09:07Z","url":"https://github.com/aws-cloudformation/cloudformation-cli-java-plugin/issues/335"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:93cf1968-4f7b-965f-497a-b09f1b8fc19f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B27C:25B7A4:1D41C4:280711:6AFD8F8C |
| html-safe-nonce | e5c4519575de8e49085992da8763e337c2268a2bb2d5dbb01ac6a4d6e8f96c05 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjdDOjI1QjdBNDoxRDQxQzQ6MjgwNzExOjZBRkQ4RjhDIiwidmlzaXRvcl9pZCI6IjEwMDUyNjAwNTQwMjM5OTkzNzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ac6cd14a5278aa02964a12a4aa4b55aabda0f2d5fafe40109da548a05db6c569 |
| hovercard-subject-tag | issue:757441306 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aws-cloudformation/cloudformation-cli-java-plugin/335/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f12238de175c224fd1733e6a0c03b2aee4b09599aa168d29a973929d98754aa2/aws-cloudformation/cloudformation-cli-java-plugin/issues/335 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f12238de175c224fd1733e6a0c03b2aee4b09599aa168d29a973929d98754aa2/aws-cloudformation/cloudformation-cli-java-plugin/issues/335 |
| og:image:alt | Hi, I'm from AWS IoT, we have a question/feature request. Our handlers across different resources use the same code for exception translations and listing resource tags. These resources reside in t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anton-aws |
| hostname | github.com |
| expected-hostname | github.com |
| None | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| turbo-cache-control | no-preview |
| go-import | github.com/aws-cloudformation/cloudformation-cli-java-plugin git https://github.com/aws-cloudformation/cloudformation-cli-java-plugin.git |
| octolytics-dimension-user_id | 19900777 |
| octolytics-dimension-user_login | aws-cloudformation |
| octolytics-dimension-repository_id | 152624998 |
| octolytics-dimension-repository_nwo | aws-cloudformation/cloudformation-cli-java-plugin |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 152624998 |
| octolytics-dimension-repository_network_root_nwo | aws-cloudformation/cloudformation-cli-java-plugin |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width