[jboss-cvs] JBossAS SVN: r89224 - in projects/logging-service-metadata-log4j/trunk: src and 10 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed May 20 19:24:11 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-05-20 19:24:11 -0400 (Wed, 20 May 2009)
New Revision: 89224
Added:
projects/logging-service-metadata-log4j/trunk/src/
projects/logging-service-metadata-log4j/trunk/src/main/
projects/logging-service-metadata-log4j/trunk/src/main/java/
projects/logging-service-metadata-log4j/trunk/src/main/java/org/
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/AppenderMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/CategoryMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ConfigurationMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ConnectionSourceMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Debug.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/EmptyMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ErrorHandlerMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/GenericObjectMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/LevelMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Log4jMetaDataHelper.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ParamMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/PluginMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RefMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RendererMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RootMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Threshold.java
projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/TriggeringPolicyMetaData.java
projects/logging-service-metadata-log4j/trunk/src/main/resources/
projects/logging-service-metadata-log4j/trunk/src/main/resources/META-INF/
projects/logging-service-metadata-log4j/trunk/src/main/resources/META-INF/schema/
projects/logging-service-metadata-log4j/trunk/src/main/resources/META-INF/schema/jboss-log4j_1_2.xsd
Log:
logging-service-metadata-log4j: initial import (for real this time)
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/AppenderMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/AppenderMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/AppenderMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+ at XmlType(name = "appender", propOrder = {})
+public class AppenderMetaData extends GenericObjectMetaData {
+ private ErrorHandlerMetaData errorHandler;
+ private GenericObjectMetaData rollingPolicy;
+ private TriggeringPolicyMetaData triggeringPolicy;
+ private ConnectionSourceMetaData connectionSource;
+ private GenericObjectMetaData layout;
+ private List<GenericObjectMetaData> filters = new ArrayList<GenericObjectMetaData>();
+ private List<RefMetaData> appenderRefs = new ArrayList<RefMetaData>();
+ private String name;
+
+ public ErrorHandlerMetaData getErrorHandler() {
+ return errorHandler;
+ }
+
+ @XmlElement
+ public void setErrorHandler(final ErrorHandlerMetaData errorHandler) {
+ this.errorHandler = errorHandler;
+ }
+
+ public GenericObjectMetaData getRollingPolicy() {
+ return rollingPolicy;
+ }
+
+ @XmlElement
+ public void setRollingPolicy(final GenericObjectMetaData rollingPolicy) {
+ this.rollingPolicy = rollingPolicy;
+ }
+
+ public TriggeringPolicyMetaData getTriggeringPolicy() {
+ return triggeringPolicy;
+ }
+
+ @XmlElement
+ public void setTriggeringPolicy(final TriggeringPolicyMetaData triggeringPolicy) {
+ this.triggeringPolicy = triggeringPolicy;
+ }
+
+ public ConnectionSourceMetaData getConnectionSource() {
+ return connectionSource;
+ }
+
+ @XmlElement
+ public void setConnectionSource(final ConnectionSourceMetaData connectionSource) {
+ this.connectionSource = connectionSource;
+ }
+
+ public GenericObjectMetaData getLayout() {
+ return layout;
+ }
+
+ @XmlElement
+ public void setLayout(final GenericObjectMetaData layout) {
+ this.layout = layout;
+ }
+
+ public List<GenericObjectMetaData> getFilters() {
+ return filters;
+ }
+
+ @XmlElement(name = "filter")
+ public void setFilters(final List<GenericObjectMetaData> filters) {
+ this.filters = filters;
+ }
+
+ public List<RefMetaData> getAppenderRefs() {
+ return appenderRefs;
+ }
+
+ @XmlElement(name = "appender-ref")
+ public void setAppenderRefs(final List<RefMetaData> appenderRefs) {
+ this.appenderRefs = appenderRefs;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/CategoryMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/CategoryMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/CategoryMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ *
+ */
+ at XmlType(name = "category", propOrder = {})
+public class CategoryMetaData extends GenericObjectMetaData {
+ private LevelMetaData level;
+ private List<RefMetaData> appenderRefs = new ArrayList<RefMetaData>();
+ private String name;
+ private boolean additivity = true;
+
+ @XmlAttribute(name = "class", required = false)
+ public void setClassName(final String className) {
+ super.setClassName(className);
+ }
+
+ public LevelMetaData getLevel() {
+ return level;
+ }
+
+ @XmlElement
+ public void setLevel(final LevelMetaData level) {
+ this.level = level;
+ }
+
+ public LevelMetaData getPriority() {
+ return level;
+ }
+
+ @XmlElement
+ public void setPriority(final LevelMetaData priority) {
+ level = priority;
+ }
+
+ public List<RefMetaData> getAppenderRefs() {
+ return appenderRefs;
+ }
+
+ @XmlElement(name = "appender-ref")
+ public void setAppenderRefs(final List<RefMetaData> appenderRefs) {
+ this.appenderRefs = appenderRefs;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public boolean isAdditivity() {
+ return additivity;
+ }
+
+ @XmlAttribute
+ public void setAdditivity(final boolean additivity) {
+ this.additivity = additivity;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ConfigurationMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ConfigurationMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ConfigurationMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,159 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.xb.annotations.JBossXmlSchema;
+import java.util.List;
+import java.util.ArrayList;
+
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+ at JBossXmlSchema(namespace = "http://jakarta.apache.org/log4j/", elementFormDefault = XmlNsForm.UNQUALIFIED)
+ at XmlRootElement(name = "configuration")
+ at XmlType(name = "configuration", propOrder = {})
+public class ConfigurationMetaData implements BeanMetaDataFactory {
+ private List<RendererMetaData> renderers = new ArrayList<RendererMetaData>();
+ private List<AppenderMetaData> appenders = new ArrayList<AppenderMetaData>();
+ private List<PluginMetaData> plugins = new ArrayList<PluginMetaData>();
+ private List<CategoryMetaData> categories = new ArrayList<CategoryMetaData>();
+ private RootMetaData root;
+ private GenericObjectMetaData categoryFactory;
+ private GenericObjectMetaData loggerFactory;
+ private Threshold threshold = Threshold.NULL;
+ private Debug debug = Debug.NULL;
+ private boolean reset;
+
+ public List<RendererMetaData> getRenderers() {
+ return renderers;
+ }
+
+ @XmlElement(name = "renderer")
+ public void setRenderers(final List<RendererMetaData> renderers) {
+ this.renderers = renderers;
+ }
+
+ public List<AppenderMetaData> getAppenders() {
+ return appenders;
+ }
+
+ @XmlElement(name = "appender")
+ public void setAppenders(final List<AppenderMetaData> appenders) {
+ this.appenders = appenders;
+ }
+
+ public List<PluginMetaData> getPlugins() {
+ return plugins;
+ }
+
+ @XmlElement(name = "plugin")
+ public void setPlugins(final List<PluginMetaData> plugins) {
+ this.plugins = plugins;
+ }
+
+ public List<CategoryMetaData> getCategories() {
+ return categories;
+ }
+
+ @XmlElement(name = "category")
+ public void setCategories(final List<CategoryMetaData> categories) {
+ this.categories = categories;
+ }
+
+ public List<CategoryMetaData> getLoggers() {
+ return categories;
+ }
+
+ @XmlElement(name = "logger")
+ public void setLoggers(final List<CategoryMetaData> loggers) {
+ categories = loggers;
+ }
+
+ public RootMetaData getRoot() {
+ return root;
+ }
+
+ @XmlElement
+ public void setRoot(final RootMetaData root) {
+ this.root = root;
+ }
+
+ public GenericObjectMetaData getCategoryFactory() {
+ return categoryFactory;
+ }
+
+ @XmlElement
+ public void setCategoryFactory(final GenericObjectMetaData categoryFactory) {
+ this.categoryFactory = categoryFactory;
+ }
+
+ public GenericObjectMetaData getLoggerFactory() {
+ return loggerFactory;
+ }
+
+ @XmlElement
+ public void setLoggerFactory(final GenericObjectMetaData loggerFactory) {
+ this.loggerFactory = loggerFactory;
+ }
+
+ public Threshold getThreshold() {
+ return threshold;
+ }
+
+ @XmlAttribute
+ public void setThreshold(final Threshold threshold) {
+ this.threshold = threshold;
+ }
+
+ public Debug getDebug() {
+ return debug;
+ }
+
+ @XmlAttribute
+ public void setDebug(final Debug debug) {
+ this.debug = debug;
+ }
+
+ public boolean isReset() {
+ return reset;
+ }
+
+ @XmlAttribute
+ public void setReset(final boolean reset) {
+ this.reset = reset;
+ }
+
+ @XmlTransient
+ public List<BeanMetaData> getBeans() {
+ return null;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ConnectionSourceMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ConnectionSourceMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ConnectionSourceMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ *
+ */
+ at XmlType(name = "connectionSource", propOrder = {})
+public class ConnectionSourceMetaData extends GenericObjectMetaData {
+ private GenericObjectMetaData dataSource;
+
+ public GenericObjectMetaData getDataSource() {
+ return dataSource;
+ }
+
+ @XmlElement
+ public void setDataSource(final GenericObjectMetaData dataSource) {
+ this.dataSource = dataSource;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Debug.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Debug.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Debug.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+/**
+ *
+ */
+ at XmlEnum
+public enum Debug {
+ @XmlEnumValue("true")
+ TRUE,
+ @XmlEnumValue("false")
+ FALSE,
+ @XmlEnumValue("null")
+ NULL,
+ ;
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/EmptyMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/EmptyMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/EmptyMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ *
+ */
+ at XmlType(name = "empty", factoryClass = EmptyMetaData.class, factoryMethod = "getInstance", propOrder = {})
+public class EmptyMetaData {
+
+ private EmptyMetaData() {
+ }
+
+ public static final EmptyMetaData INSTANCE = new EmptyMetaData();
+
+ public static EmptyMetaData getInstance() {
+ return INSTANCE;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ErrorHandlerMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ErrorHandlerMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ErrorHandlerMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ *
+ */
+ at XmlType(name = "errorHandler", propOrder = {})
+public class ErrorHandlerMetaData extends GenericObjectMetaData {
+ private EmptyMetaData rootRef;
+ private List<RefMetaData> loggerRefs = new ArrayList<RefMetaData>();
+ private RefMetaData appenderRef;
+
+ public EmptyMetaData getRootRef() {
+ return rootRef;
+ }
+
+ @XmlElement(name = "root-ref")
+ public void setRootRef(final EmptyMetaData rootRef) {
+ this.rootRef = rootRef;
+ }
+
+ public List<RefMetaData> getLoggerRefs() {
+ return loggerRefs;
+ }
+
+ @XmlElement(name = "logger-ref")
+ public void setLoggerRefs(final List<RefMetaData> loggerRefs) {
+ this.loggerRefs = loggerRefs;
+ }
+
+ public RefMetaData getAppenderRef() {
+ return appenderRef;
+ }
+
+ @XmlElement(name = "appender-ref")
+ public void setAppenderRef(final RefMetaData appenderRef) {
+ this.appenderRef = appenderRef;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/GenericObjectMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/GenericObjectMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/GenericObjectMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+ at XmlType(name = "genericObject", propOrder = {})
+public class GenericObjectMetaData {
+ private List<ParamMetaData> params = new ArrayList<ParamMetaData>();
+ private String className;
+
+ public List<ParamMetaData> getParams() {
+ return params;
+ }
+
+ @XmlElement(name = "param")
+ public void setParams(final List<ParamMetaData> params) {
+ this.params = params;
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ @XmlAttribute(name = "class")
+ public void setClassName(final String className) {
+ this.className = className;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/LevelMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/LevelMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/LevelMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ *
+ */
+ at XmlType(name = "level", propOrder = {})
+public class LevelMetaData extends GenericObjectMetaData {
+
+ private String value;
+
+ @XmlAttribute(name = "class", required = false)
+ public void setClassName(final String className) {
+ super.setClassName(className);
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @XmlAttribute(required = true)
+ public void setValue(final String value) {
+ this.value = value;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Log4jMetaDataHelper.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Log4jMetaDataHelper.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Log4jMetaDataHelper.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import java.util.List;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.logmanager.Logger;
+
+/**
+ *
+ */
+public final class Log4jMetaDataHelper {
+ private static final Logger log = Logger.getLogger("org.jboss.logging.service");
+
+ private Log4jMetaDataHelper() {}
+
+ public static void buildBeanMetaData(List<BeanMetaData> beanMetaDatas, ConfigurationMetaData configurationMetaData) {
+ if (configurationMetaData.getThreshold() != Threshold.NULL) {
+ log.warn("Threshold is not supported for this deployment");
+ }
+ if (configurationMetaData.isReset() != false) {
+ log.warn("Reset is not supported for this deployment");
+ }
+ if (configurationMetaData.getDebug() != Debug.NULL) {
+ log.warn("Debug is not supported for this deployment");
+ }
+ for (AppenderMetaData metaData : configurationMetaData.getAppenders()) {
+ final String name = metaData.getName();
+ metaData.
+ }
+ for (CategoryMetaData metaData : configurationMetaData.getCategories()) {
+ final boolean additivity = metaData.isAdditivity();
+ final String categoryClass = metaData.getClassName();
+ final List<ParamMetaData> params = metaData.getParams();
+ final String name = metaData.getName();
+ final LevelMetaData level = metaData.getLevel();
+ final List<RefMetaData> appenderRefs = metaData.getAppenderRefs();
+ if (! "org.apache.log4j.Category".equals(categoryClass) || ! "org.apache.log4j.Logger".equals(categoryClass)) {
+ log.warn("Ignoring the category class specified for category \"" + name + "\"; this attribute is unsupported");
+ }
+ BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(":log4j-category:" + name, Logger.class.getName());
+ builder.setFactoryClass(java.util.logging.Logger.class.getName());
+ builder.setFactoryMethod("getLogger");
+ builder.addConstructorParameter(String.class.getName(), name);
+
+ }
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ParamMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ParamMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/ParamMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+ at XmlType(name = "param", propOrder = {})
+public class ParamMetaData {
+ private String name;
+ private String value;
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ @XmlAttribute(required = true)
+ public void setValue(final String value) {
+ this.value = value;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/PluginMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/PluginMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/PluginMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+ at XmlType(name = "plugin", propOrder = {})
+public class PluginMetaData extends GenericObjectMetaData {
+ private ConnectionSourceMetaData connectionSource;
+ private String name;
+
+ public ConnectionSourceMetaData getConnectionSource() {
+ return connectionSource;
+ }
+
+ @XmlElement
+ public void setConnectionSource(final ConnectionSourceMetaData connectionSource) {
+ this.connectionSource = connectionSource;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RefMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RefMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RefMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+ at XmlType(name = "ref", propOrder = {})
+public class RefMetaData {
+ private String ref;
+
+ public String getRef() {
+ return ref;
+ }
+
+ @XmlAttribute(required = true)
+ public void setRef(final String ref) {
+ this.ref = ref;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RendererMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RendererMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RendererMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+ at XmlType(name = "renderer", propOrder = {})
+public class RendererMetaData {
+ private String renderedClass;
+ private String renderingClass;
+
+ public String getRenderedClass() {
+ return renderedClass;
+ }
+
+ @XmlAttribute(required = true)
+ public void setRenderedClass(final String renderedClass) {
+ this.renderedClass = renderedClass;
+ }
+
+ public String getRenderingClass() {
+ return renderingClass;
+ }
+
+ @XmlAttribute(required = true)
+ public void setRenderingClass(final String renderingClass) {
+ this.renderingClass = renderingClass;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RootMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RootMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/RootMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+
+/**
+ *
+ */
+ at XmlType(name = "root", propOrder = {})
+public class RootMetaData {
+ private List<ParamMetaData> params = new ArrayList<ParamMetaData>();
+ private LevelMetaData level;
+ private List<RefMetaData> appenderRefs = new ArrayList<RefMetaData>();
+
+ public List<ParamMetaData> getParams() {
+ return params;
+ }
+
+ @XmlElement(name = "param")
+ public void setParams(final List<ParamMetaData> params) {
+ this.params = params;
+ }
+
+ public LevelMetaData getLevel() {
+ return level;
+ }
+
+ @XmlElement(name = "level")
+ public void setLevel(final LevelMetaData level) {
+ this.level = level;
+ }
+
+ public LevelMetaData getPriority() {
+ return level;
+ }
+
+ @XmlElement(name = "priority")
+ public void setPriority(final LevelMetaData priority) {
+ level = priority;
+ }
+
+ public List<RefMetaData> getAppenderRefs() {
+ return appenderRefs;
+ }
+
+ @XmlElement(name = "appender-ref")
+ public void setAppenderRefs(final List<RefMetaData> appenderRefs) {
+ this.appenderRefs = appenderRefs;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Threshold.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Threshold.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/Threshold.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlEnumValue;
+
+/**
+ *
+ */
+ at XmlEnum
+public enum Threshold {
+ @XmlEnumValue("all")
+ ALL,
+ @XmlEnumValue("trace")
+ TRACE,
+ @XmlEnumValue("debug")
+ DEBUG,
+ @XmlEnumValue("info")
+ INFO,
+ @XmlEnumValue("warn")
+ WARN,
+ @XmlEnumValue("error")
+ ERROR,
+ @XmlEnumValue("fatal")
+ FATAL,
+ @XmlEnumValue("off")
+ OFF,
+ @XmlEnumValue("null")
+ NULL,
+ ;
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/TriggeringPolicyMetaData.java
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/TriggeringPolicyMetaData.java (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/java/org/jboss/logging/metadata/log4j/TriggeringPolicyMetaData.java 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.logging.metadata.log4j;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ *
+ */
+ at XmlType(name = "triggeringPolicy", propOrder = {})
+public class TriggeringPolicyMetaData extends GenericObjectMetaData {
+ private List<GenericObjectMetaData> filters = new ArrayList<GenericObjectMetaData>();
+ private String name;
+
+ public List<GenericObjectMetaData> getFilters() {
+ return filters;
+ }
+
+ @XmlElement(name = "filter")
+ public void setFilters(final List<GenericObjectMetaData> filters) {
+ this.filters = filters;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @XmlAttribute(required = true)
+ public void setName(final String name) {
+ this.name = name;
+ }
+}
Added: projects/logging-service-metadata-log4j/trunk/src/main/resources/META-INF/schema/jboss-log4j_1_2.xsd
===================================================================
--- projects/logging-service-metadata-log4j/trunk/src/main/resources/META-INF/schema/jboss-log4j_1_2.xsd (rev 0)
+++ projects/logging-service-metadata-log4j/trunk/src/main/resources/META-INF/schema/jboss-log4j_1_2.xsd 2009-05-20 23:24:11 UTC (rev 89224)
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Painstakingly based on log4j.dtd as found in the 1.2.15 distribution of log4j -->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ targetNamespace="http://jakarta.apache.org/log4j/"
+ xmlns="http://jakarta.apache.org/log4j/"
+ elementFormDefault="unqualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <xsd:complexType name="configuration">
+ <xsd:sequence minOccurs="1" maxOccurs="1">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="renderer" type="renderer"/>
+ </xsd:sequence>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="appender" type="appender"/>
+ </xsd:sequence>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="plugin" type="plugin"/>
+ </xsd:sequence>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:choice>
+ <xsd:element name="category" type="category"/>
+ <xsd:element name="logger" type="logger"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:element name="root" minOccurs="0" maxOccurs="1" type="root"/>
+ <xsd:choice minOccurs="0" maxOccurs="1">
+ <xsd:element name="categoryFactory" type="genericObject"/>
+ <xsd:element name="loggerFactory" type="genericObject"/>
+ </xsd:choice>
+ </xsd:sequence>
+
+ <xsd:attribute name="threshold" default="null" use="optional">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ <xsd:enumeration value="trace"/>
+ <xsd:enumeration value="debug"/>
+ <xsd:enumeration value="info"/>
+ <xsd:enumeration value="warn"/>
+ <xsd:enumeration value="error"/>
+ <xsd:enumeration value="fatal"/>
+ <xsd:enumeration value="off"/>
+ <xsd:enumeration value="null"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="debug" default="null" use="optional">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="true"/>
+ <xsd:enumeration value="false"/>
+ <xsd:enumeration value="null"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="reset" default="false" use="optional" type="xsd:boolean"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="renderer">
+ <xsd:attribute name="renderedClass" type="xsd:string" use="required"/>
+ <xsd:attribute name="renderingClass" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="appender">
+ <xsd:sequence minOccurs="1" maxOccurs="1">
+ <xsd:element name="errorHandler" type="errorHandler" minOccurs="0" maxOccurs="1"/>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="param" type="param"/>
+ </xsd:sequence>
+ <xsd:element name="rollingPolicy" type="genericObject" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="triggeringPolicy" type="triggeringPolicy" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="connectionSource" type="connectionSource" minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="layout" type="genericObject" minOccurs="0" maxOccurs="1"/>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="filter" type="genericObject"/>
+ </xsd:sequence>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="appender-ref" type="ref"/>
+ </xsd:sequence>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="class" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="genericObject">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="param" type="param"/>
+ </xsd:sequence>
+ <xsd:attribute name="class" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="errorHandler">
+ <xsd:sequence minOccurs="1" maxOccurs="1">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="param" type="param"/>
+ </xsd:sequence>
+ <xsd:element name="root-ref" type="empty" minOccurs="0" maxOccurs="1"/>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="logger-ref" type="ref"/>
+ </xsd:sequence>
+ <xsd:element name="appender-ref" type="ref" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="class" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="ref">
+ <xsd:attribute name="ref" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="param">
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="level">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="param" type="param"/>
+ </xsd:sequence>
+ <xsd:attribute name="class" type="xsd:string" use="optional"/>
+ <xsd:attribute name="value" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="category">
+ <xsd:sequence minOccurs="1" maxOccurs="1">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="param" type="param"/>
+ </xsd:sequence>
+ <xsd:choice minOccurs="0" maxOccurs="1">
+ <xsd:element name="priority" type="level"/>
+ <xsd:element name="level" type="level"/>
+ </xsd:choice>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="appender-ref" type="ref"/>
+ </xsd:sequence>
+ </xsd:sequence>
+ <xsd:attribute name="class" type="xsd:string" use="optional"/>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="additivity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="logger">
+ <xsd:sequence minOccurs="1" maxOccurs="1">
+ <xsd:element name="level" type="level" minOccurs="0" maxOccurs="1"/>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="appender-ref" type="ref"/>
+ </xsd:sequence>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="additivity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="plugin">
+ <xsd:sequence minOccurs="1" maxOccurs="1">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="param" type="param"/>
+ </xsd:sequence>
+ <xsd:element name="connectionSource" type="connectionSource" minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="class" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="connectionSource">
+ <xsd:sequence minOccurs="1" maxOccurs="1">
+ <xsd:element name="dataSource" type="genericObject"/>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="param" type="param"/>
+ </xsd:sequence>
+ </xsd:sequence>
+ <xsd:attribute name="class" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="triggeringPolicy">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:choice>
+ <xsd:element name="param" type="param"/>
+ <xsd:element name="filter" type="genericObject"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required"/>
+ <xsd:attribute name="class" type="xsd:string" use="required"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="root">
+ <xsd:sequence minOccurs="1" maxOccurs="1">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="param" type="param"/>
+ </xsd:sequence>
+ <xsd:choice minOccurs="0" maxOccurs="1">
+ <xsd:element name="priority" type="level"/>
+ <xsd:element name="level" type="level"/>
+ </xsd:choice>
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="appender-ref" type="ref"/>
+ </xsd:sequence>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="empty"/>
+
+ <xsd:element name="configuration" type="configuration"/>
+</xsd:schema>
More information about the jboss-cvs-commits
mailing list