public List<Product> getActiveProducts() {
BroadleafRequestContext context = BroadleafRequestContext.getBroadleafRequestContext();
if (context != null && context.getAdditionalProperties().containsKey("blCategoryEntityExtensionManager")) {
CategoryEntityExtensionManager extensionManager = (CategoryEntityExtensionManager) context.getAdditionalProperties().get("blCategoryEntityExtensionManager");
ExtensionResultHolder holder = new ExtensionResultHolder();
ExtensionResultStatusType result = extensionManager.getProxy().getActiveProducts(this, holder);
if (ExtensionResultStatusType.HANDLED.equals(result)) {
return (List<Product>) holder.getResult();
}
}
List<Product> result = new ArrayList<Product>();
for (CategoryProductXref product : allProductXrefs) {
if (product.getProduct().isActive()) {
result.add(product.getProduct());
}
}
return Collections.unmodifiableList(result);
}