From: <luc...@us...> - 2009-03-14 17:58:44
|
Revision: 1093 http://openutils.svn.sourceforge.net/openutils/?rev=1093&view=rev Author: lucaboati Date: 2009-03-14 17:58:38 +0000 (Sat, 14 Mar 2009) Log Message: ----------- fixed to support magnolia 4.0 Modified Paths: -------------- trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/BootstrapAtomicFilter.java trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/AbstractBootstrapSyncListener.java trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/BootstrapSyncListener.java Modified: trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/BootstrapAtomicFilter.java =================================================================== --- trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/BootstrapAtomicFilter.java 2009-03-12 12:38:45 UTC (rev 1092) +++ trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/BootstrapAtomicFilter.java 2009-03-14 17:58:38 UTC (rev 1093) @@ -1,7 +1,8 @@ package it.openutils.mgnlbootstrapsync; -import info.magnolia.cms.core.ie.filters.VersionFilter; +import info.magnolia.importexport.filters.VersionFilter; + import org.apache.commons.lang.ArrayUtils; import org.xml.sax.Attributes; import org.xml.sax.SAXException; Modified: trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/AbstractBootstrapSyncListener.java =================================================================== --- trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/AbstractBootstrapSyncListener.java 2009-03-12 12:38:45 UTC (rev 1092) +++ trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/AbstractBootstrapSyncListener.java 2009-03-14 17:58:38 UTC (rev 1093) @@ -4,10 +4,10 @@ import info.magnolia.cms.core.HierarchyManager; import info.magnolia.cms.core.Path; import info.magnolia.cms.core.ie.DataTransporter; -import info.magnolia.cms.core.ie.filters.VersionFilter; import info.magnolia.cms.security.AccessDeniedException; import info.magnolia.cms.util.ContentUtil; import info.magnolia.context.MgnlContext; +import info.magnolia.importexport.filters.VersionFilter; import it.openutils.mgnlbootstrapsync.BootstrapAtomicFilter; import it.openutils.mgnlbootstrapsync.watch.BootstrapSyncRepositoryWatch; @@ -17,7 +17,6 @@ import java.io.IOException; import java.io.OutputStream; import java.util.Collection; -import java.util.Iterator; import java.util.zip.DeflaterOutputStream; import javax.jcr.PathNotFoundException; Modified: trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/BootstrapSyncListener.java =================================================================== --- trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/BootstrapSyncListener.java 2009-03-12 12:38:45 UTC (rev 1092) +++ trunk/openutils-mgnlbootstrapsync/src/main/java/it/openutils/mgnlbootstrapsync/listener/BootstrapSyncListener.java 2009-03-14 17:58:38 UTC (rev 1093) @@ -1,6 +1,8 @@ package it.openutils.mgnlbootstrapsync.listener; import info.magnolia.cms.beans.config.ConfigLoader; +import info.magnolia.cms.beans.config.ContentRepository; +import info.magnolia.cms.security.AccessDeniedException; import it.openutils.mgnlbootstrapsync.watch.BootstrapSyncRepositoryWatch; import java.util.ArrayList; @@ -63,11 +65,29 @@ @Override public void onEvent(EventIterator events) { - if (!ConfigLoader.isConfigured() || ConfigLoader.isBootstrapping()) + + //@todo Do we need it yet? + try { + if (!ContentRepository.checkIfInitialized()) + { + return; + } + } + catch (AccessDeniedException e) + { return; } - + catch (RepositoryException e) + { + return; + } + + // if (!ConfigLoader.isConfigured() || ConfigLoader.isBootstrapping()) + // { + // return; + // } + List<JcrOperation> operations = new ArrayList<JcrOperation>(); while (events.hasNext()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |