Author: jonesde
Date: Sat Mar 3 13:13:17 2007
New Revision: 514243
URL:
http://svn.apache.org/viewvc?view=rev&rev=514243Log:
Changed default for the optional attribute on the implements element from false to true, because as is ALL attributes are being set to optional, which I think is not normally what is wanted and I bet there have been a few surprises and frustrations from this
Modified:
ofbiz/trunk/framework/service/dtd/services.xsd
ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java
Modified: ofbiz/trunk/framework/service/dtd/services.xsd
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/dtd/services.xsd?view=diff&rev=514243&r1=514242&r2=514243==============================================================================
--- ofbiz/trunk/framework/service/dtd/services.xsd (original)
+++ ofbiz/trunk/framework/service/dtd/services.xsd Sat Mar 3 13:13:17 2007
@@ -185,7 +185,8 @@
</xs:element>
<xs:attributeGroup name="attlist.implements">
<xs:attribute type="xs:string" name="service" use="required"/>
- <xs:attribute name="optional" default="true">
+ <xs:attribute name="optional" default="false">
+ <xs:annotation><xs:documentation>If set to true all attributes inherited will have be optional whether or not they were in the implemented service definition.</xs:documentation></xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java?view=diff&rev=514243&r1=514242&r2=514243==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java Sat Mar 3 13:13:17 2007
@@ -426,7 +426,7 @@
while (implIter.hasNext()) {
Element implement = (Element) implIter.next();
String serviceName = UtilXml.checkEmpty(implement.getAttribute("service"));
- boolean optional = UtilXml.checkBoolean(implement.getAttribute("optional"), true);
+ boolean optional = UtilXml.checkBoolean(implement.getAttribute("optional"), false);
if (serviceName.length() > 0)
service.implServices.add(new ModelServiceIface(serviceName, optional));
//service.implServices.add(serviceName);