Class ObfuscatorProperties
java.lang.Object
com.github.robtimus.obfuscation.spring.boot.autoconfigure.ObfuscatorProperties
Properties for
Obfuscators
.- Author:
- Rob Spoor
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The supported obfuscation modes.static final class
Validator forObfuscatorProperties.ValidObfuscatorProperties
andObfuscatorProperties
.static @interface
Indicates anObfuscatorProperties
object must be valid. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateObfuscator
(ObjectFactory objectFactory) Creates an obfuscator based on the properties configured in this object.createObfuscator
(AutowireCapableBeanFactory beanFactory) Creates an obfuscator based on the properties configured in this object.static List<Obfuscator>
createObfuscators
(Collection<ObfuscatorProperties> properties, ObjectFactory objectFactory) Creates obfuscators based on the properties configured in multiple properties objects.static List<Obfuscator>
createObfuscators
(Collection<ObfuscatorProperties> properties, AutowireCapableBeanFactory beanFactory) Creates obfuscators based on the properties configured in multiple properties objects.static <K> Map<K,
Obfuscator> createObfuscators
(Map<? extends K, ObfuscatorProperties> properties, ObjectFactory objectFactory) Creates obfuscators based on the properties configured in multiple properties objects.static <K> Map<K,
Obfuscator> createObfuscators
(Map<? extends K, ObfuscatorProperties> properties, AutowireCapableBeanFactory beanFactory) Creates obfuscators based on the properties configured in multiple properties objects.getMode()
Class<? extends ObfuscatorProvider>
void
setAtLeastFromEnd
(Integer atLeastFromEnd) void
setAtLeastFromStart
(Integer atLeastFromStart) void
setFixedLength
(Integer fixedLength) void
setFixedTotalLength
(Integer fixedTotalLength) void
setFixedValue
(String fixedValue) void
setKeepAtEnd
(Integer keepAtEnd) void
setKeepAtStart
(Integer keepAtStart) void
setMaskChar
(Character maskChar) void
void
setProviderClass
(Class<? extends ObfuscatorProvider> providerClass)
-
Constructor Details
-
ObfuscatorProperties
public ObfuscatorProperties()
-
-
Method Details
-
getMode
-
setMode
-
getMaskChar
-
setMaskChar
-
getFixedLength
-
setFixedLength
-
getFixedValue
-
setFixedValue
-
getKeepAtStart
-
setKeepAtStart
-
getKeepAtEnd
-
setKeepAtEnd
-
getAtLeastFromStart
-
setAtLeastFromStart
-
getAtLeastFromEnd
-
setAtLeastFromEnd
-
getFixedTotalLength
-
setFixedTotalLength
-
getProviderClass
-
setProviderClass
-
createObfuscator
Creates an obfuscator based on the properties configured in this object.- Parameters:
beanFactory
- A bean factory to use to create instances ofObfuscatorProvider
if needed.- Returns:
- The created obfuscator.
- Throws:
NullPointerException
- If the given bean factory isnull
.IllegalStateException
- If this object is in an inconsistent state.
-
createObfuscator
Creates an obfuscator based on the properties configured in this object.- Parameters:
objectFactory
- The object factory to use to create instances ofObfuscatorProvider
if needed.- Returns:
- The created obfuscator.
- Throws:
NullPointerException
- If the given object factory isnull
.IllegalStateException
- If this object is in an inconsistent state.
-
createObfuscators
public static List<Obfuscator> createObfuscators(Collection<ObfuscatorProperties> properties, AutowireCapableBeanFactory beanFactory) Creates obfuscators based on the properties configured in multiple properties objects.- Parameters:
properties
- A collection of properties objects for which to create obfuscators.beanFactory
- A bean factory to use to create instances ofObfuscatorProvider
if needed.- Returns:
- The created obfuscators.
- Throws:
NullPointerException
- If the given collection, any of its elements, or the given bean factory isnull
.IllegalStateException
- If any of the properties objects is in an inconsistent state.
-
createObfuscators
public static List<Obfuscator> createObfuscators(Collection<ObfuscatorProperties> properties, ObjectFactory objectFactory) Creates obfuscators based on the properties configured in multiple properties objects.- Parameters:
properties
- A collection of properties objects for which to create obfuscators.objectFactory
- The object factory to use to create instances ofObfuscatorProvider
if needed.- Returns:
- The created obfuscators.
- Throws:
NullPointerException
- If the given collection, any of its elements, or the given bean factory isnull
.IllegalStateException
- If any of the properties objects is in an inconsistent state.
-
createObfuscators
public static <K> Map<K,Obfuscator> createObfuscators(Map<? extends K, ObfuscatorProperties> properties, AutowireCapableBeanFactory beanFactory) Creates obfuscators based on the properties configured in multiple properties objects.- Type Parameters:
K
- The map key type.- Parameters:
properties
- A map with properties objects for which to create obfuscators.beanFactory
- A bean factory to use to create instances ofObfuscatorProvider
if needed.- Returns:
- The created obfuscators.
- Throws:
NullPointerException
- If the given map, any of its values, or the given bean factory isnull
.IllegalStateException
- If any of the properties objects is in an inconsistent state.- Since:
- 2.2
-
createObfuscators
public static <K> Map<K,Obfuscator> createObfuscators(Map<? extends K, ObfuscatorProperties> properties, ObjectFactory objectFactory) Creates obfuscators based on the properties configured in multiple properties objects.- Type Parameters:
K
- The map key type.- Parameters:
properties
- A map with properties objects for which to create obfuscators.objectFactory
- The object factory to use to create instances ofObfuscatorProvider
if needed.- Returns:
- The created obfuscators.
- Throws:
NullPointerException
- If the given map, any of its values, or the given bean factory isnull
.IllegalStateException
- If any of the properties objects is in an inconsistent state.- Since:
- 2.2
-