[jboss-cvs] JBossAS SVN: r102975 - in projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain: server and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 25 15:44:15 EDT 2010
Author: scott.stark at jboss.org
Date: 2010-03-25 15:44:14 -0400 (Thu, 25 Mar 2010)
New Revision: 102975
Added:
projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/Property.java
projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/server/
projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/server/JBossServer.java
projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/threadpool/
projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/threadpool/BasicThreadPoolMetaData.java
projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/threadpool/IThreadPool.java
Modified:
projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/AbstractDomainMetaData.java
projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/ServerMetaData.java
projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/spi/DomainMetaData.java
Log:
domain prototype work
Modified: projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/AbstractDomainMetaData.java
===================================================================
--- projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/AbstractDomainMetaData.java 2010-03-25 18:27:56 UTC (rev 102974)
+++ projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/AbstractDomainMetaData.java 2010-03-25 19:44:14 UTC (rev 102975)
@@ -24,6 +24,8 @@
import java.util.List;
import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
@@ -31,6 +33,7 @@
import org.jboss.profileservice.domain.spi.DomainFeatureNode;
import org.jboss.profileservice.domain.spi.DomainMetaData;
+import org.jboss.profileservice.domain.threadpool.IThreadPool;
import org.jboss.xb.annotations.JBossXmlSchema;
/**
@@ -44,7 +47,7 @@
normalizeSpace=true,
replacePropertyRefs=true)
@XmlRootElement(name = "domain")
- at XmlType(name = "managementDomainType", propOrder = {"features"})
+ at XmlType(name = "domainType", propOrder = {"server", "threadPools", "features"})
public class AbstractDomainMetaData implements DomainMetaData
{
@@ -53,7 +56,10 @@
/** The local server information. */
private ServerMetaData server;
-
+
+ /** The thread pools of the domain. */
+ private List<IThreadPool> threadPools;
+
/** The elements of the domain. */
private List<DomainFeatureNode> features;
@@ -78,7 +84,7 @@
*
* @return the server meta data
*/
- @XmlTransient
+ @XmlElement
public ServerMetaData getServer()
{
return server;
@@ -89,6 +95,16 @@
this.server = server;
}
+ @XmlElement(name="thread-pools")
+ public List<IThreadPool> getThreadPools()
+ {
+ return threadPools;
+ }
+ public void setThreadPools(List<IThreadPool> threadPools)
+ {
+ this.threadPools = threadPools;
+ }
+
/**
* Get the domain elements.
*
Added: projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/Property.java
===================================================================
--- projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/Property.java (rev 0)
+++ projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/Property.java 2010-03-25 19:44:14 UTC (rev 102975)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * 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.profileservice.domain;
+
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class Property
+{
+ private String name;
+ private Object value;
+
+ @XmlAttribute(name="name")
+ public String getName()
+ {
+ return name;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public Object getValue()
+ {
+ return value;
+ }
+
+ @XmlValue
+ @XmlAnyElement
+ public void setValue(Object value)
+ {
+ this.value = value;
+ }
+}
Modified: projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/ServerMetaData.java
===================================================================
--- projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/ServerMetaData.java 2010-03-25 18:27:56 UTC (rev 102974)
+++ projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/ServerMetaData.java 2010-03-25 19:44:14 UTC (rev 102975)
@@ -21,20 +21,42 @@
*/
package org.jboss.profileservice.domain;
+import java.util.Set;
+
import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlType;
+import org.jboss.profileservice.domain.spi.DomainFeatureNode;
+import org.jboss.profileservice.domain.spi.DomainFeatureVisitor;
+import org.jboss.profileservice.domain.spi.DomainMetaData;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
/**
* Meta information for the local server.
*
* @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
+ at JBossXmlSchema(namespace=DomainMetaData.SERVER_NAMESPACE,
+ elementFormDefault=XmlNsForm.QUALIFIED,
+ normalizeSpace=true,
+ replacePropertyRefs=false)
+ at XmlRootElement(name = "server")
+ at XmlType(name = "serverType", propOrder = {"properties", "shutdownTimeout"})
public class ServerMetaData
+ implements DomainFeatureNode
{
/** The server name. */
private String name;
-
+ private String ns;
+ private Set<Property> properties;
+ private long shutdownTimeout;
+
public ServerMetaData()
{
@@ -55,11 +77,46 @@
{
return name;
}
-
public void setName(String name)
{
this.name = name;
}
-
+
+ @XmlElementWrapper(name="properties")
+ @XmlElement(name="property")
+ public Set<Property> getProperties()
+ {
+ return properties;
+ }
+ public void setProperties(Set<Property> properties)
+ {
+ this.properties = properties;
+ }
+
+ @XmlElement(name="shutdown-timeout")
+ public void setShutdownTimeout(long shutdownTimeout)
+ {
+ this.shutdownTimeout = shutdownTimeout;
+ }
+ public long getShutdownTimeout()
+ {
+ return shutdownTimeout;
+ }
+
+ @Override
+ public String getNameSpace()
+ {
+ return ns;
+ }
+ public void setNameSpace(String ns)
+ {
+ this.ns = ns;
+ }
+
+ @Override
+ public void visit(DomainFeatureVisitor visitor)
+ {
+ // TODO Auto-generated method stub
+
+ }
}
-
Added: projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/server/JBossServer.java
===================================================================
--- projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/server/JBossServer.java (rev 0)
+++ projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/server/JBossServer.java 2010-03-25 19:44:14 UTC (rev 102975)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * 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.profileservice.domain.server;
+
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.profileservice.domain.spi.DomainMetaData;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+ at JBossXmlSchema(namespace=DomainMetaData.SERVER_NAMESPACE,
+ elementFormDefault=XmlNsForm.QUALIFIED,
+ normalizeSpace=true,
+ replacePropertyRefs=true)
+ at XmlRootElement(name = "domain")
+ at XmlType(name = "serverType", propOrder = {"features"})
+public class JBossServer
+{
+
+}
Modified: projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/spi/DomainMetaData.java
===================================================================
--- projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/spi/DomainMetaData.java 2010-03-25 18:27:56 UTC (rev 102974)
+++ projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/spi/DomainMetaData.java 2010-03-25 19:44:14 UTC (rev 102975)
@@ -34,7 +34,11 @@
/** The domain xml namespace. */
String DOMAIN_NAMESPACE = "urn:jboss:profileservice:domain:1.0";
-
+ /** The server xml namespace. */
+ String SERVER_NAMESPACE = "urn:jboss:profileservice:server:1.0";
+ /** The thread-pool xml namespace. */
+ String THREAD_POOL_NAMESPACE = "urn:jboss:profileservice:thread-pool:1.0";
+
/**
* Get the domain features.
*
Added: projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/threadpool/BasicThreadPoolMetaData.java
===================================================================
--- projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/threadpool/BasicThreadPoolMetaData.java (rev 0)
+++ projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/threadpool/BasicThreadPoolMetaData.java 2010-03-25 19:44:14 UTC (rev 102975)
@@ -0,0 +1,59 @@
+package org.jboss.profileservice.domain.threadpool;
+
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.profileservice.domain.Property;
+import org.jboss.profileservice.domain.spi.DomainFeatureNode;
+import org.jboss.profileservice.domain.spi.DomainFeatureVisitor;
+import org.jboss.profileservice.domain.spi.DomainMetaData;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+ at JBossXmlSchema(namespace=DomainMetaData.THREAD_POOL_NAMESPACE,
+ elementFormDefault=XmlNsForm.QUALIFIED,
+ normalizeSpace=true,
+ replacePropertyRefs=true)
+ at XmlRootElement(name = "thread-pool")
+ at XmlType(name = "threadPoolType", propOrder={})
+public class BasicThreadPoolMetaData
+ implements DomainFeatureNode, IThreadPool
+{
+ private String name;
+ private Set<Property> properties;
+
+ @XmlAttribute(name="name")
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setProperties(Set<Property> properties)
+ {
+ this.properties = properties;
+ }
+ public Set<Property> getProperties()
+ {
+ return properties;
+ }
+
+ @Override
+ public String getNameSpace()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ @Override
+ public void visit(DomainFeatureVisitor visitor)
+ {
+ // TODO Auto-generated method stub
+
+ }
+}
Added: projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/threadpool/IThreadPool.java
===================================================================
--- projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/threadpool/IThreadPool.java (rev 0)
+++ projects/profileservice/trunk/domain/src/main/java/org/jboss/profileservice/domain/threadpool/IThreadPool.java 2010-03-25 19:44:14 UTC (rev 102975)
@@ -0,0 +1,6 @@
+package org.jboss.profileservice.domain.threadpool;
+
+public interface IThreadPool
+{
+
+}
More information about the jboss-cvs-commits
mailing list