public abstract class HalCachingLinkResolver extends Object implements HalLinkResolver
Constructor and Description |
---|
HalCachingLinkResolver() |
Modifier and Type | Method and Description |
---|---|
protected Cache |
getCache() |
protected abstract Class<?> |
getHalResourceClass() |
protected Comparator<HalResource<?>> |
getResourceComparator() |
protected abstract String |
getResourceId(HalResource<?> resource) |
protected void |
putIntoCache(List<HalResource<?>> notCachedResources)
Put a resource into the cache.
|
protected List<HalResource<?>> |
resolveCachedLinks(String[] linkedIds,
Cache cache,
List<String> notCachedLinkedIds)
Returns a list with all resources which are cached.
|
List<HalResource<?>> |
resolveLinks(String[] linkedIds,
ProcessEngine processEngine)
Resolve resources for linked ids, if configured uses a cache.
|
protected abstract List<HalResource<?>> |
resolveNotCachedLinks(String[] linkedIds,
ProcessEngine processEngine) |
protected void |
sortResolvedResources(List<HalResource<?>> resolvedResources)
Sort the resolved resources to ensure consistent order of resolved resources.
|
public List<HalResource<?>> resolveLinks(String[] linkedIds, ProcessEngine processEngine)
resolveLinks
in interface HalLinkResolver
protected void sortResolvedResources(List<HalResource<?>> resolvedResources)
protected Cache getCache()
protected List<HalResource<?>> resolveCachedLinks(String[] linkedIds, Cache cache, List<String> notCachedLinkedIds)
linkedIds
- the ids to resolvecache
- the cache to usenotCachedLinkedIds
- a list with ids which are not found in the cacheprotected void putIntoCache(List<HalResource<?>> notCachedResources)
protected abstract Class<?> getHalResourceClass()
protected Comparator<HalResource<?>> getResourceComparator()
protected abstract List<HalResource<?>> resolveNotCachedLinks(String[] linkedIds, ProcessEngine processEngine)
protected abstract String getResourceId(HalResource<?> resource)
Copyright © 2022. All rights reserved.