Class DataRouteReference
java.lang.Object
com.broadleafcommerce.common.extension.data.DataRouteReference
Utility class used to filter routable concepts.
- Author:
- Jeff Fischer
-
Constructor Summary
ConstructorDescriptionDataRouteReference
(List<PackageDataRouteSupplier<DataRouteSupporting>> routeSuppliers, List<RepositoryDataRouteSupplier<DataRouteSupporting>> repositoryRouteSuppliers, List<DomainClassSupplier<DataRouteSupporting>> domainSuppliers) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
findDomainClassesByRoute
(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 aDataRouteSupporting
extension 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.int
hashCode()
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 validDataRouteSupporting
instance.- Returns:
- Filtered
DataRouteSupporting
instance, 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 validDataRouteSupporting
instance.- Returns:
- Filtered
DataRouteSupporting
instance, 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 validDataRouteSupporting
instances.- Returns:
- Filtered
DataRouteSupporting
instances.
-
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 validDataRouteSupporting
instances.- Returns:
- Filtered
DataRouteSupporting
instances.
-
findRoutesByRepository
Filter all routes associated with aDataRouteSupporting
extension 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
-