I added a custom metadata in CQ5 with name ./dc:sample
. Is there a way I can programmatically set this metadata for an asset?
I've written a workflow that intercepts the uploaded assets and replaces them with inputstream
sent from the third party service. I accomplish this by doing the following in my workflow.
Rendition rendition = resource.adaptTo(Rendition.class);
Asset asset = rendition.getAsset();
InputStream newInputStream = myService.sendFile(is);
asset.addRendition(rendition.getName(),newInputStream,asset.getMimeType());
Question
At this time I would like to set the ./dc:sample
metadata to a string like "test checking". Is this possible to do?