diff --git a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EntityEventField.java b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EntityEventField.java
index 3cb893a..60fa881 100644
--- a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EntityEventField.java
+++ b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EntityEventField.java
@@ -23,6 +23,11 @@ public class EntityEventField
private EventFieldEntityType entityType;
+ /**
+ * Gets the type of entities this field references.
+ *
+ * @return the type of entities this field references
+ */
public EventFieldEntityType getEntityType( )
{
return this.entityType;
diff --git a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventDefinition.java b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventDefinition.java
index f2d6148..e68f1c2 100644
--- a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventDefinition.java
+++ b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventDefinition.java
@@ -53,30 +53,55 @@ public class EventDefinition
private List< EventFieldBase > fields = new ArrayList< EventFieldBase >( );
+ /**
+ * Gets the identifier.
+ *
+ * @return the identifier
+ */
public String getIdentifier( )
{
return this.identifier;
}
+ /**
+ * Gets the priority.
+ *
+ * @return the priority
+ */
public int getPriority( )
{
return ( this.priority == null ) ? 2 : this.priority;
}
+ /**
+ * Checks if the priority is adjustable.
+ *
+ * @return true
if the priority is adjustable
+ */
public boolean isAdjustable( )
{
return ( this.adjustable == null ) ? true : this.adjustable;
}
+ /**
+ * Gets the prefix of the name and template strings.
+ *
+ * @return the prefix of the name and template strings.
+ */
public String getI18NStrings( )
{
return this.i18nStrings;
}
+ /**
+ * Allows iteration over the event definition's fields
+ *
+ * @return an iterator on the event definition's fields
+ */
@Override
public Iterator< EventFieldBase > iterator( )
{
@@ -84,6 +109,13 @@ public class EventDefinition
}
+ /**
+ * Verify fields data
+ *
+ *
+ * If no fields are defined, make sure the list is not null
; otherwise iterate over
+ * the fields to call their own data checks methods.
+ */
@Override
public void verifyData( )
throws DataImportException
diff --git a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventDefinitions.java b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventDefinitions.java
index 9e67ce4..f5037e0 100644
--- a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventDefinitions.java
+++ b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventDefinitions.java
@@ -42,6 +42,12 @@ public class EventDefinitions
}
+ /**
+ * Verify the list of definitions
+ *
+ *
+ * Make sure the list of definitions is not empty, then call the definitions' data check method.
+ */
@Override
public void verifyData( )
throws DataImportException
diff --git a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldBase.java b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldBase.java
index ea6ac1b..3cec5f5 100644
--- a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldBase.java
+++ b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldBase.java
@@ -38,12 +38,22 @@ public abstract class EventFieldBase
public abstract EventFieldType getType( );
+ /**
+ * Gets the field's identifier.
+ *
+ * @return the field's identifier
+ */
public String getIdentifier( )
{
return this.identifier;
}
+ /**
+ * Checks if the field is required or optional.
+ *
+ * @return true
if the field is required
+ */
public boolean isRequired( )
{
return this.required == null ? true : this.required;
diff --git a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldEntityType.java b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldEntityType.java
index 362e02f..52889af 100644
--- a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldEntityType.java
+++ b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldEntityType.java
@@ -1,7 +1,10 @@
package com.deepclone.lw.cli.xmlimport.data.evdef;
-/** Types of entities which can be referenced through entity fields */
+/** Types of entities which can be referenced through entity fields
+ *
+ * @author E. Benoît
+ */
public enum EventFieldEntityType {
/** Empires */
diff --git a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldType.java b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldType.java
index 0eb450e..1b33be3 100644
--- a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldType.java
+++ b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/EventFieldType.java
@@ -1,7 +1,10 @@
package com.deepclone.lw.cli.xmlimport.data.evdef;
-/** Types of event fields as they are stored in the definition file */
+/** Types of event fields as they are stored in the definition file
+ *
+ * @author E. Benoît
+ */
public enum EventFieldType {
/** An integer field */
diff --git a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/IntegerEventField.java b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/IntegerEventField.java
index 9e89c7d..1a8c1ec 100644
--- a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/IntegerEventField.java
+++ b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/IntegerEventField.java
@@ -25,12 +25,22 @@ public class IntegerEventField
private Integer max;
+ /**
+ * Gets the minimal value allowed for the field.
+ *
+ * @return the minimal value allowed for the field
+ */
public Integer getMin( )
{
return this.min;
}
+ /**
+ * Gets the maximal value allowed for the field.
+ *
+ * @return the maximal value allowed for the field
+ */
public Integer getMax( )
{
return this.max;
diff --git a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/RealEventField.java b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/RealEventField.java
index da3bf10..2b68d23 100644
--- a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/RealEventField.java
+++ b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/RealEventField.java
@@ -26,12 +26,22 @@ public class RealEventField
private Double max;
+ /**
+ * Gets the minimal value for the field.
+ *
+ * @return the minimal value for the field
+ */
public Double getMin( )
{
return this.min;
}
+ /**
+ * Gets the maximal value for the field.
+ *
+ * @return the maximal value for the field
+ */
public Double getMax( )
{
return this.max;
diff --git a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/TextEventField.java b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/TextEventField.java
index 80f6577..3e2ccd8 100644
--- a/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/TextEventField.java
+++ b/legacyworlds-server-main/src/main/java/com/deepclone/lw/cli/xmlimport/data/evdef/TextEventField.java
@@ -28,12 +28,22 @@ public class TextEventField
private Integer maxLength;
+ /**
+ * Gets the field's minimum length.
+ *
+ * @return the field's minimum length
+ */
public Integer getMinLength( )
{
return this.minLength;
}
+ /**
+ * Gets the field's maximum length.
+ *
+ * @return the field's maximum length
+ */
public Integer getMaxLength( )
{
return this.maxLength;