jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vijayanand kesavan <vijayanan...@gmail.com>
Subject JCROM development issue
Date Tue, 04 Oct 2011 04:57:30 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message