How to activate uploaded assets in DAM via my remotely running Java app over RMI? | Community
Skip to main content
October 16, 2015
Solved

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

  • October 16, 2015
  • 1 reply
  • 926 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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. 

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

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.