jford 2004/10/06 14:19:40
Modified: portal/src/java/org/apache/jetspeed/tools/pamanager
FileSystemPAM.java
Log:
Added search engine dependency
Revision Changes Path
1.44 +22 -2
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java
Index: FileSystemPAM.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/tools/pamanager/FileSystemPAM.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- FileSystemPAM.java 17 Sep 2004 03:12:47 -0000 1.43
+++ FileSystemPAM.java 6 Oct 2004 21:19:40 -0000 1.44
@@ -38,6 +38,7 @@
import org.apache.jetspeed.om.common.portlet.MutablePortletApplication;
import org.apache.jetspeed.om.common.portlet.MutablePortletEntity;
import org.apache.jetspeed.om.common.servlet.MutableWebApplication;
+import org.apache.jetspeed.search.SearchEngine;
import
org.apache.jetspeed.tools.pamanager.servletcontainer.ApplicationServerManager;
import org.apache.jetspeed.util.ArgUtil;
import org.apache.jetspeed.util.ChecksumHelper;
@@ -81,6 +82,7 @@
protected PortletEntityAccessComponent entityAccess;
protected PortletWindowAccessor windowAccess;
private PortletCache portletCache;
+ private SearchEngine searchEngine;
protected ApplicationServerManager appServerManager;
@@ -162,6 +164,12 @@
log.warn("Error retrieving Application from Registry Database.
Application not found: " + paName);
return;
}
+
+ if(searchEngine != null)
+ {
+ searchEngine.remove(app);
+ searchEngine.remove(app.getPortletDefinitions());
+ }
log.info("Removing a portlets from the PortletCache that belong to
portlet application " + paName);
portletCache.removeAll(app);
@@ -184,7 +192,6 @@
}
entityAccess.removeFromCache(entity);
windowAccess.removeWindows(entity);
-
}
}
@@ -384,6 +391,12 @@
registry.registerPortletApplication(app);
log.info("Committing registry changes...");
store.getTransaction().commit();
+
+ if(searchEngine != null)
+ {
+ searchEngine.add(app);
+ searchEngine.add(app.getPortletDefinitions());
+ }
}
catch (Exception e)
{
@@ -799,4 +812,11 @@
}
}
+ /**
+ * @param searchEngine The searchEngine to set.
+ */
+ public void setSearchEngine(SearchEngine searchEngine)
+ {
+ this.searchEngine = searchEngine;
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]