public static final void _write()

in container/openejb-jee-accessors/src/main/java/org/apache/openejb/jee/FacesApplication$JAXB.java [460:740]


    public static final 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();
                }
            }
        }

        // ELEMENT_REF: others
        List<Object> others = facesApplication.others;
        if (others!= null) {
            for (Object othersItem: others) {
                context.writeXmlAny(writer, facesApplication, "others", othersItem);
            }
        }

        context.afterMarshal(facesApplication, LifecycleCallback.NONE);
    }