32 lines
806 B
Java
32 lines
806 B
Java
/**
|
|
*
|
|
*/
|
|
package org.gcube.accounting.datamodel.validations.validators;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import org.gcube.accounting.datamodel.UsageRecord;
|
|
import org.gcube.accounting.datamodel.validations.annotations.DeprecationAction;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
|
*
|
|
*/
|
|
public class Ignore implements DeprecationAction {
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(Ignore.class);
|
|
|
|
/**
|
|
* {@inheritDoc}
|
|
*/
|
|
@Override
|
|
public Serializable manage(String key, Serializable manage, UsageRecord usageRecord) {
|
|
logger.warn("The field {} is deprecated for the {}. Anyway the field will be included in the document",
|
|
key, usageRecord.getClass().getSimpleName());
|
|
return manage;
|
|
}
|
|
|
|
}
|