| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| AssetResolver |
|
| 1.0;1 |
| 1 | package org.kuali.rice.krms.api; | |
| 2 | ||
| 3 | import java.util.Map; | |
| 4 | import java.util.Set; | |
| 5 | ||
| 6 | public interface AssetResolver <T> { | |
| 7 | ||
| 8 | /** | |
| 9 | * @return the set of assets that this resolver requires to resolve its output, or an empty set if it has no prereqs; | |
| 10 | */ | |
| 11 | Set<Asset> getPrerequisites(); | |
| 12 | ||
| 13 | /** | |
| 14 | * @return the asset that the implementor resolves | |
| 15 | */ | |
| 16 | Asset getOutput(); | |
| 17 | ||
| 18 | /** | |
| 19 | * @return an integer representing the cost of resolving the asset. 1 is cheap, Integer.MAX_INT is expensive. | |
| 20 | */ | |
| 21 | int getCost(); | |
| 22 | ||
| 23 | /** | |
| 24 | * @resolvedPrereqs the resolved prereqs | |
| 25 | * @return the resolved asset | |
| 26 | * @throws AssetResolutionException if something bad happens during the asset resolution process | |
| 27 | */ | |
| 28 | T resolve(Map<Asset, Object> resolvedPrereqs) throws AssetResolutionException; | |
| 29 | } |