DATACMNS-1240 - Update copyright years to 2018.
Also, remove some trailing whitespaces and align outdated license header format.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -38,7 +38,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* Inspects the given {@link Class} for fields annotated by {@link CreatedBy}, {@link CreatedDate},
|
||||
* {@link LastModifiedBy} , and {@link LastModifiedDate}. Only one field per annotation is stored.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
@@ -78,7 +78,7 @@ final class AnnotationAuditingMetadata {
|
||||
|
||||
/**
|
||||
* Creates a new {@link AnnotationAuditingMetadata} instance for the given type.
|
||||
*
|
||||
*
|
||||
* @param type must not be {@literal null}.
|
||||
*/
|
||||
private AnnotationAuditingMetadata(Class<?> type) {
|
||||
@@ -96,7 +96,7 @@ final class AnnotationAuditingMetadata {
|
||||
|
||||
/**
|
||||
* Checks whether the given field has a type that is a supported date type.
|
||||
*
|
||||
*
|
||||
* @param field
|
||||
*/
|
||||
private void assertValidDateFieldType(Optional<Field> field) {
|
||||
@@ -121,7 +121,7 @@ final class AnnotationAuditingMetadata {
|
||||
|
||||
/**
|
||||
* Return a {@link AnnotationAuditingMetadata} for the given {@link Class}.
|
||||
*
|
||||
*
|
||||
* @param type the type to inspect, must not be {@literal null}.
|
||||
*/
|
||||
public static AnnotationAuditingMetadata getMetadata(Class<?> type) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2015 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,7 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Interface to abstract the ways setting the auditing information can be implemented.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
*/
|
||||
@@ -28,28 +28,28 @@ public interface AuditableBeanWrapper {
|
||||
|
||||
/**
|
||||
* Set the creator of the object.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
Object setCreatedBy(Object value);
|
||||
|
||||
/**
|
||||
* Set the date the object was created.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
TemporalAccessor setCreatedDate(TemporalAccessor value);
|
||||
|
||||
/**
|
||||
* Set the last modifier of the object.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
Object setLastModifiedBy(Object value);
|
||||
|
||||
/**
|
||||
* Returns the date of the last modification date of the backing bean.
|
||||
*
|
||||
*
|
||||
* @return the date of the last modification.
|
||||
* @since 1.10
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ public interface AuditableBeanWrapper {
|
||||
|
||||
/**
|
||||
* Set the last modification date.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
TemporalAccessor setLastModifiedDate(TemporalAccessor value);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2017 the original author or authors.
|
||||
* Copyright 2015-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,7 +19,7 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* A factory to lookup {@link AuditableBeanWrapper}s.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.10
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ public interface AuditableBeanWrapperFactory {
|
||||
|
||||
/**
|
||||
* Returns the {@link AuditableBeanWrapper} for the given source object if it's eligible for auditing.
|
||||
*
|
||||
*
|
||||
* @param source must not be {@literal null}.
|
||||
* @return the {@link AuditableBeanWrapper} for the given source object if it's eligible for auditing.
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Auditing handler to mark entity objects created and modified.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.5
|
||||
@@ -53,7 +53,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
/**
|
||||
* Creates a new {@link AuditableBeanWrapper} using the given {@link MappingContext} when looking up auditing metadata
|
||||
* via reflection.
|
||||
*
|
||||
*
|
||||
* @param mappingContext must not be {@literal null}.
|
||||
* @since 1.8
|
||||
* @deprecated use {@link AuditingHandler(PersistentEntities)} instead.
|
||||
@@ -67,7 +67,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
/**
|
||||
* Creates a new {@link AuditableBeanWrapper} using the given {@link PersistentEntities} when looking up auditing
|
||||
* metadata via reflection.
|
||||
*
|
||||
*
|
||||
* @param entities must not be {@literal null}.
|
||||
* @since 1.10
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Setter to inject a {@code AuditorAware} component to retrieve the current auditor.
|
||||
*
|
||||
*
|
||||
* @param auditorAware must not be {@literal null}.
|
||||
*/
|
||||
public void setAuditorAware(AuditorAware<?> auditorAware) {
|
||||
@@ -94,7 +94,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
* Setter do determine if {@link Auditable#setCreatedDate(DateTime)} and
|
||||
* {@link Auditable#setLastModifiedDate(DateTime)} shall be filled with the current Java time. Defaults to
|
||||
* {@code true}. One might set this to {@code false} to use database features to set entity time.
|
||||
*
|
||||
*
|
||||
* @param dateTimeForNow the dateTimeForNow to set
|
||||
*/
|
||||
public void setDateTimeForNow(boolean dateTimeForNow) {
|
||||
@@ -104,7 +104,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
/**
|
||||
* Set this to false if you want to treat entity creation as modification and thus set the current date as
|
||||
* modification date, too. Defaults to {@code true}.
|
||||
*
|
||||
*
|
||||
* @param modifyOnCreation if modification information shall be set on creation, too
|
||||
*/
|
||||
public void setModifyOnCreation(boolean modifyOnCreation) {
|
||||
@@ -113,7 +113,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Sets the {@link DateTimeProvider} to be used to determine the dates to be set.
|
||||
*
|
||||
*
|
||||
* @param dateTimeProvider
|
||||
*/
|
||||
public void setDateTimeProvider(DateTimeProvider dateTimeProvider) {
|
||||
@@ -122,7 +122,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Marks the given object as created.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
*/
|
||||
public void markCreated(Object source) {
|
||||
@@ -134,7 +134,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Marks the given object as modified.
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
*/
|
||||
public void markModified(Object source) {
|
||||
@@ -177,7 +177,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Sets modifying and creating auditor. Creating auditor is only set on new auditables.
|
||||
*
|
||||
*
|
||||
* @param auditable
|
||||
* @return
|
||||
*/
|
||||
@@ -202,7 +202,7 @@ public class AuditingHandler implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Touches the auditable regarding modification and creation date. Creation date is only set on new auditables.
|
||||
*
|
||||
*
|
||||
* @param wrapper
|
||||
* @return
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,7 +23,7 @@ import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
* Default {@link DateTimeProvider} simply creating new {@link DateTime} instances for each method call.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.5
|
||||
@@ -32,7 +32,7 @@ public enum CurrentDateTimeProvider implements DateTimeProvider {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.DateTimeProvider#getNow()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,7 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* SPI to calculate the current time to be used when auditing.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ public interface DateTimeProvider {
|
||||
|
||||
/**
|
||||
* Returns the current time to be used as modification or creation date.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Optional<TemporalAccessor> getNow();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* A factory class to {@link AuditableBeanWrapper} instances.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.5
|
||||
@@ -48,7 +48,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Returns an {@link AuditableBeanWrapper} if the given object is capable of being equipped with auditing information.
|
||||
*
|
||||
*
|
||||
* @param source the auditing candidate.
|
||||
* @return
|
||||
*/
|
||||
@@ -75,7 +75,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* An {@link AuditableBeanWrapper} that works with objects implementing
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@@ -92,7 +92,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
.getGeneric(2).resolve(TemporalAccessor.class);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setCreatedBy(java.util.Optional)
|
||||
*/
|
||||
@@ -103,7 +103,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setCreatedDate(java.util.Optional)
|
||||
*/
|
||||
@@ -116,7 +116,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.DefaultAuditableBeanWrapperFactory.AuditableInterfaceBeanWrapper#setLastModifiedBy(java.util.Optional)
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#getLastModifiedDate()
|
||||
*/
|
||||
@@ -137,7 +137,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return getAsTemporalAccessor(auditable.getLastModifiedDate(), TemporalAccessor.class);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setLastModifiedDate(java.util.Optional)
|
||||
*/
|
||||
@@ -154,7 +154,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
/**
|
||||
* Base class for {@link AuditableBeanWrapper} implementations that might need to convert {@link Calendar} values into
|
||||
* compatible types when setting date/time information.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.8
|
||||
*/
|
||||
@@ -178,7 +178,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Returns the {@link Calendar} in a type, compatible to the given field.
|
||||
*
|
||||
*
|
||||
* @param value can be {@literal null}.
|
||||
* @param targetType must not be {@literal null}.
|
||||
* @param source must not be {@literal null}.
|
||||
@@ -213,7 +213,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Returns the given object as {@link Calendar}.
|
||||
*
|
||||
*
|
||||
* @param source can be {@literal null}.
|
||||
* @param target must not be {@literal null}.
|
||||
* @return
|
||||
@@ -243,7 +243,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* An {@link AuditableBeanWrapper} implementation that sets values on the target object using reflection.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
static class ReflectionAuditingBeanWrapper extends DateConvertingAuditableBeanWrapper {
|
||||
@@ -253,7 +253,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Creates a new {@link ReflectionAuditingBeanWrapper} to set auditing data on the given target object.
|
||||
*
|
||||
*
|
||||
* @param target must not be {@literal null}.
|
||||
*/
|
||||
public ReflectionAuditingBeanWrapper(Object target) {
|
||||
@@ -264,7 +264,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setCreatedBy(java.util.Optional)
|
||||
*/
|
||||
@@ -273,7 +273,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return setField(metadata.getCreatedByField(), value);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setCreatedDate(java.util.Optional)
|
||||
*/
|
||||
@@ -283,7 +283,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return setDateField(metadata.getCreatedDateField(), value);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setLastModifiedBy(java.util.Optional)
|
||||
*/
|
||||
@@ -292,7 +292,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
return setField(metadata.getLastModifiedByField(), value);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#getLastModifiedDate()
|
||||
*/
|
||||
@@ -307,7 +307,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
}), TemporalAccessor.class);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.AuditableBeanWrapper#setLastModifiedDate(java.util.Optional)
|
||||
*/
|
||||
@@ -318,7 +318,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Sets the given field to the given value if present.
|
||||
*
|
||||
*
|
||||
* @param field
|
||||
* @param value
|
||||
*/
|
||||
@@ -331,7 +331,7 @@ class DefaultAuditableBeanWrapperFactory implements AuditableBeanWrapperFactory
|
||||
|
||||
/**
|
||||
* Sets the given field to the given value if the field is not {@literal null}.
|
||||
*
|
||||
*
|
||||
* @param field
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
|
||||
* {@link AuditingHandler} extension that uses an {@link IsNewStrategyFactory} to expose a generic
|
||||
* {@link #markAudited(Optional)} method that will route calls to {@link #markCreated(Optional)} or
|
||||
* {@link #markModified(Optional)} based on the {@link IsNewStrategy} determined from the factory.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
* @since 1.5
|
||||
@@ -42,7 +42,7 @@ public class IsNewAwareAuditingHandler extends AuditingHandler {
|
||||
|
||||
/**
|
||||
* Creates a new {@link IsNewAwareAuditingHandler} for the given {@link MappingContext}.
|
||||
*
|
||||
*
|
||||
* @param mappingContext must not be {@literal null}.
|
||||
* @since 1.8
|
||||
* @deprecated use {@link IsNewAwareAuditingHandler(PersistentEntities)} instead.
|
||||
@@ -55,7 +55,7 @@ public class IsNewAwareAuditingHandler extends AuditingHandler {
|
||||
|
||||
/**
|
||||
* Creates a new {@link IsNewAwareAuditingHandler} for the given {@link MappingContext}.
|
||||
*
|
||||
*
|
||||
* @param entities must not be {@literal null}.
|
||||
* @since 1.10
|
||||
*/
|
||||
@@ -70,7 +70,7 @@ public class IsNewAwareAuditingHandler extends AuditingHandler {
|
||||
* Marks the given object created or modified based on the {@link IsNewStrategy} returned by the
|
||||
* {@link IsNewStrategyFactory} configured. Will rout the calls to {@link #markCreated(Optional)} and
|
||||
* {@link #markModified(Optional)} accordingly.
|
||||
*
|
||||
*
|
||||
* @param object
|
||||
*/
|
||||
public void markAudited(Object object) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,7 +24,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Default implementation for {@link AuditingConfiguration}.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Thomas Darimont
|
||||
* @author Oliver Gierke
|
||||
@@ -38,7 +38,7 @@ public class AnnotationAuditingConfiguration implements AuditingConfiguration {
|
||||
/**
|
||||
* Creates a new instance of {@link AnnotationAuditingConfiguration} for the given {@link AnnotationMetadata} and
|
||||
* annotation type.
|
||||
*
|
||||
*
|
||||
* @param metadata must not be {@literal null}.
|
||||
* @param annotation must not be {@literal null}.
|
||||
*/
|
||||
@@ -65,7 +65,7 @@ public class AnnotationAuditingConfiguration implements AuditingConfiguration {
|
||||
return attributes.getString("auditorAwareRef");
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingConfiguration#isSetDates()
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ public class AnnotationAuditingConfiguration implements AuditingConfiguration {
|
||||
return attributes.getBoolean("setDates");
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingConfiguration#getDateTimeProviderRef()
|
||||
*/
|
||||
@@ -83,7 +83,7 @@ public class AnnotationAuditingConfiguration implements AuditingConfiguration {
|
||||
return attributes.getString("dateTimeProviderRef");
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingConfiguration#isModifyOnCreate()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,7 +37,7 @@ import org.springframework.util.StringUtils;
|
||||
* A {@link ImportBeanDefinitionRegistrar} that serves as a base class for store specific implementations for
|
||||
* configuring audit support. Registers a {@link AuditingHandler} based on the provided configuration(
|
||||
* {@link AuditingConfiguration}).
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Thomas Darimont
|
||||
* @author Oliver Gierke
|
||||
@@ -65,7 +65,7 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
|
||||
/**
|
||||
* Registers an appropriate BeanDefinition for an {@link AuditingHandler}.
|
||||
*
|
||||
*
|
||||
* @param registry must not be {@literal null}.
|
||||
* @param configuration must not be {@literal null}.
|
||||
* @return
|
||||
@@ -84,7 +84,7 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
/**
|
||||
* Creates a {@link BeanDefinitionBuilder} to ease the definition of store specific {@link AuditingHandler}
|
||||
* implementations.
|
||||
*
|
||||
*
|
||||
* @param configuration must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -99,7 +99,7 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
/**
|
||||
* Configures the given {@link BeanDefinitionBuilder} with the default attributes from the given
|
||||
* {@link AuditingConfiguration}.
|
||||
*
|
||||
*
|
||||
* @param configuration must not be {@literal null}.
|
||||
* @param builder must not be {@literal null}.
|
||||
* @return the builder with the audit attributes configured.
|
||||
@@ -130,7 +130,7 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
|
||||
/**
|
||||
* Retrieve auditing configuration from the given {@link AnnotationMetadata}.
|
||||
*
|
||||
*
|
||||
* @param annotationMetadata will never be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -140,14 +140,14 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
|
||||
/**
|
||||
* Return the annotation type to lookup configuration values from.
|
||||
*
|
||||
*
|
||||
* @return must not be {@literal null}.
|
||||
*/
|
||||
protected abstract Class<? extends Annotation> getAnnotation();
|
||||
|
||||
/**
|
||||
* Register the listener to eventually trigger the {@link AuditingHandler}.
|
||||
*
|
||||
*
|
||||
* @param auditingHandlerDefinition will never be {@literal null}.
|
||||
* @param registry will never be {@literal null}.
|
||||
*/
|
||||
@@ -156,14 +156,14 @@ public abstract class AuditingBeanDefinitionRegistrarSupport implements ImportBe
|
||||
|
||||
/**
|
||||
* Return the name to be used to register the {@link AuditingHandler} under.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected abstract String getAuditingHandlerBeanName();
|
||||
|
||||
/**
|
||||
* Registers the given {@link AbstractBeanDefinition} as infrastructure bean under the given id.
|
||||
*
|
||||
*
|
||||
* @param definition must not be {@literal null}.
|
||||
* @param id must not be {@literal null} or empty.
|
||||
* @param registry must not be {@literal null}.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,7 @@ import org.springframework.data.domain.AuditorAware;
|
||||
|
||||
/**
|
||||
* Configuration information for auditing.
|
||||
*
|
||||
*
|
||||
* @author Ranie Jade Ramiso
|
||||
* @author Thomas Darimont
|
||||
* @author Oliver Gierke
|
||||
@@ -29,28 +29,28 @@ public interface AuditingConfiguration {
|
||||
|
||||
/**
|
||||
* Returns the bean name of the {@link AuditorAware} instance to be used..
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getAuditorAwareRef();
|
||||
|
||||
/**
|
||||
* Returns whether the creation and modification dates shall be set. Defaults to {@literal true}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isSetDates();
|
||||
|
||||
/**
|
||||
* Returns whether the entity shall be marked as modified on creation. Defaults to {@literal true}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isModifyOnCreate();
|
||||
|
||||
/**
|
||||
* Returns the bean name of the {@link DateTimeProvider} to be used.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getDateTimeProviderRef();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,7 +36,7 @@ import org.w3c.dom.Element;
|
||||
|
||||
/**
|
||||
* {@link BeanDefinitionParser} that parses an {@link AuditingHandler} {@link BeanDefinition}
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
*/
|
||||
@@ -50,7 +50,7 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
/**
|
||||
* Creates a new {@link AuditingHandlerBeanDefinitionParser} to point to a {@link MappingContext} with the given bean
|
||||
* name.
|
||||
*
|
||||
*
|
||||
* @param mappingContextBeanName must not be {@literal null} or empty.
|
||||
*/
|
||||
@SuppressWarnings("null")
|
||||
@@ -62,14 +62,14 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
|
||||
/**
|
||||
* Returns the name of the bean definition the {@link AuditingHandler} was registered under.
|
||||
*
|
||||
*
|
||||
* @return the resolvedBeanName
|
||||
*/
|
||||
public String getResolvedBeanName() {
|
||||
return resolvedBeanName;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser#getBeanClass(org.w3c.dom.Element)
|
||||
*/
|
||||
@@ -79,7 +79,7 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
return AuditingHandler.class;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractBeanDefinitionParser#shouldGenerateId()
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser#doParse(org.w3c.dom.Element, org.springframework.beans.factory.support.BeanDefinitionBuilder)
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ public class AuditingHandlerBeanDefinitionParser extends AbstractSingleBeanDefin
|
||||
ParsingUtils.setPropertyValue(builder, element, "modify-on-creation", "modifyOnCreation");
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.xml.AbstractBeanDefinitionParser#resolveId(org.w3c.dom.Element, org.springframework.beans.factory.support.AbstractBeanDefinition, org.springframework.beans.factory.xml.ParserContext)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2014 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,7 @@ import org.w3c.dom.Element;
|
||||
/**
|
||||
* {@link AuditingHandlerBeanDefinitionParser} that will register am {@link IsNewAwareAuditingHandler}. Needs to get the
|
||||
* bean id of the {@link MappingContext} it shall refer to.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.5
|
||||
*/
|
||||
@@ -30,14 +30,14 @@ public class IsNewAwareAuditingHandlerBeanDefinitionParser extends AuditingHandl
|
||||
|
||||
/**
|
||||
* Creates a new {@link IsNewAwareAuditingHandlerBeanDefinitionParser}.
|
||||
*
|
||||
*
|
||||
* @param mappingContextBeanName must not be {@literal null} or empty.
|
||||
*/
|
||||
public IsNewAwareAuditingHandlerBeanDefinitionParser(String mappingContextBeanName) {
|
||||
super(mappingContextBeanName);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.config.AuditingHandlerBeanDefinitionParser#getBeanClass(org.w3c.dom.Element)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user