Author: julien_viet
Date: 2010-01-20 12:01:22 -0500 (Wed, 20 Jan 2010)
New Revision: 1394
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/ModelDataStorage.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
GTNPORTAL-511 : immediatly save the mop after an update done by the gadget
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2010-01-20
16:37:29 UTC (rev 1393)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2010-01-20
17:01:22 UTC (rev 1394)
@@ -299,4 +299,16 @@
generateStorageName(container);
return container;
}
+
+ public void save() throws Exception
+ {
+ pomMgr.execute(new POMTask<Object>()
+ {
+ public Object run(POMSession session) throws Exception
+ {
+ session.save();
+ return null;
+ }
+ });
+ }
}
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/ModelDataStorage.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/ModelDataStorage.java 2010-01-20
16:37:29 UTC (rev 1393)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/ModelDataStorage.java 2010-01-20
17:01:22 UTC (rev 1394)
@@ -107,4 +107,6 @@
public DashboardData loadDashboard(String dashboardId) throws Exception;
public void saveDashboard(DashboardData dashboard) throws Exception;
+
+ public void save() throws Exception;
}
\ No newline at end of file
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-01-20
16:37:29 UTC (rev 1393)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-01-20
17:01:22 UTC (rev 1394)
@@ -26,6 +26,8 @@
import org.exoplatform.portal.config.model.ApplicationState;
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.config.model.Properties;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.data.ModelDataStorage;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.web.WebAppController;
import org.exoplatform.web.application.gadget.GadgetApplication;
@@ -398,6 +400,12 @@
//
state = service.save(state, gadget);
+
+ // WARNING :
+ // This is used to force a state save and it should not be copied else where to
make things
+ // convenient as this could lead to a severe performance degradation
+ ModelDataStorage mds = getApplicationComponent(ModelDataStorage.class);
+ mds.save();
}
/**
Show replies by date