Package org.ofbiz.base.config

Examples of org.ofbiz.base.config.MainResourceHandler


        if (resourceHandlerEntities == null) return null;
        return (Collection) resourceHandlerEntities.get(resourceHandler);
    }

    public void addEntityToResourceHandler(String entityName, String loaderName, String location) {
        entityResourceHandlerMap.put(entityName, new MainResourceHandler(EntityConfigUtil.ENTITY_ENGINE_XML_FILENAME, loaderName, location));
    }
View Full Code Here


            throw new GenericEntityConfException("Cound not find an entity-group-reader with the name " + modelName);
        }
        Iterator resourceElementIter = entityGroupReaderInfo.resourceElements.iterator();
        while (resourceElementIter.hasNext()) {
            Element resourceElement = (Element) resourceElementIter.next();
            this.entityGroupResourceHandlers.add(new MainResourceHandler(EntityConfigUtil.ENTITY_ENGINE_XML_FILENAME, resourceElement));
        }

        // get all of the component resource group stuff, ie specified in each ofbiz-component.xml file
        List componentResourceInfos = ComponentConfig.getAllEntityResourceInfos("group");
        Iterator componentResourceInfoIter = componentResourceInfos.iterator();
View Full Code Here

                if (entityDataReaderInfo != null) {
                    List resourceElements = entityDataReaderInfo.resourceElements;
                    Iterator resIter = resourceElements.iterator();
                    while (resIter.hasNext()) {
                        Element resourceElement = (Element) resIter.next();
                        ResourceHandler handler = new MainResourceHandler(EntityConfigUtil.ENTITY_ENGINE_XML_FILENAME, resourceElement);
                        try {
                            urlList.add(handler.getURL());
                        } catch (GenericConfigException e) {
                            String errorMsg = "Could not get URL for Main ResourceHandler: " + e.toString();
                            Debug.logWarning(errorMsg, module);
                        }
                    }
       
                    // get all of the component resource model stuff, ie specified in each ofbiz-component.xml file
                    List componentResourceInfos = ComponentConfig.getAllEntityResourceInfos("data", componentName);
                    Iterator componentResourceInfoIter = componentResourceInfos.iterator();
                    while (componentResourceInfoIter.hasNext()) {
                        ComponentConfig.EntityResourceInfo componentResourceInfo = (ComponentConfig.EntityResourceInfo) componentResourceInfoIter.next();
                        if (readerName.equals(componentResourceInfo.readerName)) {
                            ResourceHandler handler = componentResourceInfo.createResourceHandler();
                            try {
                                urlList.add(handler.getURL());
                            } catch (GenericConfigException e) {
                                String errorMsg = "Could not get URL for Component ResourceHandler: " + e.toString();
                                Debug.logWarning(errorMsg, module);
                            }
                        }
View Full Code Here

TOP

Related Classes of org.ofbiz.base.config.MainResourceHandler

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.