Expand my Community achievements bar.

SOLVED

How to activate uploaded assets in DAM via my remotely running Java app over RMI?

Avatar

Level 1

I'm very new to CQ and if I use the wrong terms, I apologize. 

The Java app I'm writing runs on a different physical server than CQ. The app uploads pdfs to DAM via webDav and then sets metadata on the pdfs using JCR over RMI. All of that is working peachy. My question is - how can I programmatically publish/(Activate?) the newly uploaded pdfs from my application? Can this be done with JCR?

 

Thanks in advance!

cool

1 Accepted Solution

Avatar

Correct answer by
Level 10

Out of the box - no - you cannot do this via the JCR API. However.... with AEM - there is most often a custom way. This is no exception. 

You can write an AEM workflow that does that job. Then you can invoke the Workflow via an API. See:

http://helpx.adobe.com/experience-manager/using/invoking-experience-manager-workflows-using.html

That is -- you can use the Workflow APIs to invoke a workflow. Now here is the cool part of working with AEM. You can code a custom Sling Servlet that uses the Workflow API to invoke the workflow that publishes the content. 

Now using a Restful request from an external Java App - you can sent a GET Request to kick off the Sling Servlet. We have a community article that shows you how to invoke an AEM Servlet from an external Java app:

http://helpx.adobe.com/experience-manager/using/post_files.html

Notice that the Java app uses Apache org.apache.http APIs. 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Out of the box - no - you cannot do this via the JCR API. However.... with AEM - there is most often a custom way. This is no exception. 

You can write an AEM workflow that does that job. Then you can invoke the Workflow via an API. See:

http://helpx.adobe.com/experience-manager/using/invoking-experience-manager-workflows-using.html

That is -- you can use the Workflow APIs to invoke a workflow. Now here is the cool part of working with AEM. You can code a custom Sling Servlet that uses the Workflow API to invoke the workflow that publishes the content. 

Now using a Restful request from an external Java App - you can sent a GET Request to kick off the Sling Servlet. We have a community article that shows you how to invoke an AEM Servlet from an external Java app:

http://helpx.adobe.com/experience-manager/using/post_files.html

Notice that the Java app uses Apache org.apache.http APIs.