Author: jleroux
Date: Thu Sep 12 17:36:45 2013 New Revision: 1522675 URL: http://svn.apache.org/r1522675 Log: Reverts r1518777 Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/FileUtil.java ofbiz/trunk/framework/webapp/dtd/site-conf.xsd ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java ofbiz/trunk/specialpurpose/birt/ofbiz-component.xml ofbiz/trunk/specialpurpose/birt/webapp/accounting/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/birt/webapp/facility/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/WEB-INF/controller.xml Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Thu Sep 12 17:36:45 2013 @@ -22,7 +22,6 @@ under the License. xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd"> <include location="component://common/webcommon/WEB-INF/common-controller.xml"/> <include location="component://commonext/webapp/WEB-INF/controller.xml"/> - <include location="component://birt/webapp/accounting/WEB-INF/controller.xml" if-present="true"/> <description>Accounting Manager Module Site Configuration File</description> <!-- Events to run on every request before security (chains exempt) --> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml Thu Sep 12 17:36:45 2013 @@ -23,7 +23,6 @@ under the License. <include location="component://common/webcommon/WEB-INF/common-controller.xml"/> <include location="component://commonext/webapp/WEB-INF/controller.xml"/> <include location="component://content/webapp/content/WEB-INF/controller.xml"/> - <include location="component://birt/webapp/ordermgr/WEB-INF/controller.xml" if-present="true"/> <description>Order Manager Module Site Configuration File</description> <!-- event handlers --> Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Thu Sep 12 17:36:45 2013 @@ -22,8 +22,6 @@ under the License. xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd"> <include location="component://common/webcommon/WEB-INF/common-controller.xml"/> <include location="component://commonext/webapp/WEB-INF/controller.xml"/> - <include location="component://birt/webapp/accounting/WEB-INF/controller.xml" if-present="true"/> - <description>Facility Manager Module Site Configuration File</description> <handler name="service-multi" type="request" class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/> Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/location/ComponentLocationResolver.java Thu Sep 12 17:36:45 2013 @@ -38,7 +38,7 @@ public class ComponentLocationResolver i public static final String module = ComponentLocationResolver.class.getName(); public URL resolveLocation(String location) throws MalformedURLException { - String baseLocation = getBaseLocation(location, false).toString(); + String baseLocation = getBaseLocation(location).toString(); if (File.separatorChar != '/') { baseLocation = baseLocation.replace(File.separatorChar, '/'); } @@ -52,7 +52,7 @@ public class ComponentLocationResolver i } } - public static StringBuilder getBaseLocation(String location, boolean ifPresent) throws MalformedURLException { + public static StringBuilder getBaseLocation(String location) throws MalformedURLException { StringBuilder baseLocation = new StringBuilder(FlexibleLocation.stripLocationType(location)); // componentName is between the first slash and the second int firstSlash = baseLocation.indexOf("/"); @@ -73,13 +73,9 @@ public class ComponentLocationResolver i baseLocation.insert(0, rootLocation); return baseLocation; } catch (ComponentException e) { - if (!ifPresent) { - String errMsg = "Could not get root location for component with name [" + componentName + "], error was: " + e.toString(); - Debug.logError(e, errMsg, module); - throw new MalformedURLException(errMsg); - } else { - return null; - } + String errMsg = "Could not get root location for component with name [" + componentName + "], error was: " + e.toString(); + Debug.logError(e, errMsg, module); + throw new MalformedURLException(errMsg); } - } + } } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/FileUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/FileUtil.java?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/FileUtil.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/FileUtil.java Thu Sep 12 17:36:45 2013 @@ -38,9 +38,10 @@ import java.util.Set; import javolution.util.FastList; import javolution.util.FastSet; -import org.apache.commons.io.FileUtils; import org.ofbiz.base.location.ComponentLocationResolver; +import org.apache.commons.io.FileUtils; + /** * File Utilities * @@ -56,7 +57,7 @@ public class FileUtil { public static File getFile(File root, String path) { if (path.startsWith("component://")) { try { - path = ComponentLocationResolver.getBaseLocation(path, false).toString(); + path = ComponentLocationResolver.getBaseLocation(path).toString(); } catch (MalformedURLException e) { Debug.logError(e, module); return null; Modified: ofbiz/trunk/framework/webapp/dtd/site-conf.xsd URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/dtd/site-conf.xsd?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/dtd/site-conf.xsd (original) +++ ofbiz/trunk/framework/webapp/dtd/site-conf.xsd Thu Sep 12 17:36:45 2013 @@ -55,17 +55,6 @@ under the License. </xs:element> <xs:attributeGroup name="attlist.include"> <xs:attribute type="xs:string" name="location" use="required"/> - <xs:attribute type="xs:boolean" name="if-present" use="optional" default="true"> - <xs:annotation> - <xs:documentation> - Only used with component type location (component://). This allows to introduce a loose coupling to another component. - - If true, if the component is absent it will be ignored. - A warning will be logged, to let know the component can possibly be checked out from trunk HEAD - (since R13.07, in releases specialpurpose components are removed but ecommerce). - </xs:documentation> - </xs:annotation> - </xs:attribute> </xs:attributeGroup> <xs:element name="description" type="xs:string"/> <xs:element name="owner" type="xs:string"/> Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ConfigXMLReader.java Thu Sep 12 17:36:45 2013 @@ -32,7 +32,6 @@ import javolution.util.FastList; import javolution.util.FastMap; import javolution.util.FastSet; -import org.ofbiz.base.location.ComponentLocationResolver; import org.ofbiz.base.location.FlexibleLocation; import org.ofbiz.base.metrics.Metrics; import org.ofbiz.base.metrics.MetricsFactory; @@ -296,24 +295,7 @@ public class ConfigXMLReader { protected void loadIncludes(Element rootElement) { for (Element includeElement: UtilXml.childElementList(rootElement, "include")) { String includeLocation = includeElement.getAttribute("location"); - boolean testIfPresent = "true".equals(includeElement.getAttribute("if-present")); if (UtilValidate.isNotEmpty(includeLocation)) { - if (includeLocation.startsWith("component://") && testIfPresent) { - try { - if (null == ComponentLocationResolver.getBaseLocation(includeLocation, true)) { - Debug.logWarning(includeLocation + " does not exist." + " Since R13.07, in releases, specialpurpose components were removed but ecommerce." - + " If you need this component, you might check it out from Apache OFBiz trunk HEAD (http://svn.apache.org/repos/asf/ofbiz/trunk)." - + " Else, you can simply neglect this warning.", module); - continue; - } - } catch (MalformedURLException mue) { - Debug.logWarning("While trying to retrieve " + includeLocation + " an error occured (but if-present was used, so it's maybe only a typo)." - + " Also note that since R13.07, in releases, specialpurpose components were removed but ecommerce." - + " If you need this component, you might check it out from Apache OFBiz trunk HEAD (http://svn.apache.org/repos/asf/ofbiz/trunk)." - + " Else, you can simply neglect this warning.", module); - continue; - } - } try { URL urlLocation = FlexibleLocation.resolveLocation(includeLocation); includes.add(urlLocation); Modified: ofbiz/trunk/specialpurpose/birt/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/birt/ofbiz-component.xml?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/birt/ofbiz-component.xml (original) +++ ofbiz/trunk/specialpurpose/birt/ofbiz-component.xml Thu Sep 12 17:36:45 2013 @@ -29,6 +29,28 @@ under the License. <entity-resource type="data" reader-name="seed" loader="main" location="data/OrderPortletData.xml"/> <service-resource type="model" loader="main" location="servicedef/services.xml"/> + <!-- use when reports need to be injected into applications Note: this will break contextual help for those applications. + <webapp name="accounting" + title="Accounting" + server="default-server" + location="webapp/accounting" + base-permission="OFBTOOLS,ACCOUNTING" + mount-point="/accounting"/> + <webapp name="facility" + title="Facility" + description="FacilityComponentDescription" + server="default-server" + location="webapp/facility" + base-permission="OFBTOOLS,FACILITY" + mount-point="/facility"/> + <webapp name="order" + title="Order" + description="OrderComponentDescription" + server="default-server" + location="webapp/ordermgr" + base-permission="OFBTOOLS,ORDERMGR" + mount-point="/ordermgr"/> + --> <webapp name="birt" title="BIRT" server="default-server" Modified: ofbiz/trunk/specialpurpose/birt/webapp/accounting/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/birt/webapp/accounting/WEB-INF/controller.xml?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/birt/webapp/accounting/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/birt/webapp/accounting/WEB-INF/controller.xml Thu Sep 12 17:36:45 2013 @@ -20,6 +20,7 @@ under the License. <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd"> + <include location="component://accounting/webapp/accounting/WEB-INF/controller.xml"/> <description>Extended Accounting Controller Configuration File</description> Modified: ofbiz/trunk/specialpurpose/birt/webapp/facility/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/birt/webapp/facility/WEB-INF/controller.xml?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/birt/webapp/facility/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/birt/webapp/facility/WEB-INF/controller.xml Thu Sep 12 17:36:45 2013 @@ -20,6 +20,7 @@ under the License. <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd"> + <include location="component://product/webapp/facility/WEB-INF/controller.xml"/> <description>Extended Facility Manager Controller Configuration File</description> Modified: ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/WEB-INF/controller.xml?rev=1522675&r1=1522674&r2=1522675&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/birt/webapp/ordermgr/WEB-INF/controller.xml Thu Sep 12 17:36:45 2013 @@ -20,6 +20,7 @@ under the License. <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd"> + <include location="component://order/webapp/ordermgr/WEB-INF/controller.xml"/> <description>Extended Order Manager Controller Configuration File</description> |
Free forum by Nabble | Edit this page |