Class IdempotentAttributes
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<java.lang.String,java.lang.Object>
-
- org.springframework.core.annotation.AnnotationAttributes
-
- io.microsphere.spring.core.annotation.GenericAnnotationAttributes<A>
-
- io.microsphere.spring.core.annotation.ResolvablePlaceholderAnnotationAttributes<Idempotent>
-
- io.microsphere.spring.web.idempotent.IdempotentAttributes
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<java.lang.String,java.lang.Object>
public class IdempotentAttributes extends io.microsphere.spring.core.annotation.ResolvablePlaceholderAnnotationAttributes<Idempotent>
ResolvablePlaceholderAnnotationAttributesforIdempotentannotation- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
ResolvablePlaceholderAnnotationAttributes, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IdempotentAttributes(Idempotent annotation, org.springframework.core.env.PropertyResolver propertyResolver)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WebSourcegetSource()Get the request sourceWebTargetgetTarget()Get the request targetjava.lang.StringgetTokenName()Get the token nameorg.springframework.web.bind.annotation.RequestMethod[]getValidatedMethod()Get the request methods for idempotent validation.booleanisValidatedMethod(java.lang.String method)Determine whether the specified request method should be validatedstatic IdempotentAttributesof(Idempotent annotation)Create theIdempotentannotation attributesstatic IdempotentAttributesof(Idempotent annotation, org.springframework.core.env.PropertyResolver propertyResolver)Create theIdempotentannotation attributes-
Methods inherited from class io.microsphere.spring.core.annotation.ResolvablePlaceholderAnnotationAttributes
of, of, of, ofSet
-
Methods inherited from class io.microsphere.spring.core.annotation.GenericAnnotationAttributes
annotationType, equals, hashCode, of, of, ofSet, toString
-
Methods inherited from class org.springframework.core.annotation.AnnotationAttributes
fromMap, getAnnotation, getAnnotation, getAnnotationArray, getAnnotationArray, getBoolean, getClass, getClassArray, getEnum, getNumber, getString, getStringArray
-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Constructor Detail
-
IdempotentAttributes
public IdempotentAttributes(Idempotent annotation, @Nullable org.springframework.core.env.PropertyResolver propertyResolver)
-
-
Method Detail
-
getTokenName
@Nonnull public java.lang.String getTokenName()
Get the token name- Returns:
- non-null
- See Also:
Idempotent.tokenName()
-
getValidatedMethod
@Nonnull public org.springframework.web.bind.annotation.RequestMethod[] getValidatedMethod()
Get the request methods for idempotent validation.- Returns:
- non-null
- See Also:
Idempotent.validatedMethod()
-
getSource
@Nonnull public WebSource getSource()
Get the request source- Returns:
- non-null
- See Also:
Idempotent.source()
-
getTarget
@Nonnull public WebTarget getTarget()
Get the request target- Returns:
- non-null
- See Also:
Idempotent.target()
-
isValidatedMethod
public boolean isValidatedMethod(java.lang.String method)
Determine whether the specified request method should be validated- Parameters:
method- the request method- Returns:
trueif the specified request method should be validated;falseotherwise
-
of
@Nonnull public static IdempotentAttributes of(Idempotent annotation)
Create theIdempotentannotation attributes- Parameters:
annotation- theIdempotentannotation- Returns:
- non-null
-
of
@Nonnull public static IdempotentAttributes of(Idempotent annotation, @Nullable org.springframework.core.env.PropertyResolver propertyResolver)
Create theIdempotentannotation attributes- Parameters:
annotation- theIdempotentannotationpropertyResolver- thePropertyResolver- Returns:
- non-null
-
-