diff --git a/libreplan-business/src/main/java/org/libreplan/business/common/entities/AppProperties.java b/libreplan-business/src/main/java/org/libreplan/business/common/entities/AppProperties.java
index a5b977564..7c048051f 100644
--- a/libreplan-business/src/main/java/org/libreplan/business/common/entities/AppProperties.java
+++ b/libreplan-business/src/main/java/org/libreplan/business/common/entities/AppProperties.java
@@ -19,10 +19,22 @@
package org.libreplan.business.common.entities;
+import org.hibernate.validator.NotNull;
import org.libreplan.business.common.BaseEntity;
/**
- * AppProperties Entity
+ * AppProperties Entity, represents application configuration parameters.
+ *
+ * This property can be used by all applications who needs simple name-value
+ * pair configurations. It consists the following properties:
+ *
+ * - majorId: an indication for some large piece of functionality like "jira"
+ * for "jira-connector"
+ * - minorId: used for sub module within this majorId. It can be null if not
+ * used
+ * - propertyName: holder for the name of a property
+ * - propertyValue: holder for the value of a property
+ *
*
* @author Miciele Ghiorghis
*/
@@ -33,8 +45,11 @@ public class AppProperties extends BaseEntity {
}
private String majorId;
+
private String minorId;
+
private String propertyName;
+
private String propertyValue;
/**
@@ -43,6 +58,7 @@ public class AppProperties extends BaseEntity {
protected AppProperties() {
}
+ @NotNull(message = "majorId not specified")
public String getMajorId() {
return majorId;
}
@@ -59,6 +75,7 @@ public class AppProperties extends BaseEntity {
this.minorId = minorId;
}
+ @NotNull(message = "property name not specified")
public String getPropertyName() {
return propertyName;
}
@@ -67,6 +84,7 @@ public class AppProperties extends BaseEntity {
this.propertyName = propertyName;
}
+ @NotNull(message = "property value not specified")
public String getPropertyValue() {
return propertyValue;
}
diff --git a/libreplan-business/src/main/java/org/libreplan/business/common/entities/JobSchedulerConfiguration.java b/libreplan-business/src/main/java/org/libreplan/business/common/entities/JobSchedulerConfiguration.java
index a0938dc7a..ccee32606 100644
--- a/libreplan-business/src/main/java/org/libreplan/business/common/entities/JobSchedulerConfiguration.java
+++ b/libreplan-business/src/main/java/org/libreplan/business/common/entities/JobSchedulerConfiguration.java
@@ -19,10 +19,17 @@
package org.libreplan.business.common.entities;
+import org.hibernate.validator.NotNull;
import org.libreplan.business.common.BaseEntity;
/**
- * JobSchedulerConfiguration entity
+ * JobSchedulerConfiguration entity, represents parameters for the jobs to be
+ * scheduled. This entity is used by the SchedulerManager to
+ * schedule jobs and in UI to show the scheduler status.
+ *
+ * The jobGroup and jobName together forms a job key
+ * and non of the fields must be null. Moreover it should contain a valid
+ * cronExpression
*
* @author Miciele Ghiorghis
*/
@@ -39,12 +46,18 @@ public class JobSchedulerConfiguration extends BaseEntity {
}
private String jobGroup;
+
private String jobName;
+
private String triggerGroup;
+
private String triggerName;
+
private String cronExpression;
+
private String jobClassName;
+ @NotNull(message = "job group not specified")
public String getJobGroup() {
return jobGroup;
}
@@ -53,6 +66,7 @@ public class JobSchedulerConfiguration extends BaseEntity {
this.jobGroup = jobGroup;
}
+ @NotNull(message = "job name not specified")
public String getJobName() {
return jobName;
}
@@ -61,6 +75,7 @@ public class JobSchedulerConfiguration extends BaseEntity {
this.jobName = jobName;
}
+ @NotNull(message = "trigger group not specified")
public String getTriggerGroup() {
return triggerGroup;
}
@@ -69,6 +84,7 @@ public class JobSchedulerConfiguration extends BaseEntity {
this.triggerGroup = triggerGroup;
}
+ @NotNull(message = "trigger name not specified")
public String getTriggerName() {
return triggerName;
}
@@ -77,6 +93,7 @@ public class JobSchedulerConfiguration extends BaseEntity {
this.triggerName = triggerName;
}
+ @NotNull(message = "cron expression not specified")
public String getCronExpression() {
return cronExpression;
}
@@ -85,6 +102,7 @@ public class JobSchedulerConfiguration extends BaseEntity {
this.cronExpression = cronExpression;
}
+ @NotNull(message = "job class name not specified")
public String getJobClassName() {
return jobClassName;
}
diff --git a/libreplan-business/src/main/resources/org/libreplan/business/common/entities/AppProperties.hbm.xml b/libreplan-business/src/main/resources/org/libreplan/business/common/entities/AppProperties.hbm.xml
index 185cc5a58..789b78d0f 100644
--- a/libreplan-business/src/main/resources/org/libreplan/business/common/entities/AppProperties.hbm.xml
+++ b/libreplan-business/src/main/resources/org/libreplan/business/common/entities/AppProperties.hbm.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/libreplan-webapp/src/main/java/org/libreplan/importers/RosterException.java b/libreplan-webapp/src/main/java/org/libreplan/importers/RosterException.java
index 29ac804d0..43de84ea0 100644
--- a/libreplan-webapp/src/main/java/org/libreplan/importers/RosterException.java
+++ b/libreplan-webapp/src/main/java/org/libreplan/importers/RosterException.java
@@ -71,6 +71,22 @@ public class RosterException {
/**
* updates the exceptionType and effortDuration
*
+ * In Tim you can divide your exception day in different
+ * exceptionType, for example on Monday:
+ *
+ * - 4 hours RESOURCE_HOLIDAY
+ * - 2 hours STRIKE
+ * - 2 hours BANK_HOLIDAY
+ *
+ *
+ * But Libreplan allows only one exceptionType per day.
+ *
+ * In order to store different exceptionTypes per day as one
+ * exceptionType, this method gets the
+ * exceptionType from the rosterDTO with the
+ * highest duration, in this example RESOURCE_HOLIDAY as a valid exception
+ * type, but the total duration is the sum of all these exception types
+ *
* @param rosterExceptionItem
* the rosterException item
* @param rosterDTOs