Class DataRouteReference
java.lang.Object
com.broadleafcommerce.common.extension.data.DataRouteReference
Utility class used to filter routable concepts.
- Author:
- Jeff Fischer
-
Constructor Summary
ConstructorsConstructorDescriptionDataRouteReference(List<PackageDataRouteSupplier<DataRouteSupporting>> routeSuppliers, List<RepositoryDataRouteSupplier<DataRouteSupporting>> repositoryRouteSuppliers, List<DomainClassSupplier<DataRouteSupporting>> domainSuppliers) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanfindDomainClassesByRoute(Class<?> routeClass) Given an example class, find any available scanned entity classes associated with the route.findRouteByExample(Class<?> exampleClass) Given an example class, find a matching instance based onPackageDataRouteSupplier.PackageMapping.packageFragment(), if available.findRouteByExample(String routePartition) Given an example package fragment, find a matching instance based onPackageDataRouteSupplier.PackageMapping.packageFragment(), if available.findRouteByKey(String key) Given a known route key, find a matching instance based onDataRouteSupporting.getLookupKey().findRoutesByRepository(Class<?> repositoryClass) Filter all routes associated with aDataRouteSupportingextension that are handled by a given repository.findSupportingRoutesByExample(Class<?> exampleClass) Given an example class, find one or more matching instances based onPackageDataRouteSupplier.PackageMapping.packageFragment(), if available.findSupportingRoutesByExample(String routePartition) Given an example package fragment, find one or more matching instances based onPackageDataRouteSupplier.PackageMapping.packageFragment(), if available.inthashCode()toString()
-
Constructor Details
-
DataRouteReference
public DataRouteReference(List<PackageDataRouteSupplier<DataRouteSupporting>> routeSuppliers, List<RepositoryDataRouteSupplier<DataRouteSupporting>> repositoryRouteSuppliers, List<DomainClassSupplier<DataRouteSupporting>> domainSuppliers)
-
-
Method Details
-
findRouteByKey
Given a known route key, find a matching instance based onDataRouteSupporting.getLookupKey().- Parameters:
key- The known rout key.- Returns:
- The filtered
DataRouteSupporting
-
findRouteByExample
Given an example class, find a matching instance based onPackageDataRouteSupplier.PackageMapping.packageFragment(), if available.- Parameters:
exampleClass- Class whose package name is used to identify a validDataRouteSupportinginstance.- Returns:
- Filtered
DataRouteSupportinginstance, if found.
-
findRouteByExample
Given an example package fragment, find a matching instance based onPackageDataRouteSupplier.PackageMapping.packageFragment(), if available.- Parameters:
routePartition- Package fragment used to identify a validDataRouteSupportinginstance.- Returns:
- Filtered
DataRouteSupportinginstance, if found.
-
findSupportingRoutesByExample
Given an example class, find one or more matching instances based onPackageDataRouteSupplier.PackageMapping.packageFragment(), if available.- Parameters:
exampleClass- Class whose package name is used to identify validDataRouteSupportinginstances.- Returns:
- Filtered
DataRouteSupportinginstances.
-
findSupportingRoutesByExample
Given an example package fragment, find one or more matching instances based onPackageDataRouteSupplier.PackageMapping.packageFragment(), if available.- Parameters:
routePartition- Package fragment used to identify validDataRouteSupportinginstances.- Returns:
- Filtered
DataRouteSupportinginstances.
-
findRoutesByRepository
Filter all routes associated with aDataRouteSupportingextension that are handled by a given repository. This is generally useful in common libraries that have data interactions. For example, BulkUpdateRepository deals with any BulkDataRouteSupporting data route proxy.- Parameters:
repositoryClass- The specific repository to filter associated data route proxies by.- Returns:
- List of one or more DataRouteSupporting proxies, if found.
-
findDomainClassesByRoute
Given an example class, find any available scanned entity classes associated with the route.- Parameters:
routeClass- Example class for the route.- Returns:
- Any available scanned entity classes associated with the route.
-
getRouteSuppliers
-
getRepositoryRouteSuppliers
-
getDomainSuppliers
-
getPackageFragmentByRoute
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-