I am trying to create a node of type "jcr:content" in JCR repository. I am
using JCROM api.
The actual problem: I am not able to insert a property "cq:tags" under the
jcr:content. This is actually a String[] and the values does not reflect on
insertion programatically.
It would be of great help if anyone can advice the solution for this.
The code I have is something like below:
PageContentNode pgcNode = new PageContentNode();
pgcNode.setPath("/");
pgcNode.setDescription("Content description");
pgcNode.setName("jcr:content");
pgcNode.setResourceType("foundation/components/redirect");
pgcNode.setTemplate("/apps/hyattlib/templates/hredirect");
pgcNode.setTitle("english");
*pgcNode.setTags(new String[] {"abc", "def"});*
// 1. Get JCROM object
Jcrom jcrom = RepositoryUtil.getJCROM(new Class[] {
pgcNode.getClass() });
// 2. Login to repository
session = RepositoryUtil.login();
PageContentNodeDao pgcDao = new PageContentNodeDao(session, jcrom);
pgcDao.create(pgcNode);
session.save();
--Vijayanand