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:
Luca Frosini 2015-06-08 15:19:09 +00:00
parent 9ceb6ccbca
commit f505d080db
30 changed files with 74 additions and 73 deletions

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;
/**

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.accounting.datamodel.annotations;
package org.gcube.accounting.datamodel.validations.annotations;
import java.io.Serializable;

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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/

View File

@ -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/

View File

@ -1,7 +1,7 @@
/**
*
*/
package org.gcube.accounting.datamodel.validators;
package org.gcube.accounting.datamodel.validations.validators;
import java.io.Serializable;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package org.gcube.accounting.datamodel.validators;
package org.gcube.accounting.datamodel.validations.validators;
import java.io.Serializable;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package org.gcube.accounting.datamodel.validators;
package org.gcube.accounting.datamodel.validations.validators;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.gcube.accounting.datamodel.validators;
package org.gcube.accounting.datamodel.validations.validators;
import java.io.Serializable;

View File

@ -1,4 +1,4 @@
package org.gcube.accounting.datamodel.validators;
package org.gcube.accounting.datamodel.validations.validators;
import java.io.Serializable;

View File

@ -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;