[jboss-osgi-commits] JBoss-OSGI SVN: r100827 - in projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx: service and 1 other directory.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Wed Feb 10 17:28:38 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-02-10 17:28:37 -0500 (Wed, 10 Feb 2010)
New Revision: 100827

Removed:
   projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/Item.java
   projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/JmxConstants.java
   projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/framework/
   projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/package.html
   projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/packageinfo
   projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/service/cm/
   projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/service/permissionadmin/
   projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/service/provisioning/
   projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/service/useradmin/
Log:
Remove spec API

Deleted: projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/Item.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/Item.java	2010-02-10 22:28:33 UTC (rev 100826)
+++ projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/Item.java	2010-02-10 22:28:37 UTC (rev 100827)
@@ -1,164 +0,0 @@
-package org.osgi.jmx;
-
-import java.util.Arrays;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.OpenType;
-import javax.management.openmbean.TabularType;
-
-/**
- * The item class enables the definition of open types in the appropriate
- * interfaces.
- * 
- * This class contains a number of methods that make it possible to create open
- * types for {@link CompositeType}, {@link TabularType}, and {@link ArrayType}.
- * The normal creation throws a checked exception, making it impossible to use
- * them in a static initializer. They constructors are also not very suitable
- * for static construction.
- * 
- * 
- * An Item instance describes an item in a Composite Type. It groups the triplet
- * of name, description, and Open Type. These Item instances allows the
- * definitions of an item to stay together.
- * 
- * @version $Revision$
- * @Immutable
- */
-public class Item {
-
-	/**
-	 * The name of this item.
-	 */
-	private final String	name;
-
-	/**
-	 * The description of this item.
-	 */
-	private final String	description;
-
-	/**
-	 * The type of this item.
-	 */
-	private final OpenType	type;
-
-	/**
-	 * Create a triple of name, description, and type. This triplet is used in
-	 * the creation of a Composite Type.
-	 * 
-	 * @param name The name of the item.
-	 * @param description The description of the item.
-	 * @param type The Open Type of this item.
-	 * @param restrictions Ignored, contains list of restrictions
-	 */
-	public Item(String name, String description, OpenType type,
-			String... restrictions) {
-		this.name = name;
-		this.description = description;
-		this.type = type;
-	}
-
-	/**
-	 * 
-	 */
-
-	/**
-	 * Create a Tabular Type.
-	 * 
-	 * @param name The name of the Tabular Type.
-	 * @param description The description of the Tabular Type.
-	 * @param rowType The Open Type for a row
-	 * @param index The names of the items that form the index .
-	 * @return A new Tabular Type composed from the parameters.
-	 * @throws RuntimeException when the Tabular Type throws an
-	 *         OpenDataException
-	 */
-	static public TabularType tabularType(String name, String description,
-			CompositeType rowType, String... index) {
-		try {
-			return new TabularType(name, description, rowType, index);
-		}
-		catch (OpenDataException e) {
-			throw new RuntimeException(e);
-		}
-	}
-
-	/**
-	 * Create a Composite Type
-	 * 
-	 * @param name The name of the Tabular Type.
-	 * @param description The description of the Tabular Type.
-	 * @param items The items that describe the composite type.
-	 * @return a new Composite Type
-	 * @throws RuntimeException when the Tabular Type throws an
-	 *         OpenDataException
-	 */
-	static public CompositeType compositeType(String name, String description,
-			Item... items) {
-		return extend(null, name, description, items);
-	}
-
-	/**
-	 * Return a new Array Type.
-	 * 
-	 * @param dim The dimension
-	 * @param elementType The element type
-	 * @return A new Array Type
-	 */
-	public static ArrayType arrayType(int dim, OpenType elementType) {
-		try {
-			return new ArrayType(dim, elementType);
-		}
-		catch (OpenDataException e) {
-			throw new RuntimeException(e);
-		}
-	}
-
-	/**
-	 * Extend a Composite Type by adding new items. Items can override items in
-	 * the parent type.
-	 * 
-	 * @param parent The parent type, can be <code>null</code>
-	 * @param name The name of the type
-	 * @param description The description of the type
-	 * @param items The items that should be added/override to the parent type
-	 * @return A new Composite Type that extends the parent type
-	 * @throws RuntimeException when an OpenDataException is thrown
-	 */
-	public static CompositeType extend(CompositeType parent, String name,
-			String description, Item... items) {
-		Set<Item> all = new LinkedHashSet<Item>();
-
-		if (parent != null) {
-			for (Object nm : parent.keySet()) {
-				String key = (String) nm;
-				all.add(new Item((String) nm, parent.getDescription(key),
-						parent.getType(key)));
-			}
-		}
-
-		all.addAll(Arrays.asList(items));
-
-		String names[] = new String[all.size()];
-		String descriptions[] = new String[all.size()];
-		OpenType types[] = new OpenType[all.size()];
-
-		for (int n = 0; n < types.length; n++) {
-			names[n] = items[n].name;
-			descriptions[n] = items[n].description;
-			types[n] = items[n].type;
-		}
-
-		try {
-			return new CompositeType(name, description, names, descriptions,
-					types);
-		}
-		catch (OpenDataException e) {
-			throw new RuntimeException(e);
-		}
-	}
-
-}

Deleted: projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/JmxConstants.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/JmxConstants.java	2010-02-10 22:28:33 UTC (rev 100826)
+++ projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/JmxConstants.java	2010-02-10 22:28:37 UTC (rev 100827)
@@ -1,317 +0,0 @@
-/*
- * Copyright (c) OSGi Alliance (2009). All Rights Reserved.
- * 
- * Licensed 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.osgi.jmx;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.management.openmbean.ArrayType;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.SimpleType;
-import javax.management.openmbean.TabularType;
-
-/**
- * Constants for OSGi JMX Specification.
- * 
- * Additionally, this class contains a number of utility types that are used in
- * different places in the specification. These are {@link #LONG_ARRAY_TYPE},
- * {@link #STRING_ARRAY_TYPE}, and {@link #PROPERTIES_TYPE}.
- * 
- * @version $Revision$
- * @Immutable
- */
-public class JmxConstants {
-
-	/*
-	 * Empty constructor to make sure this is not used as an object.
-	 */
-	private JmxConstants() {
-		// empty
-	}
-
-	/**
-	 * The MBean Open type for an array of strings
-	 */
-	public static final ArrayType		STRING_ARRAY_TYPE	= Item
-																	.arrayType(
-																			1,
-																			SimpleType.STRING);
-	/**
-	 * The MBean Open type for an array of longs
-	 */
-	public static final ArrayType		LONG_ARRAY_TYPE		= Item
-																	.arrayType(
-																			1,
-																			SimpleType.LONG);
-
-	/**
-	 * For an encoded array we need to start with ARRAY_OF. This must be
-	 * followed by one of the names in {@link #SCALAR}.
-	 * 
-	 */
-	public final static String			ARRAY_OF			= "Array of ";
-
-	/**
-	 * For an encoded vector we need to start with ARRAY_OF. This must be
-	 * followed by one of the names in {@link #SCALAR}.
-	 */
-	public final static String			VECTOR_OF			= "Vector of ";
-
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.lang.String}
-	 */
-	public static final String			STRING				= "String";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.lang.Integer}
-	 */
-	public static final String			INTEGER				= "Integer";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.lang.Long}
-	 */
-	public static final String			LONG				= "Long";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.lang.Float}
-	 */
-	public static final String			FLOAT				= "Float";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.lang.Double}
-	 */
-	public static final String			DOUBLE				= "Double";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.lang.Byte}
-	 */
-	public static final String			BYTE				= "Byte";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.lang.Short}
-	 */
-	public static final String			SHORT				= "Short";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.lang.Character}
-	 */
-	public static final String			CHARACTER			= "Character";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.lang.Boolean}
-	 */
-	public static final String			BOOLEAN				= "Boolean";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.math.BigDecimal}
-	 */
-	public static final String			BIGDECIMAL			= "BigDecimal";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * {@link java.math.BigInteger}
-	 */
-	public static final String			BIGINTEGER			= "BigInteger";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * the <code>double</code> primitive type.
-	 */
-	public static final String			P_DOUBLE			= "double";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * the <code>float</code> primitive type.
-	 */
-	public static final String			P_FLOAT				= "float";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * the <code>long</code> primitive type.
-	 */
-	public static final String			P_LONG				= "long";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * the <code>int</code> primitive type.
-	 */
-	public static final String			P_INT				= "int";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * the <code>short</code> primitive type.
-	 */
-	public static final String			P_SHORT				= "short";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * the <code>byte</code> primitive type.
-	 */
-	public static final String			P_BYTE				= "byte";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * the <code>char</code> primitive type.
-	 */
-	public static final String			P_CHAR				= "char";
-	/**
-	 * Value for {@link #PROPERTY_TYPE} <code>Type</code> value in the case of
-	 * the <code>boolean</code> primitive type.
-	 */
-	public static final String			P_BOOLEAN			= "boolean";
-
-	/**
-	 * A set of all scalars that can be used in the {@link #TYPE} property of a
-	 * {@link #PROPERTIES_TYPE}. This contains the following names:
-	 * <ul>
-	 * <li>{@link #BIGDECIMAL}</li>
-	 * <li>{@link #BIGINTEGER}</li>
-	 * <li>{@link #BOOLEAN}</li>
-	 * <li>{@link #BYTE}</li>
-	 * <li>{@link #CHARACTER}</li>
-	 * <li>{@link #DOUBLE}</li>
-	 * <li>{@link #FLOAT}</li>
-	 * <li>{@link #INTEGER}</li>
-	 * <li>{@link #LONG}</li>
-	 * <li>{@link #SHORT}</li>
-	 * <li>{@link #STRING}</li>
-	 * <li>{@link #P_BYTE}</li>
-	 * <li>{@link #P_CHAR}</li>
-	 * <li>{@link #P_DOUBLE}</li>
-	 * <li>{@link #P_FLOAT}</li>
-	 * <li>{@link #P_INT}</li>
-	 * <li>{@link #P_LONG}</li>
-	 * <li>{@link #P_SHORT}</li>
-	 */
-	public final static Set<String>		SCALAR				= new HashSet<String>(
-																	Arrays
-																			.asList(
-																					STRING,
-																					INTEGER,
-																					LONG,
-																					FLOAT,
-																					DOUBLE,
-																					BYTE,
-																					SHORT,
-																					CHARACTER,
-																					BOOLEAN,
-																					BIGDECIMAL,
-																					BIGINTEGER,
-																					P_BYTE,
-																					P_CHAR,
-																					P_SHORT,
-																					P_INT,
-																					P_LONG,
-																					P_DOUBLE,
-																					P_FLOAT));
-	/**
-	 * The key KEY.
-	 */
-	public static final String			KEY					= "Key";
-	/**
-	 * The key of a property. The key is {@link #KEY} and the type is
-	 * {@link SimpleType#STRING}.
-	 */
-	public static final Item			KEY_ITEM			= new Item(
-																	KEY,
-																	"The key of the property",
-																	SimpleType.STRING);
-
-	/**
-	 * The key VALUE.
-	 */
-	public static final String			VALUE				= "Value";
-
-	/**
-	 * The value of a property. The key is {@link #VALUE} and the type is
-	 * {@link SimpleType#STRING}. A value will be encoded by the string given in
-	 * {@link #TYPE}. The syntax for this type is given in {@link #TYPE_ITEM}.
-	 */
-	public static final Item			VALUE_ITEM			= new Item(
-																	VALUE,
-																	"The value of the property",
-																	SimpleType.STRING);
-
-	/**
-	 * The key PROPERTY_TYPE.
-	 * 
-	 * ### can we call this value PropertyType and service type ServiceType?
-	 */
-	public static final String			TYPE				= "Type";
-
-	/**
-	 * The type of the property. The key is {@link #TYPE} and the type is
-	 * {@link SimpleType#STRING}. This string must follow the following syntax:
-	 * 
-	 * TYPE ::= ( 'Array of ' | 'Vector of ' )? {@link #SCALAR}
-	 * 
-	 * ### why can't we just use the class name?
-	 * 
-	 * ### why do we have to distinguish between primitives and wrappers?
-	 */
-	public static final Item			TYPE_ITEM			= new Item(
-																	TYPE,
-																	"The type of the property",
-																	SimpleType.STRING, //
-																	STRING,
-																	INTEGER,
-																	LONG,
-																	FLOAT,
-																	DOUBLE,
-																	BYTE,
-																	SHORT,
-																	CHARACTER,
-																	BOOLEAN,
-																	BIGDECIMAL,
-																	BIGINTEGER,
-																	P_DOUBLE,
-																	P_FLOAT,
-																	P_LONG,
-																	P_INT,
-																	P_SHORT,
-																	P_CHAR,
-																	P_BYTE,
-																	P_BOOLEAN);
-
-	/**
-	 * A Composite Type describing a a single property. A property consists of
-	 * the following items {@link #KEY_ITEM}, {@link #VALUE_ITEM}, and
-	 * {@link #TYPE_ITEM}.
-	 */
-	public static final CompositeType	PROPERTY_TYPE		= Item
-																	.compositeType(
-																			"PROPERTY",
-																			"This type encapsulates a key/value pair",
-																			KEY_ITEM,
-																			VALUE_ITEM,
-																			TYPE_ITEM);
-
-	/**
-	 * Describes a map with properties. The row type is {@link #PROPERTY_TYPE}.
-	 * The index is defined to the {@link #KEY} of the property.
-	 */
-	public static final TabularType		PROPERTIES_TYPE		= Item
-																	.tabularType(
-																			"PROPERTIES",
-																			"A table of PROPERTY",
-																			PROPERTY_TYPE,
-																			KEY);
-
-	/**
-	 * The domain name of the core OSGi MBeans
-	 */
-	public static final String			OSGI_CORE			= "osgi.core";
-
-	/**
-	 * The domain name of the selected OSGi compendium MBeans
-	 */
-	public static final String			OSGI_COMPENDIUM		= "osgi.compendium";
-}

Deleted: projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/package.html
===================================================================
--- projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/package.html	2010-02-10 22:28:33 UTC (rev 100826)
+++ projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/package.html	2010-02-10 22:28:37 UTC (rev 100827)
@@ -1,11 +0,0 @@
-<!-- $Revision: 8212 $ -->
-<BODY>
-<p>OSGi JMX Package Version 1.0.</p>
-<p>Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:</p>
-<pre>
-Import-Package: org.osgi.jmx; version=&quot;[1.0,2.0)&quot;
-</pre>
-</BODY>
-

Deleted: projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/packageinfo
===================================================================
--- projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/packageinfo	2010-02-10 22:28:33 UTC (rev 100826)
+++ projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/osgi/jmx/packageinfo	2010-02-10 22:28:37 UTC (rev 100827)
@@ -1 +0,0 @@
-version 1.0



More information about the jboss-osgi-commits mailing list