Thanks Bertrand.
It works just as you say.

Regards
Dimitar

On 12/04/2012 11:21 AM, Bertrand Delacretaz wrote:
Hi Dimitar,

On Tue, Dec 4, 2012 at 9:52 AM, Dimitar Dimitrov <[email protected]> wrote:
...I am a pretty new in Sling and for now I am searching the way to get the
ContentImporter instance in my SlingPostProcessor implementation...
You can get it in the same way as the SlingPostServlet [1] does, using
an @Reference to a ContentImporter. Checking /system/console/services
does show that such a ContentImporter service is available in a
default Sling launchpad instance.

The default reference options are probably good for your case, so just

   @Reference
   private ContentImporter contentImporter;

should do.

-Bertrand

[1] 
http://svn.apache.org/repos/asf/sling/trunk/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java

Reply via email to