developing a custom polling importer by marcel boucher
TRANSCRIPT
![Page 1: Developing a Custom Polling Importer by Marcel Boucher](https://reader036.vdocument.in/reader036/viewer/2022062513/55614c0ed8b42adb6b8b4e44/html5/thumbnails/1.jpg)
Developing a Custom Polling Importer: Ingesting and Processing External ContentMarcel Boucher | AEM Evangelist | @marcelboucher
![Page 2: Developing a Custom Polling Importer by Marcel Boucher](https://reader036.vdocument.in/reader036/viewer/2022062513/55614c0ed8b42adb6b8b4e44/html5/thumbnails/2.jpg)
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
AEM Feed Importer – Social Communities
2
Auto blogging with RSS and ATOM
Calendar Subscriptions via iCal
Analytics integration for top …
![Page 3: Developing a Custom Polling Importer by Marcel Boucher](https://reader036.vdocument.in/reader036/viewer/2022062513/55614c0ed8b42adb6b8b4e44/html5/thumbnails/3.jpg)
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
The Use Case
3
![Page 4: Developing a Custom Polling Importer by Marcel Boucher](https://reader036.vdocument.in/reader036/viewer/2022062513/55614c0ed8b42adb6b8b4e44/html5/thumbnails/4.jpg)
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
The Required Pieces
4
Data Source Importer Scheme Implementation
![Page 5: Developing a Custom Polling Importer by Marcel Boucher](https://reader036.vdocument.in/reader036/viewer/2022062513/55614c0ed8b42adb6b8b4e44/html5/thumbnails/5.jpg)
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
The Data Source
5
Jira QueryResult is a 13MB XML document
o Useless elements
o Calculations needed to be applied in parallel
![Page 6: Developing a Custom Polling Importer by Marcel Boucher](https://reader036.vdocument.in/reader036/viewer/2022062513/55614c0ed8b42adb6b8b4e44/html5/thumbnails/6.jpg)
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
The Importer Scheme
6
Add a custom Scheme1) Make a Copy of: /libs/cq/ui/widgets/source/widgets/wcm/FeedImporter.js2) To: /apps/cq/ui/widgets/source/widgets/wcm/FeedImporter.js3) Add your scheme:
{ "text":"Jira Feed", "value":"jira”}
![Page 7: Developing a Custom Polling Importer by Marcel Boucher](https://reader036.vdocument.in/reader036/viewer/2022062513/55614c0ed8b42adb6b8b4e44/html5/thumbnails/7.jpg)
© 2013 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
The Implementation
7
OSGi Bundle1) Add service descriptors
@Service(value=Importer.class)@Component(immediate = true, metatype = true)@Properties({
@Property(name = "service.name", value = "Jira RSS Polling Importer"), @Property(name = "service.description", value = "JIRA Polling Data Importer"), @Property(name = "importer.scheme", value="jira") , @Property(name = "jira.username", description = "The JIRA service account to be used."), @Property(name = "jira.password", description = "The JIRA servuce account password to be used."), @Property(name = "xslt.path", description = "The JCR path to the XSLT to be applied to the Jira feed.")
})
2) Implement the importData method
public void importData(final String scheme, final String dataSource, final Resource resource) throws ImportException {}
![Page 8: Developing a Custom Polling Importer by Marcel Boucher](https://reader036.vdocument.in/reader036/viewer/2022062513/55614c0ed8b42adb6b8b4e44/html5/thumbnails/8.jpg)
DEMO
![Page 9: Developing a Custom Polling Importer by Marcel Boucher](https://reader036.vdocument.in/reader036/viewer/2022062513/55614c0ed8b42adb6b8b4e44/html5/thumbnails/9.jpg)
Thank You