Interface QueryParamEnum
- All Superinterfaces:
FriendlyEnum
- All Known Implementing Classes:
WPQueryParam
QueryParamEnum is an interface that promotes a unified type for query parameters and a
value() method to ensure consistency with the design practices of the project. It can be used as
a means to provide your own query parameters to the WPCacheManager safely.- Author:
- Yoham Gabriel B. @YGBStudio
- See Also:
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <E extends QueryParamEnum>
@NotNull StringjoinQueryParams(@NotNull Map<E, String> wpRestQueriesMap) This method helps you join a map of query parameters into a string that can be used as a query string.Methods inherited from interface net.ygbstudio.powerwp4j.base.extension.enums.FriendlyEnum
value
-
Method Details
-
joinQueryParams
@NotNull static <E extends QueryParamEnum> @NotNull String joinQueryParams(@NotNull @NotNull Map<E, String> wpRestQueriesMap) This method helps you join a map of query parameters into a string that can be used as a query string.It is up to you to create a separate class that contains such "leading" parameters or use the same for all as long as both implement
QueryParamEnum. In either case this method will help you and throw anIllegalArgumentExceptionif you do not provide any query parameters.- Type Parameters:
E- the query parameter enum type- Parameters:
wpRestQueriesMap- map of query parameters and their values- Returns:
- string that can be used as a query string
-