{"id":16986729,"url":"https://github.com/jmigac/sling-specific-annotations","last_synced_at":"2025-07-07T00:03:51.747Z","repository":{"id":42028709,"uuid":"470465489","full_name":"jmigac/sling-specific-annotations","owner":"jmigac","description":"Sling specific annotations is a small projects which enables custom annotations for Sling models. Currently it enables @LocalDateValueMapValue and @LocalDateTimeValueMapValue specific injection. Mentioned annotation work on the principle by finding Date object from java.util and transforming it into LocalDate or LocalDateTime object as requested per specific annotations.","archived":false,"fork":false,"pushed_at":"2024-03-06T19:21:56.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T00:02:25.597Z","etag":null,"topics":["adobe-experience-manager","aem","annotation-processing","annotations","injection","sling"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmigac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-16T06:50:33.000Z","updated_at":"2022-03-16T08:47:45.000Z","dependencies_parsed_at":"2024-11-28T10:42:54.594Z","dependency_job_id":null,"html_url":"https://github.com/jmigac/sling-specific-annotations","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jmigac/sling-specific-annotations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmigac%2Fsling-specific-annotations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmigac%2Fsling-specific-annotations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmigac%2Fsling-specific-annotations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmigac%2Fsling-specific-annotations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmigac","download_url":"https://codeload.github.com/jmigac/sling-specific-annotations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmigac%2Fsling-specific-annotations/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263991427,"owners_count":23540662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adobe-experience-manager","aem","annotation-processing","annotations","injection","sling"],"created_at":"2024-10-14T02:46:45.757Z","updated_at":"2025-07-07T00:03:51.454Z","avatar_url":"https://github.com/jmigac.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sling specific annotations\n### Project information\n![GitHub Workflow Status](https://img.shields.io/github/workflow/status/jmigac/sling-specific-annotations/Java%20CI%20with%20Maven?style=for-the-badge)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/jmigac/sling-specific-annotations?style=for-the-badge)\n[![GitHub license](https://img.shields.io/github/license/jmigac/sling-specific-annotations?style=for-the-badge)](https://github.com/jmigac/additional-graphql-extensions/blob/main/LICENSE)\n![Lines of code](https://img.shields.io/tokei/lines/github/jmigac/sling-specific-annotations?style=for-the-badge)\n\n### Maven dependency intro\nSling specific annotations is a small projects which enables custom annotations for Sling models.\nCurrently it enables `@LocalDateValueMapValue` and `@LocalDateTimeValueMapValue` specific injection. Mentioned annotation work on the principle by finding Date object from java.util and transforming it into LocalDate or LocalDateTime object as requested per specific annotations.\n\n## How to add following project as dependency\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.juricamigac\u003c/groupId\u003e\n    \u003cartifactId\u003esling-specific-annotations\u003c/artifactId\u003e\n    \u003cversion\u003euse the latest version\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nUnder repositories add the following code block for repository specification\n```\n\u003crepository\u003e\n    \u003cid\u003egithub\u003c/id\u003e\n    \u003curl\u003ehttps://maven.pkg.github.com/jmigac/sling-specific-annotations\u003c/url\u003e\n    \u003csnapshots\u003e\n        \u003cenabled\u003etrue\u003c/enabled\u003e\n    \u003c/snapshots\u003e\n    \u003creleases\u003e\n        \u003cenabled\u003etrue\u003c/enabled\u003e\n  \u003c/releases\u003e\n\u003c/repository\u003e\n```\n\n### Additional dependencies which are required to use the following the extension\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.osgi\u003c/groupId\u003e\n    \u003cartifactId\u003eosgi.annotation\u003c/artifactId\u003e\n    \u003cversion\u003e7.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003ebiz.aQute.bnd\u003c/groupId\u003e\n    \u003cartifactId\u003ebndlib\u003c/artifactId\u003e\n    \u003cversion\u003e2.4.0\u003c/version\u003e\n    \u003cscope\u003eprovided\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n### How to use it\nAs you have injected `Date` object at this time for acquiring Date information in Sling model, with this dependency you can use the following code block to automatically inject `LocalDate` or `LocalDateTime` into Sling models.\n\n```\n@LocalDateValueMap\nprivate LocalDate date;\n```\n\n```\n@LocalDateValueMap(name = \"jcr:lastModified\", value=\"node/node2\")\nprivate LocalDate date;\n```\n\n```\n@LocalDateTimeValueMap\nprivate LocalDateTime date;\n```\n\n```\n@LocalDateTimeValueMap(name = \"jcr:lastModified\", value=\"node/node2\")\nprivate LocalDatetime date;\n```\n\n```\n@CurrentPage\nprivate Page page;\n```\n\n```\n@PageTemplate\nprivate Template template;\n```\n\nAnnotations `LocalDateValueMapValue` and `LocalDateTimeValueMapValue` have the same properties as ordinary `@ValueMapValue` to inject object with different name or in different structure path.\n\n## Known issues of dependency not getting resolved\n\nIf your bundle can't resolve the dependency, there might be a issue that it's not exported to the OSGi, so just import it in your bundle and then expose it to OSGi as shown in the example below.\n\n```\n\u003cplugin\u003e\n    \u003cgroupId\u003ebiz.aQute.bnd\u003c/groupId\u003e\n    \u003cartifactId\u003ebnd-maven-plugin\u003c/artifactId\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cid\u003ebnd-process\u003c/id\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003ebnd-process\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003cconfiguration\u003e\n                \u003cbnd\u003e\u003c![CDATA[\nImport-Package: javax.annotation;version=0.0.0,*\nExport-Package: com.juricamigac.slingspecificannotations.*;0.0.2,\\\n                    ]]\u003e\u003c/bnd\u003e\n            \u003c/configuration\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmigac%2Fsling-specific-annotations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmigac%2Fsling-specific-annotations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmigac%2Fsling-specific-annotations/lists"}