Class AbstractUrlResolver<T>
java.lang.Object
de.hybris.platform.commerceservices.url.impl.AbstractUrlResolver<T>
- Type Parameters:
T- the source type to resolve into a url
- All Implemented Interfaces:
UrlResolver<T>
- Direct Known Subclasses:
DefaulCustomPageUrlResolver,DefaultCategoryDataUrlResolver,DefaultCategoryModelUrlResolver,DefaultContentPageUrlResolver,DefaultHomepageContentPageUrlResolver,DefaultPointOfServiceUrlResolver,DefaultProductDataUrlResolver,DefaultProductModelUrlResolver,OrdermanagementOrderEntryUrlResolver,VendorUrlResolver,WarehousingWarehouseUrlResolver,WsProductModelUrlResolver
Abstract url resolver that provides support methods for url resolvers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGet the cache key for the source instance.protected ThreadContextServiceResolve the url path for the source type.protected abstract StringresolveInternal(T source) Resolve the url path for the source type.voidsetThreadContextService(ThreadContextService threadContextService) protected StringUrl encodes a stringprotected StringEncode string with UTF8 encoding and then convert a string into a URL safe version of the string.
-
Constructor Details
-
AbstractUrlResolver
public AbstractUrlResolver()
-
-
Method Details
-
getThreadContextService
-
setThreadContextService
-
urlSafe
Encode string with UTF8 encoding and then convert a string into a URL safe version of the string. Only upper and lower case letters and numbers are retained. All other characters are replaced by a hyphen (-).- Parameters:
text- the text to sanitize- Returns:
- the safe version of the text
-
urlEncode
Url encodes a string- Parameters:
source- A string to encode- Returns:
- A Url encoded string
-
getKey
Get the cache key for the source instance.- Parameters:
source- the source instance- Returns:
- the cache key or null if caching is not supported
-
resolve
Description copied from interface:UrlResolverResolve the url path for the source type.- Specified by:
resolvein interfaceUrlResolver<T>- Parameters:
source- the source type.- Returns:
- the URL path
-
resolveInternal
Resolve the url path for the source type.- Parameters:
source- the source type.- Returns:
- the URL path
-