|
Author: adrianc
Date: Sat Jun 8 10:00:45 2013 New Revision: 1490940 URL: http://svn.apache.org/r1490940 Log: Cleaned up the auto-generated code in the entity config models. Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ConnectionFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Datasource.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DebugXaResources.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DelegatorElement.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityConfig.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityEcaReader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityGroupReader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityModelReader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/FieldType.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/GroupMap.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/InlineJdbc.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JdbcElement.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JndiJdbc.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ReadData.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Resource.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ResourceLoader.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/SqlLoadPath.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionFactory.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionManagerJndi.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TyrexDataSource.java ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/UserTransactionJndi.java Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ConnectionFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ConnectionFactory.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ConnectionFactory.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ConnectionFactory.java Sat Jun 8 10:00:45 2013 @@ -33,11 +33,11 @@ public final class ConnectionFactory { private final String className; // type = xs:string - public ConnectionFactory(Element element) throws GenericEntityConfException { + ConnectionFactory(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String className = element.getAttribute("class").intern(); if (className.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element class attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<connection-factory> element class attribute is empty" + lineNumberText); } this.className = className; } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Datasource.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Datasource.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Datasource.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Datasource.java Sat Jun 8 10:00:45 2013 @@ -82,21 +82,21 @@ public final class Datasource { private final JndiJdbc jndiJdbc; // <jndi-jdbc> private final TyrexDataSource tyrexDataSource; // <tyrex-dataSource> - public Datasource(Element element) throws GenericEntityConfException { + Datasource(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String name = element.getAttribute("name").intern(); if (name.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<datasource> element name attribute is empty" + lineNumberText); } this.name = name; String helperClass = element.getAttribute("helper-class").intern(); if (helperClass.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element helper-class attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<datasource> element helper-class attribute is empty" + lineNumberText); } this.helperClass = helperClass; String fieldTypeName = element.getAttribute("field-type-name").intern(); if (fieldTypeName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element field-type-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<datasource> element field-type-name attribute is empty" + lineNumberText); } this.fieldTypeName = fieldTypeName; this.useSchemas = !"false".equals(element.getAttribute("use-schemas")); @@ -112,7 +112,7 @@ public final class Datasource { try { this.constraintNameClipLength = Integer.parseInt(constraintNameClipLength); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element constraint-name-clip-length attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<datasource> element constraint-name-clip-length attribute is invalid" + lineNumberText); } } this.useProxyCursor = "true".equalsIgnoreCase(element.getAttribute("use-proxy-cursor")); @@ -128,7 +128,7 @@ public final class Datasource { try { this.resultFetchSize = Integer.parseInt(resultFetchSize); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element result-fetch-size attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<datasource> element result-fetch-size attribute is invalid" + lineNumberText); } } this.useForeignKeys = !"false".equals(element.getAttribute("use-foreign-keys")); @@ -175,7 +175,7 @@ public final class Datasource { } this.maxWorkerPoolSize = maxWorkerPoolSizeInt; } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element max-worker-pool-size attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<datasource> element max-worker-pool-size attribute is invalid" + lineNumberText); } } List<? extends Element> sqlLoadPathElementList = UtilXml.childElementList(element, "sql-load-path"); @@ -221,7 +221,7 @@ public final class Datasource { jdbcElementCount++; } if (jdbcElementCount > 1) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element is invalid: Only one of <inline-jdbc>, <jndi-jdbc>, <tyrex-dataSource> is allowed" + lineNumberText); + throw new GenericEntityConfException("<datasource> element is invalid: Only one of <inline-jdbc>, <jndi-jdbc>, <tyrex-dataSource> is allowed" + lineNumberText); } } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DebugXaResources.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DebugXaResources.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DebugXaResources.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DebugXaResources.java Sat Jun 8 10:00:45 2013 @@ -33,11 +33,11 @@ public final class DebugXaResources { private final boolean value; // type = xs:string - public DebugXaResources(Element element) throws GenericEntityConfException { + DebugXaResources(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String value = element.getAttribute("value").intern(); if (value.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element value attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<debug-xa-resources> element value attribute is empty" + lineNumberText); } this.value = "true".equals(value); } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DelegatorElement.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DelegatorElement.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DelegatorElement.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/DelegatorElement.java Sat Jun 8 10:00:45 2013 @@ -53,21 +53,21 @@ public final class DelegatorElement { private final List<GroupMap> groupMapList; // <group-map> private final Map<String, String> groupMapMap; // <group-map> - public DelegatorElement(Element element) throws GenericEntityConfException { + DelegatorElement(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String name = element.getAttribute("name").intern(); if (name.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<delegator> element name attribute is empty" + lineNumberText); } this.name = name; String entityModelReader = element.getAttribute("entity-model-reader").intern(); if (entityModelReader.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element entity-model-reader attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<delegator> element entity-model-reader attribute is empty" + lineNumberText); } this.entityModelReader = entityModelReader; String entityGroupReader = element.getAttribute("entity-group-reader").intern(); if (entityGroupReader.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element entity-group-reader attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<delegator> element entity-group-reader attribute is empty" + lineNumberText); } this.entityGroupReader = entityGroupReader; this.entityEcaReader = element.getAttribute("entity-eca-reader").intern(); @@ -97,7 +97,7 @@ public final class DelegatorElement { this.keyEncryptingKey = element.getAttribute("key-encrypting-key").intern(); List<? extends Element> groupMapElementList = UtilXml.childElementList(element, "group-map"); if (groupMapElementList.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child elements <group-map> are missing" + lineNumberText); + throw new GenericEntityConfException("<delegator> element child elements <group-map> are missing" + lineNumberText); } else { List<GroupMap> groupMapList = new ArrayList<GroupMap>(groupMapElementList.size()); Map<String, String> groupMapMap = new HashMap<String, String>(); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityConfig.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityConfig.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityConfig.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityConfig.java Sat Jun 8 10:00:45 2013 @@ -60,7 +60,7 @@ public final class EntityConfig { public EntityConfig(Element element) throws GenericEntityConfException { List<? extends Element> resourceLoaderElementList = UtilXml.childElementList(element, "resource-loader"); if (resourceLoaderElementList.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child elements <resource-loader> are missing"); + throw new GenericEntityConfException("<entity-config> element child elements <resource-loader> are missing"); } else { List<ResourceLoader> resourceLoaderList = new ArrayList<ResourceLoader>(resourceLoaderElementList.size()); Map<String, ResourceLoader> resourceLoaderMap = new HashMap<String, ResourceLoader>(); @@ -74,25 +74,25 @@ public final class EntityConfig { } Element transactionFactoryElement = UtilXml.firstChildElement(element, "transaction-factory"); if (transactionFactoryElement == null) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child element <transaction-factory> is missing"); + throw new GenericEntityConfException("<entity-config> element child element <transaction-factory> is missing"); } else { this.transactionFactory = new TransactionFactory(transactionFactoryElement); } Element connectionFactoryElement = UtilXml.firstChildElement(element, "connection-factory"); if (connectionFactoryElement == null) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child element <connection-factory> is missing"); + throw new GenericEntityConfException("<entity-config> element child element <connection-factory> is missing"); } else { this.connectionFactory = new ConnectionFactory(connectionFactoryElement); } Element debugXaResourcesElement = UtilXml.firstChildElement(element, "debug-xa-resources"); if (debugXaResourcesElement == null) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child element <debug-xa-resources> is missing"); + throw new GenericEntityConfException("<entity-config> element child element <debug-xa-resources> is missing"); } else { this.debugXaResources = new DebugXaResources(debugXaResourcesElement); } List<? extends Element> delegatorElementList = UtilXml.childElementList(element, "delegator"); if (delegatorElementList.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child elements <delegator> are missing"); + throw new GenericEntityConfException("<entity-config> element child elements <delegator> are missing"); } else { List<DelegatorElement> delegatorList = new ArrayList<DelegatorElement>(delegatorElementList.size()); Map<String, DelegatorElement> delegatorMap = new HashMap<String, DelegatorElement>(); @@ -106,7 +106,7 @@ public final class EntityConfig { } List<? extends Element> entityModelReaderElementList = UtilXml.childElementList(element, "entity-model-reader"); if (entityModelReaderElementList.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child elements <entity-model-reader> are missing"); + throw new GenericEntityConfException("<entity-config> element child elements <entity-model-reader> are missing"); } else { List<EntityModelReader> entityModelReaderList = new ArrayList<EntityModelReader>(entityModelReaderElementList.size()); Map<String, EntityModelReader> entityModelReaderMap = new HashMap<String, EntityModelReader>(); @@ -120,7 +120,7 @@ public final class EntityConfig { } List<? extends Element> entityGroupReaderElementList = UtilXml.childElementList(element, "entity-group-reader"); if (entityGroupReaderElementList.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child elements <entity-group-reader> are missing"); + throw new GenericEntityConfException("<entity-config> element child elements <entity-group-reader> are missing"); } else { List<EntityGroupReader> entityGroupReaderList = new ArrayList<EntityGroupReader>(entityGroupReaderElementList.size()); Map<String, EntityGroupReader> entityGroupReaderMap = new HashMap<String, EntityGroupReader>(); @@ -164,7 +164,7 @@ public final class EntityConfig { } List<? extends Element> fieldTypeElementList = UtilXml.childElementList(element, "field-type"); if (fieldTypeElementList.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child elements <field-type> are missing"); + throw new GenericEntityConfException("<entity-config> element child elements <field-type> are missing"); } else { List<FieldType> fieldTypeList = new ArrayList<FieldType>(fieldTypeElementList.size()); Map<String, FieldType> fieldTypeMap = new HashMap<String, FieldType>(); @@ -178,7 +178,7 @@ public final class EntityConfig { } List<? extends Element> datasourceElementList = UtilXml.childElementList(element, "datasource"); if (datasourceElementList.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element child elements <datasource> are missing"); + throw new GenericEntityConfException("<entity-config> element child elements <datasource> are missing"); } else { List<Datasource> datasourceList = new ArrayList<Datasource>(datasourceElementList.size()); Map<String, Datasource> datasourceMap = new HashMap<String, Datasource>(); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityDataReader.java Sat Jun 8 10:00:45 2013 @@ -39,11 +39,11 @@ public final class EntityDataReader { private final String name; // type = xs:string private final List<Resource> resourceList; // <resource> - public EntityDataReader(Element element) throws GenericEntityConfException { + EntityDataReader(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String name = element.getAttribute("name").intern(); if (name.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<entity-data-reader> element name attribute is empty" + lineNumberText); } this.name = name; List<? extends Element> resourceElementList = UtilXml.childElementList(element, "resource"); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityEcaReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityEcaReader.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityEcaReader.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityEcaReader.java Sat Jun 8 10:00:45 2013 @@ -39,11 +39,11 @@ public final class EntityEcaReader { private final String name; // type = xs:string private final List<Resource> resourceList; // <resource> - public EntityEcaReader(Element element) throws GenericEntityConfException { + EntityEcaReader(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String name = element.getAttribute("name").intern(); if (name.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<entity-eca-reader> element name attribute is empty" + lineNumberText); } this.name = name; List<? extends Element> resourceElementList = UtilXml.childElementList(element, "resource"); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityGroupReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityGroupReader.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityGroupReader.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityGroupReader.java Sat Jun 8 10:00:45 2013 @@ -41,11 +41,11 @@ public final class EntityGroupReader { private final String location; // type = xs:string private final List<Resource> resourceList; // <resource> - public EntityGroupReader(Element element) throws GenericEntityConfException { + EntityGroupReader(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String name = element.getAttribute("name").intern(); if (name.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<entity-group-reader> element name attribute is empty" + lineNumberText); } this.name = name; this.loader = element.getAttribute("loader").intern(); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityModelReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityModelReader.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityModelReader.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/EntityModelReader.java Sat Jun 8 10:00:45 2013 @@ -39,11 +39,11 @@ public final class EntityModelReader { private final String name; // type = xs:string private final List<Resource> resourceList; // <resource> - public EntityModelReader(Element element) throws GenericEntityConfException { + EntityModelReader(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String name = element.getAttribute("name").intern(); if (name.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<entity-model-reader> element name attribute is empty" + lineNumberText); } this.name = name; List<? extends Element> resourceElementList = UtilXml.childElementList(element, "resource"); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/FieldType.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/FieldType.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/FieldType.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/FieldType.java Sat Jun 8 10:00:45 2013 @@ -35,21 +35,21 @@ public final class FieldType { private final String loader; // type = xs:string private final String location; // type = xs:string - public FieldType(Element element) throws GenericEntityConfException { + FieldType(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String name = element.getAttribute("name").intern(); if (name.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<field-type> element name attribute is empty" + lineNumberText); } this.name = name; String loader = element.getAttribute("loader").intern(); if (loader.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element loader attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<field-type> element loader attribute is empty" + lineNumberText); } this.loader = loader; String location = element.getAttribute("location").intern(); if (location.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element location attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<field-type> element location attribute is empty" + lineNumberText); } this.location = location; } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/GroupMap.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/GroupMap.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/GroupMap.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/GroupMap.java Sat Jun 8 10:00:45 2013 @@ -34,16 +34,16 @@ public final class GroupMap { private final String groupName; // type = xs:string private final String datasourceName; // type = xs:string - public GroupMap(Element element) throws GenericEntityConfException { + GroupMap(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String groupName = element.getAttribute("group-name").intern(); if (groupName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element group-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<group-map> element group-name attribute is empty" + lineNumberText); } this.groupName = groupName; String datasourceName = element.getAttribute("datasource-name").intern(); if (datasourceName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element datasource-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<group-map> element datasource-name attribute is empty" + lineNumberText); } this.datasourceName = datasourceName; } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/InlineJdbc.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/InlineJdbc.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/InlineJdbc.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/InlineJdbc.java Sat Jun 8 10:00:45 2013 @@ -47,22 +47,22 @@ public final class InlineJdbc extends Jd private final String poolJdbcTestStmt; // type = xs:string private final String poolXaWrapperClass; // type = xs:string - public InlineJdbc(Element element) throws GenericEntityConfException { + InlineJdbc(Element element) throws GenericEntityConfException { super(element); String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String jdbcDriver = element.getAttribute("jdbc-driver").intern(); if (jdbcDriver.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element jdbc-driver attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element jdbc-driver attribute is empty" + lineNumberText); } this.jdbcDriver = jdbcDriver; String jdbcUri = element.getAttribute("jdbc-uri").intern(); if (jdbcUri.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element jdbc-uri attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element jdbc-uri attribute is empty" + lineNumberText); } this.jdbcUri = jdbcUri; String jdbcUsername = element.getAttribute("jdbc-username").intern(); if (jdbcUsername.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element jdbc-username attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element jdbc-username attribute is empty" + lineNumberText); } this.jdbcUsername = jdbcUsername; this.jdbcPassword = element.getAttribute("jdbc-password").intern(); @@ -74,7 +74,7 @@ public final class InlineJdbc extends Jd try { this.poolMaxsize = Integer.parseInt(poolMaxsize); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element pool-maxsize attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element pool-maxsize attribute is invalid" + lineNumberText); } } String poolMinsize = element.getAttribute("pool-minsize"); @@ -84,7 +84,7 @@ public final class InlineJdbc extends Jd try { this.poolMinsize = Integer.parseInt(poolMinsize); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element pool-minsize attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element pool-minsize attribute is invalid" + lineNumberText); } } String idleMaxsize = element.getAttribute("idle-maxsize"); @@ -94,7 +94,7 @@ public final class InlineJdbc extends Jd try { this.idleMaxsize = Integer.parseInt(idleMaxsize); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element idle-maxsize attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element idle-maxsize attribute is invalid" + lineNumberText); } } String timeBetweenEvictionRunsMillis = element.getAttribute("time-between-eviction-runs-millis"); @@ -104,7 +104,7 @@ public final class InlineJdbc extends Jd try { this.timeBetweenEvictionRunsMillis = Integer.parseInt(timeBetweenEvictionRunsMillis); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element time-between-eviction-runs-millis attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element time-between-eviction-runs-millis attribute is invalid" + lineNumberText); } } String poolSleeptime = element.getAttribute("pool-sleeptime"); @@ -114,7 +114,7 @@ public final class InlineJdbc extends Jd try { this.poolSleeptime = Integer.parseInt(poolSleeptime); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element pool-sleeptime attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element pool-sleeptime attribute is invalid" + lineNumberText); } } String poolLifetime = element.getAttribute("pool-lifetime"); @@ -124,7 +124,7 @@ public final class InlineJdbc extends Jd try { this.poolLifetime = Integer.parseInt(poolLifetime); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element pool-lifetime attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element pool-lifetime attribute is invalid" + lineNumberText); } } String poolDeadlockMaxwait = element.getAttribute("pool-deadlock-maxwait"); @@ -134,7 +134,7 @@ public final class InlineJdbc extends Jd try { this.poolDeadlockMaxwait = Integer.parseInt(poolDeadlockMaxwait); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element pool-deadlock-maxwait attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element pool-deadlock-maxwait attribute is invalid" + lineNumberText); } } String poolDeadlockRetrywait = element.getAttribute("pool-deadlock-retrywait"); @@ -144,7 +144,7 @@ public final class InlineJdbc extends Jd try { this.poolDeadlockRetrywait = Integer.parseInt(poolDeadlockRetrywait); } catch (Exception e) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element pool-deadlock-retrywait attribute is invalid" + lineNumberText); + throw new GenericEntityConfException("<inline-jdbc> element pool-deadlock-retrywait attribute is invalid" + lineNumberText); } } this.poolJdbcTestStmt = element.getAttribute("pool-jdbc-test-stmt").intern(); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JdbcElement.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JdbcElement.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JdbcElement.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JdbcElement.java Sat Jun 8 10:00:45 2013 @@ -30,7 +30,7 @@ public abstract class JdbcElement { private final String isolationLevel; - public JdbcElement(Element element) throws GenericEntityConfException { + protected JdbcElement(Element element) throws GenericEntityConfException { this.isolationLevel = element.getAttribute("isolation-level").intern(); } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JndiJdbc.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JndiJdbc.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JndiJdbc.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/JndiJdbc.java Sat Jun 8 10:00:45 2013 @@ -34,17 +34,17 @@ public final class JndiJdbc extends Jdbc private final String jndiServerName; // type = xs:string private final String jndiName; // type = xs:string - public JndiJdbc(Element element) throws GenericEntityConfException { + JndiJdbc(Element element) throws GenericEntityConfException { super(element); String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String jndiServerName = element.getAttribute("jndi-server-name").intern(); if (jndiServerName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-server-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<jndi-jdbc> element jndi-server-name attribute is empty" + lineNumberText); } this.jndiServerName = jndiServerName; String jndiName = element.getAttribute("jndi-name").intern(); if (jndiName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<jndi-jdbc> element jndi-name attribute is empty" + lineNumberText); } this.jndiName = jndiName; } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ReadData.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ReadData.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ReadData.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ReadData.java Sat Jun 8 10:00:45 2013 @@ -33,11 +33,11 @@ public final class ReadData { private final String readerName; // type = xs:string - public ReadData(Element element) throws GenericEntityConfException { + ReadData(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String readerName = element.getAttribute("reader-name").intern(); if (readerName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element reader-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<read-data> element reader-name attribute is empty" + lineNumberText); } this.readerName = readerName; } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Resource.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Resource.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Resource.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Resource.java Sat Jun 8 10:00:45 2013 @@ -34,16 +34,16 @@ public final class Resource { private final String loader; // type = xs:string private final String location; // type = xs:string - public Resource(Element element) throws GenericEntityConfException { + Resource(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String loader = element.getAttribute("loader").intern(); if (loader.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element loader attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<resource> element loader attribute is empty" + lineNumberText); } this.loader = loader; String location = element.getAttribute("location").intern(); if (location.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element location attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<resource> element location attribute is empty" + lineNumberText); } this.location = location; } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ResourceLoader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ResourceLoader.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ResourceLoader.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ResourceLoader.java Sat Jun 8 10:00:45 2013 @@ -36,16 +36,16 @@ public final class ResourceLoader { private final String prependEnv; // type = xs:string private final String prefix; // type = xs:string - public ResourceLoader(Element element) throws GenericEntityConfException { + ResourceLoader(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String name = element.getAttribute("name").intern(); if (name.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<resource-loader> element name attribute is empty" + lineNumberText); } this.name = name; String className = element.getAttribute("class").intern(); if (className.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element class attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<resource-loader> element class attribute is empty" + lineNumberText); } this.className = className; this.prependEnv = element.getAttribute("prepend-env").intern(); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/SqlLoadPath.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/SqlLoadPath.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/SqlLoadPath.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/SqlLoadPath.java Sat Jun 8 10:00:45 2013 @@ -34,11 +34,11 @@ public final class SqlLoadPath { private final String path; // type = xs:string private final String prependEnv; // type = xs:string - public SqlLoadPath(Element element) throws GenericEntityConfException { + SqlLoadPath(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String path = element.getAttribute("path").intern(); if (path.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element path attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<sql-load-path> element path attribute is empty" + lineNumberText); } this.path = path; this.prependEnv = element.getAttribute("prepend-env").intern(); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionFactory.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionFactory.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionFactory.java Sat Jun 8 10:00:45 2013 @@ -36,11 +36,11 @@ public final class TransactionFactory { private final UserTransactionJndi userTransactionJndi; // <user-transaction-jndi> private final TransactionManagerJndi transactionManagerJndi; // <transaction-manager-jndi> - public TransactionFactory(Element element) throws GenericEntityConfException { + TransactionFactory(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String className = element.getAttribute("class").intern(); if (className.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element class attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<transaction-factory> element class attribute is empty" + lineNumberText); } this.className = className; Element userTransactionJndiElement = UtilXml.firstChildElement(element, "user-transaction-jndi"); Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionManagerJndi.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionManagerJndi.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionManagerJndi.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionManagerJndi.java Sat Jun 8 10:00:45 2013 @@ -34,16 +34,16 @@ public final class TransactionManagerJnd private final String jndiServerName; // type = xs:string private final String jndiName; // type = xs:string - public TransactionManagerJndi(Element element) throws GenericEntityConfException { + TransactionManagerJndi(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String jndiServerName = element.getAttribute("jndi-server-name").intern(); if (jndiServerName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-server-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<transaction-manager-jndi> element jndi-server-name attribute is empty" + lineNumberText); } this.jndiServerName = jndiServerName; String jndiName = element.getAttribute("jndi-name").intern(); if (jndiName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<transaction-manager-jndi> element jndi-name attribute is empty" + lineNumberText); } this.jndiName = jndiName; } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TyrexDataSource.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TyrexDataSource.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TyrexDataSource.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TyrexDataSource.java Sat Jun 8 10:00:45 2013 @@ -33,12 +33,12 @@ public final class TyrexDataSource exten private final String dataSourceName; // type = xs:string - public TyrexDataSource(Element element) throws GenericEntityConfException { + TyrexDataSource(Element element) throws GenericEntityConfException { super(element); String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String dataSourceName = element.getAttribute("dataSource-name").intern(); if (dataSourceName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element dataSource-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<tyrex-dataSource> element dataSource-name attribute is empty" + lineNumberText); } this.dataSourceName = dataSourceName; } Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/UserTransactionJndi.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/UserTransactionJndi.java?rev=1490940&r1=1490939&r2=1490940&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/UserTransactionJndi.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/UserTransactionJndi.java Sat Jun 8 10:00:45 2013 @@ -34,16 +34,16 @@ public final class UserTransactionJndi { private final String jndiServerName; // type = xs:string private final String jndiName; // type = xs:string - public UserTransactionJndi(Element element) throws GenericEntityConfException { + UserTransactionJndi(Element element) throws GenericEntityConfException { String lineNumberText = EntityConfigUtil.createConfigFileLineNumberText(element); String jndiServerName = element.getAttribute("jndi-server-name").intern(); if (jndiServerName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-server-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<user-transaction-jndi> element jndi-server-name attribute is empty" + lineNumberText); } this.jndiServerName = jndiServerName; String jndiName = element.getAttribute("jndi-name").intern(); if (jndiName.isEmpty()) { - throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-name attribute is empty" + lineNumberText); + throw new GenericEntityConfException("<user-transaction-jndi> element jndi-name attribute is empty" + lineNumberText); } this.jndiName = jndiName; } |
| Free forum by Nabble | Edit this page |
