Exemple #1
0
 private Node getPublishedContent(Node node, HashMap<String, String> filters) throws Exception {
   HashMap<String, Object> context = new HashMap<String, Object>();
   String mode = filters.get(FILTER_MODE);
   context.put(WCMComposer.FILTER_MODE, mode);
   context.put(WCMComposer.PORTLET_MODE, filters.get(PORTLET_MODE));
   String lifecyleName = null;
   try {
     lifecyleName = publicationService.getNodeLifecycleName(node);
   } catch (NotInPublicationLifecycleException e) {
     // Don't log here, this is normal
   }
   if (lifecyleName == null) return node;
   PublicationPlugin publicationPlugin =
       publicationService.getPublicationPlugins().get(lifecyleName);
   Node viewNode = publicationPlugin.getNodeView(node, context);
   return viewNode;
 }