Package org.broadleafcommerce.common.extension

Examples of org.broadleafcommerce.common.extension.ExtensionResultStatusType


    public List<ProductOptionXref> getProductXrefs() {
        BroadleafRequestContext context = BroadleafRequestContext.getBroadleafRequestContext();
        if (context != null && context.getAdditionalProperties().containsKey("blProductOptionEntityExtensionManager")) {
            ProductOptionEntityExtensionManager extensionManager = (ProductOptionEntityExtensionManager) context.getAdditionalProperties().get("blProductOptionEntityExtensionManager");
            ExtensionResultHolder holder = new ExtensionResultHolder();
            ExtensionResultStatusType result = extensionManager.getProxy().getProductXrefs(this, holder);
            if (ExtensionResultStatusType.HANDLED.equals(result)) {
                return (List<ProductOptionXref>) holder.getResult();
            }
        }
View Full Code Here


    @Override
    public Category findCategoryByURI(String uri) {
        if (extensionManager != null) {
            ExtensionResultHolder holder = new ExtensionResultHolder();
            ExtensionResultStatusType result = extensionManager.getProxy().findCategoryByURI(uri, holder);
            if (ExtensionResultStatusType.HANDLED.equals(result)) {
                return (Category) holder.getResult();
            }
        }
        Query query;
View Full Code Here

        Class<?> clazz = entityConfiguration.lookupEntityClass(entity.getType());

        ExtensionResultHolder erh = new ExtensionResultHolder();
        try {
            Long id = Long.parseLong(entityId);
            ExtensionResultStatusType result = extensionManager.getProxy().overrideRequestedId(erh, em, clazz, id);
            if (result.equals(ExtensionResultStatusType.HANDLED)) {
                return String.valueOf((Long) erh.getResult());
            }
        } catch (NumberFormatException e) {
            // The ID was not a Long, which means we can't override it. We'll return the default value below.
        }
View Full Code Here

    public List<OfferCode> getOfferCodes() {
        BroadleafRequestContext context = BroadleafRequestContext.getBroadleafRequestContext();
        if (context != null && context.getAdditionalProperties().containsKey("blOfferEntityExtensionManager")) {
            OfferEntityExtensionManager extensionManager = (OfferEntityExtensionManager) context.getAdditionalProperties().get("blOfferEntityExtensionManager");
            ExtensionResultHolder holder = new ExtensionResultHolder();
            ExtensionResultStatusType result = extensionManager.getProxy().getOfferCodes(this, holder);
            if (ExtensionResultStatusType.HANDLED.equals(result)) {
                return (List<OfferCode>) holder.getResult();
            }
        }
        return offerCodes;
View Full Code Here

    @Override
    public List<Product> findProductByURI(String uri) {
        if (extensionManager != null) {
            ExtensionResultHolder holder = new ExtensionResultHolder();
            ExtensionResultStatusType result = extensionManager.getProxy().findProductByURI(uri, holder);
            if (ExtensionResultStatusType.HANDLED.equals(result)) {
                return (List<Product>) holder.getResult();
            }
        }
        String urlKey = uri.substring(uri.lastIndexOf('/'));       
View Full Code Here

    public List<CategoryXref> getAllChildCategoryXrefs(){
        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().getAllChildCategoryXrefs(this, holder);
            if (ExtensionResultStatusType.HANDLED.equals(result)) {
                return (List<CategoryXref>) holder.getResult();
            }
        }
        return allChildCategoryXrefs;
View Full Code Here

    public List<CategoryXref> getChildCategoryXrefs() {
        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().getChildCategoryXrefs(this, holder);
            if (ExtensionResultStatusType.HANDLED.equals(result)) {
                return (List<CategoryXref>) holder.getResult();
            }
        }
        if (childCategoryXrefs.isEmpty()) {
View Full Code Here

    public List<Category> getAllChildCategories(){
        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().getAllChildCategories(this, holder);
            if (ExtensionResultStatusType.HANDLED.equals(result)) {
                return (List<Category>) holder.getResult();
            }
        }
        if (allLegacyChildCategories.isEmpty()) {
View Full Code Here

    public boolean hasAllChildCategories(){
        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().hasAllChildCategories(this, holder);
            if (ExtensionResultStatusType.HANDLED.equals(result)) {
                return (Boolean) holder.getResult();
            }
        }
        return !allChildCategoryXrefs.isEmpty();
View Full Code Here

    public List<Category> getChildCategories() {
        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().getChildCategories(this, holder);
            if (ExtensionResultStatusType.HANDLED.equals(result)) {
                return (List<Category>) holder.getResult();
            }
        }
        if (legacyChildCategories.isEmpty()) {
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.common.extension.ExtensionResultStatusType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.