info.magnolia.module.exchangesimple
Class ResourceCollector

java.lang.Object
  extended by info.magnolia.module.exchangesimple.ResourceCollector

public class ResourceCollector
extends Object

Class responsible for collecting all the resources for activation of content.

Version:
$Id$

Constructor Summary
ResourceCollector()
           
 
Method Summary
protected  void addOrderingInfo(org.jdom.Element root, List<String> orderBefore)
          Adds ordering information to the resource mapping file.
protected  void addResources(org.jdom.Element resourceElement, javax.jcr.Session session, info.magnolia.cms.core.Content content, info.magnolia.cms.core.Content.ContentFilter filter, ActivationContent activationContent)
           
 ActivationContent collect(info.magnolia.cms.core.Content node, List<String> orderBefore, String parent, String workspaceName, String repositoryName, info.magnolia.cms.util.Rule contentFilterRule)
          Collects all information about activated content and its children (those that are set to be activated with the parent by filter rules).
protected  void exportAndParse(javax.jcr.Session session, info.magnolia.cms.core.Content content, XMLReader elementfilter, OutputStream os, boolean noRecurse)
          Exports frozen resource.
protected  info.magnolia.cms.core.Content.ContentFilter getContentFilter(info.magnolia.cms.util.Rule contentFilterRule)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceCollector

public ResourceCollector()
Method Detail

collect

public ActivationContent collect(info.magnolia.cms.core.Content node,
                                 List<String> orderBefore,
                                 String parent,
                                 String workspaceName,
                                 String repositoryName,
                                 info.magnolia.cms.util.Rule contentFilterRule)
                          throws Exception
Collects all information about activated content and its children (those that are set to be activated with the parent by filter rules).

Parameters:
contentFilterRule -
repositoryName -
workspaceName -
parent -
Throws:
Exception

getContentFilter

protected info.magnolia.cms.core.Content.ContentFilter getContentFilter(info.magnolia.cms.util.Rule contentFilterRule)

addOrderingInfo

protected void addOrderingInfo(org.jdom.Element root,
                               List<String> orderBefore)
Adds ordering information to the resource mapping file.

Parameters:
root - element of the resource file under which ordering info must be added
orderBefore -

addResources

protected void addResources(org.jdom.Element resourceElement,
                            javax.jcr.Session session,
                            info.magnolia.cms.core.Content content,
                            info.magnolia.cms.core.Content.ContentFilter filter,
                            ActivationContent activationContent)
                     throws IOException,
                            javax.jcr.RepositoryException,
                            SAXException,
                            Exception
Throws:
IOException
javax.jcr.RepositoryException
SAXException
Exception

exportAndParse

protected void exportAndParse(javax.jcr.Session session,
                              info.magnolia.cms.core.Content content,
                              XMLReader elementfilter,
                              OutputStream os,
                              boolean noRecurse)
                       throws Exception
Exports frozen resource. We can't export such resource directly, but need to filter out versioning information from the export.

Throws:
Exception


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.