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
This commit is contained in:
parent
9ceb6ccbca
commit
f505d080db
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
|
@ -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;
|
|
@ -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;
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.accounting.datamodel.annotations;
|
||||
package org.gcube.accounting.datamodel.validations.annotations;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -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)
|
|
@ -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/
|
|
@ -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/
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.accounting.datamodel.validators;
|
||||
package org.gcube.accounting.datamodel.validations.validators;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -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;
|
||||
|
|
@ -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;
|
|
@ -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;
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.accounting.datamodel.validators;
|
||||
package org.gcube.accounting.datamodel.validations.validators;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -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;
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.accounting.datamodel.validators;
|
||||
package org.gcube.accounting.datamodel.validations.validators;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.accounting.datamodel.validators;
|
||||
package org.gcube.accounting.datamodel.validations.validators;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.accounting.datamodel.validators;
|
||||
package org.gcube.accounting.datamodel.validations.validators;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue