From f505d080db4e347ad0cb7d1ea8f0f9d447fa441b Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 8 Jun 2015 15:19:09 +0000 Subject: [PATCH] refs #200: Create accouting-lib library https://support.d4science.org/issues/200 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-lib@115252 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../accounting/datamodel/RawUsageRecord.java | 16 ++++++++-------- .../implementations/JobUsageRecord.java | 12 ++++++------ .../implementations/PortletUsageRecord.java | 10 +++++----- .../implementations/ServiceUsageRecord.java | 12 ++++++------ .../implementations/StorageUsageUsageRecord.java | 12 ++++++------ .../implementations/TaskUsageRecord.java | 14 +++++++------- .../aggregated/StorageStatusUsageRecord.java | 6 +++--- .../{annotations => validations}/Required.java | 2 +- .../annotations/Aggregated.java | 2 +- .../annotations/DeprecatedField.java | 2 +- .../annotations/DeprecationAction.java | 2 +- .../{ => validations}/annotations/NotEmpty.java | 4 ++-- .../annotations/NotEmptyIfNotNull.java | 4 ++-- .../{ => validations}/annotations/NotNull.java | 4 ++-- .../{ => validations}/annotations/ValidIP.java | 4 ++-- .../annotations/ValidInteger.java | 4 ++-- .../{ => validations}/annotations/ValidLong.java | 4 ++-- .../annotations/ValidOperationResult.java | 4 ++-- .../annotations/ValidityChecker.java | 4 ++-- .../validators/ConvertToOperationResult.java | 4 ++-- .../validators/FieldValidator.java | 2 +- .../{ => validations}/validators/Ignore.java | 4 ++-- .../validators/NotEmptyIfNotNullValidator.java | 2 +- .../validators/NotEmptyValidator.java | 2 +- .../validators/NotNullValidator.java | 2 +- .../validators/ValidIPValidator.java | 2 +- .../validators/ValidIntegerValidator.java | 2 +- .../validators/ValidLongValidator.java | 2 +- .../ValidOperationResultValidator.java | 2 +- .../validators/ValidTimeValidatorTest.java | 1 + 30 files changed, 74 insertions(+), 73 deletions(-) rename src/main/java/org/gcube/accounting/datamodel/{annotations => validations}/Required.java (83%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/Aggregated.java (80%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/DeprecatedField.java (85%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/DeprecationAction.java (82%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/NotEmpty.java (68%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/NotEmptyIfNotNull.java (68%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/NotNull.java (68%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/ValidIP.java (68%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/ValidInteger.java (68%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/ValidLong.java (68%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/ValidOperationResult.java (68%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/annotations/ValidityChecker.java (76%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/ConvertToOperationResult.java (74%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/FieldValidator.java (89%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/Ignore.java (82%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/NotEmptyIfNotNullValidator.java (90%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/NotEmptyValidator.java (94%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/NotNullValidator.java (86%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/ValidIPValidator.java (96%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/ValidIntegerValidator.java (90%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/ValidLongValidator.java (91%) rename src/main/java/org/gcube/accounting/datamodel/{ => validations}/validators/ValidOperationResultValidator.java (95%) diff --git a/src/main/java/org/gcube/accounting/datamodel/RawUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/RawUsageRecord.java index ce6ba23..ce2237a 100644 --- a/src/main/java/org/gcube/accounting/datamodel/RawUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/RawUsageRecord.java @@ -17,14 +17,14 @@ import java.util.Map.Entry; import java.util.Set; import java.util.UUID; -import org.gcube.accounting.datamodel.annotations.Aggregated; -import org.gcube.accounting.datamodel.annotations.NotEmpty; -import org.gcube.accounting.datamodel.annotations.NotEmptyIfNotNull; -import org.gcube.accounting.datamodel.annotations.Required; -import org.gcube.accounting.datamodel.annotations.ValidLong; -import org.gcube.accounting.datamodel.annotations.ValidOperationResult; -import org.gcube.accounting.datamodel.annotations.ValidityChecker; -import org.gcube.accounting.datamodel.validators.FieldValidator; +import org.gcube.accounting.datamodel.validations.Required; +import org.gcube.accounting.datamodel.validations.annotations.Aggregated; +import org.gcube.accounting.datamodel.validations.annotations.NotEmpty; +import org.gcube.accounting.datamodel.validations.annotations.NotEmptyIfNotNull; +import org.gcube.accounting.datamodel.validations.annotations.ValidLong; +import org.gcube.accounting.datamodel.validations.annotations.ValidOperationResult; +import org.gcube.accounting.datamodel.validations.annotations.ValidityChecker; +import org.gcube.accounting.datamodel.validations.validators.FieldValidator; import org.gcube.accounting.exception.InvalidValueException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/gcube/accounting/datamodel/implementations/JobUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/implementations/JobUsageRecord.java index 0f0fd67..03e0696 100644 --- a/src/main/java/org/gcube/accounting/datamodel/implementations/JobUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/implementations/JobUsageRecord.java @@ -7,12 +7,12 @@ import java.util.Calendar; import org.gcube.accounting.datamodel.RawUsageRecord; import org.gcube.accounting.datamodel.SingleUsageRecord; -import org.gcube.accounting.datamodel.annotations.DeprecatedField; -import org.gcube.accounting.datamodel.annotations.NotEmpty; -import org.gcube.accounting.datamodel.annotations.Required; -import org.gcube.accounting.datamodel.annotations.ValidInteger; -import org.gcube.accounting.datamodel.annotations.ValidLong; -import org.gcube.accounting.datamodel.validators.ConvertToOperationResult; +import org.gcube.accounting.datamodel.validations.Required; +import org.gcube.accounting.datamodel.validations.annotations.DeprecatedField; +import org.gcube.accounting.datamodel.validations.annotations.NotEmpty; +import org.gcube.accounting.datamodel.validations.annotations.ValidInteger; +import org.gcube.accounting.datamodel.validations.annotations.ValidLong; +import org.gcube.accounting.datamodel.validations.validators.ConvertToOperationResult; import org.gcube.accounting.exception.InvalidValueException; /** diff --git a/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java index 4cdaaf8..a5f1e88 100644 --- a/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/implementations/PortletUsageRecord.java @@ -5,11 +5,11 @@ package org.gcube.accounting.datamodel.implementations; import org.gcube.accounting.datamodel.RawUsageRecord; import org.gcube.accounting.datamodel.SingleUsageRecord; -import org.gcube.accounting.datamodel.annotations.DeprecatedField; -import org.gcube.accounting.datamodel.annotations.NotEmpty; -import org.gcube.accounting.datamodel.annotations.NotEmptyIfNotNull; -import org.gcube.accounting.datamodel.annotations.Required; -import org.gcube.accounting.datamodel.validators.Ignore; +import org.gcube.accounting.datamodel.validations.Required; +import org.gcube.accounting.datamodel.validations.annotations.DeprecatedField; +import org.gcube.accounting.datamodel.validations.annotations.NotEmpty; +import org.gcube.accounting.datamodel.validations.annotations.NotEmptyIfNotNull; +import org.gcube.accounting.datamodel.validations.validators.Ignore; import org.gcube.accounting.exception.InvalidValueException; /** diff --git a/src/main/java/org/gcube/accounting/datamodel/implementations/ServiceUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/implementations/ServiceUsageRecord.java index 4e67899..5aaa991 100644 --- a/src/main/java/org/gcube/accounting/datamodel/implementations/ServiceUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/implementations/ServiceUsageRecord.java @@ -5,12 +5,12 @@ package org.gcube.accounting.datamodel.implementations; import org.gcube.accounting.datamodel.RawUsageRecord; import org.gcube.accounting.datamodel.SingleUsageRecord; -import org.gcube.accounting.datamodel.annotations.DeprecatedField; -import org.gcube.accounting.datamodel.annotations.NotEmpty; -import org.gcube.accounting.datamodel.annotations.Required; -import org.gcube.accounting.datamodel.annotations.ValidIP; -import org.gcube.accounting.datamodel.annotations.ValidInteger; -import org.gcube.accounting.datamodel.validators.Ignore; +import org.gcube.accounting.datamodel.validations.Required; +import org.gcube.accounting.datamodel.validations.annotations.DeprecatedField; +import org.gcube.accounting.datamodel.validations.annotations.NotEmpty; +import org.gcube.accounting.datamodel.validations.annotations.ValidIP; +import org.gcube.accounting.datamodel.validations.annotations.ValidInteger; +import org.gcube.accounting.datamodel.validations.validators.Ignore; import org.gcube.accounting.exception.InvalidValueException; /** diff --git a/src/main/java/org/gcube/accounting/datamodel/implementations/StorageUsageUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/implementations/StorageUsageUsageRecord.java index 75a0e3a..4a7c60f 100644 --- a/src/main/java/org/gcube/accounting/datamodel/implementations/StorageUsageUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/implementations/StorageUsageUsageRecord.java @@ -5,12 +5,12 @@ package org.gcube.accounting.datamodel.implementations; import org.gcube.accounting.datamodel.RawUsageRecord; import org.gcube.accounting.datamodel.SingleUsageRecord; -import org.gcube.accounting.datamodel.annotations.NotEmpty; -import org.gcube.accounting.datamodel.annotations.NotEmptyIfNotNull; -import org.gcube.accounting.datamodel.annotations.Required; -import org.gcube.accounting.datamodel.annotations.ValidIP; -import org.gcube.accounting.datamodel.annotations.ValidInteger; -import org.gcube.accounting.datamodel.annotations.ValidLong; +import org.gcube.accounting.datamodel.validations.Required; +import org.gcube.accounting.datamodel.validations.annotations.NotEmpty; +import org.gcube.accounting.datamodel.validations.annotations.NotEmptyIfNotNull; +import org.gcube.accounting.datamodel.validations.annotations.ValidIP; +import org.gcube.accounting.datamodel.validations.annotations.ValidInteger; +import org.gcube.accounting.datamodel.validations.annotations.ValidLong; import org.gcube.accounting.exception.InvalidValueException; /** diff --git a/src/main/java/org/gcube/accounting/datamodel/implementations/TaskUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/implementations/TaskUsageRecord.java index 56a851d..85a9f5d 100644 --- a/src/main/java/org/gcube/accounting/datamodel/implementations/TaskUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/implementations/TaskUsageRecord.java @@ -7,13 +7,13 @@ import java.util.Calendar; import org.gcube.accounting.datamodel.RawUsageRecord; import org.gcube.accounting.datamodel.SingleUsageRecord; -import org.gcube.accounting.datamodel.annotations.DeprecatedField; -import org.gcube.accounting.datamodel.annotations.NotEmpty; -import org.gcube.accounting.datamodel.annotations.Required; -import org.gcube.accounting.datamodel.annotations.ValidInteger; -import org.gcube.accounting.datamodel.annotations.ValidLong; -import org.gcube.accounting.datamodel.validators.ConvertToOperationResult; -import org.gcube.accounting.datamodel.validators.Ignore; +import org.gcube.accounting.datamodel.validations.Required; +import org.gcube.accounting.datamodel.validations.annotations.DeprecatedField; +import org.gcube.accounting.datamodel.validations.annotations.NotEmpty; +import org.gcube.accounting.datamodel.validations.annotations.ValidInteger; +import org.gcube.accounting.datamodel.validations.annotations.ValidLong; +import org.gcube.accounting.datamodel.validations.validators.ConvertToOperationResult; +import org.gcube.accounting.datamodel.validations.validators.Ignore; import org.gcube.accounting.exception.InvalidValueException; /** diff --git a/src/main/java/org/gcube/accounting/datamodel/implementations/aggregated/StorageStatusUsageRecord.java b/src/main/java/org/gcube/accounting/datamodel/implementations/aggregated/StorageStatusUsageRecord.java index c71a46d..4300db3 100644 --- a/src/main/java/org/gcube/accounting/datamodel/implementations/aggregated/StorageStatusUsageRecord.java +++ b/src/main/java/org/gcube/accounting/datamodel/implementations/aggregated/StorageStatusUsageRecord.java @@ -4,9 +4,9 @@ package org.gcube.accounting.datamodel.implementations.aggregated; import org.gcube.accounting.datamodel.RawUsageRecord; -import org.gcube.accounting.datamodel.annotations.NotEmpty; -import org.gcube.accounting.datamodel.annotations.ValidInteger; -import org.gcube.accounting.datamodel.annotations.ValidLong; +import org.gcube.accounting.datamodel.validations.annotations.NotEmpty; +import org.gcube.accounting.datamodel.validations.annotations.ValidInteger; +import org.gcube.accounting.datamodel.validations.annotations.ValidLong; import org.gcube.accounting.exception.InvalidValueException; /** diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/Required.java b/src/main/java/org/gcube/accounting/datamodel/validations/Required.java similarity index 83% rename from src/main/java/org/gcube/accounting/datamodel/annotations/Required.java rename to src/main/java/org/gcube/accounting/datamodel/validations/Required.java index 4806dfb..a71d369 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/Required.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/Required.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/Aggregated.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/Aggregated.java similarity index 80% rename from src/main/java/org/gcube/accounting/datamodel/annotations/Aggregated.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/Aggregated.java index 60eee5a..6894615 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/Aggregated.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/Aggregated.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/DeprecatedField.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/DeprecatedField.java similarity index 85% rename from src/main/java/org/gcube/accounting/datamodel/annotations/DeprecatedField.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/DeprecatedField.java index 763868c..f78f708 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/DeprecatedField.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/DeprecatedField.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/DeprecationAction.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/DeprecationAction.java similarity index 82% rename from src/main/java/org/gcube/accounting/datamodel/annotations/DeprecationAction.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/DeprecationAction.java index 830f71a..969fec3 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/DeprecationAction.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/DeprecationAction.java @@ -1,7 +1,7 @@ /** * */ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.io.Serializable; diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/NotEmpty.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/NotEmpty.java similarity index 68% rename from src/main/java/org/gcube/accounting/datamodel/annotations/NotEmpty.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/NotEmpty.java index f9abdcb..afea4df 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/NotEmpty.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/NotEmpty.java @@ -1,11 +1,11 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.gcube.accounting.datamodel.validators.NotEmptyValidator; +import org.gcube.accounting.datamodel.validations.validators.NotEmptyValidator; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/NotEmptyIfNotNull.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/NotEmptyIfNotNull.java similarity index 68% rename from src/main/java/org/gcube/accounting/datamodel/annotations/NotEmptyIfNotNull.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/NotEmptyIfNotNull.java index 539602a..6cee764 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/NotEmptyIfNotNull.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/NotEmptyIfNotNull.java @@ -1,11 +1,11 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.gcube.accounting.datamodel.validators.NotEmptyIfNotNullValidator; +import org.gcube.accounting.datamodel.validations.validators.NotEmptyIfNotNullValidator; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/NotNull.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/NotNull.java similarity index 68% rename from src/main/java/org/gcube/accounting/datamodel/annotations/NotNull.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/NotNull.java index f0e506a..f370d72 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/NotNull.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/NotNull.java @@ -1,11 +1,11 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.gcube.accounting.datamodel.validators.NotNullValidator; +import org.gcube.accounting.datamodel.validations.validators.NotNullValidator; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidIP.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidIP.java similarity index 68% rename from src/main/java/org/gcube/accounting/datamodel/annotations/ValidIP.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidIP.java index dceac3e..b69b81c 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidIP.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidIP.java @@ -1,11 +1,11 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.gcube.accounting.datamodel.validators.ValidIPValidator; +import org.gcube.accounting.datamodel.validations.validators.ValidIPValidator; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidInteger.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidInteger.java similarity index 68% rename from src/main/java/org/gcube/accounting/datamodel/annotations/ValidInteger.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidInteger.java index 02bdb56..bc2c492 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidInteger.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidInteger.java @@ -1,11 +1,11 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.gcube.accounting.datamodel.validators.ValidIntegerValidator; +import org.gcube.accounting.datamodel.validations.validators.ValidIntegerValidator; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidLong.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidLong.java similarity index 68% rename from src/main/java/org/gcube/accounting/datamodel/annotations/ValidLong.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidLong.java index 5d21852..ef60c0c 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidLong.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidLong.java @@ -1,11 +1,11 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.gcube.accounting.datamodel.validators.ValidLongValidator; +import org.gcube.accounting.datamodel.validations.validators.ValidLongValidator; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidOperationResult.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidOperationResult.java similarity index 68% rename from src/main/java/org/gcube/accounting/datamodel/annotations/ValidOperationResult.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidOperationResult.java index e9b7fca..09c6f86 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidOperationResult.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidOperationResult.java @@ -1,11 +1,11 @@ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.gcube.accounting.datamodel.validators.ValidOperationResultValidator; +import org.gcube.accounting.datamodel.validations.validators.ValidOperationResultValidator; @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidityChecker.java b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidityChecker.java similarity index 76% rename from src/main/java/org/gcube/accounting/datamodel/annotations/ValidityChecker.java rename to src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidityChecker.java index 65bf309..dface4a 100644 --- a/src/main/java/org/gcube/accounting/datamodel/annotations/ValidityChecker.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/annotations/ValidityChecker.java @@ -1,7 +1,7 @@ /** * */ -package org.gcube.accounting.datamodel.annotations; +package org.gcube.accounting.datamodel.validations.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -9,7 +9,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.gcube.accounting.datamodel.validators.FieldValidator; +import org.gcube.accounting.datamodel.validations.validators.FieldValidator; /** * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/ diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/ConvertToOperationResult.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ConvertToOperationResult.java similarity index 74% rename from src/main/java/org/gcube/accounting/datamodel/validators/ConvertToOperationResult.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/ConvertToOperationResult.java index 09bf4ab..91ff321 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/ConvertToOperationResult.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ConvertToOperationResult.java @@ -1,12 +1,12 @@ /** * */ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; import org.gcube.accounting.datamodel.UsageRecord; -import org.gcube.accounting.datamodel.annotations.DeprecationAction; +import org.gcube.accounting.datamodel.validations.annotations.DeprecationAction; /** * @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/ diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/FieldValidator.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/FieldValidator.java similarity index 89% rename from src/main/java/org/gcube/accounting/datamodel/validators/FieldValidator.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/FieldValidator.java index ed10f66..105924b 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/FieldValidator.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/FieldValidator.java @@ -1,7 +1,7 @@ /** * */ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/Ignore.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/Ignore.java similarity index 82% rename from src/main/java/org/gcube/accounting/datamodel/validators/Ignore.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/Ignore.java index 70004e1..53d7426 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/Ignore.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/Ignore.java @@ -1,12 +1,12 @@ /** * */ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; import org.gcube.accounting.datamodel.UsageRecord; -import org.gcube.accounting.datamodel.annotations.DeprecationAction; +import org.gcube.accounting.datamodel.validations.annotations.DeprecationAction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/NotEmptyIfNotNullValidator.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/NotEmptyIfNotNullValidator.java similarity index 90% rename from src/main/java/org/gcube/accounting/datamodel/validators/NotEmptyIfNotNullValidator.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/NotEmptyIfNotNullValidator.java index 346a115..d24501c 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/NotEmptyIfNotNullValidator.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/NotEmptyIfNotNullValidator.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; import java.util.Map; diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/NotEmptyValidator.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/NotEmptyValidator.java similarity index 94% rename from src/main/java/org/gcube/accounting/datamodel/validators/NotEmptyValidator.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/NotEmptyValidator.java index 8de3ade..ad0b40b 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/NotEmptyValidator.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/NotEmptyValidator.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; import java.util.Map; diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/NotNullValidator.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/NotNullValidator.java similarity index 86% rename from src/main/java/org/gcube/accounting/datamodel/validators/NotNullValidator.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/NotNullValidator.java index 93bcd84..a91f465 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/NotNullValidator.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/NotNullValidator.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/ValidIPValidator.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidIPValidator.java similarity index 96% rename from src/main/java/org/gcube/accounting/datamodel/validators/ValidIPValidator.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidIPValidator.java index d78f161..004ef2c 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/ValidIPValidator.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidIPValidator.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; import java.util.regex.Matcher; diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/ValidIntegerValidator.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidIntegerValidator.java similarity index 90% rename from src/main/java/org/gcube/accounting/datamodel/validators/ValidIntegerValidator.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidIntegerValidator.java index e8b9173..8dda460 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/ValidIntegerValidator.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidIntegerValidator.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/ValidLongValidator.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidLongValidator.java similarity index 91% rename from src/main/java/org/gcube/accounting/datamodel/validators/ValidLongValidator.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidLongValidator.java index d40f0f7..39f6c96 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/ValidLongValidator.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidLongValidator.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; diff --git a/src/main/java/org/gcube/accounting/datamodel/validators/ValidOperationResultValidator.java b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidOperationResultValidator.java similarity index 95% rename from src/main/java/org/gcube/accounting/datamodel/validators/ValidOperationResultValidator.java rename to src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidOperationResultValidator.java index 21d26ff..81c3675 100644 --- a/src/main/java/org/gcube/accounting/datamodel/validators/ValidOperationResultValidator.java +++ b/src/main/java/org/gcube/accounting/datamodel/validations/validators/ValidOperationResultValidator.java @@ -1,4 +1,4 @@ -package org.gcube.accounting.datamodel.validators; +package org.gcube.accounting.datamodel.validations.validators; import java.io.Serializable; diff --git a/src/test/java/org/gcube/accounting/datamodel/validators/ValidTimeValidatorTest.java b/src/test/java/org/gcube/accounting/datamodel/validators/ValidTimeValidatorTest.java index 7ba29a1..e163c75 100644 --- a/src/test/java/org/gcube/accounting/datamodel/validators/ValidTimeValidatorTest.java +++ b/src/test/java/org/gcube/accounting/datamodel/validators/ValidTimeValidatorTest.java @@ -3,6 +3,7 @@ */ package org.gcube.accounting.datamodel.validators; +import org.gcube.accounting.datamodel.validations.validators.ValidLongValidator; import org.gcube.accounting.exception.InvalidValueException; import org.junit.Test;