I’m getting all the pages,taking the jcr:content of all the pages as resource and trying to update the pageTitle property using valueMap by adapting ValueMap to resource, But I’mgetting UnsupportedOperationException,
Please can anyone help to sort it out,This is my code snippet:
Resource next = resources.next();String path=next.getPath();Resource resource=resourceResolver.getResource(path+"/jcr:content");ValueMap pages = null;if (resource != null) {pages = resource.adaptTo(ValueMap.class);}if(pages != null) {pages.put("pageTitle","MyProject");}