Class DataRouteReference
- java.lang.Object
-
- com.broadleafcommerce.common.extension.data.DataRouteReference
-
public class DataRouteReference extends Object
Utility class used to filter routable concepts.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description DataRouteReference(List<PackageDataRouteSupplier<DataRouteSupporting>> routeSuppliers, List<RepositoryDataRouteSupplier<DataRouteSupporting>> repositoryRouteSuppliers, List<DomainClassSupplier<DataRouteSupporting>> domainSuppliers)
-
Method Summary
-
-
-
Constructor Detail
-
DataRouteReference
public DataRouteReference(List<PackageDataRouteSupplier<DataRouteSupporting>> routeSuppliers, List<RepositoryDataRouteSupplier<DataRouteSupporting>> repositoryRouteSuppliers, List<DomainClassSupplier<DataRouteSupporting>> domainSuppliers)
-
-
Method Detail
-
findRouteByKey
public DataRouteSupporting findRouteByKey(String key)
Given a known route key, find a matching instance based onDataRouteSupporting.getLookupKey()
.- Parameters:
key
- The known rout key.- Returns:
- The filtered
DataRouteSupporting
-
findRouteByExample
public Optional<DataRouteSupporting> findRouteByExample(Class<?> exampleClass)
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
public Optional<DataRouteSupporting> findRouteByExample(String routePartition)
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
public Set<DataRouteSupporting> findSupportingRoutesByExample(Class<?> exampleClass)
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
public Set<DataRouteSupporting> findSupportingRoutesByExample(String routePartition)
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
public Optional<List<DataRouteSupporting>> findRoutesByRepository(Class<?> repositoryClass)
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
public Optional<List<Class<?>>> findDomainClassesByRoute(Class<?> routeClass)
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
public List<PackageDataRouteSupplier<DataRouteSupporting>> getRouteSuppliers()
-
getRepositoryRouteSuppliers
public List<RepositoryDataRouteSupplier<DataRouteSupporting>> getRepositoryRouteSuppliers()
-
getDomainSuppliers
public List<DomainClassSupplier<DataRouteSupporting>> getDomainSuppliers()
-
canEqual
protected boolean canEqual(Object other)
-
-