Changed classes signature

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-publishing/document-store-lib@133101 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-10-12 12:18:38 +00:00
parent 9d941b2578
commit 5533c697aa
34 changed files with 62 additions and 24 deletions

View File

@ -1,5 +1,8 @@
package org.gcube.documentstore.exception;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class InvalidValueException extends Exception {
/**

View File

@ -4,8 +4,7 @@
package org.gcube.documentstore.exception;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
*
* @author Luca Frosini (ISTI - CNR)
*/
public class NotAggregatableRecordsExceptions extends Exception {

View File

@ -6,7 +6,7 @@ package org.gcube.documentstore.persistence;
import org.gcube.documentstore.records.Record;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*
*/
class DefaultPersitenceExecutor implements PersistenceExecutor {

View File

@ -12,7 +12,7 @@ import java.io.PrintWriter;
import org.gcube.documentstore.records.Record;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
public class FallbackPersistenceBackend extends PersistenceBackend {

View File

@ -14,7 +14,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
public abstract class PersistenceBackend {

View File

@ -13,7 +13,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
public abstract class PersistenceBackendConfiguration {

View File

@ -17,7 +17,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*
*/
public abstract class PersistenceBackendFactory {

View File

@ -18,7 +18,7 @@ import org.slf4j.LoggerFactory;
/**
*
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
class PersistenceBackendMonitor implements Runnable {

View File

@ -10,7 +10,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*
*/
class PersistenceBackendRediscover implements Runnable {

View File

@ -6,7 +6,7 @@ package org.gcube.documentstore.persistence;
import org.gcube.documentstore.records.Record;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*
*/
public interface PersistenceExecutor {

View File

@ -13,7 +13,7 @@ import org.gcube.documentstore.records.implementation.RequiredField;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
public interface AggregatedRecord<A extends AggregatedRecord<A,R>, R extends Record> extends Record {

View File

@ -13,7 +13,7 @@ import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.documentstore.records.implementation.RequiredField;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*
*/
public interface Record extends Comparable<Record>, Serializable {

View File

@ -18,7 +18,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
public class RecordUtility {

View File

@ -27,7 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*
*/
public abstract class AggregationScheduler implements Runnable {

View File

@ -15,7 +15,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
public class AggregationUtility<T extends AggregatedRecord<T,?>> {

View File

@ -8,7 +8,7 @@ import java.util.Calendar;
import org.gcube.documentstore.persistence.PersistenceExecutor;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*
* This class implements a Simple Buffer with timeout strategy.
* It buffer a predefined number of Records before invoking a persistence.

View File

@ -29,7 +29,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*
*/
public abstract class AbstractRecord implements Record {

View File

@ -7,7 +7,7 @@ import java.lang.annotation.Target;
/**
* This annotations indicates that the field is related to an aggregation
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)

View File

@ -8,7 +8,7 @@ import java.lang.annotation.Target;
/**
* This annotations indicates that the field is calculated using the
* value of other field in the instance
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)

View File

@ -9,7 +9,7 @@ import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.documentstore.records.Record;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*/
public interface FieldAction {

View File

@ -10,7 +10,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
* @author Luca Frosini (ISTI - CNR)
*
*/
@Target(ElementType.ANNOTATION_TYPE)

View File

@ -5,6 +5,9 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface RequiredField {

View File

@ -8,6 +8,9 @@ import java.lang.annotation.Target;
import org.gcube.documentstore.records.implementation.FieldDecorator;
import org.gcube.documentstore.records.implementation.validations.validators.NotEmptyValidator;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@FieldDecorator(action=NotEmptyValidator.class)

View File

@ -8,6 +8,9 @@ import java.lang.annotation.Target;
import org.gcube.documentstore.records.implementation.FieldDecorator;
import org.gcube.documentstore.records.implementation.validations.validators.NotEmptyIfNotNullValidator;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@FieldDecorator(action=NotEmptyIfNotNullValidator.class)

View File

@ -8,6 +8,9 @@ import java.lang.annotation.Target;
import org.gcube.documentstore.records.implementation.FieldDecorator;
import org.gcube.documentstore.records.implementation.validations.validators.NotNullValidator;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@FieldDecorator(action=NotNullValidator.class)

View File

@ -8,6 +8,9 @@ import java.lang.annotation.Target;
import org.gcube.documentstore.records.implementation.FieldDecorator;
import org.gcube.documentstore.records.implementation.validations.validators.ValidBooleanValidator;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@FieldDecorator(action=ValidBooleanValidator.class)

View File

@ -8,6 +8,9 @@ import java.lang.annotation.Target;
import org.gcube.documentstore.records.implementation.FieldDecorator;
import org.gcube.documentstore.records.implementation.validations.validators.ValidIntegerValidator;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@FieldDecorator(action=ValidIntegerValidator.class)

View File

@ -8,6 +8,9 @@ import java.lang.annotation.Target;
import org.gcube.documentstore.records.implementation.FieldDecorator;
import org.gcube.documentstore.records.implementation.validations.validators.ValidLongValidator;
/**
* @author Luca Frosini (ISTI - CNR)
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@FieldDecorator(action=ValidLongValidator.class)

View File

@ -3,6 +3,9 @@ package org.gcube.documentstore.records.implementation.validations.validators;
import java.io.Serializable;
import java.util.Map;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class NotEmptyIfNotNullValidator extends NotEmptyValidator {
protected boolean isValid(Serializable toValidate) {

View File

@ -7,6 +7,9 @@ import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.documentstore.records.Record;
import org.gcube.documentstore.records.implementation.FieldAction;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class NotEmptyValidator implements FieldAction {
private static final String ERROR = "Is Empty";

View File

@ -6,6 +6,9 @@ import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.documentstore.records.Record;
import org.gcube.documentstore.records.implementation.FieldAction;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class NotNullValidator implements FieldAction {
private static final String ERROR = "Is Null";

View File

@ -6,7 +6,9 @@ import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.documentstore.records.Record;
import org.gcube.documentstore.records.implementation.FieldAction;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class ValidBooleanValidator implements FieldAction {
private static final String ERROR = String.format("Not Instance of %s", Boolean.class.getSimpleName());

View File

@ -6,7 +6,9 @@ import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.documentstore.records.Record;
import org.gcube.documentstore.records.implementation.FieldAction;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class ValidIntegerValidator implements FieldAction {
private static final String ERROR = String.format("Not Instance of %s", Integer.class.getSimpleName());

View File

@ -6,7 +6,9 @@ import org.gcube.documentstore.exception.InvalidValueException;
import org.gcube.documentstore.records.Record;
import org.gcube.documentstore.records.implementation.FieldAction;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public class ValidLongValidator implements FieldAction {
private static final String ERROR = String.format("Not Instance of %s", Integer.class.getSimpleName());