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 [13/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/ ope...
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycle$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycle%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycle$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycle$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,220 @@
+/*
+ * 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.FacesLifecycleExtension$JAXB.readFacesLifecycleExtension;
+import static org.apache.openejb.jee.FacesLifecycleExtension$JAXB.writeFacesLifecycleExtension;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesLifecycle$JAXB
+ extends JAXBObject<FacesLifecycle> {
+
+
+ public FacesLifecycle$JAXB() {
+ super(FacesLifecycle.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-lifecycleType".intern()), FacesLifecycleExtension$JAXB.class);
+ }
+
+ public static FacesLifecycle readFacesLifecycle(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesLifecycle(XoXMLStreamWriter writer, FacesLifecycle facesLifecycle, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesLifecycle, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesLifecycle facesLifecycle, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesLifecycle, context);
+ }
+
+ public final static FacesLifecycle _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesLifecycle facesLifecycle = new FacesLifecycle();
+ context.beforeUnmarshal(facesLifecycle, LifecycleCallback.NONE);
+
+ List<String> phaseListener = null;
+ List<FacesLifecycleExtension> lifecycleExtension = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-lifecycleType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesLifecycle.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, facesLifecycle);
+ facesLifecycle.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 (("phase-listener" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: phaseListener
+ String phaseListenerItemRaw = elementReader.getElementAsString();
+
+ String phaseListenerItem;
+ try {
+ phaseListenerItem = Adapters.collapsedStringAdapterAdapter.unmarshal(phaseListenerItemRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ if (phaseListener == null) {
+ phaseListener = facesLifecycle.phaseListener;
+ if (phaseListener != null) {
+ phaseListener.clear();
+ } else {
+ phaseListener = new ArrayList<String>();
+ }
+ }
+ phaseListener.add(phaseListenerItem);
+ } else if (("lifecycle-extension" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: lifecycleExtension
+ FacesLifecycleExtension lifecycleExtensionItem = readFacesLifecycleExtension(elementReader, context);
+ if (lifecycleExtension == null) {
+ lifecycleExtension = facesLifecycle.lifecycleExtension;
+ if (lifecycleExtension != null) {
+ lifecycleExtension.clear();
+ } else {
+ lifecycleExtension = new ArrayList<FacesLifecycleExtension>();
+ }
+ }
+ lifecycleExtension.add(lifecycleExtensionItem);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "phase-listener"), new QName("http://java.sun.com/xml/ns/javaee", "lifecycle-extension"));
+ }
+ }
+ if (phaseListener != null) {
+ facesLifecycle.phaseListener = phaseListener;
+ }
+ if (lifecycleExtension != null) {
+ facesLifecycle.lifecycleExtension = lifecycleExtension;
+ }
+
+ context.afterUnmarshal(facesLifecycle, LifecycleCallback.NONE);
+
+ return facesLifecycle;
+ }
+
+ public final FacesLifecycle read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesLifecycle facesLifecycle, RuntimeContext context)
+ throws Exception {
+ if (facesLifecycle == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesLifecycle.class != facesLifecycle.getClass()) {
+ context.unexpectedSubclass(writer, facesLifecycle, FacesLifecycle.class);
+ return;
+ }
+
+ context.beforeMarshal(facesLifecycle, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesLifecycle.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesLifecycle, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: phaseListener
+ List<String> phaseListenerRaw = facesLifecycle.phaseListener;
+ if (phaseListenerRaw != null) {
+ for (String phaseListenerItem : phaseListenerRaw) {
+ String phaseListener = null;
+ try {
+ phaseListener = Adapters.collapsedStringAdapterAdapter.marshal(phaseListenerItem);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesLifecycle, "phaseListener", CollapsedStringAdapter.class, List.class, List.class, e);
+ }
+ if (phaseListener != null) {
+ writer.writeStartElement(prefix, "phase-listener", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(phaseListener);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: lifecycleExtension
+ List<FacesLifecycleExtension> lifecycleExtension = facesLifecycle.lifecycleExtension;
+ if (lifecycleExtension != null) {
+ for (FacesLifecycleExtension lifecycleExtensionItem : lifecycleExtension) {
+ if (lifecycleExtensionItem != null) {
+ writer.writeStartElement(prefix, "lifecycle-extension", "http://java.sun.com/xml/ns/javaee");
+ writeFacesLifecycleExtension(writer, lifecycleExtensionItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ context.afterMarshal(facesLifecycle, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycle$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycleExtension$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycleExtension%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycleExtension$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycleExtension$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 FacesLifecycleExtension$JAXB
+ extends JAXBObject<FacesLifecycleExtension> {
+
+
+ public FacesLifecycleExtension$JAXB() {
+ super(FacesLifecycleExtension.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-lifecycle-extensionType".intern()));
+ }
+
+ public static FacesLifecycleExtension readFacesLifecycleExtension(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesLifecycleExtension(XoXMLStreamWriter writer, FacesLifecycleExtension facesLifecycleExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesLifecycleExtension, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesLifecycleExtension facesLifecycleExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesLifecycleExtension, context);
+ }
+
+ public final static FacesLifecycleExtension _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesLifecycleExtension facesLifecycleExtension = new FacesLifecycleExtension();
+ context.beforeUnmarshal(facesLifecycleExtension, LifecycleCallback.NONE);
+
+ List<Object> any = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-lifecycle-extensionType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesLifecycleExtension.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, facesLifecycleExtension);
+ facesLifecycleExtension.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 = facesLifecycleExtension.any;
+ if (any != null) {
+ any.clear();
+ } else {
+ any = new ArrayList<Object>();
+ }
+ }
+ any.add(context.readXmlAny(elementReader, Object.class, true));
+ }
+ if (any != null) {
+ facesLifecycleExtension.any = any;
+ }
+
+ context.afterUnmarshal(facesLifecycleExtension, LifecycleCallback.NONE);
+
+ return facesLifecycleExtension;
+ }
+
+ public final FacesLifecycleExtension read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesLifecycleExtension facesLifecycleExtension, RuntimeContext context)
+ throws Exception {
+ if (facesLifecycleExtension == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesLifecycleExtension.class != facesLifecycleExtension.getClass()) {
+ context.unexpectedSubclass(writer, facesLifecycleExtension, FacesLifecycleExtension.class);
+ return;
+ }
+
+ context.beforeMarshal(facesLifecycleExtension, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesLifecycleExtension.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesLifecycleExtension, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT_REF: any
+ List<Object> any = facesLifecycleExtension.any;
+ if (any != null) {
+ for (Object anyItem : any) {
+ context.writeXmlAny(writer, facesLifecycleExtension, "any", anyItem);
+ }
+ }
+
+ context.afterMarshal(facesLifecycleExtension, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLifecycleExtension$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesListEntries$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesListEntries%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesListEntries$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesListEntries$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,226 @@
+/*
+ * 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.FacesNullValue$JAXB.readFacesNullValue;
+import static org.apache.openejb.jee.FacesNullValue$JAXB.writeFacesNullValue;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesListEntries$JAXB
+ extends JAXBObject<FacesListEntries> {
+
+
+ public FacesListEntries$JAXB() {
+ super(FacesListEntries.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-list-entriesType".intern()), FacesNullValue$JAXB.class);
+ }
+
+ public static FacesListEntries readFacesListEntries(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesListEntries(XoXMLStreamWriter writer, FacesListEntries facesListEntries, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesListEntries, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesListEntries facesListEntries, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesListEntries, context);
+ }
+
+ public final static FacesListEntries _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesListEntries facesListEntries = new FacesListEntries();
+ context.beforeUnmarshal(facesListEntries, LifecycleCallback.NONE);
+
+ List<Object> nullValueOrValue = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-list-entriesType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesListEntries.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (("id" == attribute.getLocalName()) && (("" == attribute.getNamespace()) || (attribute.getNamespace() == null))) {
+ // ATTRIBUTE: id
+ java.lang.String id = Adapters.collapsedStringAdapterAdapter.unmarshal(attribute.getValue());
+ context.addXmlId(reader, id, facesListEntries);
+ facesListEntries.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 (("value-class" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: valueClass
+ java.lang.String valueClassRaw = elementReader.getElementAsString();
+
+ java.lang.String valueClass;
+ try {
+ valueClass = Adapters.collapsedStringAdapterAdapter.unmarshal(valueClassRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, java.lang.String.class, java.lang.String.class, e);
+ continue;
+ }
+
+ facesListEntries.valueClass = valueClass;
+ } else if (("value" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: nullValueOrValue
+ java.lang.String nullValueOrValueItem = elementReader.getElementAsString();
+ if (nullValueOrValue == null) {
+ nullValueOrValue = facesListEntries.nullValueOrValue;
+ if (nullValueOrValue != null) {
+ nullValueOrValue.clear();
+ } else {
+ nullValueOrValue = new ArrayList<Object>();
+ }
+ }
+ nullValueOrValue.add(nullValueOrValueItem);
+ } else if (("null-value" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: nullValueOrValue
+ org.apache.openejb.jee.FacesNullValue nullValueOrValueItem1 = readFacesNullValue(elementReader, context);
+ if (nullValueOrValue == null) {
+ nullValueOrValue = facesListEntries.nullValueOrValue;
+ if (nullValueOrValue != null) {
+ nullValueOrValue.clear();
+ } else {
+ nullValueOrValue = new ArrayList<Object>();
+ }
+ }
+ nullValueOrValue.add(nullValueOrValueItem1);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "value-class"), new QName("http://java.sun.com/xml/ns/javaee", "value"), new QName("http://java.sun.com/xml/ns/javaee", "null-value"));
+ }
+ }
+ if (nullValueOrValue != null) {
+ facesListEntries.nullValueOrValue = nullValueOrValue;
+ }
+
+ context.afterUnmarshal(facesListEntries, LifecycleCallback.NONE);
+
+ return facesListEntries;
+ }
+
+ public final FacesListEntries read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesListEntries facesListEntries, RuntimeContext context)
+ throws Exception {
+ if (facesListEntries == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ java.lang.String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesListEntries.class != facesListEntries.getClass()) {
+ context.unexpectedSubclass(writer, facesListEntries, FacesListEntries.class);
+ return;
+ }
+
+ context.beforeMarshal(facesListEntries, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ java.lang.String idRaw = facesListEntries.id;
+ if (idRaw != null) {
+ java.lang.String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesListEntries, "id", CollapsedStringAdapter.class, java.lang.String.class, java.lang.String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: valueClass
+ java.lang.String valueClassRaw = facesListEntries.valueClass;
+ java.lang.String valueClass = null;
+ try {
+ valueClass = Adapters.collapsedStringAdapterAdapter.marshal(valueClassRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesListEntries, "valueClass", CollapsedStringAdapter.class, java.lang.String.class, java.lang.String.class, e);
+ }
+ if (valueClass != null) {
+ writer.writeStartElement(prefix, "value-class", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(valueClass);
+ writer.writeEndElement();
+ }
+
+ // ELEMENT: nullValueOrValue
+ List<Object> nullValueOrValue = facesListEntries.nullValueOrValue;
+ if (nullValueOrValue != null) {
+ for (Object nullValueOrValueItem : nullValueOrValue) {
+ if (nullValueOrValueItem instanceof org.apache.openejb.jee.FacesNullValue) {
+ org.apache.openejb.jee.FacesNullValue FacesNullValue = ((org.apache.openejb.jee.FacesNullValue) nullValueOrValueItem);
+ writer.writeStartElement(prefix, "null-value", "http://java.sun.com/xml/ns/javaee");
+ writeFacesNullValue(writer, FacesNullValue, context);
+ writer.writeEndElement();
+ } else if (nullValueOrValueItem instanceof java.lang.String) {
+ java.lang.String String = ((java.lang.String) nullValueOrValueItem);
+ writer.writeStartElement(prefix, "value", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(String);
+ writer.writeEndElement();
+ } else if (nullValueOrValueItem == null) {
+ context.unexpectedNullValue(facesListEntries, "nullValueOrValue");
+ } else {
+ context.unexpectedElementType(writer, facesListEntries, "nullValueOrValue", nullValueOrValueItem, org.apache.openejb.jee.FacesNullValue.class, java.lang.String.class);
+ }
+ }
+ }
+
+ context.afterMarshal(facesListEntries, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesListEntries$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocale$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocale%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocale$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocale$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,146 @@
+/*
+ * 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;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesLocale$JAXB
+ extends JAXBObject<FacesLocale> {
+
+
+ public FacesLocale$JAXB() {
+ super(FacesLocale.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-localeType".intern()));
+ }
+
+ public static FacesLocale readFacesLocale(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesLocale(XoXMLStreamWriter writer, FacesLocale facesLocale, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesLocale, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesLocale facesLocale, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesLocale, context);
+ }
+
+ public final static FacesLocale _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesLocale facesLocale = new FacesLocale();
+ context.beforeUnmarshal(facesLocale, LifecycleCallback.NONE);
+
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-localeType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesLocale.class);
+ }
+ }
+
+ // Read attributes
+ for (Attribute attribute : reader.getAttributes()) {
+ if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI != attribute.getNamespace()) {
+ context.unexpectedAttribute(attribute);
+ }
+ }
+
+ // VALUE: value
+ String valueRaw = reader.getElementText();
+
+ String value = null;
+ boolean valueConverted;
+ try {
+ value = Adapters.collapsedStringAdapterAdapter.unmarshal(valueRaw);
+ valueConverted = true;
+ } catch (Exception e) {
+ context.xmlAdapterError(reader, CollapsedStringAdapter.class, String.class, String.class, e);
+ valueConverted = false;
+ }
+
+ if (valueConverted) {
+ facesLocale.value = value;
+ }
+
+ context.afterUnmarshal(facesLocale, LifecycleCallback.NONE);
+
+ return facesLocale;
+ }
+
+ public final FacesLocale read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesLocale facesLocale, RuntimeContext context)
+ throws Exception {
+ if (facesLocale == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesLocale.class != facesLocale.getClass()) {
+ context.unexpectedSubclass(writer, facesLocale, FacesLocale.class);
+ return;
+ }
+
+ context.beforeMarshal(facesLocale, LifecycleCallback.NONE);
+
+
+ // VALUE: value
+ String valueRaw = facesLocale.value;
+ String value = null;
+ try {
+ value = Adapters.collapsedStringAdapterAdapter.marshal(valueRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesLocale, "value", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeCharacters(value);
+
+ context.afterMarshal(facesLocale, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocale$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocaleConfig$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocaleConfig%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocaleConfig$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocaleConfig$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,191 @@
+/*
+ * 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.FacesDefaultLocale$JAXB.readFacesDefaultLocale;
+import static org.apache.openejb.jee.FacesDefaultLocale$JAXB.writeFacesDefaultLocale;
+import static org.apache.openejb.jee.FacesSupportedLocale$JAXB.readFacesSupportedLocale;
+import static org.apache.openejb.jee.FacesSupportedLocale$JAXB.writeFacesSupportedLocale;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesLocaleConfig$JAXB
+ extends JAXBObject<FacesLocaleConfig> {
+
+
+ public FacesLocaleConfig$JAXB() {
+ super(FacesLocaleConfig.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-locale-configType".intern()), FacesDefaultLocale$JAXB.class, FacesSupportedLocale$JAXB.class);
+ }
+
+ public static FacesLocaleConfig readFacesLocaleConfig(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesLocaleConfig(XoXMLStreamWriter writer, FacesLocaleConfig facesLocaleConfig, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesLocaleConfig, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesLocaleConfig facesLocaleConfig, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesLocaleConfig, context);
+ }
+
+ public final static FacesLocaleConfig _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesLocaleConfig facesLocaleConfig = new FacesLocaleConfig();
+ context.beforeUnmarshal(facesLocaleConfig, LifecycleCallback.NONE);
+
+ List<FacesSupportedLocale> supportedLocale = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-locale-configType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesLocaleConfig.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, facesLocaleConfig);
+ facesLocaleConfig.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 (("default-locale" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: defaultLocale
+ FacesDefaultLocale defaultLocale = readFacesDefaultLocale(elementReader, context);
+ facesLocaleConfig.defaultLocale = defaultLocale;
+ } else if (("supported-locale" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: supportedLocale
+ FacesSupportedLocale supportedLocaleItem = readFacesSupportedLocale(elementReader, context);
+ if (supportedLocale == null) {
+ supportedLocale = facesLocaleConfig.supportedLocale;
+ if (supportedLocale != null) {
+ supportedLocale.clear();
+ } else {
+ supportedLocale = new ArrayList<FacesSupportedLocale>();
+ }
+ }
+ supportedLocale.add(supportedLocaleItem);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "default-locale"), new QName("http://java.sun.com/xml/ns/javaee", "supported-locale"));
+ }
+ }
+ if (supportedLocale != null) {
+ facesLocaleConfig.supportedLocale = supportedLocale;
+ }
+
+ context.afterUnmarshal(facesLocaleConfig, LifecycleCallback.NONE);
+
+ return facesLocaleConfig;
+ }
+
+ public final FacesLocaleConfig read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesLocaleConfig facesLocaleConfig, RuntimeContext context)
+ throws Exception {
+ if (facesLocaleConfig == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesLocaleConfig.class != facesLocaleConfig.getClass()) {
+ context.unexpectedSubclass(writer, facesLocaleConfig, FacesLocaleConfig.class);
+ return;
+ }
+
+ context.beforeMarshal(facesLocaleConfig, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesLocaleConfig.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesLocaleConfig, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: defaultLocale
+ FacesDefaultLocale defaultLocale = facesLocaleConfig.defaultLocale;
+ if (defaultLocale != null) {
+ writer.writeStartElement(prefix, "default-locale", "http://java.sun.com/xml/ns/javaee");
+ writeFacesDefaultLocale(writer, defaultLocale, context);
+ writer.writeEndElement();
+ }
+
+ // ELEMENT: supportedLocale
+ List<FacesSupportedLocale> supportedLocale = facesLocaleConfig.supportedLocale;
+ if (supportedLocale != null) {
+ for (FacesSupportedLocale supportedLocaleItem : supportedLocale) {
+ if (supportedLocaleItem != null) {
+ writer.writeStartElement(prefix, "supported-locale", "http://java.sun.com/xml/ns/javaee");
+ writeFacesSupportedLocale(writer, supportedLocaleItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ context.afterMarshal(facesLocaleConfig, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesLocaleConfig$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBean$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBean%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBean$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBean$JAXB.java Mon Dec 10 05:08:14 2012
@@ -0,0 +1,424 @@
+/*
+ * 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.FacesListEntries$JAXB.readFacesListEntries;
+import static org.apache.openejb.jee.FacesListEntries$JAXB.writeFacesListEntries;
+import static org.apache.openejb.jee.FacesManagedBeanExtension$JAXB.readFacesManagedBeanExtension;
+import static org.apache.openejb.jee.FacesManagedBeanExtension$JAXB.writeFacesManagedBeanExtension;
+import static org.apache.openejb.jee.FacesManagedProperty$JAXB.readFacesManagedProperty;
+import static org.apache.openejb.jee.FacesManagedProperty$JAXB.writeFacesManagedProperty;
+import static org.apache.openejb.jee.FacesMapEntries$JAXB.readFacesMapEntries;
+import static org.apache.openejb.jee.FacesMapEntries$JAXB.writeFacesMapEntries;
+import static org.apache.openejb.jee.Icon$JAXB.readIcon;
+import static org.apache.openejb.jee.Icon$JAXB.writeIcon;
+import static org.apache.openejb.jee.Text$JAXB.readText;
+import static org.apache.openejb.jee.Text$JAXB.writeText;
+
+@SuppressWarnings({
+ "StringEquality"
+})
+public class FacesManagedBean$JAXB
+ extends JAXBObject<FacesManagedBean> {
+
+
+ public FacesManagedBean$JAXB() {
+ super(FacesManagedBean.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-managed-beanType".intern()), Text$JAXB.class, Icon$JAXB.class, FacesManagedProperty$JAXB.class, FacesMapEntries$JAXB.class, FacesListEntries$JAXB.class, FacesManagedBeanExtension$JAXB.class);
+ }
+
+ public static FacesManagedBean readFacesManagedBean(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesManagedBean(XoXMLStreamWriter writer, FacesManagedBean facesManagedBean, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesManagedBean, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesManagedBean facesManagedBean, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesManagedBean, context);
+ }
+
+ public final static FacesManagedBean _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesManagedBean facesManagedBean = new FacesManagedBean();
+ context.beforeUnmarshal(facesManagedBean, LifecycleCallback.NONE);
+
+ ArrayList<Text> descriptions = null;
+ ArrayList<Text> displayNames = null;
+ LocalCollection<Icon> icon = null;
+ List<FacesManagedProperty> managedProperty = null;
+ List<FacesManagedBeanExtension> managedBeanExtension = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-managed-beanType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesManagedBean.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, facesManagedBean);
+ facesManagedBean.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 (("display-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: displayNames
+ Text displayNamesItem = readText(elementReader, context);
+ if (displayNames == null) {
+ displayNames = new ArrayList<Text>();
+ }
+ displayNames.add(displayNamesItem);
+ } else if (("icon" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: icon
+ Icon iconItem = readIcon(elementReader, context);
+ if (icon == null) {
+ icon = facesManagedBean.icon;
+ if (icon != null) {
+ icon.clear();
+ } else {
+ icon = new LocalCollection<Icon>();
+ }
+ }
+ icon.add(iconItem);
+ } else if (("managed-bean-name" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: managedBeanName
+ String managedBeanNameRaw = elementReader.getElementAsString();
+
+ String managedBeanName;
+ try {
+ managedBeanName = Adapters.collapsedStringAdapterAdapter.unmarshal(managedBeanNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesManagedBean.managedBeanName = managedBeanName;
+ } else if (("managed-bean-class" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: managedBeanClass
+ String managedBeanClassRaw = elementReader.getElementAsString();
+
+ String managedBeanClass;
+ try {
+ managedBeanClass = Adapters.collapsedStringAdapterAdapter.unmarshal(managedBeanClassRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesManagedBean.managedBeanClass = managedBeanClass;
+ } else if (("managed-bean-scope" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: managedBeanScope
+ String managedBeanScopeRaw = elementReader.getElementAsString();
+
+ String managedBeanScope;
+ try {
+ managedBeanScope = Adapters.collapsedStringAdapterAdapter.unmarshal(managedBeanScopeRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(elementReader, CollapsedStringAdapter.class, String.class, String.class, e);
+ continue;
+ }
+
+ facesManagedBean.managedBeanScope = managedBeanScope;
+ } else if (("managed-property" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: managedProperty
+ FacesManagedProperty managedPropertyItem = readFacesManagedProperty(elementReader, context);
+ if (managedProperty == null) {
+ managedProperty = facesManagedBean.managedProperty;
+ if (managedProperty != null) {
+ managedProperty.clear();
+ } else {
+ managedProperty = new ArrayList<FacesManagedProperty>();
+ }
+ }
+ managedProperty.add(managedPropertyItem);
+ } else if (("map-entries" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: mapEntries
+ FacesMapEntries mapEntries = readFacesMapEntries(elementReader, context);
+ facesManagedBean.mapEntries = mapEntries;
+ } else if (("list-entries" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: listEntries
+ FacesListEntries listEntries = readFacesListEntries(elementReader, context);
+ facesManagedBean.listEntries = listEntries;
+ } else if (("managed-bean-extension" == elementReader.getLocalName()) && ("http://java.sun.com/xml/ns/javaee" == elementReader.getNamespaceURI())) {
+ // ELEMENT: managedBeanExtension
+ FacesManagedBeanExtension managedBeanExtensionItem = readFacesManagedBeanExtension(elementReader, context);
+ if (managedBeanExtension == null) {
+ managedBeanExtension = facesManagedBean.managedBeanExtension;
+ if (managedBeanExtension != null) {
+ managedBeanExtension.clear();
+ } else {
+ managedBeanExtension = new ArrayList<FacesManagedBeanExtension>();
+ }
+ }
+ managedBeanExtension.add(managedBeanExtensionItem);
+ } else {
+ context.unexpectedElement(elementReader, new QName("http://java.sun.com/xml/ns/javaee", "description"), new QName("http://java.sun.com/xml/ns/javaee", "display-name"), new QName("http://java.sun.com/xml/ns/javaee", "icon"), new QName("http://java.sun.com/xml/ns/javaee", "managed-bean-name"), new QName("http://java.sun.com/xml/ns/javaee", "managed-bean-class"), new QName("http://java.sun.com/xml/ns/javaee", "managed-bean-scope"), new QName("http://java.sun.com/xml/ns/javaee", "managed-property"), new QName("http://java.sun.com/xml/ns/javaee", "map-entries"), new QName("http://java.sun.com/xml/ns/javaee", "list-entries"), new QName("http://java.sun.com/xml/ns/javaee", "managed-bean-extension"));
+ }
+ }
+ if (descriptions != null) {
+ try {
+ facesManagedBean.setDescriptions(descriptions.toArray(new Text[descriptions.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, FacesManagedBean.class, "setDescriptions", Text[].class, e);
+ }
+ }
+ if (displayNames != null) {
+ try {
+ facesManagedBean.setDisplayNames(displayNames.toArray(new Text[displayNames.size()]));
+ } catch (Exception e) {
+ context.setterError(reader, FacesManagedBean.class, "setDisplayNames", Text[].class, e);
+ }
+ }
+ if (icon != null) {
+ facesManagedBean.icon = icon;
+ }
+ if (managedProperty != null) {
+ facesManagedBean.managedProperty = managedProperty;
+ }
+ if (managedBeanExtension != null) {
+ facesManagedBean.managedBeanExtension = managedBeanExtension;
+ }
+
+ context.afterUnmarshal(facesManagedBean, LifecycleCallback.NONE);
+
+ return facesManagedBean;
+ }
+
+ public final FacesManagedBean read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesManagedBean facesManagedBean, RuntimeContext context)
+ throws Exception {
+ if (facesManagedBean == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ String prefix = writer.getUniquePrefix("http://java.sun.com/xml/ns/javaee");
+ if (FacesManagedBean.class != facesManagedBean.getClass()) {
+ context.unexpectedSubclass(writer, facesManagedBean, FacesManagedBean.class);
+ return;
+ }
+
+ context.beforeMarshal(facesManagedBean, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesManagedBean.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesManagedBean, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT: descriptions
+ Text[] descriptions = null;
+ try {
+ descriptions = facesManagedBean.getDescriptions();
+ } catch (Exception e) {
+ context.getterError(facesManagedBean, "descriptions", FacesManagedBean.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(facesManagedBean, "descriptions");
+ }
+ }
+ }
+
+ // ELEMENT: displayNames
+ Text[] displayNames = null;
+ try {
+ displayNames = facesManagedBean.getDisplayNames();
+ } catch (Exception e) {
+ context.getterError(facesManagedBean, "displayNames", FacesManagedBean.class, "getDisplayNames", e);
+ }
+ if (displayNames != null) {
+ for (Text displayNamesItem : displayNames) {
+ if (displayNamesItem != null) {
+ writer.writeStartElement(prefix, "display-name", "http://java.sun.com/xml/ns/javaee");
+ writeText(writer, displayNamesItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesManagedBean, "displayNames");
+ }
+ }
+ }
+
+ // ELEMENT: icon
+ LocalCollection<Icon> icon = facesManagedBean.icon;
+ if (icon != null) {
+ for (Icon iconItem : icon) {
+ if (iconItem != null) {
+ writer.writeStartElement(prefix, "icon", "http://java.sun.com/xml/ns/javaee");
+ writeIcon(writer, iconItem, context);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesManagedBean, "icon");
+ }
+ }
+ }
+
+ // ELEMENT: managedBeanName
+ String managedBeanNameRaw = facesManagedBean.managedBeanName;
+ String managedBeanName = null;
+ try {
+ managedBeanName = Adapters.collapsedStringAdapterAdapter.marshal(managedBeanNameRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesManagedBean, "managedBeanName", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (managedBeanName != null) {
+ writer.writeStartElement(prefix, "managed-bean-name", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(managedBeanName);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesManagedBean, "managedBeanName");
+ }
+
+ // ELEMENT: managedBeanClass
+ String managedBeanClassRaw = facesManagedBean.managedBeanClass;
+ String managedBeanClass = null;
+ try {
+ managedBeanClass = Adapters.collapsedStringAdapterAdapter.marshal(managedBeanClassRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesManagedBean, "managedBeanClass", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (managedBeanClass != null) {
+ writer.writeStartElement(prefix, "managed-bean-class", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(managedBeanClass);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesManagedBean, "managedBeanClass");
+ }
+
+ // ELEMENT: managedBeanScope
+ String managedBeanScopeRaw = facesManagedBean.managedBeanScope;
+ String managedBeanScope = null;
+ try {
+ managedBeanScope = Adapters.collapsedStringAdapterAdapter.marshal(managedBeanScopeRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesManagedBean, "managedBeanScope", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ if (managedBeanScope != null) {
+ writer.writeStartElement(prefix, "managed-bean-scope", "http://java.sun.com/xml/ns/javaee");
+ writer.writeCharacters(managedBeanScope);
+ writer.writeEndElement();
+ } else {
+ context.unexpectedNullValue(facesManagedBean, "managedBeanScope");
+ }
+
+ // ELEMENT: managedProperty
+ List<FacesManagedProperty> managedProperty = facesManagedBean.managedProperty;
+ if (managedProperty != null) {
+ for (FacesManagedProperty managedPropertyItem : managedProperty) {
+ if (managedPropertyItem != null) {
+ writer.writeStartElement(prefix, "managed-property", "http://java.sun.com/xml/ns/javaee");
+ writeFacesManagedProperty(writer, managedPropertyItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ // ELEMENT: mapEntries
+ FacesMapEntries mapEntries = facesManagedBean.mapEntries;
+ if (mapEntries != null) {
+ writer.writeStartElement(prefix, "map-entries", "http://java.sun.com/xml/ns/javaee");
+ writeFacesMapEntries(writer, mapEntries, context);
+ writer.writeEndElement();
+ }
+
+ // ELEMENT: listEntries
+ FacesListEntries listEntries = facesManagedBean.listEntries;
+ if (listEntries != null) {
+ writer.writeStartElement(prefix, "list-entries", "http://java.sun.com/xml/ns/javaee");
+ writeFacesListEntries(writer, listEntries, context);
+ writer.writeEndElement();
+ }
+
+ // ELEMENT: managedBeanExtension
+ List<FacesManagedBeanExtension> managedBeanExtension = facesManagedBean.managedBeanExtension;
+ if (managedBeanExtension != null) {
+ for (FacesManagedBeanExtension managedBeanExtensionItem : managedBeanExtension) {
+ if (managedBeanExtensionItem != null) {
+ writer.writeStartElement(prefix, "managed-bean-extension", "http://java.sun.com/xml/ns/javaee");
+ writeFacesManagedBeanExtension(writer, managedBeanExtensionItem, context);
+ writer.writeEndElement();
+ }
+ }
+ }
+
+ context.afterMarshal(facesManagedBean, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBean$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBeanExtension$JAXB.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBeanExtension%24JAXB.java?rev=1419199&view=auto
==============================================================================
--- openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBeanExtension$JAXB.java (added)
+++ openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBeanExtension$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 FacesManagedBeanExtension$JAXB
+ extends JAXBObject<FacesManagedBeanExtension> {
+
+
+ public FacesManagedBeanExtension$JAXB() {
+ super(FacesManagedBeanExtension.class, null, new QName("http://java.sun.com/xml/ns/javaee".intern(), "faces-config-managed-bean-extensionType".intern()));
+ }
+
+ public static FacesManagedBeanExtension readFacesManagedBeanExtension(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public static void writeFacesManagedBeanExtension(XoXMLStreamWriter writer, FacesManagedBeanExtension facesManagedBeanExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesManagedBeanExtension, context);
+ }
+
+ public void write(XoXMLStreamWriter writer, FacesManagedBeanExtension facesManagedBeanExtension, RuntimeContext context)
+ throws Exception {
+ _write(writer, facesManagedBeanExtension, context);
+ }
+
+ public final static FacesManagedBeanExtension _read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+
+ // Check for xsi:nil
+ if (reader.isXsiNil()) {
+ return null;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ FacesManagedBeanExtension facesManagedBeanExtension = new FacesManagedBeanExtension();
+ context.beforeUnmarshal(facesManagedBeanExtension, LifecycleCallback.NONE);
+
+ List<Object> any = null;
+
+ // Check xsi:type
+ QName xsiType = reader.getXsiType();
+ if (xsiType != null) {
+ if (("faces-config-managed-bean-extensionType" != xsiType.getLocalPart()) || ("http://java.sun.com/xml/ns/javaee" != xsiType.getNamespaceURI())) {
+ return context.unexpectedXsiType(reader, FacesManagedBeanExtension.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, facesManagedBeanExtension);
+ facesManagedBeanExtension.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 = facesManagedBeanExtension.any;
+ if (any != null) {
+ any.clear();
+ } else {
+ any = new ArrayList<Object>();
+ }
+ }
+ any.add(context.readXmlAny(elementReader, Object.class, true));
+ }
+ if (any != null) {
+ facesManagedBeanExtension.any = any;
+ }
+
+ context.afterUnmarshal(facesManagedBeanExtension, LifecycleCallback.NONE);
+
+ return facesManagedBeanExtension;
+ }
+
+ public final FacesManagedBeanExtension read(XoXMLStreamReader reader, RuntimeContext context)
+ throws Exception {
+ return _read(reader, context);
+ }
+
+ public final static void _write(XoXMLStreamWriter writer, FacesManagedBeanExtension facesManagedBeanExtension, RuntimeContext context)
+ throws Exception {
+ if (facesManagedBeanExtension == null) {
+ writer.writeXsiNil();
+ return;
+ }
+
+ if (context == null) {
+ context = new RuntimeContext();
+ }
+
+ if (FacesManagedBeanExtension.class != facesManagedBeanExtension.getClass()) {
+ context.unexpectedSubclass(writer, facesManagedBeanExtension, FacesManagedBeanExtension.class);
+ return;
+ }
+
+ context.beforeMarshal(facesManagedBeanExtension, LifecycleCallback.NONE);
+
+
+ // ATTRIBUTE: id
+ String idRaw = facesManagedBeanExtension.id;
+ if (idRaw != null) {
+ String id = null;
+ try {
+ id = Adapters.collapsedStringAdapterAdapter.marshal(idRaw);
+ } catch (Exception e) {
+ context.xmlAdapterError(facesManagedBeanExtension, "id", CollapsedStringAdapter.class, String.class, String.class, e);
+ }
+ writer.writeAttribute("", "", "id", id);
+ }
+
+ // ELEMENT_REF: any
+ List<Object> any = facesManagedBeanExtension.any;
+ if (any != null) {
+ for (Object anyItem : any) {
+ context.writeXmlAny(writer, facesManagedBeanExtension, "any", anyItem);
+ }
+ }
+
+ context.afterMarshal(facesManagedBeanExtension, LifecycleCallback.NONE);
+ }
+
+}
Propchange: openejb/trunk/openejb/container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesManagedBeanExtension$JAXB.java
------------------------------------------------------------------------------
svn:eol-style = native