Author: tdraier
Date: Fri Sep 14 12:55:12 2007
New Revision: 18462
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18462&repname=
=3Djahia
Log:
flush all pages that reference container list, if import was adding a conta=
iner ( JAHIA-2140 ) (port 18194)
Modified:
trunk/core/src/java/org/jahia/services/importexport/ImportHandler.java
Modified: trunk/core/src/java/org/jahia/services/importexport/ImportHandler=
.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/services/importexport/ImportHandler.java&rev=3D18462&repname=3Djah=
ia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/java/org/jahia/services/importexport/ImportHandler.java =
(original)
+++ trunk/core/src/java/org/jahia/services/importexport/ImportHandler.java =
Fri Sep 14 12:55:12 2007
@@ -582,6 +582,36 @@
if (lastObject =3D=3D topObjectWithAclChanged && lastObject !=3D n=
ull && restoreAcl) {
restoreAcl(topAcl, topObjectWithAclChanged);
}
+ =
+ if (objects.size() =3D=3D 1) {
+ if (lastObject instanceof ContentContainer) {
+ try {
+ ContentContainerList theList =3D (ContentContainerList=
) lastObject.getParent(null);
+ if (theList !=3D null) {
+ final Set containerPageRefs =3D ContentContainerLi=
stsXRefManager.getInstance().
+ getAbsoluteContainerListPageIDs(theList.ge=
tID());
+ if (containerPageRefs !=3D null) {
+ final Iterator pageRefIDs =3D containerPageRef=
s.iterator();
+ while (pageRefIDs.hasNext()) {
+ final Integer curPageID =3D (Integer) page=
RefIDs.next();
+ final HtmlCache htmlCache =3D ServicesRegi=
stry.getInstance().getCacheService().getHtmlCacheInstance();
+ if (htmlCache !=3D null) {
+ htmlCache.invalidatePageEntries(curPag=
eID.toString(), EntryLoadRequest.STAGING_WORKFLOW_STATE);
+ }
+ }
+ } else {
+ logger.debug("Why is cross ref list empty ?");
+ }
+ } else {
+ logger.debug(
+ "Couldn't retrieve parent containerList, w=
hy is that ?");
+ }
+ } catch (JahiaException e) {
+ logger.error("Cannot flush html cache",e);
+ }
+ }
+ }
+
if (lastObject instanceof ContentPage) {
lastPage =3D (ContentPage) lastObject;
JahiaEvent esi =3D new JahiaEvent(this, jParams, lastObject);
@@ -595,17 +625,6 @@
logger.error("Cannot send event", e); =
}
}
-//
-// if (lastObject instanceof ContentContainer) {
-// try {
-// ContainerHTMLCache chtmlCache =3D ServicesRegistry.getIn=
stance().getCacheService().getContainerHTMLCacheInstance();
-// chtmlCache.invalidateContainerEntries(Integer.toString(l=
astObject.getID()));
-// } catch (JahiaInitializationException e) {
-// logger.error("Cannot send event", e);
-// }
-// }
-//
-//
}
=
public void restoreAcl(String aclString, ContentObject object) {
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list