#1891: fix version inconsistency which caused runtime error
This commit is contained in:
parent
b7ec362648
commit
bc5ceeb64d
5 changed files with 23 additions and 12 deletions
|
|
@ -57,10 +57,8 @@ public class StartupApplicationListener implements ApplicationListener {
|
||||||
if (SecurityUtils.isGatheredStatsAlreadySent) {
|
if (SecurityUtils.isGatheredStatsAlreadySent) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (configurationDAO.getConfigurationWithReadOnlyTransaction() == null || configurationDAO.getConfigurationWithReadOnlyTransaction().isAllowToGatherUsageStatsEnabled()) {
|
if (configurationDAO.getConfigurationWithReadOnlyTransaction() == null || configurationDAO.getConfigurationWithReadOnlyTransaction().isAllowedToGatherUsageStatsEnabled()) {
|
||||||
GatheredUsageStats gatheredUsageStats = new GatheredUsageStats();
|
GatheredUsageStats gatheredUsageStats = new GatheredUsageStats(userDAO, orderModel, workReportModel, workerModel, machineModel,
|
||||||
|
|
||||||
gatheredUsageStats.setupNotAutowiredClasses(userDAO, orderModel, workReportModel, workerModel, machineModel,
|
|
||||||
expenseSheetModel, materialsModel, assignedQualityFormsModel);
|
expenseSheetModel, materialsModel, assignedQualityFormsModel);
|
||||||
|
|
||||||
gatheredUsageStats.sendGatheredUsageStatsToServer();
|
gatheredUsageStats.sendGatheredUsageStatsToServer();
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
import org.apache.cxf.jaxrs.client.WebClient;
|
import org.apache.cxf.jaxrs.client.WebClient;
|
||||||
import org.libreplan.business.calendars.entities.BaseCalendar;
|
import org.libreplan.business.calendars.entities.BaseCalendar;
|
||||||
import org.libreplan.business.common.daos.IConfigurationDAO;
|
import org.libreplan.business.common.daos.IConfigurationDAO;
|
||||||
|
import org.libreplan.business.common.entities.*;
|
||||||
import org.libreplan.business.common.exceptions.ValidationException;
|
import org.libreplan.business.common.exceptions.ValidationException;
|
||||||
import org.libreplan.business.costcategories.entities.TypeOfWorkHours;
|
import org.libreplan.business.costcategories.entities.TypeOfWorkHours;
|
||||||
import org.libreplan.business.users.entities.UserRole;
|
import org.libreplan.business.users.entities.UserRole;
|
||||||
|
|
@ -253,10 +254,9 @@ public class ConfigurationController extends GenericForwardComposer {
|
||||||
messages.showMessage(Level.INFO, _("Changes saved"));
|
messages.showMessage(Level.INFO, _("Changes saved"));
|
||||||
|
|
||||||
// Send data to server
|
// Send data to server
|
||||||
if (!SecurityUtils.isGatheredStatsAlreadySent &&
|
if (!SecurityUtils.isGatheredStatsAlreadySent && (configurationDAO.getConfigurationWithReadOnlyTransaction() == null || configurationDAO.getConfigurationWithReadOnlyTransaction().isAllowedToGatherUsageStatsEnabled())) {
|
||||||
configurationDAO.getConfigurationWithReadOnlyTransaction().isAllowedToGatherUsageStatsEnabled()) {
|
sendDataToServer();
|
||||||
sendDataToServer();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ( getSelectedConnector() != null &&
|
if ( getSelectedConnector() != null &&
|
||||||
!configurationModel.scheduleOrUnscheduleJobs(getSelectedConnector())) {
|
!configurationModel.scheduleOrUnscheduleJobs(getSelectedConnector())) {
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,20 @@ public class GatheredUsageStats {
|
||||||
initialize();
|
initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GatheredUsageStats(IUserDAO userDAO, IOrderModel orderModel, IWorkReportModel workReportModel, IWorkerModel workerModel,
|
||||||
|
IMachineModel machineModel, IExpenseSheetModel expenseSheetModel, IMaterialsModel materialsModel, IAssignedTaskQualityFormsToOrderElementModel assignedTaskQualityFormsToOrderElementModel) {
|
||||||
|
this.userDAO = userDAO;
|
||||||
|
this.orderModel = orderModel;
|
||||||
|
this.workReportModel = workReportModel;
|
||||||
|
this.workerModel = workerModel;
|
||||||
|
this.machineModel = machineModel;
|
||||||
|
this.expenseSheetModel = expenseSheetModel;
|
||||||
|
this.materialsModel = materialsModel;
|
||||||
|
this.assignedTaskQualityFormsToOrderElementModel = assignedTaskQualityFormsToOrderElementModel;
|
||||||
|
|
||||||
|
initialize();
|
||||||
|
}
|
||||||
|
|
||||||
private String generateID() {
|
private String generateID() {
|
||||||
String ip = null;
|
String ip = null;
|
||||||
String hostname = null;
|
String hostname = null;
|
||||||
|
|
|
||||||
|
|
@ -506,9 +506,8 @@ public class MultipleTabsPlannerController implements Composer, IGlobalViewEntry
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send data to server
|
// Send data to server
|
||||||
if ( !SecurityUtils.isGatheredStatsAlreadySent &&
|
if (!SecurityUtils.isGatheredStatsAlreadySent
|
||||||
configurationDAO.getConfiguration().isAllowedToGatherUsageStatsEnabled() ) {
|
&& (configurationDAO.getConfigurationWithReadOnlyTransaction() == null || configurationDAO.getConfigurationWithReadOnlyTransaction().isAllowedToGatherUsageStatsEnabled())) {
|
||||||
|
|
||||||
sendDataToServer();
|
sendDataToServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
pom.xml
2
pom.xml
|
|
@ -469,7 +469,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.zkoss.common</groupId>
|
<groupId>org.zkoss.common</groupId>
|
||||||
<artifactId>zweb</artifactId>
|
<artifactId>zweb</artifactId>
|
||||||
<version>5.0.11</version>
|
<version>8.0.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- JGraphT -->
|
<!-- JGraphT -->
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue