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, Content content, Content.ContentFilter filter, ActivationContent activationContent)
           
 ActivationContent collect(Content node, List<String> orderBefore, String parent, String workspaceName, String repositoryName, 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, Content content, XMLReader elementfilter, OutputStream os, boolean noRecurse)
          Exports frozen resource.
protected  Content.ContentFilter getContentFilter(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(Content node,
                                 List<String> orderBefore,
                                 String parent,
                                 String workspaceName,
                                 String repositoryName,
                                 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 Content.ContentFilter getContentFilter(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,
                            Content content,
                            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,
                              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–2014 Magnolia International Ltd.. All rights reserved.