|
Added: 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=1490187&view=auto ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ReadData.java (added) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ReadData.java Thu Jun 6 08:02:14 2013 @@ -0,0 +1,47 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.entity.config.model; + +import org.ofbiz.base.lang.ThreadSafe; +import org.ofbiz.entity.GenericEntityConfException; +import org.w3c.dom.Element; + +/** + * An object that models the <code><read-data></code> element. + * + * @see <code>entity-config.xsd</code> + */ +@ThreadSafe +public final class ReadData { + + private final String readerName; // type = xs:string + + public ReadData(Element element) throws GenericEntityConfException { + String readerName = element.getAttribute("reader-name").intern(); + if (readerName.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element reader-name attribute is empty"); + } + this.readerName = readerName; + } + + /** Returns the value of the <code>reader-name</code> attribute. */ + public String getReaderName() { + return this.readerName; + } +} Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ReadData.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ReadData.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Rev URL Added: 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=1490187&view=auto ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Resource.java (added) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Resource.java Thu Jun 6 08:02:14 2013 @@ -0,0 +1,58 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.entity.config.model; + +import org.ofbiz.base.lang.ThreadSafe; +import org.ofbiz.entity.GenericEntityConfException; +import org.w3c.dom.Element; + +/** + * An object that models the <code><resource></code> element. + * + * @see <code>entity-config.xsd</code> + */ +@ThreadSafe +public final class Resource { + + private final String loader; // type = xs:string + private final String location; // type = xs:string + + public Resource(Element element) throws GenericEntityConfException { + String loader = element.getAttribute("loader").intern(); + if (loader.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element loader attribute is empty"); + } + this.loader = loader; + String location = element.getAttribute("location").intern(); + if (location.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element location attribute is empty"); + } + this.location = location; + } + + /** Returns the value of the <code>loader</code> attribute. */ + public String getLoader() { + return this.loader; + } + + /** Returns the value of the <code>location</code> attribute. */ + public String getLocation() { + return this.location; + } +} Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Resource.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/Resource.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Rev URL Added: 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=1490187&view=auto ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ResourceLoader.java (added) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ResourceLoader.java Thu Jun 6 08:02:14 2013 @@ -0,0 +1,72 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.entity.config.model; + +import org.ofbiz.base.lang.ThreadSafe; +import org.ofbiz.entity.GenericEntityConfException; +import org.w3c.dom.Element; + +/** + * An object that models the <code><resource-loader></code> element. + * + * @see <code>entity-config.xsd</code> + */ +@ThreadSafe +public final class ResourceLoader { + + private final String name; // type = xs:string + private final String className; // type = xs:string + private final String prependEnv; // type = xs:string + private final String prefix; // type = xs:string + + public ResourceLoader(Element element) throws GenericEntityConfException { + String name = element.getAttribute("name").intern(); + if (name.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element name attribute is empty"); + } + this.name = name; + String className = element.getAttribute("class").intern(); + if (className.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element class attribute is empty"); + } + this.className = className; + this.prependEnv = element.getAttribute("prepend-env").intern(); + this.prefix = element.getAttribute("prefix").intern(); + } + + /** Returns the value of the <code>name</code> attribute. */ + public String getName() { + return this.name; + } + + /** Returns the value of the <code>class</code> attribute. */ + public String getClassName() { + return this.className; + } + + /** Returns the value of the <code>prepend-env</code> attribute. */ + public String getPrependEnv() { + return this.prependEnv; + } + + /** Returns the value of the <code>prefix</code> attribute. */ + public String getPrefix() { + return this.prefix; + } +} Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ResourceLoader.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/ResourceLoader.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Rev URL Added: 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=1490187&view=auto ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/SqlLoadPath.java (added) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/SqlLoadPath.java Thu Jun 6 08:02:14 2013 @@ -0,0 +1,54 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.entity.config.model; + +import org.ofbiz.base.lang.ThreadSafe; +import org.ofbiz.entity.GenericEntityConfException; +import org.w3c.dom.Element; + +/** + * An object that models the <code><sql-load-path></code> element. + * + * @see <code>entity-config.xsd</code> + */ +@ThreadSafe +public final class SqlLoadPath { + + private final String path; // type = xs:string + private final String prependEnv; // type = xs:string + + public SqlLoadPath(Element element) throws GenericEntityConfException { + String path = element.getAttribute("path").intern(); + if (path.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element path attribute is empty"); + } + this.path = path; + this.prependEnv = element.getAttribute("prepend-env").intern(); + } + + /** Returns the value of the <code>path</code> attribute. */ + public String getPath() { + return this.path; + } + + /** Returns the value of the <code>prepend-env</code> attribute. */ + public String getPrependEnv() { + return this.prependEnv; + } +} Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/SqlLoadPath.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/SqlLoadPath.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Rev URL Added: 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=1490187&view=auto ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionFactory.java (added) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionFactory.java Thu Jun 6 08:02:14 2013 @@ -0,0 +1,72 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.entity.config.model; + +import org.ofbiz.base.lang.ThreadSafe; +import org.ofbiz.base.util.UtilXml; +import org.ofbiz.entity.GenericEntityConfException; +import org.w3c.dom.Element; + +/** + * An object that models the <code><transaction-factory></code> element. + * + * @see <code>entity-config.xsd</code> + */ +@ThreadSafe +public final class TransactionFactory { + + private final String className; // type = xs:string + private final UserTransactionJndi userTransactionJndi; // <user-transaction-jndi> + private final TransactionManagerJndi transactionManagerJndi; // <transaction-manager-jndi> + + public TransactionFactory(Element element) throws GenericEntityConfException { + String className = element.getAttribute("class").intern(); + if (className.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element class attribute is empty"); + } + this.className = className; + Element userTransactionJndiElement = UtilXml.firstChildElement(element, "user-transaction-jndi"); + if (userTransactionJndiElement == null) { + this.userTransactionJndi = null; + } else { + this.userTransactionJndi = new UserTransactionJndi(userTransactionJndiElement); + } + Element transactionManagerJndiElement = UtilXml.firstChildElement(element, "transaction-manager-jndi"); + if (transactionManagerJndiElement == null) { + this.transactionManagerJndi = null; + } else { + this.transactionManagerJndi = new TransactionManagerJndi(transactionManagerJndiElement); + } + } + + /** Returns the value of the <code>class</code> attribute. */ + public String getClassName() { + return this.className; + } + + /** Returns the <code><user-transaction-jndi></code> child element, or <code>null</code> if no child element was found. */ + public UserTransactionJndi getUserTransactionJndi() { + return this.userTransactionJndi; + } + + /** Returns the <code><transaction-manager-jndi></code> child element, or <code>null</code> if no child element was found. */ + public TransactionManagerJndi getTransactionManagerJndi() { + return this.transactionManagerJndi; + } +} Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionFactory.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionFactory.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Rev URL Added: 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=1490187&view=auto ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionManagerJndi.java (added) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionManagerJndi.java Thu Jun 6 08:02:14 2013 @@ -0,0 +1,58 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.entity.config.model; + +import org.ofbiz.base.lang.ThreadSafe; +import org.ofbiz.entity.GenericEntityConfException; +import org.w3c.dom.Element; + +/** + * An object that models the <code><transaction-manager-jndi></code> element. + * + * @see <code>entity-config.xsd</code> + */ +@ThreadSafe +public final class TransactionManagerJndi { + + private final String jndiServerName; // type = xs:string + private final String jndiName; // type = xs:string + + public TransactionManagerJndi(Element element) throws GenericEntityConfException { + String jndiServerName = element.getAttribute("jndi-server-name").intern(); + if (jndiServerName.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-server-name attribute is empty"); + } + this.jndiServerName = jndiServerName; + String jndiName = element.getAttribute("jndi-name").intern(); + if (jndiName.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-name attribute is empty"); + } + this.jndiName = jndiName; + } + + /** Returns the value of the <code>jndi-server-name</code> attribute. */ + public String getJndiServerName() { + return this.jndiServerName; + } + + /** Returns the value of the <code>jndi-name</code> attribute. */ + public String getJndiName() { + return this.jndiName; + } +} Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionManagerJndi.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TransactionManagerJndi.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Rev URL Added: 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=1490187&view=auto ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TyrexDataSource.java (added) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TyrexDataSource.java Thu Jun 6 08:02:14 2013 @@ -0,0 +1,54 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.entity.config.model; + +import org.ofbiz.base.lang.ThreadSafe; +import org.ofbiz.entity.GenericEntityConfException; +import org.w3c.dom.Element; + +/** + * An object that models the <code><tyrex-dataSource></code> element. + * + * @see <code>entity-config.xsd</code> + */ +@ThreadSafe +public final class TyrexDataSource { + + private final String dataSourceName; // type = xs:string + private final String isolationLevel; + + public TyrexDataSource(Element element) throws GenericEntityConfException { + String dataSourceName = element.getAttribute("dataSource-name").intern(); + if (dataSourceName.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element dataSource-name attribute is empty"); + } + this.dataSourceName = dataSourceName; + this.isolationLevel = element.getAttribute("isolation-level").intern(); + } + + /** Returns the value of the <code>dataSource-name</code> attribute. */ + public String getDataSourceName() { + return this.dataSourceName; + } + + /** Returns the value of the <code>isolation-level</code> attribute. */ + public String getIsolationLevel() { + return this.isolationLevel; + } +} Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TyrexDataSource.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/TyrexDataSource.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Rev URL Added: 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=1490187&view=auto ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/UserTransactionJndi.java (added) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/UserTransactionJndi.java Thu Jun 6 08:02:14 2013 @@ -0,0 +1,58 @@ +/******************************************************************************* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + *******************************************************************************/ +package org.ofbiz.entity.config.model; + +import org.ofbiz.base.lang.ThreadSafe; +import org.ofbiz.entity.GenericEntityConfException; +import org.w3c.dom.Element; + +/** + * An object that models the <code><user-transaction-jndi></code> element. + * + * @see <code>entity-config.xsd</code> + */ +@ThreadSafe +public final class UserTransactionJndi { + + private final String jndiServerName; // type = xs:string + private final String jndiName; // type = xs:string + + public UserTransactionJndi(Element element) throws GenericEntityConfException { + String jndiServerName = element.getAttribute("jndi-server-name").intern(); + if (jndiServerName.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-server-name attribute is empty"); + } + this.jndiServerName = jndiServerName; + String jndiName = element.getAttribute("jndi-name").intern(); + if (jndiName.isEmpty()) { + throw new GenericEntityConfException("<" + element.getNodeName() + "> element jndi-name attribute is empty"); + } + this.jndiName = jndiName; + } + + /** Returns the value of the <code>jndi-server-name</code> attribute. */ + public String getJndiServerName() { + return this.jndiServerName; + } + + /** Returns the value of the <code>jndi-name</code> attribute. */ + public String getJndiName() { + return this.jndiName; + } +} Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/UserTransactionJndi.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/config/model/UserTransactionJndi.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Rev URL |
| Free forum by Nabble | Edit this page |
