Dear Community,
Is the Feed importer feature available still on AEM? I tried using the classic UI but even that (at least using purely UI) does not seem to work. My questions here are:
I am looking into AEM 6.5+ or AEM as a Cloud Service offerings.
Thank you in advance.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @KimonP,
You can create custom implementation for Importer. Please find below for the details.
We should create a config (nt:unstructured node with mixin - cq:PollConfig) with properties as source, target and interval in either /etc or /content. Sample screenshot attached.
format for property, source : scheme:datasource where
In the implementation class, importData method has all the details as part of the poll config(have attached log screenshot) using which we can frame the desired logic.
package com.aem.demoproject.core.services.impl; import com.day.cq.polling.importer.ImportException; import com.day.cq.polling.importer.Importer; import org.apache.sling.api.resource.Resource; import org.osgi.service.component.annotations.Component; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Component(service = Importer.class, property = {Importer.SCHEME_PROPERTY + "=customImporter"}) public class CustomPollingImporter implements Importer { private static final Logger LOG = LoggerFactory.getLogger(CustomPollingImporter.class); @Override public void importData(String scheme, String datasource, Resource resource) throws ImportException { LOG.info("Scheme={}, data source={} and target repo path={} ", scheme, datasource, resource.getPath()); /* Logic to Parse the data source XML and write to target repo path */ } @Override public void importData(String s, String s1, Resource resource, String s2, String s3) throws ImportException { } }
Hi @KimonP,
You can create custom implementation for Importer. Please find below for the details.
We should create a config (nt:unstructured node with mixin - cq:PollConfig) with properties as source, target and interval in either /etc or /content. Sample screenshot attached.
format for property, source : scheme:datasource where
In the implementation class, importData method has all the details as part of the poll config(have attached log screenshot) using which we can frame the desired logic.
package com.aem.demoproject.core.services.impl; import com.day.cq.polling.importer.ImportException; import com.day.cq.polling.importer.Importer; import org.apache.sling.api.resource.Resource; import org.osgi.service.component.annotations.Component; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Component(service = Importer.class, property = {Importer.SCHEME_PROPERTY + "=customImporter"}) public class CustomPollingImporter implements Importer { private static final Logger LOG = LoggerFactory.getLogger(CustomPollingImporter.class); @Override public void importData(String scheme, String datasource, Resource resource) throws ImportException { LOG.info("Scheme={}, data source={} and target repo path={} ", scheme, datasource, resource.getPath()); /* Logic to Parse the data source XML and write to target repo path */ } @Override public void importData(String s, String s1, Resource resource, String s2, String s3) throws ImportException { } }
Views
Likes
Replies