You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2012/12/10 06:08:43 UTC
svn commit: r1419199 [9/35] - in /openejb/trunk/openejb/container:
openejb-jee-accessors/ openejb-jee-accessors/src/main/
openejb-jee-accessors/src/main/java/ openejb-jee-accessors/src/main/java/org/
openejb-jee-accessors/src/main/java/org/apache/ open...
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExceptionMapping$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExceptionMapping%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExceptionMapping$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExceptionMapping$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,229 @@
+/*
+ * 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.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+
+import static org.apache.openejb.jee.ConstructorParameterOrder$JAXB.readConstructorParameterOrder;
+import static org.apache.openejb.jee.ConstructorParameterOrder$JAXB.writeConstructorParameterOrder;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class ExceptionMapping$JAXB
+ extends JAXBObject<ExceptionMapping> {
+
+
+ public ExceptionMapping$JAXB() {
+ super(ExceptionMapping.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "exception-mappingType".intern()), ConstructorParameterOrder$JAXB.class);
+ }
+
+ public static ExceptionMapping readExceptionMapping(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeExceptionMapping(XoXMLStreamWriter writer, ExceptionMapping exceptionMapping, RuntimeContext context)
+ throws Exception {
+ _write(writer, exceptionMapping, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, ExceptionMapping exceptionMapping, RuntimeContext context)
+ throws Exception {
+ _write(writer, exceptionMapping, context);
+ }
+
+ public final static ExceptionMapping _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ ExceptionMapping exceptionMapping = new ExceptionMapping();
+ context.beforeUnmarshal(exceptionMapping, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("exception-mappingType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, ExceptionMapping.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, exceptionMapping);
+ exceptionMapping.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("exception-type" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: exceptionType
+ String exceptionTypeRaw = elementReader.getElementAsString();
+
+ String exceptionType;
+ try {
+ exceptionType = Adapters.collapsedStringAdapterAdapter.unmarshal(exceptionTypeRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ exceptionMapping.exceptionType = exceptionType;
+ } else if (("wsdl-message" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: wsdlMessage
+ QName wsdlMessage = elementReader.getElementAsQName();
+ exceptionMapping.wsdlMessage = wsdlMessage;
+ } else if (("wsdl-message-part-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: wsdlMessagePartName
+ String wsdlMessagePartNameRaw = elementReader.getElementAsString();
+
+ String wsdlMessagePartName;
+ try {
+ wsdlMessagePartName = Adapters.collapsedStringAdapterAdapter.unmarshal(wsdlMessagePartNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ exceptionMapping.wsdlMessagePartName = wsdlMessagePartName;
+ } else if (("constructor-parameter-order" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: constructorParameterOrder
+ ConstructorParameterOrder constructorParameterOrder = readConstructorParameterOrder(elementReader, context);
+ exceptionMapping.constructorParameterOrder = constructorParameterOrder;
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "exception-type"), new QName("http://java.sun.com/xml/ns/javaee", "wsdl-message"), new QName("http://java.sun.com/xml/ns/javaee", "wsdl-message-part-name"), new QName("http://java.sun.com/xml/ns/javaee", "constructor-parameter-order"));
+ }
+ }
+
+ context.afterUnmarshal(exceptionMapping, LifecycleCallback.NONE);
+
+ return exceptionMapping;
+ }
+
+ public final ExceptionMapping read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, ExceptionMapping exceptionMapping, RuntimeContext context)
+ throws Exception {
+ if (exceptionMapping == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (ExceptionMapping.class != exceptionMapping.getClass()) {
+ context.unexpectedSubclass(writer, exceptionMapping, ExceptionMapping.class);
+ return;
+ }
+
+ context.beforeMarshal(exceptionMapping, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = exceptionMapping.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(exceptionMapping, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: exceptionType
+ String exceptionTypeRaw = exceptionMapping.exceptionType;
+ String exceptionType = null;
+ try {
+ exceptionType = Adapters.collapsedStringAdapterAdapter.marshal(exceptionTypeRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(exceptionMapping, "exceptionType", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (exceptionType != null) {
+ writer.writeStartElement(prefix, "exception-type", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(exceptionType);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(exceptionMapping, "exceptionType");
+ }
+
+ // ELEMENT: wsdlMessage
+ QName wsdlMessage = exceptionMapping.wsdlMessage;
+ if (wsdlMessage != null) {
+ writer.writeStartElement(prefix, "wsdl-message", "http://java.sun.com/xml/ns/javaee");
+ writer.writeQName(wsdlMessage);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(exceptionMapping, "wsdlMessage");
+ }
+
+ // ELEMENT: wsdlMessagePartName
+ String wsdlMessagePartNameRaw = exceptionMapping.wsdlMessagePartName;
+ String wsdlMessagePartName = null;
+ try {
+ wsdlMessagePartName = Adapters.collapsedStringAdapterAdapter.marshal(wsdlMessagePartNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(exceptionMapping, "wsdlMessagePartName", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (wsdlMessagePartName != null) {
+ writer.writeStartElement(prefix, "wsdl-message-part-name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(wsdlMessagePartName);
+ writer.writeEndElement();
+ }
+
+ // ELEMENT: constructorParameterOrder
+ ConstructorParameterOrder constructorParameterOrder = exceptionMapping.constructorParameterOrder;
+ if (constructorParameterOrder != null) {
+ writer.writeStartElement(prefix, "constructor-parameter-order", "http://java.sun.com/xml/ns/javaee");
+ writeConstructorParameterOrder(writer, constructorParameterOrder, context);
+ writer.writeEndElement();
+ }
+
+ context.afterMarshal(exceptionMapping, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExceptionMapping$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExcludeList$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExcludeList%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExcludeList$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExcludeList$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,215 @@
+/*
+ * 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.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.apache.openejb.jee.Method$JAXB.readMethod;
+import static org.apache.openejb.jee.Method$JAXB.writeMethod;
+import static org.apache.openejb.jee.Text$JAXB.readText;
+import static org.apache.openejb.jee.Text$JAXB.writeText;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class ExcludeList$JAXB
+ extends JAXBObject<ExcludeList> {
+
+
+ public ExcludeList$JAXB() {
+ super(ExcludeList.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "exclude-listType".intern()), Text$JAXB.class, Method$JAXB.class);
+ }
+
+ public static ExcludeList readExcludeList(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeExcludeList(XoXMLStreamWriter writer, ExcludeList excludeList, RuntimeContext context)
+ throws Exception {
+ _write(writer, excludeList, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, ExcludeList excludeList, RuntimeContext context)
+ throws Exception {
+ _write(writer, excludeList, context);
+ }
+
+ public final static ExcludeList _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ ExcludeList excludeList = new ExcludeList();
+ context.beforeUnmarshal(excludeList, LifecycleCallback.NONE);
+
+ ArrayList<Text> descriptions = null;
+ List<Method> method = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("exclude-listType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, ExcludeList.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, excludeList);
+ excludeList.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("description" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: descriptions
+ Text descriptionsItem = readText(elementReader, context);
+ if (descriptions == null) {
+ descriptions = new ArrayList<Text>();
+ }
+ descriptions.add(descriptionsItem);
+ } else if (("method" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: method
+ Method methodItem = readMethod(elementReader, context);
+ if (method == null) {
+ method = excludeList.method;
+ if (method != null) {
+ method.clear();
+ } else {
+ method = new ArrayList<Method>();
+ }
+ }
+ method.add(methodItem);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "description"), new QName("http://java.sun.com/xml/ns/javaee", "method"));
+ }
+ }
+ if (descriptions != null) {
+ try {
+ excludeList.setDescriptions(descriptions.toArray(new Text[descriptions.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, ExcludeList.class, "setDescriptions", Text[].class, e);
+ }
+ }
+ if (method != null) {
+ excludeList.method = method;
+ }
+
+ context.afterUnmarshal(excludeList, LifecycleCallback.NONE);
+
+ return excludeList;
+ }
+
+ public final ExcludeList read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, ExcludeList excludeList, RuntimeContext context)
+ throws Exception {
+ if (excludeList == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (ExcludeList.class != excludeList.getClass()) {
+ context.unexpectedSubclass(writer, excludeList, ExcludeList.class);
+ return;
+ }
+
+ context.beforeMarshal(excludeList, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = excludeList.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(excludeList, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: descriptions
+ Text[] descriptions = null;
+ try {
+ descriptions = excludeList.getDescriptions();
+ } catch (Exception e) {
+ context.getterError(excludeList, "descriptions", ExcludeList.class, "getDescriptions", e);
+ }
+ if (descriptions != null) {
+ for (Text descriptionsItem : descriptions) {
+ if (descriptionsItem != null) {
+ writer.writeStartElement(prefix, "description", "http://java.sun.com/xml/ns/javaee");
+ writeText(writer, descriptionsItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(excludeList, "descriptions");
+ }
+ }
+ }
+
+ // ELEMENT: method
+ List<Method> method = excludeList.method;
+ if (method != null) {
+ for (Method methodItem : method) {
+ if (methodItem != null) {
+ writer.writeStartElement(prefix, "method", "http://java.sun.com/xml/ns/javaee");
+ writeMethod(writer, methodItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(excludeList, "method");
+ }
+ }
+ }
+
+ context.afterMarshal(excludeList, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/ExcludeList$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesAbsoluteOrdering$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesAbsoluteOrdering%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesAbsoluteOrdering$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesAbsoluteOrdering$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,181 @@
+/*
+ * 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.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.apache.openejb.jee.FacesOrderingOthers$JAXB.readFacesOrderingOthers;
+import static org.apache.openejb.jee.FacesOrderingOthers$JAXB.writeFacesOrderingOthers;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesAbsoluteOrdering$JAXB
+ extends JAXBObject<FacesAbsoluteOrdering> {
+
+
+ public FacesAbsoluteOrdering$JAXB() {
+ super(FacesAbsoluteOrdering.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-absoluteOrderingType".intern()), FacesOrderingOthers$JAXB.class);
+ }
+
+ public static FacesAbsoluteOrdering readFacesAbsoluteOrdering(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesAbsoluteOrdering(XoXMLStreamWriter writer, FacesAbsoluteOrdering facesAbsoluteOrdering, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesAbsoluteOrdering, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesAbsoluteOrdering facesAbsoluteOrdering, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesAbsoluteOrdering, context);
+ }
+
+ public final static FacesAbsoluteOrdering _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesAbsoluteOrdering facesAbsoluteOrdering = new FacesAbsoluteOrdering();
+ context.beforeUnmarshal(facesAbsoluteOrdering, LifecycleCallback.NONE);
+
+ List<Object> nameOrOthers = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-absoluteOrderingType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesAbsoluteOrdering.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute);
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("others" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: nameOrOthers
+ org.apache.openejb.jee.FacesOrderingOthers nameOrOthersItem = readFacesOrderingOthers(elementReader, context);
+ if (nameOrOthers == null) {
+ nameOrOthers = facesAbsoluteOrdering.nameOrOthers;
+ if (nameOrOthers != null) {
+ nameOrOthers.clear();
+ } else {
+ nameOrOthers = new ArrayList<Object>();
+ }
+ }
+ nameOrOthers.add(nameOrOthersItem);
+ } else if (("name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: nameOrOthers
+ java.lang.String nameOrOthersItem1 = elementReader.getElementAsString();
+ if (nameOrOthers == null) {
+ nameOrOthers = facesAbsoluteOrdering.nameOrOthers;
+ if (nameOrOthers != null) {
+ nameOrOthers.clear();
+ } else {
+ nameOrOthers = new ArrayList<Object>();
+ }
+ }
+ nameOrOthers.add(nameOrOthersItem1);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "others"), new QName("http://java.sun.com/xml/ns/javaee", "name"));
+ }
+ }
+ if (nameOrOthers != null) {
+ facesAbsoluteOrdering.nameOrOthers = nameOrOthers;
+ }
+
+ context.afterUnmarshal(facesAbsoluteOrdering, LifecycleCallback.NONE);
+
+ return facesAbsoluteOrdering;
+ }
+
+ public final FacesAbsoluteOrdering read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesAbsoluteOrdering facesAbsoluteOrdering, RuntimeContext context)
+ throws Exception {
+ if (facesAbsoluteOrdering == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ java.lang.String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesAbsoluteOrdering.class != facesAbsoluteOrdering.getClass()) {
+ context.unexpectedSubclass(writer, facesAbsoluteOrdering, FacesAbsoluteOrdering.class);
+ return;
+ }
+
+ context.beforeMarshal(facesAbsoluteOrdering, LifecycleCallback.NONE);
+
+
+ // ELEMENT: nameOrOthers
+ List<Object> nameOrOthers = facesAbsoluteOrdering.nameOrOthers;
+ if (nameOrOthers != null) {
+ for (Object nameOrOthersItem : nameOrOthers) {
+ if (nameOrOthersItem instanceof java.lang.String) {
+ java.lang.String String = ((java.lang.String) nameOrOthersItem);
+ writer.writeStartElement(prefix, "name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(String);
+ writer.writeEndElement();
+ } else if (nameOrOthersItem instanceof org.apache.openejb.jee.FacesOrderingOthers) {
+ org.apache.openejb.jee.FacesOrderingOthers FacesOrderingOthers = ((org.apache.openejb.jee.FacesOrderingOthers) nameOrOthersItem);
+ writer.writeStartElement(prefix, "others", "http://java.sun.com/xml/ns/javaee");
+ writeFacesOrderingOthers(writer, FacesOrderingOthers, context);
+ writer.writeEndElement();
+ } else if (nameOrOthersItem == null) {
+ context.unexpectedNullValue(facesAbsoluteOrdering, "nameOrOthers");
+ } else {
+ context.unexpectedElementType(writer, facesAbsoluteOrdering, "nameOrOthers", nameOrOthersItem, java.lang.String.class, org.apache.openejb.jee.FacesOrderingOthers.class);
+ }
+ }
+ }
+
+ context.afterMarshal(facesAbsoluteOrdering, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesAbsoluteOrdering$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplication$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplication%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplication$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplication$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,713 @@
+/*
+ * 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.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.apache.openejb.jee.FacesApplicationExtension$JAXB.readFacesApplicationExtension;
+import static org.apache.openejb.jee.FacesApplicationExtension$JAXB.writeFacesApplicationExtension;
+import static org.apache.openejb.jee.FacesApplicationResourceBundle$JAXB.readFacesApplicationResourceBundle;
+import static org.apache.openejb.jee.FacesApplicationResourceBundle$JAXB.writeFacesApplicationResourceBundle;
+import static org.apache.openejb.jee.FacesLocaleConfig$JAXB.readFacesLocaleConfig;
+import static org.apache.openejb.jee.FacesLocaleConfig$JAXB.writeFacesLocaleConfig;
+import static org.apache.openejb.jee.FacesSystemEventListener$JAXB.readFacesSystemEventListener;
+import static org.apache.openejb.jee.FacesSystemEventListener$JAXB.writeFacesSystemEventListener;
+import static org.apache.openejb.jee.FacesValidator$JAXB.readFacesValidator;
+import static org.apache.openejb.jee.FacesValidator$JAXB.writeFacesValidator;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesApplication$JAXB
+ extends JAXBObject<FacesApplication> {
+
+
+ public FacesApplication$JAXB() {
+ super(FacesApplication.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-applicationType".intern()), FacesSystemEventListener$JAXB.class, FacesLocaleConfig$JAXB.class, FacesApplicationResourceBundle$JAXB.class, FacesApplicationExtension$JAXB.class, FacesValidator$JAXB.class);
+ }
+
+ public static FacesApplication readFacesApplication(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesApplication(XoXMLStreamWriter writer, FacesApplication facesApplication, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesApplication, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesApplication facesApplication, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesApplication, context);
+ }
+
+ public final static FacesApplication _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesApplication facesApplication = new FacesApplication();
+ context.beforeUnmarshal(facesApplication, LifecycleCallback.NONE);
+
+ List<String> actionListener = null;
+ List<String> defaultRenderKitId = null;
+ List<String> messageBundle = null;
+ List<String> navigationHandler = null;
+ List<String> viewHandler = null;
+ List<String> stateManager = null;
+ List<String> elResolver = null;
+ List<String> propertyResolver = null;
+ List<String> variableResolver = null;
+ List<String> resourceHandler = null;
+ List<FacesSystemEventListener> systemEventListener = null;
+ List<FacesLocaleConfig> localeConfig = null;
+ List<FacesApplicationExtension> applicationExtension = null;
+ List<FacesValidator> defaultValidators = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-applicationType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesApplication.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, facesApplication);
+ facesApplication.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ if (("action-listener" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: actionListener
+ String actionListenerItemRaw = elementReader.getElementAsString();
+
+ String actionListenerItem;
+ try {
+ actionListenerItem = Adapters.collapsedStringAdapterAdapter.unmarshal(actionListenerItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (actionListener == null) {
+ actionListener = facesApplication.actionListener;
+ if (actionListener != null) {
+ actionListener.clear();
+ } else {
+ actionListener = new ArrayList<String>();
+ }
+ }
+ actionListener.add(actionListenerItem);
+ } else if (("default-render-kit-id" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: defaultRenderKitId
+ String defaultRenderKitIdItemRaw = elementReader.getElementAsString();
+
+ String defaultRenderKitIdItem;
+ try {
+ defaultRenderKitIdItem = Adapters.collapsedStringAdapterAdapter.unmarshal(defaultRenderKitIdItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (defaultRenderKitId == null) {
+ defaultRenderKitId = facesApplication.defaultRenderKitId;
+ if (defaultRenderKitId != null) {
+ defaultRenderKitId.clear();
+ } else {
+ defaultRenderKitId = new ArrayList<String>();
+ }
+ }
+ defaultRenderKitId.add(defaultRenderKitIdItem);
+ } else if (("message-bundle" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: messageBundle
+ String messageBundleItemRaw = elementReader.getElementAsString();
+
+ String messageBundleItem;
+ try {
+ messageBundleItem = Adapters.collapsedStringAdapterAdapter.unmarshal(messageBundleItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (messageBundle == null) {
+ messageBundle = facesApplication.messageBundle;
+ if (messageBundle != null) {
+ messageBundle.clear();
+ } else {
+ messageBundle = new ArrayList<String>();
+ }
+ }
+ messageBundle.add(messageBundleItem);
+ } else if (("navigation-handler" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: navigationHandler
+ String navigationHandlerItemRaw = elementReader.getElementAsString();
+
+ String navigationHandlerItem;
+ try {
+ navigationHandlerItem = Adapters.collapsedStringAdapterAdapter.unmarshal(navigationHandlerItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (navigationHandler == null) {
+ navigationHandler = facesApplication.navigationHandler;
+ if (navigationHandler != null) {
+ navigationHandler.clear();
+ } else {
+ navigationHandler = new ArrayList<String>();
+ }
+ }
+ navigationHandler.add(navigationHandlerItem);
+ } else if (("view-handler" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: viewHandler
+ String viewHandlerItemRaw = elementReader.getElementAsString();
+
+ String viewHandlerItem;
+ try {
+ viewHandlerItem = Adapters.collapsedStringAdapterAdapter.unmarshal(viewHandlerItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (viewHandler == null) {
+ viewHandler = facesApplication.viewHandler;
+ if (viewHandler != null) {
+ viewHandler.clear();
+ } else {
+ viewHandler = new ArrayList<String>();
+ }
+ }
+ viewHandler.add(viewHandlerItem);
+ } else if (("state-manager" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: stateManager
+ String stateManagerItemRaw = elementReader.getElementAsString();
+
+ String stateManagerItem;
+ try {
+ stateManagerItem = Adapters.collapsedStringAdapterAdapter.unmarshal(stateManagerItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (stateManager == null) {
+ stateManager = facesApplication.stateManager;
+ if (stateManager != null) {
+ stateManager.clear();
+ } else {
+ stateManager = new ArrayList<String>();
+ }
+ }
+ stateManager.add(stateManagerItem);
+ } else if (("el-resolver" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: elResolver
+ String elResolverItemRaw = elementReader.getElementAsString();
+
+ String elResolverItem;
+ try {
+ elResolverItem = Adapters.collapsedStringAdapterAdapter.unmarshal(elResolverItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (elResolver == null) {
+ elResolver = facesApplication.elResolver;
+ if (elResolver != null) {
+ elResolver.clear();
+ } else {
+ elResolver = new ArrayList<String>();
+ }
+ }
+ elResolver.add(elResolverItem);
+ } else if (("property-resolver" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: propertyResolver
+ String propertyResolverItemRaw = elementReader.getElementAsString();
+
+ String propertyResolverItem;
+ try {
+ propertyResolverItem = Adapters.collapsedStringAdapterAdapter.unmarshal(propertyResolverItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (propertyResolver == null) {
+ propertyResolver = facesApplication.propertyResolver;
+ if (propertyResolver != null) {
+ propertyResolver.clear();
+ } else {
+ propertyResolver = new ArrayList<String>();
+ }
+ }
+ propertyResolver.add(propertyResolverItem);
+ } else if (("variable-resolver" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: variableResolver
+ String variableResolverItemRaw = elementReader.getElementAsString();
+
+ String variableResolverItem;
+ try {
+ variableResolverItem = Adapters.collapsedStringAdapterAdapter.unmarshal(variableResolverItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (variableResolver == null) {
+ variableResolver = facesApplication.variableResolver;
+ if (variableResolver != null) {
+ variableResolver.clear();
+ } else {
+ variableResolver = new ArrayList<String>();
+ }
+ }
+ variableResolver.add(variableResolverItem);
+ } else if (("resource-handler" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: resourceHandler
+ String resourceHandlerItemRaw = elementReader.getElementAsString();
+
+ String resourceHandlerItem;
+ try {
+ resourceHandlerItem = Adapters.collapsedStringAdapterAdapter.unmarshal(resourceHandlerItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (resourceHandler == null) {
+ resourceHandler = facesApplication.resourceHandler;
+ if (resourceHandler != null) {
+ resourceHandler.clear();
+ } else {
+ resourceHandler = new ArrayList<String>();
+ }
+ }
+ resourceHandler.add(resourceHandlerItem);
+ } else if (("system-event-listener" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: systemEventListener
+ FacesSystemEventListener systemEventListenerItem = readFacesSystemEventListener(elementReader, context);
+ if (systemEventListener == null) {
+ systemEventListener = facesApplication.systemEventListener;
+ if (systemEventListener != null) {
+ systemEventListener.clear();
+ } else {
+ systemEventListener = new ArrayList<FacesSystemEventListener>();
+ }
+ }
+ systemEventListener.add(systemEventListenerItem);
+ } else if (("locale-config" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: localeConfig
+ FacesLocaleConfig localeConfigItem = readFacesLocaleConfig(elementReader, context);
+ if (localeConfig == null) {
+ localeConfig = facesApplication.localeConfig;
+ if (localeConfig != null) {
+ localeConfig.clear();
+ } else {
+ localeConfig = new ArrayList<FacesLocaleConfig>();
+ }
+ }
+ localeConfig.add(localeConfigItem);
+ } else if (("resource-bundle" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: resourceBundle
+ FacesApplicationResourceBundle resourceBundle = readFacesApplicationResourceBundle(elementReader, context);
+ facesApplication.resourceBundle = resourceBundle;
+ } else if (("application-extension" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: applicationExtension
+ FacesApplicationExtension applicationExtensionItem = readFacesApplicationExtension(elementReader, context);
+ if (applicationExtension == null) {
+ applicationExtension = facesApplication.applicationExtension;
+ if (applicationExtension != null) {
+ applicationExtension.clear();
+ } else {
+ applicationExtension = new ArrayList<FacesApplicationExtension>();
+ }
+ }
+ applicationExtension.add(applicationExtensionItem);
+ } else if (("default-validators" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: defaultValidators
+ FacesValidator defaultValidatorsItem = readFacesValidator(elementReader, context);
+ if (defaultValidators == null) {
+ defaultValidators = facesApplication.defaultValidators;
+ if (defaultValidators != null) {
+ defaultValidators.clear();
+ } else {
+ defaultValidators = new ArrayList<FacesValidator>();
+ }
+ }
+ defaultValidators.add(defaultValidatorsItem);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "action-listener"), new QName("http://java.sun.com/xml/ns/javaee", "default-render-kit-id"), new QName("http://java.sun.com/xml/ns/javaee", "message-bundle"), new QName("http://java.sun.com/xml/ns/javaee", "navigation-handler"), new QName("http://java.sun.com/xml/ns/javaee", "view-handler"), new QName("http://java.sun.com/xml/ns/javaee", "state-manager"), new QName("http://java.sun.com/xml/ns/javaee", "el-resolver"), new QName("http://java.sun.com/xml/ns/javaee", "property-resolver"), new QName("http://java.sun.com/xml/ns/javaee", "variable-resolver"), new QName("http://java.sun.com/xml/ns/javaee", "resource-handler"), new QName("http://java.sun.com/xml/ns/javaee", "system-event-listener"), new QName("http://java.sun.com/xml/ns/javaee", "locale-config"), new QName("http://java.sun.com/xml/ns/javaee", "resource-bundle"), new QName("http://java.sun.com/xml/ns/javaee", "appli
cation-extension"), new QName("http://java.sun.com/xml/ns/javaee", "default-validators"));
+ }
+ }
+ if (actionListener != null) {
+ facesApplication.actionListener = actionListener;
+ }
+ if (defaultRenderKitId != null) {
+ facesApplication.defaultRenderKitId = defaultRenderKitId;
+ }
+ if (messageBundle != null) {
+ facesApplication.messageBundle = messageBundle;
+ }
+ if (navigationHandler != null) {
+ facesApplication.navigationHandler = navigationHandler;
+ }
+ if (viewHandler != null) {
+ facesApplication.viewHandler = viewHandler;
+ }
+ if (stateManager != null) {
+ facesApplication.stateManager = stateManager;
+ }
+ if (elResolver != null) {
+ facesApplication.elResolver = elResolver;
+ }
+ if (propertyResolver != null) {
+ facesApplication.propertyResolver = propertyResolver;
+ }
+ if (variableResolver != null) {
+ facesApplication.variableResolver = variableResolver;
+ }
+ if (resourceHandler != null) {
+ facesApplication.resourceHandler = resourceHandler;
+ }
+ if (systemEventListener != null) {
+ facesApplication.systemEventListener = systemEventListener;
+ }
+ if (localeConfig != null) {
+ facesApplication.localeConfig = localeConfig;
+ }
+ if (applicationExtension != null) {
+ facesApplication.applicationExtension = applicationExtension;
+ }
+ if (defaultValidators != null) {
+ facesApplication.defaultValidators = defaultValidators;
+ }
+
+ context.afterUnmarshal(facesApplication, LifecycleCallback.NONE);
+
+ return facesApplication;
+ }
+
+ public final FacesApplication read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesApplication facesApplication, RuntimeContext context)
+ throws Exception {
+ if (facesApplication == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesApplication.class != facesApplication.getClass()) {
+ context.unexpectedSubclass(writer, facesApplication, FacesApplication.class);
+ return;
+ }
+
+ context.beforeMarshal(facesApplication, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesApplication.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: actionListener
+ List<String> actionListenerRaw = facesApplication.actionListener;
+ if (actionListenerRaw != null) {
+ for (String actionListenerItem : actionListenerRaw) {
+ String actionListener = null;
+ try {
+ actionListener = Adapters.collapsedStringAdapterAdapter.marshal(actionListenerItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "actionListener", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (actionListener != null) {
+ writer.writeStartElement(prefix, "action-listener", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(actionListener);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: defaultRenderKitId
+ List<String> defaultRenderKitIdRaw = facesApplication.defaultRenderKitId;
+ if (defaultRenderKitIdRaw != null) {
+ for (String defaultRenderKitIdItem : defaultRenderKitIdRaw) {
+ String defaultRenderKitId = null;
+ try {
+ defaultRenderKitId = Adapters.collapsedStringAdapterAdapter.marshal(defaultRenderKitIdItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "defaultRenderKitId", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (defaultRenderKitId != null) {
+ writer.writeStartElement(prefix, "default-render-kit-id", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(defaultRenderKitId);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: messageBundle
+ List<String> messageBundleRaw = facesApplication.messageBundle;
+ if (messageBundleRaw != null) {
+ for (String messageBundleItem : messageBundleRaw) {
+ String messageBundle = null;
+ try {
+ messageBundle = Adapters.collapsedStringAdapterAdapter.marshal(messageBundleItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "messageBundle", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (messageBundle != null) {
+ writer.writeStartElement(prefix, "message-bundle", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(messageBundle);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: navigationHandler
+ List<String> navigationHandlerRaw = facesApplication.navigationHandler;
+ if (navigationHandlerRaw != null) {
+ for (String navigationHandlerItem : navigationHandlerRaw) {
+ String navigationHandler = null;
+ try {
+ navigationHandler = Adapters.collapsedStringAdapterAdapter.marshal(navigationHandlerItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "navigationHandler", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (navigationHandler != null) {
+ writer.writeStartElement(prefix, "navigation-handler", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(navigationHandler);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: viewHandler
+ List<String> viewHandlerRaw = facesApplication.viewHandler;
+ if (viewHandlerRaw != null) {
+ for (String viewHandlerItem : viewHandlerRaw) {
+ String viewHandler = null;
+ try {
+ viewHandler = Adapters.collapsedStringAdapterAdapter.marshal(viewHandlerItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "viewHandler", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (viewHandler != null) {
+ writer.writeStartElement(prefix, "view-handler", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(viewHandler);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: stateManager
+ List<String> stateManagerRaw = facesApplication.stateManager;
+ if (stateManagerRaw != null) {
+ for (String stateManagerItem : stateManagerRaw) {
+ String stateManager = null;
+ try {
+ stateManager = Adapters.collapsedStringAdapterAdapter.marshal(stateManagerItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "stateManager", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (stateManager != null) {
+ writer.writeStartElement(prefix, "state-manager", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(stateManager);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: elResolver
+ List<String> elResolverRaw = facesApplication.elResolver;
+ if (elResolverRaw != null) {
+ for (String elResolverItem : elResolverRaw) {
+ String elResolver = null;
+ try {
+ elResolver = Adapters.collapsedStringAdapterAdapter.marshal(elResolverItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "elResolver", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (elResolver != null) {
+ writer.writeStartElement(prefix, "el-resolver", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(elResolver);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: propertyResolver
+ List<String> propertyResolverRaw = facesApplication.propertyResolver;
+ if (propertyResolverRaw != null) {
+ for (String propertyResolverItem : propertyResolverRaw) {
+ String propertyResolver = null;
+ try {
+ propertyResolver = Adapters.collapsedStringAdapterAdapter.marshal(propertyResolverItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "propertyResolver", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (propertyResolver != null) {
+ writer.writeStartElement(prefix, "property-resolver", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(propertyResolver);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: variableResolver
+ List<String> variableResolverRaw = facesApplication.variableResolver;
+ if (variableResolverRaw != null) {
+ for (String variableResolverItem : variableResolverRaw) {
+ String variableResolver = null;
+ try {
+ variableResolver = Adapters.collapsedStringAdapterAdapter.marshal(variableResolverItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "variableResolver", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (variableResolver != null) {
+ writer.writeStartElement(prefix, "variable-resolver", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(variableResolver);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: resourceHandler
+ List<String> resourceHandlerRaw = facesApplication.resourceHandler;
+ if (resourceHandlerRaw != null) {
+ for (String resourceHandlerItem : resourceHandlerRaw) {
+ String resourceHandler = null;
+ try {
+ resourceHandler = Adapters.collapsedStringAdapterAdapter.marshal(resourceHandlerItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplication, "resourceHandler", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (resourceHandler != null) {
+ writer.writeStartElement(prefix, "resource-handler", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(resourceHandler);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: systemEventListener
+ List<FacesSystemEventListener> systemEventListener = facesApplication.systemEventListener;
+ if (systemEventListener != null) {
+ for (FacesSystemEventListener systemEventListenerItem : systemEventListener) {
+ if (systemEventListenerItem != null) {
+ writer.writeStartElement(prefix, "system-event-listener", "http://java.sun.com/xml/ns/javaee");
+ writeFacesSystemEventListener(writer, systemEventListenerItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: localeConfig
+ List<FacesLocaleConfig> localeConfig = facesApplication.localeConfig;
+ if (localeConfig != null) {
+ for (FacesLocaleConfig localeConfigItem : localeConfig) {
+ if (localeConfigItem != null) {
+ writer.writeStartElement(prefix, "locale-config", "http://java.sun.com/xml/ns/javaee");
+ writeFacesLocaleConfig(writer, localeConfigItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: resourceBundle
+ FacesApplicationResourceBundle resourceBundle = facesApplication.resourceBundle;
+ if (resourceBundle != null) {
+ writer.writeStartElement(prefix, "resource-bundle", "http://java.sun.com/xml/ns/javaee");
+ writeFacesApplicationResourceBundle(writer, resourceBundle, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesApplication, "resourceBundle");
+ }
+
+ // ELEMENT: applicationExtension
+ List<FacesApplicationExtension> applicationExtension = facesApplication.applicationExtension;
+ if (applicationExtension != null) {
+ for (FacesApplicationExtension applicationExtensionItem : applicationExtension) {
+ if (applicationExtensionItem != null) {
+ writer.writeStartElement(prefix, "application-extension", "http://java.sun.com/xml/ns/javaee");
+ writeFacesApplicationExtension(writer, applicationExtensionItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: defaultValidators
+ List<FacesValidator> defaultValidators = facesApplication.defaultValidators;
+ if (defaultValidators != null) {
+ for (FacesValidator defaultValidatorsItem : defaultValidators) {
+ if (defaultValidatorsItem != null) {
+ writer.writeStartElement(prefix, "default-validators", "http://java.sun.com/xml/ns/javaee");
+ writeFacesValidator(writer, defaultValidatorsItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ context.afterMarshal(facesApplication, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplication$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplicationExtension$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplicationExtension%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplicationExtension$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplicationExtension$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,164 @@
+/*
+ * 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.apache.openejb.jee;
+
+import com.envoisolutions.sxc.jaxb.JAXBObject;
+import com.envoisolutions.sxc.jaxb.LifecycleCallback;
+import com.envoisolutions.sxc.jaxb.RuntimeContext;
+import com.envoisolutions.sxc.util.Attribute;
+import com.envoisolutions.sxc.util.XoXMLStreamReader;
+import com.envoisolutions.sxc.util.XoXMLStreamWriter;
+
+import javax.xml.XMLConstants;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.namespace.QName;
+import java.util.ArrayList;
+import java.util.List;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesApplicationExtension$JAXB
+ extends JAXBObject<FacesApplicationExtension> {
+
+
+ public FacesApplicationExtension$JAXB() {
+ super(FacesApplicationExtension.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-application-extensionType".intern()));
+ }
+
+ public static FacesApplicationExtension readFacesApplicationExtension(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesApplicationExtension(XoXMLStreamWriter writer, FacesApplicationExtension facesApplicationExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesApplicationExtension, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesApplicationExtension facesApplicationExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesApplicationExtension, context);
+ }
+
+ public final static FacesApplicationExtension _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesApplicationExtension facesApplicationExtension = new FacesApplicationExtension();
+ context.beforeUnmarshal(facesApplicationExtension, LifecycleCallback.NONE);
+
+ List<Object> any = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-application-extensionType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesApplicationExtension.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, facesApplicationExtension);
+ facesApplicationExtension.id = id;
+ } else if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute, new QName("", "id"));
+ }
+ }
+
+ // Read elements
+ for (XoXMLStreamReader elementReader : reader.getChildElements()) {
+ // ELEMENT_REF: any
+ if (any == null) {
+ any = facesApplicationExtension.any;
+ if (any != null) {
+ any.clear();
+ } else {
+ any = new ArrayList<Object>();
+ }
+ }
+ any.add(context.readXmlAny(elementReader, Object.class, true));
+ }
+ if (any != null) {
+ facesApplicationExtension.any = any;
+ }
+
+ context.afterUnmarshal(facesApplicationExtension, LifecycleCallback.NONE);
+
+ return facesApplicationExtension;
+ }
+
+ public final FacesApplicationExtension read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesApplicationExtension facesApplicationExtension, RuntimeContext context)
+ throws Exception {
+ if (facesApplicationExtension == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesApplicationExtension.class != facesApplicationExtension.getClass()) {
+ context.unexpectedSubclass(writer, facesApplicationExtension, FacesApplicationExtension.class);
+ return;
+ }
+
+ context.beforeMarshal(facesApplicationExtension, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesApplicationExtension.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesApplicationExtension, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT_REF: any
+ List<Object> any = facesApplicationExtension.any;
+ if (any != null) {
+ for (Object anyItem : any) {
+ context.writeXmlAny(writer, facesApplicationExtension, "any", anyItem);
+ }
+ }
+
+ context.afterMarshal(facesApplicationExtension, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplicationExtension$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native