diff -Nru osgi-compendium-4.2.0/about.html osgi-compendium-4.3.0/about.html --- osgi-compendium-4.2.0/about.html 2011-10-03 17:57:47.000000000 +0000 +++ osgi-compendium-4.3.0/about.html 2010-06-15 15:44:10.000000000 +0000 @@ -8,7 +8,7 @@
Copyright © OSGi Alliance (2000, 2009). All Rights Reserved.
+Copyright © OSGi Alliance (2000, 2011). All Rights Reserved.
OSGi Alliance
* The methods of this class taking a principal as parameter accept remote
* server IDs (as passed to {@link DmtAdmin#getSession(String, String, int)
- * DmtAdmin.getSession}), as well as "
* The syntax for valid remote server IDs:
* A principal name may not appear multiple times in the 'principals'
@@ -171,7 +171,7 @@
* @param permissions The array of permissions
* @throws IllegalArgumentException if the length of the two arrays are not
* the same, if any array element is invalid, or if a principal
- * appears multiple times in the
* Assumes that the permissions parameter has been checked. All
- * modifications of an
@@ -331,11 +341,11 @@
* @param principal The entity from which permissions should be revoked, or
* "*" to revoke permissions from all principals.
* @param permissions The permissions to be revoked. The parameter can be a
- * logical
@@ -406,9 +416,9 @@
* "*" to globally grant permissions to all principals.
* @param permissions The set of permissions to be given. The parameter is
* a bitmask of the permission constants defined in this class.
- * @return a new
- * The
* This interface also contains methods for manipulating the set of
- *
- * The
- * To perform this operation the caller must have
- * The
- * To perform this operation the caller must have
- * The
- * This method is guarded by
@@ -210,21 +210,21 @@
* which the registering application has the appropriate GET
* {@link info.dmtree.security.DmtPermission}.
*
- * If the specified
* The listener will only receive the change notifications of nodes for
* which the node ACL grants GET access to the specified principal.
*
- * If the specified
* Different constructors are available to create nodes with different formats.
- * Nodes of
* {@link #FORMAT_RAW_BINARY} and {@link #FORMAT_RAW_STRING} enable the support
* of future data formats. When using these formats, the actual format name is
- * specified as a
@@ -204,7 +204,7 @@
* complex values, making it simpler to retrieve or update all leaf nodes in
* a subtree.
*
- * The given value must be a non-
* Certain interior nodes can support access to their subtrees through
@@ -615,7 +615,7 @@
*
* @return the data object associated with an interior node
* @throws DmtIllegalStateException if the format of the data is not
- *
* For string format data - including {@link #FORMAT_RAW_STRING} - the
@@ -702,10 +702,10 @@
* Binary - including {@link #FORMAT_RAW_BINARY} - and base64 data is
* represented by two-digit hexadecimal numbers for each byte separated by
* spaces. The {@link #NULL_VALUE} data has the string form of
- * "
* In case of {@link #FORMAT_RAW_BINARY} and {@link #FORMAT_RAW_STRING}
* the textual name of the data format - as returned by
* {@link #getFormatName()} - must be equal as well.
*
- * @param obj the object to compare with this
- * The
- * When a
* The method returns only those affected nodes that the caller has the GET
@@ -123,7 +123,7 @@
/**
* This method can be used to query the new nodes, when the type of the
* event is {@link #COPIED} or {@link #RENAMED}. For all other event types
- * this method returns
* The array returned by this method runs parallel to the array returned by
* {@link #getNodes}, the elements in the two arrays contain the source and
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/DmtEventListener.java osgi-compendium-4.3.0/src/info/dmtree/DmtEventListener.java
--- osgi-compendium-4.2.0/src/info/dmtree/DmtEventListener.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/DmtEventListener.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -22,16 +22,16 @@
* {@link DmtSession} is opened in atomic mode, DMT events are only sent when
* the session is committed, when the changes are actually performed.
*
- * @version $Revision: 5673 $
+ * @version $Id: 275675e7ed60b346c1081e1b5bacdfa348ad8350 $
*/
public interface DmtEventListener {
/**
- *
@@ -30,22 +30,22 @@
* different range, starting from 1.
*
* The cause of the exception (if specified) can either be a single
- *
- * Each constructor has two variants, one accepts a
* Getter methods are provided to retrieve the values of the additional
- * parameters, and the
* This error code corresponds to the OMA DM response status code 418
* "Already exists".
@@ -207,7 +207,7 @@
/**
* Operation failed because of meta data restrictions. This covers any
* attempted deviation from the parameters defined by the
- *
* This error code can also be used to indicate any other meta data
- * violation, even if it cannot be described by the
@@ -237,15 +237,15 @@
/**
* The requested command failed because the target URI or node name is
- *
* If a fatal exception is thrown, no further business methods will be
@@ -399,12 +399,12 @@
* exception was thrown during commit.
*
* @param uri the node on which the failed DMT operation was issued, or
- *
@@ -34,30 +34,30 @@
*
* If the URI specified does not correspond to a legitimate node in the tree an
* exception is thrown. The only exception is the {@link #isNodeUri(String)}
- * method which returns
- * Each method of
* An error situation can arise due to the lack of a two phase commit
* mechanism in the underlying plugins. As an example, if plugin A has
@@ -147,30 +147,30 @@
* predictable behaviour, the commit operation should continue with the
* remaining plugins even after detecting a failure. All exceptions received
* from failed commits are aggregated into one
- *
* In many cases the tree is not the only way to manage a given part of the
* system. It may happen that while modifying some nodes in an atomic
* session, the underlying settings are modified in parallel outside the
* scope of the DMT. If this is detected during commit, an exception with
- * the code
- * The state of the session changes to
- * If the given
* If meta-data is available for the node, several checks are made before
- * creating it. The node must have
* If the meta-data cannot be retrieved because the given node cannot
* possibly exist in the tree (it is not defined in the specification), the
- *
* If meta-data is available for the node, several checks are made before
- * creating it. The node must have
* If the meta-data cannot be retrieved because the given node cannot
* possibly exist in the tree (it is not defined in the specification), the
- *
* Interior node type identifiers must follow the format defined in section
@@ -611,43 +611,43 @@
* avoid unnecessary double-checks.
*
* @param nodeUri the URI of the node to create
- * @param type the type URI of the interior node, can be
@@ -672,51 +672,51 @@
* descriptions below.
*
* If meta-data is available for a node, several checks are made before
- * creating it. The node must have
* If the meta-data cannot be retrieved because the given node cannot
* possibly exist in the tree (it is not defined in the specification), the
- *
@@ -739,7 +739,7 @@
* descriptions below.
*
* If meta-data is available for a node, several checks are made before
- * creating it. The node must have
* If the meta-data cannot be retrieved because the given node cannot
* possibly exist in the tree (it is not defined in the specification), the
- *
- * Nodes of
@@ -811,7 +811,7 @@
* descriptions below.
*
* If meta-data is available for a node, several checks are made before
- * creating it. The node must have
* If the meta-data cannot be retrieved because the given node cannot
* possibly exist in the tree (it is not defined in the specification), the
- *
- * Nodes of
* The MIME type string must conform to the definition in RFC 2045. Checking
@@ -833,44 +833,44 @@
*
* @param nodeUri the URI of the node to create
* @param value the value to be given to the new node, can be
- *
* If meta-data is available for a node, several checks are made before
* deleting it. The node must be non-permanent, it must have the
- *
- * If the specified value is
* An Event of type REPLACE is sent out for a leaf node. A replaced interior
@@ -1051,44 +1051,44 @@
* but the structure of the subtree is not modified by the operation.
*
* @param nodeUri the URI of the node
- * @param data the data to be set, can be
- * For interior nodes, a
@@ -1162,43 +1162,43 @@
* double-checks.
*
* @param nodeUri the URI of the node
- * @param type the type of the node, can be
- * The
- * If a
- * Most of the methods of this class return
* All MIME types are considered valid if no meta-data is provided for a
- * node or if
* The information returned by this method is not checked by DmtAdmin, it
@@ -259,7 +259,7 @@
* calls {@link #isValidValue} for checking the value, its behaviour should
* be consistent with this method.
*
- * @return the valid values for this node, or
* The format names returned by this method are not checked by DmtAdmin,
* they are only for external use, for example in user interfaces. DmtAdmin
@@ -299,7 +299,7 @@
* should be consistent with this method.
*
* @return the allowed format name(s) of raw data stored by the node, or
- *
- * This method may return
@@ -334,7 +334,7 @@
* calls {@link #isValidName} for checking the name, its behaviour should be
* consistent with this method.
*
- * @return the valid values for this node name, or
- * This method may return
- * The syntax used in
@@ -57,42 +57,42 @@
* between the execute and the notification.
*
* In order to send a notification using this method, the caller must have
- * an
- * When this method is called with all its parameters Device Management Tree Notification Package Version 1.0.
-This package contains the public API of the Notification service. This service
-enables the sending of asynchronous notifications to management servers.
-Permission classes are provided by the Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
-
+ * This package contains the public API of the Notification service. This service
+ * enables the sending of asynchronous notifications to management servers.
+ * Permission classes are provided by the {@code info.dmtree.security} package.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.notification; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.notification; version="[1.0,1.1)"}
+ *
+ * @version $Id: f5805c2959795df8d5c39a3bd0a5634a424f9b47 $
+ */
+
+package info.dmtree.notification;
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/notification/spi/package.html osgi-compendium-4.3.0/src/info/dmtree/notification/spi/package.html
--- osgi-compendium-4.2.0/src/info/dmtree/notification/spi/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/notification/spi/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-
- Device Management Tree Notification SPI Package Version 1.0.
-This package contains the SPI (Service Provider Interface) of the Notification
-service. These interfaces are implemented by Protocol Adapters capable of
-delivering notifications to management servers on a specific protocol. Users of
-the Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
-
+ * This package contains the SPI (Service Provider Interface) of the Notification
+ * service. These interfaces are implemented by Protocol Adapters capable of
+ * delivering notifications to management servers on a specific protocol. Users of
+ * the {@code NotificationService} interface do not interact directly with this
+ * package.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.notification.spi; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.notification.spi; version="[1.0,1.1)"}
+ *
+ * @version $Id: 2c273b00d322bca78476155dffb03e0e6344ea9b $
+ */
+
+package info.dmtree.notification.spi;
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/notification/spi/RemoteAlertSender.java osgi-compendium-4.3.0/src/info/dmtree/notification/spi/RemoteAlertSender.java
--- osgi-compendium-4.2.0/src/info/dmtree/notification/spi/RemoteAlertSender.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/notification/spi/RemoteAlertSender.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -27,20 +27,20 @@
*
* The properties of the service registration should specify a list of
* destinations (principals) where the service is capable of sending alerts.
- * This can be done by providing a
- * The
- * The
* Any exception thrown on this method will be propagated to the original
- * sender of the event, wrapped in a
* Since sending the alert and receiving acknowledgment for it is
* potentially a very time-consuming operation, alerts are sent
@@ -69,12 +69,12 @@
* it.
*
* @param principal the name identifying the server where the alert should
- * be sent, can be Device Management Tree Package Version 1.0.
-This package contains the public API for the Device Management Tree
-manipulations. Permission classes are provided by the
- Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
- This package contains the public API for the Device Management Tree
+ * manipulations. Permission classes are provided by the
+ * {@code info.dmtree.security} package, and DMT plugin interfaces can be found in
+ * the {@code info.dmtree.spi} package. Asynchronous notifications to remote
+ * management servers can be sent using the interfaces in the
+ * {@code info.dmtree.notification} package.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: info.dmtree; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: info.dmtree; version="[1.0,1.1)"}
+ *
+ * @version $Id: 09257aa0c6277a1b2c9731b591d26b5ca0e8a96e $
+ */
+
+package info.dmtree;
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/registry/DmtServiceFactory.java osgi-compendium-4.3.0/src/info/dmtree/registry/DmtServiceFactory.java
--- osgi-compendium-4.2.0/src/info/dmtree/registry/DmtServiceFactory.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/registry/DmtServiceFactory.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -31,7 +31,7 @@
* These methods are not needed in an OSGi environment, clients should retrieve
* the required service objects from the OSGi Service Registry.
*
- * @version $Revision: 5673 $
+ * @version $Id: 2e571c170e4e61fef5b829c5aed1983afc394070 $
*/
public final class DmtServiceFactory {
private static BundleContext context = null;
@@ -42,7 +42,7 @@
private DmtServiceFactory() {}
/**
- * This method is used to obtain access to Device Management Tree Registry Package Version 1.0.
-This package contains the factory class providing access to the different
-Device Management services for non-OSGi applications. The
- Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
-
+ * This package contains the factory class providing access to the different
+ * Device Management services for non-OSGi applications. The
+ * {@code DmtServiceFactory} class contained in this package provides methods
+ * for retrieving {@code NotificationService} and {@code DmtAdmin}
+ * service implementations.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.registry; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.registry; version="[1.0,1.1)"}
+ *
+ * @version $Id: 7df579cffa84a035f9198eeda06989cf95f803c9 $
+ */
+
+package info.dmtree.registry;
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/security/AlertPermission.java osgi-compendium-4.3.0/src/info/dmtree/security/AlertPermission.java
--- osgi-compendium-4.2.0/src/info/dmtree/security/AlertPermission.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/security/AlertPermission.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -26,13 +26,13 @@
* Indicates the callers authority to send alerts to management servers,
* identified by their principal names.
*
- *
* If wildcard is present in the actions field, all legal OMA DM commands are
* allowed on the designated nodes(s) by the owner of the permission. Action
@@ -57,7 +57,7 @@
* returned by {@link #getActions} uses the forms defined by the action
* constants.
*
- * @version $Revision: 7942 $
+ * @version $Id: b0e2d35af55ac4ed117b4988b2c3a3f57081ab6d $
*/
public class DmtPermission extends Permission {
private static final long serialVersionUID = -1910969921419407809L;
@@ -122,21 +122,21 @@
* Creates a new DmtPermission object for the specified DMT URI with the
* specified actions. The given URI can be:
*
- * Since the
* The actions string must either be "*" to allow all actions, or it must
* contain a non-empty subset of the valid actions, defined as constants in
@@ -145,7 +145,7 @@
* @param dmtUri URI of the management object (or subtree)
* @param actions OMA DM actions allowed
* @throws NullPointerException if any of the parameters are
- *
- * Device Management Tree Security Package Version 1.0.
-This package contains the permission classes used by the Device
-Management API in environments that support the Java 2 security model.
- Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
-
+ * This package contains the permission classes used by the Device
+ * Management API in environments that support the Java 2 security model.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.security; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.security; version="[1.0,1.1)"}
+ *
+ * @version $Id: f113975faaa4bcaaadfbdc8855657559c228897a $
+ */
+
+package info.dmtree.security;
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/spi/DataPlugin.java osgi-compendium-4.3.0/src/info/dmtree/spi/DataPlugin.java
--- osgi-compendium-4.2.0/src/info/dmtree/spi/DataPlugin.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/spi/DataPlugin.java 2011-05-17 09:55:04.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -25,34 +25,34 @@
*
* In an OSGi environment such implementations should be registered at the OSGi
* service registry specifying the list of root node URIs in a
- *
* When the first reference in a session is made to a node handled by this
- * plugin, the DmtAdmin calls one of the
- * The
*
- * @version $Revision: 5673 $
+ * @version $Id: 9c832c44be569dfd63ef66eb5a40bae7b283b81f $
*/
public interface DataPlugin {
/**
* This method is called to signal the start of a read-only session when the
- * first reference is made within a
@@ -60,15 +60,15 @@
* subtree that has any overlap with the subtree of this session.
*
* @param sessionRoot the path to the subtree which is accessed in the
- * current session, must not be
@@ -87,17 +87,17 @@
* subtree that has any overlap with the subtree of this session.
*
* @param sessionRoot the path to the subtree which is locked in the current
- * session, must not be
@@ -116,17 +116,17 @@
* subtree that has any overlap with the subtree of this session.
*
* @param sessionRoot the path to the subtree which is locked in the current
- * session, must not be
* In an OSGi environment such implementations should be registered at the OSGi
* service registry specifying the list of root node URIs in a
- *
- * The Device Management Tree SPI Package Version 1.0.
-This package contains the interface classes that compose the Device Management
-SPI (Service Provider Interface). These interfaces are implemented by DMT plugins;
-users of the Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
-
+ * This package contains the interface classes that compose the Device Management
+ * SPI (Service Provider Interface). These interfaces are implemented by DMT plugins;
+ * users of the {@code DmtAdmin} interface do not interact directly with these.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.spi; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: info.dmtree.spi; version="[1.0,1.1)"}
+ *
+ * @version $Id: d606bdeacd82efe829ce829dabbf5eedb1ae4b42 $
+ */
+
+package info.dmtree.spi;
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/spi/ReadableDataSession.java osgi-compendium-4.3.0/src/info/dmtree/spi/ReadableDataSession.java
--- osgi-compendium-4.2.0/src/info/dmtree/spi/ReadableDataSession.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/spi/ReadableDataSession.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -27,11 +27,11 @@
*
* Since the {@link ReadWriteDataSession} and {@link TransactionalDataSession}
* interfaces inherit from this interface, some of the method descriptions do
- * not apply for an instance that is only a
- * The
* The DmtAdmin also ensures that the targeted nodes exist before calling the
- * plugin (except, of course, before the
* Note, that a node does not have to exist for having meta-data associated
* with it. This method may provide meta-data for any node that can possibly
* exist in the tree (any node defined by the Management Object provided by
- * the plugin). For nodes that are not defined, a
- * The
- * For interior nodes, the
- * If the specified value is
* In many cases the tree is not the only way to manage a given part of the
* system. It may happen that while modifying some nodes in an atomic
* session, the underlying settings are modified parallelly outside the
* scope of the DMT. If this is detected during commit, an exception with
- * the code
* Syntax of valid DMT URIs:
*
* Node name mangling is needed in the following cases:
*
- * The method returns the normalized
* If the specified path is an empty array then an empty URI
- * (
- * The return value of
- * The return value of
- * The return value of
- * Application instances can obtain their
- * The lifecycle of an
- * If the
*
* @param listener
* The {@link org.osgi.application.ApplicationServiceListener} to be added. It must
- * not be
- * If the
*
* @param listener
* The {@link org.osgi.application.ApplicationServiceListener} to be added. It must not
- * be
- * If
* Note: this method can safely be called on an invalid
- *
- * Startup arguments can be specified as name, value pairs. The name
- * must be of type {@link java.lang.String}, which must not be
- *
+ * Startup arguments can be specified as name, value pairs. The name must be
+ * of type {@link java.lang.String}, which must not be {@code null} or empty
+ * {@link java.lang.String} ({@code ""}), the value can be any object
+ * including {@code null}.
+ *
+ * @return a {@link java.util.Map} containing the startup arguments. It can
+ * be {@code null}.
+ * @throws java.lang.IllegalStateException If this context application
+ * instance has stopped.
+ */
public Map getStartupParameters();
/**
* Application can query the service properties of a service object
* it is bound to. Application gets bound to a service object when
* it first obtains a reference to the service by calling
- *
* An application can register a service object that implements the
- * {@link org.osgi.framework.ServiceFactory} interface to have more flexibility in providing
- * service objects to other applications or bundles.
+ * {@link org.osgi.framework.ServiceFactory} interface to have more
+ * flexibility in providing service objects to other applications or
+ * bundles.
*
*
* The following steps are required to register a service:
*
- *
- *
- * An
- *
- * Foreign Application Package Version 1.0.
- Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
-
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.application; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.application; version="[1.0,1.1)"}
+ *
+ * @version $Id: cd35b66cfa49a385a5650be5ceecad454d65e7b9 $
+ */
+
+package org.osgi.application;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/framework/BundleStateMBean.java osgi-compendium-4.3.0/src/org/osgi/jmx/framework/BundleStateMBean.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/framework/BundleStateMBean.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/framework/BundleStateMBean.java 2010-06-15 15:44:04.000000000 +0000
@@ -0,0 +1,692 @@
+/*
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.framework;
+
+import java.io.IOException;
+
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.SimpleType;
+import javax.management.openmbean.TabularData;
+import javax.management.openmbean.TabularType;
+
+import org.osgi.jmx.Item;
+import org.osgi.jmx.JmxConstants;
+
+/**
+ * This MBean represents the Bundle state of the framework. This MBean also
+ * emits events that clients can use to get notified of the changes in the
+ * bundle state of the framework.
+ *
+ * @version $Id: 84a76d7e9f2b40aa5ef4310c0e5b49b7d1786d82 $
+ * @ThreadSafe
+ */
+public interface BundleStateMBean {
+ /**
+ * The Object Name for a Bundle State MBean.
+ */
+ String OBJECTNAME = JmxConstants.OSGI_CORE
+ + ":type=bundleState,version=1.5";
+
+ /**
+ * The key KEY, used in {@link #KEY_ITEM}.
+ */
+ String KEY = "Key";
+
+ /**
+ * The item describing the key of a bundle header entry. The key is
+ * {@link #KEY} and the type is {@link SimpleType#STRING}.
+ */
+ Item KEY_ITEM = new Item(KEY, "The bundle header key", SimpleType.STRING);
+ /**
+ * The key VALUE, used in {@link #VALUE_ITEM}.
+ */
+ String VALUE = "Value";
+ /**
+ * The item describing the value of a bundle header entry. The key is
+ * {@link #VALUE} and the type is {@link SimpleType#STRING}.
+ */
+ Item VALUE_ITEM = new Item(VALUE, "The bundle header value",
+ SimpleType.STRING);
+
+ /**
+ * The Composite Type describing an entry in bundle headers. It consists of
+ * {@link #KEY_ITEM} and {@link #VALUE_ITEM}.
+ */
+ CompositeType HEADER_TYPE = Item.compositeType("HEADER",
+ "This type encapsulates OSGi bundle header key/value pairs",
+ KEY_ITEM, VALUE_ITEM);
+
+ /**
+ * The Tabular Type describing the type of the Tabular Data value that is
+ * returned from {@link #getHeaders(long)} method. The primary item is
+ * {@link #KEY_ITEM}.
+ */
+ TabularType HEADERS_TYPE = Item.tabularType("HEADERS",
+ "The table of bundle headers",
+ HEADER_TYPE,
+ KEY);
+
+ /**
+ * The key LOCATION, used in {@link #LOCATION_ITEM}.
+ */
+ String LOCATION = "Location";
+ /**
+ * The item containing the bundle location in {@link #BUNDLE_TYPE}. The key
+ * is {@link #LOCATION} and the the type is {@link SimpleType#STRING}.
+ */
+ Item LOCATION_ITEM = new Item(LOCATION, "The location of the bundle",
+ SimpleType.STRING);
+
+ /**
+ * The key IDENTIFIER, used in {@link #IDENTIFIER_ITEM}.
+ */
+ String IDENTIFIER = "Identifier";
+
+ /**
+ * The item containing the bundle identifier in {@link #BUNDLE_TYPE}. The
+ * key is {@link #IDENTIFIER} and the the type is {@link SimpleType#LONG}.
+ */
+ Item IDENTIFIER_ITEM = new Item(IDENTIFIER, "The id of the bundle",
+ SimpleType.LONG);
+ /**
+ * The key SYMBOLIC_NAME, used in {@link #SYMBOLIC_NAME_ITEM}.
+ */
+ String SYMBOLIC_NAME = "SymbolicName";
+
+ /**
+ * The item containing the symbolic name in {@link #BUNDLE_TYPE}. The key is
+ * {@link #SYMBOLIC_NAME} and the the type is {@link SimpleType#STRING}.
+ */
+ Item SYMBOLIC_NAME_ITEM = new Item(SYMBOLIC_NAME,
+ "The symbolic name of the bundle", SimpleType.STRING);
+ /**
+ * The key VERSION, used in {@link #VERSION_ITEM}.
+ */
+ String VERSION = "Version";
+
+ /**
+ * The item containing the symbolic name in {@link #BUNDLE_TYPE}. The key is
+ * {@link #SYMBOLIC_NAME} and the the type is {@link SimpleType#STRING}.
+ */
+ Item VERSION_ITEM = new Item(VERSION, "The version of the bundle",
+ SimpleType.STRING);
+ /**
+ * The key START_LEVEL, used in {@link #START_LEVEL_ITEM}.
+ */
+ String START_LEVEL = "StartLevel";
+
+ /**
+ * The item containing the start level in {@link #BUNDLE_TYPE}. The key is
+ * {@link #START_LEVEL} and the the type is {@link SimpleType#INTEGER}.
+ */
+ Item START_LEVEL_ITEM = new Item(START_LEVEL,
+ "The start level of the bundle", SimpleType.INTEGER);
+ /**
+ * The key STATE, used in {@link #STATE_ITEM}.
+ */
+ String STATE = "State";
+
+ /**
+ * Constant INSTALLED for the {@link #STATE}
+ */
+ String INSTALLED = "INSTALLED";
+ /**
+ * Constant RESOLVED for the {@link #STATE}
+ */
+ String RESOLVED = "RESOLVED";
+ /**
+ * Constant STARTING for the {@link #STATE}
+ */
+ String STARTING = "STARTING";
+ /**
+ * Constant ACTIVE for the {@link #STATE}
+ */
+ String ACTIVE = "ACTIVE";
+ /**
+ * Constant STOPPING for the {@link #STATE}
+ */
+ String STOPPING = "STOPPING";
+ /**
+ * Constant UNINSTALLED for the {@link #STATE}
+ */
+ String UNINSTALLED = "UNINSTALLED";
+ /**
+ * Constant UNKNOWN for the {@link #STATE}
+ */
+ String UNKNOWN = "UNKNOWN";
+ /**
+ * The item containing the bundle state in {@link #BUNDLE_TYPE}. The key is
+ * {@link #STATE} and the the type is {@link SimpleType#STRING}. The
+ * returned values must be one of the following strings:
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.framework; version="[1.5,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.framework; version="[1.5,1.6)"}
+ *
+ * @version $Id: 737f6cf596363b73c8386d81aec57448f68fa36f $
+ */
+
+package org.osgi.jmx.framework;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/framework/PackageStateMBean.java osgi-compendium-4.3.0/src/org/osgi/jmx/framework/PackageStateMBean.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/framework/PackageStateMBean.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/framework/PackageStateMBean.java 2010-06-15 15:44:04.000000000 +0000
@@ -0,0 +1,197 @@
+/*
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.framework;
+
+import java.io.IOException;
+
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.SimpleType;
+import javax.management.openmbean.TabularData;
+import javax.management.openmbean.TabularType;
+
+import org.osgi.jmx.Item;
+import org.osgi.jmx.JmxConstants;
+
+/**
+ * This MBean provides information about the package state of the framework.
+ *
+ * @version $Id: dcd7950ca90fb92f67ac3d2ad93e31a53f87f1d3 $
+ * @ThreadSafe
+ */
+public interface PackageStateMBean {
+ /**
+ * The fully qualified object name of this MBean.
+ */
+ String OBJECTNAME = JmxConstants.OSGI_CORE
+ + ":type=packageState,version=1.5";
+
+ /**
+ * The key EXPORTING_BUNDLE, used in {@link #EXPORTING_BUNDLES_ITEM}.
+ */
+ String EXPORTING_BUNDLES = "ExportingBundles";
+
+ /**
+ * The item containing the bundle identifier in {@link #PACKAGE_TYPE}. The
+ * key is {@link #EXPORTING_BUNDLES} and the type is
+ * {@link JmxConstants#LONG_ARRAY_TYPE}.
+ */
+ Item EXPORTING_BUNDLES_ITEM = new Item(
+ EXPORTING_BUNDLES,
+ "The bundles the package belongs to",
+ JmxConstants.LONG_ARRAY_TYPE);
+
+ /**
+ * The key IMPORTING_BUNDLES, used in {@link #IMPORTING_BUNDLES_ITEM}.
+ */
+ String IMPORTING_BUNDLES = "ImportingBundles";
+
+ /**
+ * The item containing the bundle identifier in {@link #PACKAGE_TYPE}. The
+ * key is {@link #IMPORTING_BUNDLES} and the type is {@link JmxConstants#LONG_ARRAY_TYPE}.
+ */
+ Item IMPORTING_BUNDLES_ITEM = new Item(
+ IMPORTING_BUNDLES,
+ "The importing bundles of the package",
+ JmxConstants.LONG_ARRAY_TYPE);
+
+
+ /**
+ * The key NAME, used in {@link #NAME_ITEM}.
+ */
+ String NAME = "Name";
+
+ /**
+ * The item containing the name of the package in {@link #PACKAGE_TYPE}.
+ * The key is {@link #NAME} and the type is {@link SimpleType#LONG}.
+ */
+ Item NAME_ITEM = new Item(NAME,
+ "The package name",
+ SimpleType.STRING);
+
+ /**
+ * The name of the item containing the pending removal status of the package
+ * in the CompositeData. Used
+ */
+ String REMOVAL_PENDING = "RemovalPending";
+ /**
+ * The item representing the removal pending status of a package. The key is
+ * {@link #REMOVAL_PENDING} and the type is {@link SimpleType#BOOLEAN}.
+ */
+ Item REMOVAL_PENDING_ITEM = new Item(
+ REMOVAL_PENDING,
+ "Whether the package is pending removal",
+ SimpleType.BOOLEAN);
+
+ /**
+ * The name of the item containing the package version in the CompositeData.
+ * Used in {@link #VERSION_ITEM}.
+ */
+ String VERSION = "Version";
+
+ /**
+ * The item containing the version of the package in {@link #PACKAGE_TYPE}.
+ * The key is {@link #VERSION} and the type is {@link SimpleType#STRING}.
+ */
+ Item VERSION_ITEM = new Item(
+ VERSION,
+ "The identifier of the bundle the service belongs to",
+ SimpleType.STRING);
+
+ /**
+ * The Composite Type for a CompositeData representing a package. This type
+ * consists of:
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx; version="[1.0,1.1)"}
+ *
+ * @version $Id: 131d479c10ad443110c00a6eb56186df952a4125 $
+ */
+
+package org.osgi.jmx;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/cm/ConfigurationAdminMBean.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/cm/ConfigurationAdminMBean.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/cm/ConfigurationAdminMBean.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/cm/ConfigurationAdminMBean.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.service.cm;
+
+import java.io.IOException;
+
+import javax.management.openmbean.TabularData;
+
+import org.osgi.jmx.JmxConstants;
+
+/**
+ * This MBean provides the management interface to the OSGi Configuration
+ * Administration Service.
+ *
+ * @version $Id: 1071096f6c4eb69c836479e7f1d2847d7932600c $
+ * @ThreadSafe
+ */
+public interface ConfigurationAdminMBean {
+ /**
+ * The object name for this mbean.
+ */
+ String OBJECTNAME = JmxConstants.OSGI_COMPENDIUM+":service=cm,version=1.3";
+
+ /**
+ * Create a new configuration instance for the supplied persistent id of the
+ * factory, answering the PID of the created configuration
+ *
+ * @param factoryPid the persistent id of the factory
+ * @return the PID of the created configuration
+ * @throws IOException if the operation failed
+ */
+ String createFactoryConfiguration(String factoryPid) throws IOException;
+
+ /**
+ * Create a factory configuration for the supplied persistent id of the
+ * factory and the bundle location bound to bind the created configuration
+ * to, answering the PID of the created configuration
+ *
+ * @param factoryPid the persistent id of the factory
+ * @param location the bundle location
+ * @return the pid of the created configuation
+ * @throws IOException if the operation failed
+ */
+ String createFactoryConfigurationForLocation(String factoryPid, String location)
+ throws IOException;
+
+ /**
+ * Delete the configuration
+ *
+ * @param pid the persistent identifier of the configuration
+ * @throws IOException if the operation fails
+ */
+ void delete(String pid) throws IOException;
+
+ /**
+ * Delete the configuration
+ *
+ * @param pid the persistent identifier of the configuration
+ * @param location the bundle location
+ * @throws IOException if the operation fails
+ */
+ void deleteForLocation(String pid, String location) throws IOException;
+
+ /**
+ * Delete the configurations matching the filter specification.
+ *
+ * @param filter the string representation of the
+ * {@code org.osgi.framework.Filter}
+ * @throws IOException if the operation failed
+ * @throws IllegalArgumentException if the filter is invalid
+ */
+ void deleteConfigurations(String filter) throws IOException;
+
+ /**
+ * Answer the bundle location the configuration is bound to
+ *
+ * @param pid the persistent identifier of the configuration
+ * @return the bundle location
+ * @throws IOException if the operation fails
+ */
+ String getBundleLocation(String pid) throws IOException;
+
+ /**
+ * Answer the factory PID if the configuration is a factory configuration,
+ * null otherwise.
+ *
+ * @param pid the persistent identifier of the configuration
+ * @return the factory PID
+ * @throws IOException if the operation fails
+ */
+ String getFactoryPid(String pid) throws IOException;
+
+ /**
+ * Answer the factory PID if the configuration is a factory configuration,
+ * null otherwise.
+ *
+ * @param pid the persistent identifier of the configuration
+ * @param location the bundle location
+ * @return the factory PID
+ * @throws IOException if the operation fails
+ */
+ String getFactoryPidForLocation(String pid, String location) throws IOException;
+
+ /**
+ * Answer the contents of the configuration.
+ *
+ * @see JmxConstants#PROPERTIES_TYPE JmxConstants.PROPERTIES_TYPE for the
+ * details of the TabularType
+ *
+ * @param pid the persistent identifier of the configuration
+ * @return the table of contents
+ * @throws IOException if the operation fails
+ */
+
+ TabularData getProperties(String pid) throws IOException;
+
+ /**
+ * Answer the contents of the configuration.
+ *
+ * @see JmxConstants#PROPERTIES_TYPE JmxConstants.PROPERTIES_TYPE for the
+ * details of the TabularType
+ *
+ * @param pid the persistent identifier of the configuration
+ * @param location the bundle location
+ * @return the table of contents
+ * @throws IOException if the operation fails
+ */
+ TabularData getPropertiesForLocation(String pid, String location) throws IOException;
+
+ /**
+ * Answer the list of PID/Location pairs of the configurations managed by
+ * this service
+ *
+ * @param filter the string representation of the
+ * {@code org.osgi.framework.Filter}
+ * @return the list of configuration PID/Location pairs
+ * @throws IOException if the operation failed
+ * @throws IllegalArgumentException if the filter is invalid
+ */
+ String[][] getConfigurations(String filter) throws IOException;
+
+ /**
+ * Set the bundle location the configuration is bound to
+ *
+ * @param pid the persistent identifier of the configuration
+ * @param location the bundle location
+ * @throws IOException if the operation fails
+ */
+ void setBundleLocation(String pid, String location) throws IOException;
+
+ /**
+ * Update the configuration with the supplied properties For each property
+ * entry, the following row is supplied.
+ *
+ * @see JmxConstants#PROPERTIES_TYPE JmxConstants.PROPERTIES_TYPE for the
+ * details of the TabularType
+ *
+ * @param pid the persistent identifier of the configuration
+ * @param properties the table of properties
+ * @throws IOException if the operation fails
+ */
+ void update(String pid, TabularData properties) throws IOException;
+
+ /**
+ * Update the configuration with the supplied properties For each property
+ * entry, the following row is supplied.
+ *
+ * @see JmxConstants#PROPERTIES_TYPE JmxConstants.PROPERTIES_TYPE for the
+ * details of the TabularType
+ *
+ * @param pid the persistent identifier of the configuration
+ * @param location the bundle location
+ * @param properties the table of properties
+ * @throws IOException if the operation fails
+ */
+ void updateForLocation(String pid, String location, TabularData properties)
+ throws IOException;
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/cm/packageinfo osgi-compendium-4.3.0/src/org/osgi/jmx/service/cm/packageinfo
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/cm/packageinfo 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/cm/packageinfo 2010-06-15 15:44:04.000000000 +0000
@@ -0,0 +1 @@
+version 1.3
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/cm/package-info.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/cm/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/cm/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/cm/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * OSGi JMX CM Package Version 1.3.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.cm; version="[1.3,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.cm; version="[1.3,1.4)"}
+ *
+ * @version $Id: de1716559983426cc1fadaa04dd23e412be803f4 $
+ */
+
+package org.osgi.jmx.service.cm;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/coordinator/CoordinatorMBean.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/coordinator/CoordinatorMBean.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/coordinator/CoordinatorMBean.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/coordinator/CoordinatorMBean.java 2011-05-16 12:29:16.000000000 +0000
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.service.coordinator;
+
+import java.io.IOException;
+
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.SimpleType;
+import javax.management.openmbean.TabularData;
+import javax.management.openmbean.TabularType;
+
+import org.osgi.jmx.Item;
+import org.osgi.jmx.JmxConstants;
+
+/**
+ * This MBean provides the management interface to the OSGi Coordinator Service
+ *
+ * @version $Id: 4c8a1031c3e93d3d88a21faa48fdacedf5051de0 $
+ * @ThreadSafe
+ */
+public interface CoordinatorMBean {
+ /**
+ * User Admin MBean object name.
+ */
+ String OBJECTNAME = JmxConstants.OSGI_COMPENDIUM
+ + ":service=coordinator,version=1.0";
+
+ /**
+ * The key NAME, used in {@link #NAME_ITEM}.
+ */
+ String NAME = "Name";
+
+ /**
+ * The item for the user name for an authorization object. The key is
+ * {@link #NAME} and the type is {@link SimpleType#STRING}.
+ */
+ Item NAME_ITEM = new Item(NAME,
+ "The name of a Coordination",
+ SimpleType.STRING);
+
+ /**
+ * The key ID, used in {@link #ID_ITEM}.
+ */
+ String ID = "Id";
+
+ /**
+ * The item for the id of an Coordination object. The key is {@link #ID} and
+ * the type is {@link SimpleType#LONG}. The id must be generated by the
+ * Mbean and map to a unique Coordination (which should no be pinned in
+ * memory because of this).
+ */
+ Item ID_ITEM = new Item(ID,
+ "The id of a Coordination",
+ SimpleType.LONG);
+
+ /**
+ * The key TIMEOUT, used in {@link #TIMEOUT_ITEM}.
+ */
+ String TIMEOUT = "Timeout";
+
+ /**
+ * The item for the id of an Coordination object. The key is {@link #ID} and
+ * the type is {@link SimpleType#LONG}.
+ */
+ Item TIMEOUT_ITEM = new Item(
+ TIMEOUT,
+ "The timeout of a Coordination",
+ SimpleType.LONG);
+
+ /**
+ */
+ CompositeType COORDINATION_TYPE = Item.compositeType("COORDINATION",
+ "Coordination mapping",
+ ID_ITEM, NAME_ITEM,
+ TIMEOUT_ITEM);
+
+ /**
+ * Defines a list of {@link #COORDINATION_TYPE}
+ */
+ TabularType COORDINATIONS_TYPE = Item.tabularType("COORDINATIONS", "A list of Coordinations", COORDINATION_TYPE);
+
+ /**
+ * List the current coordinations.
+ *
+ * The Composite Data is typed by {@link #COORDINATIONS_TYPE}.
+ *
+ * @param regexFilter a regular expression filter on the coordination name
+ * @return the Coordinations typed by {@link #COORDINATIONS_TYPE}.
+ * @throws IOException if the operation fails
+ */
+ TabularData listCoordinations(String regexFilter) throws IOException;
+
+ /**
+ * Get a Coordination.
+ *
+ * The Composite Data is typed by {@link #COORDINATION_TYPE}.
+ *
+ * @param id The id of a Coordination
+ * @return the Coordinations typed by {@link #COORDINATION_TYPE}.
+ * @throws IOException if the operation fails
+ */
+ CompositeData getCoordination(long id) throws IOException;
+
+ /**
+ * Fail a Coordination.
+ *
+ * @param id The id of the coordination to be failed.
+ * @param reason
+ * @return {@code true} if the coordination was failed by this call,
+ * otherwise {@code false}.
+ * @throws IOException
+ */
+ boolean fail(long id, String reason) throws IOException;
+
+ /**
+ * Set/Change the timeout of a Coordination.
+ *
+ * @param id The id of the Coordination
+ * @param timeout The nr of milliseconds for the next timeout.
+ * @throws IOException
+ */
+ void addTimeout(long id, long timeout) throws IOException;
+
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/coordinator/packageinfo osgi-compendium-4.3.0/src/org/osgi/jmx/service/coordinator/packageinfo
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/coordinator/packageinfo 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/coordinator/packageinfo 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1 @@
+version 1.0
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/coordinator/package-info.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/coordinator/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/coordinator/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/coordinator/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * OSGi JMX Coordinator Package Version 1.0.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.coordinator; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.coordinator; version="[1.0,1.1)"}
+ *
+ * @version $Id: a6b08791e9192cb21059225702d006a3b1ff9554 $
+ */
+
+package org.osgi.jmx.service.coordinator;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/permissionadmin/packageinfo osgi-compendium-4.3.0/src/org/osgi/jmx/service/permissionadmin/packageinfo
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/permissionadmin/packageinfo 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/permissionadmin/packageinfo 2010-06-15 15:44:04.000000000 +0000
@@ -0,0 +1 @@
+version 1.2
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/permissionadmin/package-info.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/permissionadmin/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/permissionadmin/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/permissionadmin/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * OSGi JMX Permission Admin Package Admin Package Version 1.2.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.permissionadmin; version="[1.2,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.permissionadmin; version="[1.2,1.3)"}
+ *
+ * @version $Id: dd8380cabcfb9d30c57953dbdd33ce7f5cbd978e $
+ */
+
+package org.osgi.jmx.service.permissionadmin;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/permissionadmin/PermissionAdminMBean.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/permissionadmin/PermissionAdminMBean.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/permissionadmin/PermissionAdminMBean.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/permissionadmin/PermissionAdminMBean.java 2010-06-15 15:44:04.000000000 +0000
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.service.permissionadmin;
+
+import java.io.IOException;
+
+import org.osgi.jmx.JmxConstants;
+
+/**
+ * This MBean represents the OSGi Permission Manager Service
+ *
+ * @version $Id: 451844cb51b9bdb47bf289a9c68e30d02707419f $
+ * @ThreadSafe
+ */
+public interface PermissionAdminMBean {
+ /**
+ * Permission Admin MBean object name.
+ */
+ String OBJECTNAME = JmxConstants.OSGI_CORE
+ + ":service=permissionadmin,version=1.2";
+
+ /**
+ * Answer the bundle locations that have permissions assigned to them
+ *
+ * @return the bundle locations
+ * @throws IOException if the operation fails
+ */
+ String[] listLocations() throws IOException;
+
+ /**
+ * Answer the list of encoded permissions of the bundle specified by the
+ * bundle location
+ *
+ * @param location location identifying the bundle
+ * @return the array of String encoded permissions
+ * @throws IOException if the operation fails
+ */
+ String[] getPermissions(String location) throws IOException;
+
+ /**
+ * Set the default permissions assigned to bundle locations that have no
+ * assigned permissions
+ *
+ * @param encodedPermissions the string encoded permissions
+ * @throws IOException if the operation fails
+ */
+ void setDefaultPermissions(String[] encodedPermissions) throws IOException;
+
+ /**
+ * Answer the list of encoded permissions representing the default
+ * permissions assigned to bundle locations that have no assigned
+ * permissions
+ *
+ * @return the array of String encoded permissions
+ * @throws IOException if the operation fails
+ */
+ String[] listDefaultPermissions() throws IOException;
+
+ /**
+ * Set the permissions on the bundle specified by the bundle location
+ *
+ * @param location the location of the bundle
+ * @param encodedPermissions the string encoded permissions to set
+ * @throws IOException if the operation fails
+ */
+ void setPermissions(String location, String[] encodedPermissions)
+ throws IOException;
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/provisioning/packageinfo osgi-compendium-4.3.0/src/org/osgi/jmx/service/provisioning/packageinfo
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/provisioning/packageinfo 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/provisioning/packageinfo 2010-06-15 15:44:04.000000000 +0000
@@ -0,0 +1 @@
+version 1.2
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/provisioning/package-info.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/provisioning/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/provisioning/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/provisioning/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * OSGi JMX Initial Provisioning Package Version 1.2.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.provisioning; version="[1.2,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.provisioning; version="[1.2,1.3)"}
+ *
+ * @version $Id: 18a6210be42bca78d7026df451d9508125543000 $
+ */
+
+package org.osgi.jmx.service.provisioning;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/provisioning/ProvisioningServiceMBean.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/provisioning/ProvisioningServiceMBean.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/provisioning/ProvisioningServiceMBean.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/provisioning/ProvisioningServiceMBean.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.service.provisioning;
+
+import java.io.IOException;
+
+import javax.management.openmbean.TabularData;
+
+import org.osgi.jmx.JmxConstants;
+
+/**
+ * This MBean represents the management interface to the OSGi Initial
+ * Provisioning Service
+ *
+ * @version $Id: 16831adbe379e039330a1fd63cf9ce84370dbcb5 $
+ * @ThreadSafe
+ */
+public interface ProvisioningServiceMBean {
+ /**
+ * Provisioning MBean object name.
+ */
+ String OBJECTNAME = JmxConstants.OSGI_COMPENDIUM
+ + ":service=provisioning,version=1.2";
+
+ /**
+ * Processes the {@code ZipInputStream} contents of the provided
+ * zipURL and extracts information to add to the Provisioning Information
+ * dictionary, as well as, install/update and start bundles. This method
+ * causes the {@code PROVISIONING_UPDATE_COUNT} to be incremented.
+ *
+ * @param zipURL the String form of the URL that will be resolved into a
+ * {@code ZipInputStream} which will be used to add key/value
+ * pairs to the Provisioning Information dictionary and install and
+ * start bundles. If a {@code ZipEntry} does not have an
+ * {@code Extra} field that corresponds to one of the four
+ * defined MIME types ({@code MIME_STRING},
+ * {@code MIME_BYTE_ARRAY},{@code MIME_BUNDLE}, and
+ * {@code MIME_BUNDLE_URL}) in will be silently ignored.
+ * @throws IOException if an error occurs while processing the
+ * ZipInputStream of the URL. No additions will be made to the
+ * Provisioning Information dictionary and no bundles must be
+ * started or installed.
+ */
+ public void addInformationFromZip(String zipURL) throws IOException;
+
+ /**
+ * Adds the key/value pairs contained in {@code info} to the
+ * Provisioning Information dictionary. This method causes the
+ * {@code PROVISIONING_UPDATE_COUNT} to be incremented.
+ *
+ * @see JmxConstants#PROPERTIES_TYPE JmxConstants.PROPERTIES_TYPE for
+ * details of the Tabular Data
+ *
+ * @param info the set of Provisioning Information key/value pairs to add to
+ * the Provisioning Information dictionary. Any keys are values that
+ * are of an invalid type will be silently ignored.
+ * @throws IOException if the operation fails
+ */
+ public void addInformation(TabularData info) throws IOException;
+
+ /**
+ * Returns a table representing the Provisioning Information Dictionary.
+ *
+ * @see JmxConstants#PROPERTIES_TYPE JmxConstants.PROPERTIES_TYPE for
+ * details of the Tabular Data
+ *
+ * @throws IOException if the operation fails
+ * @return The table representing the manager dictionary.
+ */
+ public TabularData listInformation() throws IOException;
+
+ /**
+ * Replaces the Provisioning Information dictionary with the entries of the
+ * supplied table. This method causes the
+ * {@code PROVISIONING_UPDATE_COUNT} to be incremented.
+ *
+ * @see JmxConstants#PROPERTIES_TYPE JmxConstants.PROPERTIES_TYPE for
+ * details of the Tabular Data
+ *
+ * @param info the new set of Provisioning Information key/value pairs. Any
+ * keys are values that are of an invalid type will be silently
+ * ignored.
+ * @throws IOException if the operation fails
+ */
+ public void setInformation(TabularData info) throws IOException;
+
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/useradmin/packageinfo osgi-compendium-4.3.0/src/org/osgi/jmx/service/useradmin/packageinfo
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/useradmin/packageinfo 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/useradmin/packageinfo 2010-06-15 15:44:04.000000000 +0000
@@ -0,0 +1 @@
+version 1.1.1
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/useradmin/package-info.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/useradmin/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/useradmin/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/useradmin/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * OSGi JMX User Admin Package Version 1.1.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.useradmin; version="[1.1,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.jmx.service.useradmin; version="[1.1,1.2)"}
+ *
+ * @version $Id: 03e6509d592d2f353f6c5fe476c2c01dac7696e2 $
+ */
+
+package org.osgi.jmx.service.useradmin;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/service/useradmin/UserAdminMBean.java osgi-compendium-4.3.0/src/org/osgi/jmx/service/useradmin/UserAdminMBean.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/service/useradmin/UserAdminMBean.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/service/useradmin/UserAdminMBean.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,530 @@
+/*
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.service.useradmin;
+
+import java.io.IOException;
+
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.SimpleType;
+import javax.management.openmbean.TabularData;
+
+import org.osgi.jmx.Item;
+import org.osgi.jmx.JmxConstants;
+
+/**
+ * This MBean provides the management interface to the OSGi User Manager Service
+ *
+ * @version $Id: 7846fdb7099c7dde750cb9cfed2e7b8e581924b7 $
+ * @ThreadSafe
+ */
+public interface UserAdminMBean {
+ /**
+ * User Admin MBean object name.
+ */
+ String OBJECTNAME = JmxConstants.OSGI_COMPENDIUM
+ + ":service=useradmin,version=1.1";
+
+ /**
+ * The key NAME, used in {@link #NAME_ITEM}.
+ */
+ String NAME = "Name";
+
+ /**
+ * The item for the user name for an authorization object. The key is
+ * {@link #NAME} and the type is {@link SimpleType#STRING}.
+ */
+ Item NAME_ITEM = new Item(
+ NAME,
+ "The user name for this authorization object",
+ SimpleType.STRING);
+
+ /**
+ * The key ROLES, used in {@link #ROLES_ITEM}.
+ */
+ String ROLES = "Roles";
+
+ /**
+ * The item containing the roles for this authorization object. The key is
+ * {@link #ROLES}. and the type is {@link JmxConstants#STRING_ARRAY_TYPE}.
+ */
+ Item ROLES_ITEM = new Item(
+ ROLES,
+ "The names of the roles encapsulated by this auth object",
+ JmxConstants.STRING_ARRAY_TYPE);
+
+ /**
+ * The Composite Type for an Authorization object. It consists of the
+ * {@link #NAME_ITEM} and {@link #TYPE_ITEM} items.
+ */
+ CompositeType AUTORIZATION_TYPE = Item
+ .compositeType(
+ "AUTHORIZATION",
+ "An authorization object defines which roles has a user got",
+ NAME_ITEM,
+ ROLES_ITEM);
+ /**
+ * The Role TYPE key, used in {@link #TYPE_ITEM}.
+ */
+ String TYPE = "Type";
+
+ /**
+ * The item containing the type of the roles encapsulated by this
+ * authorization object. The key is {@link #TYPE} and the type is
+ * {@link SimpleType#INTEGER}.
+ */
+ Item TYPE_ITEM = new Item(
+ TYPE,
+ "An integer representing type of the role: {0=Role,1=user,2=group}",
+ SimpleType.INTEGER);
+
+ /**
+ * The PROPERTIES key, used in {@link #PROPERTIES_ITEM}.
+ */
+ String PROPERTIES = "Properties";
+
+ /**
+ * The item containing the properties of a Role. The key is
+ * {@link #PROPERTIES} and the type is {@link JmxConstants#PROPERTIES_TYPE}.
+ */
+ Item PROPERTIES_ITEM = new Item(
+ PROPERTIES,
+ "A properties as defined by org.osgi.service.useradmin.Role",
+ JmxConstants.PROPERTIES_TYPE);
+ /**
+ * The Composite Type for a Role. It contains the following items:
+ *
* ApplicationAdminPermission may be granted for different actions:
- *
- * If the
- * The
* This method is used by {@link ApplicationAdminPermission#implies(java.security.Permission)} method
- * to match target
- * This method will call the
@@ -197,7 +197,7 @@
* @param locale
* the locale string, it may be null, the value null means the
* default locale. If the provided locale is the empty String
- * (
* The following steps are made:
*
- * The
- * The method is synchronous, it return only when the application instance was
- * successfully started or the attempt to start it failed.
+ * The method is synchronous, it return only when the application instance
+ * was successfully started or the attempt to start it failed.
*
- * This method never returns
- * This method must not return
- * The
- * The created schedules have a unique identifier within the scope of this
- *
+ * The created schedules have a unique identifier within the scope of this
+ * {@code ApplicationDescriptor}. This identifier can be specified in the
+ * {@code scheduleId} argument. If this argument is {@code null}, the
+ * identifier is automatically generated.
+ *
+ * @param scheduleId the identifier of the created schedule. It can be
+ * {@code null}, in this case the identifier is automatically
+ * generated.
+ * @param arguments the startup arguments for the scheduled application, may
+ * be null
+ * @param topic specifies the topic of the triggering event, it may contain
+ * a trailing asterisk as wildcard, the empty string is treated as
+ * "*", must not be null
+ * @param eventFilter specifies and LDAP filter to filter on the properties
+ * of the triggering event, may be null
+ * @param recurring if the recurring parameter is false then the application
+ * will be launched only once, when the event firstly occurs. If the
+ * parameter is true then scheduling will take place for every event
+ * occurrence; i.e. it is a recurring schedule
*
* @return the registered scheduled application service
*
- * @throws NullPointerException
- * if the topic is
* The instance identifier should follow the following scheme:
* <application descriptor PID>.<index>
* where <application descriptor PID> is the PID of the
- * corresponding
* The default implementation throws an
- *
- * At the end the
* When this method is completed the application instance has already made
* its operations for safe stopping, the ApplicationHandle has been
@@ -219,7 +219,7 @@
*
* @throws SecurityException
* if the caller doesn't have "lifecycle"
- * Application Package Version 1.1.
- Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
-
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.application; version="[1.1,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.application; version="[1.1,1.2)"}
+ *
+ * @version $Id: 49d2e45d560437599c4e283251eb4b15b0961ae5 $
+ */
+
+package org.osgi.service.application;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/application/ScheduledApplication.java osgi-compendium-4.3.0/src/org/osgi/service/application/ScheduledApplication.java
--- osgi-compendium-4.2.0/src/org/osgi/service/application/ScheduledApplication.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/application/ScheduledApplication.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -24,15 +24,15 @@
* specified event is fired a new instance must be launched. Note that launching
* operation may fail because e.g. the application is locked.
*
- * Each
- *
- *
* To receive Blueprint Events, a bundle must register a Blueprint Listener
@@ -37,7 +37,7 @@
*
* @see BlueprintEvent
* @ThreadSafe
- * @version $Revision: 7564 $
+ * @version $Id: 4709d79a098b4feccb3b47995d7f92a326cd3cac $
*/
public interface BlueprintListener {
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/ComponentDefinitionException.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/ComponentDefinitionException.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/ComponentDefinitionException.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/ComponentDefinitionException.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -21,7 +21,7 @@
* This exception is thrown when a configuration-related error occurs during
* creation of a Blueprint Container.
*
- * @version $Revision: 7556 $
+ * @version $Id: 43b88aced023a8bb5f8c4d4ffd172102acb60252 $
*/
public class ComponentDefinitionException extends RuntimeException {
private static final long serialVersionUID = 1L;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/Converter.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/Converter.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/Converter.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/Converter.java 2011-09-08 14:18:36.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2011). 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.
@@ -19,7 +19,7 @@
* Type converter to convert an object to a target type.
*
* @ThreadSafe
- * @version $Revision: 7564 $
+ * @version $Id: 7c3530bfc70e2e7bafce5a7216f7f50dd3f9a3b0 $
*/
public interface Converter {
@@ -27,25 +27,25 @@
* Return if this converter is able to convert the specified object to the
* specified type.
*
- * @param sourceObject The source object
- *
* where <event-type> can have the values
@@ -51,7 +51,7 @@
*
*
* @Immutable
- * @version $Revision: 7564 $
+ * @version $Id: dc8b6c7bbad6fd3f3e0df92551002c274040bcbc $
*/
public class EventConstants {
private EventConstants() {
@@ -60,68 +60,68 @@
/**
* The type of the event that has been issued. This property is of type
- * Blueprint Container Package Version 1.0. Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
- This package defines the primary interface to a Blueprint Container,
-
- This package also declares the supporting exception types, listener, and constants for working with a Blueprint
- Container.
-
+ * This package defines the primary interface to a Blueprint Container,
+ * {@code BlueprintContainer}. An instance of this type is available
+ * inside a Blueprint Container as an implicitly defined component with the name
+ * "blueprintContainer".
+ *
+ *
+ * This package also declares the supporting exception types, listener, and constants
+ * for working with a Blueprint Container.
+ *
+ *
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.blueprint.container; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.blueprint.container; version="[1.0,1.1)"}
+ *
+ * @version $Id: efcc971bdfbafc3c7a97ecb39967c10f188b1360 $
+ */
+
+package org.osgi.service.blueprint.container;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/ReifiedType.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/ReifiedType.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/ReifiedType.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/ReifiedType.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -20,9 +20,9 @@
*
*
* Java 5 and later support generic types. These types consist of a raw class
- * with type parameters. This class models such a
* In Java 1.4, a class has by definition no type parameters. This class
* implementation provides the Reified Type for Java 1.4 by making the raw class
- * the Java 1.4 class and using a Reified Type based on the
* A Blueprint extender implementations can subclass this class and provide
* access to the generic type parameter graph for conversion. Such a subclass
- * must reify the different Java 5
- * This implementation returns a Reified Type that has
- * This implementation returns
- * This is specified by the
* When a factory method and factory component have been specified for the
* bean, this method returns the factory component on which to invoke the
* factory method for the bean. When no factory component has been specified
- * this method will return
- * This is specified by the
* This Metadata type is used for keys in Maps because they cannot be
- * Blueprint Reflection Package Version 1.0.
- Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
- This package provides a reflection-based view of the configuration information for a
- Blueprint Container.
-
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.blueprint.reflect; version="[1.0,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.blueprint.reflect; version="[1.0,1.1)"}
+ *
+ * @version $Id: 1bfec302a8c43d8f67ce09ed851caa1e30a05243 $
+ */
+
+package org.osgi.service.blueprint.reflect;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/PropsMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/PropsMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/PropsMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/PropsMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -18,17 +18,17 @@
import java.util.List;
/**
- * Metadata for a
* The {@link MapEntry} objects of properties are defined with keys and values
- * of type
- * This is specified by the
- * This is specified by the
- * This is specified by the
- * This is specified by the
* The main purpose of this interface is to store bundle configuration data
- * persistently. This information is represented in
* There are two principally different ways to manage configurations. First
@@ -36,8 +36,8 @@
*
*
* Next, there is the concept of a factory where the Configuration Admin service
- * will maintain 0 or more
* The first concept is intended for configuration data about "things/services"
@@ -48,205 +48,202 @@
*
* Bundles that require configuration should register a Managed Service or a
* Managed Service Factory in the service registry. A registration property
- * named
* When the ConfigurationAdmin detects the registration of a Managed Service, it
* checks its persistent storage for a configuration object whose
- *
* When the Configuration Admin service detects a Managed Service Factory
* registration, it checks its storage for configuration objects whose
- *
* In general, bundles having permission to use the Configuration Admin service
* can only access and modify their own configuration information. Accessing or
* modifying the configuration of another bundle requires
- *
- *
* The method descriptions of this class refer to a concept of "the calling
* bundle". This is a loose way of referring to the bundle which obtained the
* Configuration Admin service from the service registry. Implementations of
- *
- * It is not required that the
- * The
- * It is not required that the
- * The
- * If a
- * Else, return a new
- * Otherwise, if the location of the existing
- * Only
- * Normally only
* The syntax of the filter string is as defined in the
* {@link org.osgi.framework.Filter} class. The filter can test any
* configuration properties including the following:
*
- *
- * Security Considerations.
- * This
- * The value of
- * This
- * The value of
- * A
* The properties handled in this configuration have case insensitive
- *
* A configuration can be bound to a bundle location (
- *
- * If a configuration's location is
- * The same
* If called just after the configuration is created and before update has
- * been called, this method returns
* If the corresponding Managed Service/Managed Service Factory is
@@ -108,12 +109,12 @@
*
*
* Also initiates an asynchronous call to all
- *
* Also initiates an asynchronous call to all
- *
* This is the only way for a bundle that uses a Configuration Plugin
* service to initiate a callback. For example, when that bundle detects a
* change that requires an update of the Managed Service or Managed Service
- * Factory via its
- *
- *
* Security Considerations. Bundles wishing to monitor configuration events will
- * require
- * Two
- * Always returns present
- * A bundle registers a
- * The
- * By convention, plugins with
@@ -66,15 +66,15 @@
* defined.
*
*
- * A plugin may optionally specify a
* This method should not modify the properties unless the
- *
- * If this method throws any
* Each of these service instances is represented, in the persistent
* storage of the Configuration Admin service, by a factory
- *
@@ -92,7 +92,7 @@
*
*
*
- * @version $Revision: 5673 $
+ * @version $Id: 107d3da81f09a25309cc8052073057afdd2d36e3 $
*/
public interface ManagedServiceFactory {
/**
@@ -106,19 +106,19 @@
* Create a new instance, or update the configuration of an existing
* instance.
*
- * If the PID of the
* If the factory instance is registered with the Framework, then the
- * configuration
- * If this method throws any
@@ -128,7 +128,7 @@
*
*
* The Configuration Admin service must call this method asynchronously.
- * This implies that implementors of the
- * If this method throws any
* The Configuration Admin service must call this method asynchronously.
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/ManagedService.java osgi-compendium-4.3.0/src/org/osgi/service/cm/ManagedService.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/ManagedService.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/ManagedService.java 2011-07-21 13:53:52.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2010). 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.
@@ -24,29 +24,29 @@
*
* A Managed Service is a service that needs configuration data. Such an object
* should be registered with the Framework registry with the
- *
- * If the Configuration Admin service has a
- * If it has no such
- * Else, every time that either of the
@@ -84,9 +84,9 @@
* public synchronized void updated(
* Dictionary configuration ) {
* if ( configuration ==
- *
- * When the implementation of
- * If this method throws any other
* The Configuration Admin service must call this method asynchronously
@@ -128,9 +128,9 @@
* registration when they execute the registration in a synchronized method.
*
* @param properties A copy of the Configuration properties, or
- * Configuration Admin Package Version 1.3.
- Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
-
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.cm; version="[1.3,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.cm; version="[1.3,1.4)"}
+ *
+ * @version $Id: 10168cbf1555ba91c73aff69ff27fed93f5f7e69 $
+ */
+
+package org.osgi.service.cm;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Activate.java osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Activate.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Activate.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Activate.java 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) OSGi Alliance (2011). 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.service.component.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Identify the annotated method as the {@code activate} method of a Service
+ * Component.
+ *
+ *
+ * The annotated method is the activate method of the Component.
+ *
+ *
+ * This annotation is not processed at runtime by a Service Component Runtime
+ * implementation. It must be processed by tools and used to add a Component
+ * Description to the bundle.
+ *
+ * @see "The activate attribute of the component element of a Component Description."
+ * @version $Id: b61a8aecb6d8df3d60a2e6b05e6021801b580331 $
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target(ElementType.METHOD)
+public @interface Activate {
+ // marker annotation
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Component.java osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Component.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Component.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Component.java 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) OSGi Alliance (2011). 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.service.component.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Identify the annotated class as a Service Component.
+ *
+ *
+ * The annotated class is the implementation class of the Component.
+ *
+ *
+ * This annotation is not processed at runtime by a Service Component Runtime
+ * implementation. It must be processed by tools and used to add a Component
+ * Description to the bundle.
+ *
+ * @see "The component element of a Component Description."
+ * @version $Id: 6d6332dbb471a2bc582bf8fc9a9b7f3efd02bfc2 $
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target(ElementType.TYPE)
+public @interface Component {
+ /**
+ * The name of this Component.
+ *
+ *
+ * If not specified, the name of this Component is the fully qualified type
+ * name of the class being annotated.
+ *
+ * @see "The name attribute of the component element of a Component Description."
+ */
+ String name() default "";
+
+ /**
+ * The types under which to register this Component as a service.
+ *
+ *
+ * If no service should be registered, the empty value
+ *
+ * If not specified, the service types for this Component are all the
+ * directly implemented interfaces of the class being annotated.
+ *
+ * @see "The service element of a Component Description."
+ */
+ Class< ? >[] service() default {};
+
+ /**
+ * The factory identifier of this Component. Specifying a factory identifier
+ * makes this Component a Factory Component.
+ *
+ *
+ * If not specified, the default is that this Component is not a Factory
+ * Component.
+ *
+ * @see "The factory attribute of the component element of a Component Description."
+ */
+ String factory() default "";
+
+ /**
+ * Declares whether this Component uses the OSGi ServiceFactory concept and
+ * each bundle using this Component's service will receive a different
+ * component instance.
+ *
+ *
+ * If {@code true}, this Component uses the OSGi ServiceFactory concept. If
+ * {@code false} or not specified, this Component does not use the OSGi
+ * ServiceFactory concept.
+ *
+ * @see "The servicefactory attribute of the service element of a Component Description."
+ */
+ boolean servicefactory() default false;
+
+ /**
+ * Declares whether this Component is enabled when the bundle containing it
+ * is started.
+ *
+ *
+ * If {@code true}, this Component is enabled. If {@code false} or not
+ * specified, this Component is disabled.
+ *
+ * @see "The enabled attribute of the component element of a Component Description."
+ */
+ boolean enabled() default true;
+
+ /**
+ * Declares whether this Component must be immediately activated upon
+ * becoming satisfied or whether activation should be delayed.
+ *
+ *
+ * If {@code true}, this Component must be immediately activated upon
+ * becoming satisfied. If {@code false}, activation of this Component is
+ * delayed. If this property is specified, its value must be {@code false}
+ * if the {@link #factory} property is also specified or must be
+ * {@code true} if the {@link #service} property is specified with an empty
+ * value.
+ *
+ *
+ * If not specified, the default is {@code false} if the {@link #factory}
+ * property is specified or the {@link #service} property is not specified
+ * or specified with a non-empty value and {@code true} otherwise.
+ *
+ * @see "The immediate attribute of the component element of a Component Description."
+ */
+ boolean immediate() default false;
+
+ /**
+ * The configuration policy of this Component.
+ *
+ *
+ * Controls whether component configurations must be satisfied depending on
+ * the presence of a corresponding Configuration object in the OSGi
+ * Configuration Admin service. A corresponding configuration is a
+ * Configuration object where the PID equals the name of the component.
+ *
+ *
+ * If not specified, the {@link ConfigurationPolicy#OPTIONAL OPTIONAL}
+ * configuration policy is used.
+ *
+ * @see "The configuration-policy attribute of the component element of a Component Description."
+ */
+ ConfigurationPolicy configurationPolicy() default ConfigurationPolicy.OPTIONAL;
+
+ /**
+ * Properties for this Component.
+ *
+ *
+ * Each property string is specified as {@code "key=value"}. The type of the
+ * property value can be specified in the key as {@code key:type=value}. The
+ * type must be one of the property types supported by the type attribute of
+ * the property element of a Component Description.
+ *
+ *
+ * To specify a property with multiple values, use multiple key, value
+ * pairs. For example, {@code "foo=bar", "foo=baz"}.
+ *
+ * @see "The property element of a Component Description."
+ */
+ String[] property() default {};
+
+ /**
+ * Property entries for this Component.
+ *
+ *
+ * Specifies the name of an entry in the bundle whose contents conform to a
+ * standard Java Properties File. The entry is read and processed to obtain
+ * the properties and their values.
+ *
+ * @see "The properties element of a Component Description."
+ */
+ String[] properties() default {};
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/ConfigurationPolicy.java osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/ConfigurationPolicy.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/ConfigurationPolicy.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/ConfigurationPolicy.java 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) OSGi Alliance (2011). 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.service.component.annotations;
+
+/**
+ * Configuration Policy for the {@link Component} annotation.
+ *
+ *
+ * Controls whether component configurations must be satisfied depending on the
+ * presence of a corresponding Configuration object in the OSGi Configuration
+ * Admin service. A corresponding configuration is a Configuration object where
+ * the PID is the name of the component.
+ *
+ * @version $Id: 333d73c609620e0474ec143b6a9b9cba7ce271e7 $
+ */
+public enum ConfigurationPolicy {
+ /**
+ * Use the corresponding Configuration object if present but allow the
+ * component to be satisfied even if the corresponding Configuration object
+ * is not present.
+ */
+ OPTIONAL,
+ /**
+ * There must be a corresponding Configuration object for the component
+ * configuration to become satisfied.
+ */
+ REQUIRE,
+ /**
+ * Always allow the component configuration to be satisfied and do not use
+ * the corresponding Configuration object even if it is present.
+ */
+ IGNORE;
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Deactivate.java osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Deactivate.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Deactivate.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Deactivate.java 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) OSGi Alliance (2011). 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.service.component.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Identify the annotated method as the {@code deactivate} method of a Service
+ * Component.
+ *
+ *
+ * The annotated method is the deactivate method of the Component.
+ *
+ *
+ * This annotation is not processed at runtime by a Service Component Runtime
+ * implementation. It must be processed by tools and used to add a Component
+ * Description to the bundle.
+ *
+ * @see "The deactivate attribute of the component element of a Component Description."
+ * @version $Id: 397f31967ac41b758dd65190962f620bf9a86bdc $
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target(ElementType.METHOD)
+public @interface Deactivate {
+ // marker annotation
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Modified.java osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Modified.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Modified.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Modified.java 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) OSGi Alliance (2011). 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.service.component.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Identify the annotated method as the {@code modified} method of a Service
+ * Component.
+ *
+ *
+ * The annotated method is the modified method of the Component.
+ *
+ *
+ * This annotation is not processed at runtime by a Service Component Runtime
+ * implementation. It must be processed by tools and used to add a Component
+ * Description to the bundle.
+ *
+ * @see "The modified attribute of the component element of a Component Description."
+ * @version $Id: 2a93eb9a641883494d39ddb6ecdf42779d787f7a $
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target(ElementType.METHOD)
+public @interface Modified {
+ // marker annotation
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/packageinfo osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/packageinfo
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/packageinfo 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/packageinfo 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1 @@
+version 1.0
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/package-info.java osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/package-info.java 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) OSGi Alliance (2011). 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.
+ */
+
+/**
+ * Service Component Annotations Package Version 1.0.
+ *
+ *
+ * This package is not used at runtime. Annotated classes are processed by
+ * tools to generate Component Descriptions which are used at runtime.
+ *
+ * @version $Id: 2d28d03f84156d782d6a07cf6c6b814744a6d087 $
+ */
+
+package org.osgi.service.component.annotations;
+
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/ReferenceCardinality.java osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/ReferenceCardinality.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/ReferenceCardinality.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/ReferenceCardinality.java 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) OSGi Alliance (2011). 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.service.component.annotations;
+
+/**
+ * Cardinality for the {@link Reference} annotation.
+ *
+ *
+ * Specifies if the reference is optional and if the component implementation
+ * support a single bound service or multiple bound services.
+ *
+ * @version $Id: a86f2f25880cbd49111f9d8ab8279cbd5bc6e7c1 $
+ */
+public enum ReferenceCardinality {
+ /**
+ * The reference is optional and unary. That is, the reference has a
+ * cardinality of {@code 0..1}.
+ */
+ OPTIONAL, // 0..1
+ /**
+ * The reference is mandatory and unary. That is, the reference has a
+ * cardinality of {@code 1..1}.
+ */
+ MANDATORY, // 1..1
+ /**
+ * The reference is optional and multiple. That is, the reference has a
+ * cardinality of {@code 0..n}.
+ */
+ MULTIPLE, // 0..n
+ /**
+ * The reference is mandatory and multiple. That is, the reference has a
+ * cardinality of {@code 1..n}.
+ */
+ AT_LEAST_ONE; // 1..n
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Reference.java osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Reference.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/Reference.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/Reference.java 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) OSGi Alliance (2011). 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.service.component.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Identify the annotated method as a {@code bind} method of a Service
+ * Component.
+ *
+ *
+ * The annotated method is a bind method of the Component.
+ *
+ *
+ * This annotation is not processed at runtime by a Service Component Runtime
+ * implementation. It must be processed by tools and used to add a Component
+ * Description to the bundle.
+ *
+ * @see "The reference element of a Component Description."
+ * @version $Id: 4fffce54b3954d421d7f2b98962ff8e1ac7f076a $
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target(ElementType.METHOD)
+public @interface Reference {
+ /**
+ * The name of this reference.
+ *
+ *
+ * If not specified, the name of this reference is based upon the name of
+ * the method being annotated. If the method name begins with {@code set} or
+ * {@code add}, that is removed.
+ *
+ * @see "The name attribute of the reference element of a Component Description."
+ */
+ String name() default "";
+
+ /**
+ * The type of the service to bind to this reference.
+ *
+ *
+ * If not specified, the type of the service to bind is based upon the type
+ * of the first argument of the method being annotated.
+ *
+ * @see "The interface attribute of the reference element of a Component Description."
+ */
+ Class< ? > service() default Object.class;
+
+ /**
+ * The cardinality of the reference.
+ *
+ *
+ * If not specified, the reference has a
+ * {@link ReferenceCardinality#MANDATORY 1..1} cardinality.
+ *
+ * @see "The cardinality attribute of the reference element of a Component Description."
+ */
+ ReferenceCardinality cardinality() default ReferenceCardinality.MANDATORY;
+
+ /**
+ * The policy for the reference.
+ *
+ *
+ * If not specified, the {@link ReferencePolicy#STATIC STATIC} reference
+ * policy is used.
+ *
+ * @see "The policy attribute of the reference element of a Component Description."
+ */
+ ReferencePolicy policy() default ReferencePolicy.STATIC;
+
+ /**
+ * The target filter for the reference.
+ *
+ * @see "The target attribute of the reference element of a Component Description."
+ */
+ String target() default "";
+
+ /**
+ * The name of the unbind method which pairs with the annotated bind method.
+ *
+ *
+ * To declare no unbind method, the value {@code "-"} must be used.
+ *
+ *
+ * If not specified, the name of the unbind method is derived from the name
+ * of the annotated bind method. If the annotated method name begins with
+ * {@code set}, that is replaced with {@code unset} to derive the unbind
+ * method name. If the annotated method name begins with {@code add}, that
+ * is replaced with {@code remove} to derive the unbind method name.
+ * Otherwise, {@code un} is prefixed to the annotated method name to derive
+ * the unbind method name.
+ *
+ * @see "The unbind attribute of the reference element of a Component Description."
+ */
+ String unbind() default "";
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/ReferencePolicy.java osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/ReferencePolicy.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/annotations/ReferencePolicy.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/annotations/ReferencePolicy.java 2011-09-08 14:21:52.000000000 +0000
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) OSGi Alliance (2011). 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.service.component.annotations;
+
+/**
+ * Policy for the {@link Reference} annotation.
+ *
+ * @version $Id: 698f862af7645e7a5baf98070cfbf71223041241 $
+ */
+public enum ReferencePolicy {
+ /**
+ * The static policy is the most simple policy and is the default policy. A
+ * component instance never sees any of the dynamics. Component
+ * configurations are deactivated before any bound service for a reference
+ * having a static policy becomes unavailable. If a target service is
+ * available to replace the bound service which became unavailable, the
+ * component configuration must be reactivated and bound to the replacement
+ * service.
+ */
+ STATIC,
+ /**
+ * The dynamic policy is slightly more complex since the component
+ * implementation must properly handle changes in the set of bound services.
+ * With the dynamic policy, SCR can change the set of bound services without
+ * deactivating a component configuration. If the component uses the event
+ * strategy to access services, then the component instance will be notified
+ * of changes in the set of bound services by calls to the bind and unbind
+ * methods.
+ */
+ DYNAMIC;
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentConstants.java osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentConstants.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentConstants.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentConstants.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -19,30 +19,31 @@
/**
* Defines standard names for Service Component constants.
*
- * @version $Revision: 6454 $
+ * @noimplement
+ * @version $Id: b2e509f16a23384cc6c90697b0fd8a70c8f9eae7 $
*/
public interface ComponentConstants {
/**
* Manifest header specifying the XML documents within a bundle that contain
* the bundle's Service Component descriptions.
*
- * The attribute value may be retrieved from the
* The value of this property is assigned by the Service Component Runtime
@@ -55,15 +56,15 @@
/**
* A service registration property for a Component Factory that contains the
- * value of the
* A component instance may have a deactivate method. If a component instance
* has a suitable and accessible deactivate method, this method will be called
* when the component configuration is deactivated. If the deactivate method
- * takes a
- * If the cardinality of the reference is
- * This method will return
- * This method will return Service Component Package Version 1.1.
- Bundles wishing to use this package must list the package
-in the Import-Package header of the bundle's manifest.
-For example:
-
+ * Bundles wishing to use this package must list the package in the
+ * Import-Package header of the bundle's manifest. This package has two types of
+ * users: the consumers that use the API in this package and the providers that
+ * implement the API in this package.
+ *
+ *
+ * Example import for consumers using the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.component; version="[1.1,2.0)"}
+ *
+ * Example import for providers implementing the API in this package:
+ *
+ * {@code Import-Package: org.osgi.service.component; version="[1.1,1.2)"}
+ *
+ * @version $Id: b9d67bb6dc2a108f89d826771b56d7b3a67b3e9b $
+ */
+
+package org.osgi.service.component;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/coordinator/CoordinationException.java osgi-compendium-4.3.0/src/org/osgi/service/coordinator/CoordinationException.java
--- osgi-compendium-4.2.0/src/org/osgi/service/coordinator/CoordinationException.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/coordinator/CoordinationException.java 2011-05-16 12:29:18.000000000 +0000
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) OSGi Alliance (2010, 2011). 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.service.coordinator;
+
+/**
+ * Unchecked exception which may be thrown by a Coordinator implementation.
+ *
+ * @version $Id: 9813b5b25a0572e81529626cb162f88bd005c707 $
+ */
+public class CoordinationException extends RuntimeException {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Unknown reason for this exception.
+ */
+ public final static int UNKNOWN = 0;
+
+ /**
+ * Registering a Participant with a Coordination would have resulted in a
+ * deadlock.
+ */
+ public final static int DEADLOCK_DETECTED = 1;
+
+ /**
+ * The Coordination has terminated as a failure with
+ * {@link Coordination#fail(Throwable)}. When this exception type is used,
+ * the {@link #getCause()} method must return a non-null value.
+ */
+ public final static int FAILED = 2;
+
+ /**
+ * The Coordination has partially ended.
+ */
+ public final static int PARTIALLY_ENDED = 3;
+
+ /**
+ * The Coordination has already terminated normally.
+ */
+ public final static int ALREADY_ENDED = 4;
+
+ /**
+ * The Coordination was already on a thread's thread local Coordination
+ * stack.
+ */
+ public final static int ALREADY_PUSHED = 5;
+
+ /**
+ * The current thread was interrupted while waiting to register a
+ * Participant with a Coordination.
+ */
+ public final static int LOCK_INTERRUPTED = 6;
+
+ /**
+ * The Coordination cannot be ended by the calling thread since the
+ * Coordination is on the thread local Coordination stack of another thread.
+ */
+ public final static int WRONG_THREAD = 7;
+
+ private final String name;
+ private final int type;
+ private final long id;
+
+ /**
+ * Create a new Coordination Exception with a cause.
+ *
+ * @param message The detail message for this exception.
+ * @param coordination The Coordination associated with this exception.
+ * @param cause The cause associated with this exception.
+ * @param type The type of this exception.
+ */
+ public CoordinationException(String message, Coordination coordination,
+ int type, Throwable cause) {
+ super(message, cause);
+ this.type = type;
+ if (coordination == null) {
+ this.id = -1L;
+ this.name = "<>";
+ }
+ else {
+ this.id = coordination.getId();
+ this.name = coordination.getName();
+ }
+ if ((type == FAILED) && (cause == null)) {
+ throw new IllegalArgumentException(
+ "A cause must be specified for type FAILED");
+ }
+ }
+
+ /**
+ * Create a new Coordination Exception.
+ *
+ * @param message The detail message for this exception.
+ * @param coordination The Coordination associated with this exception.
+ * @param type The type of this exception.
+ */
+ public CoordinationException(String message, Coordination coordination,
+ int type) {
+ super(message);
+ this.type = type;
+ if (coordination == null) {
+ this.id = -1L;
+ this.name = "<>";
+ }
+ else {
+ this.id = coordination.getId();
+ this.name = coordination.getName();
+ }
+ if (type == FAILED) {
+ throw new IllegalArgumentException(
+ "A cause must be specified for type FAILED");
+ }
+ }
+
+ /**
+ * Returns the name of the {@link Coordination} associated with this
+ * exception.
+ *
+ * @return The name of the Coordination associated with this exception or
+ * {@code "<>"} if no Coordination is associated with this
+ * exception.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the type for this exception.
+ *
+ * @return The type of this exception.
+ */
+ public int getType() {
+ return type;
+ }
+
+ /**
+ * Returns the id of the {@link Coordination} associated with this
+ * exception.
+ *
+ * @return The id of the Coordination associated with this exception or
+ * {@code -1} if no Coordination is associated with this exception.
+ */
+
+ public long getId() {
+ return id;
+ }
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/coordinator/Coordination.java osgi-compendium-4.3.0/src/org/osgi/service/coordinator/Coordination.java
--- osgi-compendium-4.2.0/src/org/osgi/service/coordinator/Coordination.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/coordinator/Coordination.java 2011-08-18 14:13:16.000000000 +0000
@@ -0,0 +1,398 @@
+/*
+ * Copyright (c) OSGi Alliance (2010, 2011). 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.service.coordinator;
+
+import java.util.List;
+import java.util.Map;
+
+import org.osgi.framework.Bundle;
+
+/**
+ * A Coordination object is used to coordinate a number of independent
+ * Participants.
+ *
+ *
+ * Once a Coordination is {@link Coordinator#create(String, long) created}, it
+ * can be used to add {@link Participant} objects. When the Coordination is
+ * ended, the participants are {@link Participant#ended(Coordination) notified}.
+ * A Coordination can also fail for various reasons. When this occurs, the
+ * participants are {@link Participant#failed(Coordination) notified} of the
+ * failure.
+ *
+ *
+ * A Coordination must be in one of two states, either ACTIVE or TERMINATED. The
+ * transition between ACTIVE and TERMINATED must be atomic, ensuring that a
+ * Participant can be guaranteed of either receiving an exception when adding
+ * itself to a Coordination or of receiving notification the Coordination has
+ * terminated.
+ *
+ *
+ * A Coordination object is thread safe and can be passed as a parameter to
+ * other parties regardless of the threads these parties use.
+ *
+ *
+ * The following example code shows how a Coordination should be used.
+ *
+ *
+ * If this Coordination has been {@link #push() pushed} on the thread local
+ * Coordination stack of another thread, this method does nothing except
+ * throw a CoordinationException of type
+ * {@link CoordinationException#WRONG_THREAD}.
+ *
+ *
+ * If this Coordination has been {@link #push() pushed} on the thread local
+ * Coordination stack of this thread but is not the
+ * {@link Coordinator#peek() current Coordination}, then the Coordinations
+ * on the thread local Coordination stack above this Coordination must be
+ * terminated and removed from the thread local Coordination stack before
+ * this Coordination is terminated. Each of these Coordinations, starting
+ * with the current Coordination, will be {@link #end() terminated normally}
+ * . If the termination throws a {@link CoordinationException}, then the
+ * next Coordination on the thread local Coordination stack will be
+ * {@link #fail(Throwable) terminated as a failure} with a failure cause of
+ * the thrown CoordinationException. At the end of this process, this
+ * Coordination will be the current Coordination and will have been
+ * terminated as a failure if any of the terminated Coordinations threw a
+ * CoordinationException
+ *
+ *
+ * If this Coordination is the {@link Coordinator#peek() current
+ * Coordination}, then it will be {@link Coordinator#pop() removed} from the
+ * thread local Coordination stack.
+ *
+ *
+ * If this Coordination is already terminated, a CoordinationException is
+ * thrown. If this Coordination was terminated as a failure, the
+ * {@link #getFailure() failure cause} will be the cause of the thrown
+ * CoordinationException.
+ *
+ *
+ * Otherwise, this Coordination is terminated normally and then all
+ * registered {@link #getParticipants() Participants} are
+ * {@link Participant#ended(Coordination) notified}. Participants should
+ * finalize any work associated with this Coordination. The successful
+ * return of this method indicates that the Coordination has terminated
+ * normally and all registered Participants have been notified of the normal
+ * termination.
+ *
+ *
+ * It is possible that one of the Participants throws an exception during
+ * notification. If this happens, this Coordination is considered to have
+ * partially failed and this method must throw a CoordinationException of
+ * type {@link CoordinationException#PARTIALLY_ENDED} after all the
+ * registered Participants have been notified.
+ *
+ * @throws CoordinationException If this Coordination has failed, including
+ * timed out, or partially failed or this Coordination is on the
+ * thread local Coordination stack of another thread.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[INITIATE]} for this Coordination.
+ */
+ void end();
+
+ /**
+ * Terminate this Coordination as a failure with the specified failure
+ * cause.
+ *
+ *
+ * If this Coordination is already {@link #isTerminated() terminated}, this
+ * method does nothing and returns {@code false}.
+ *
+ *
+ * Otherwise, this Coordination is terminated as a failure with the
+ * specified failure cause and then all registered
+ * {@link #getParticipants() Participants} are
+ * {@link Participant#failed(Coordination) notified}. Participants should
+ * discard any work associated with this Coordination. This method will
+ * return {@code true}.
+ *
+ *
+ * If this Coordination has been {@link #push() pushed} onto a thread local
+ * Coordination stack, this Coordination is not removed from the stack. The
+ * creator of this Coordination must still call {@link #end()} on this
+ * Coordination to cause it to be removed from the thread local Coordination
+ * stack.
+ *
+ * @param cause The failure cause. The failure cause must not be
+ * {@code null}.
+ * @return {@code true} if this Coordination was active and was terminated
+ * by this method, otherwise {@code false}.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[PARTICIPATE]} for this Coordination.
+ */
+ boolean fail(Throwable cause);
+
+ /**
+ * Returns the failure cause of this Coordination.
+ *
+ *
+ * If this Coordination has {@link #fail(Throwable) failed}, then this
+ * method will return the failure cause.
+ *
+ *
+ * If this Coordination timed out, this method will return {@link #TIMEOUT}
+ * as the failure cause. If this Coordination was active when the bundle
+ * that created it released the {@link Coordinator} service, this method
+ * will return {@link #RELEASED} as the failure cause.
+ *
+ * @return The failure cause of this Coordination or {@code null} if this
+ * Coordination has not terminated as a failure.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[INITIATE]} for this Coordination.
+ */
+ Throwable getFailure();
+
+ /**
+ * Returns whether this Coordination is terminated.
+ *
+ * @return {@code true} if this Coordination is terminated, otherwise
+ * {@code false} if this Coordination is active.
+ */
+ boolean isTerminated();
+
+ /**
+ * Register a Participant with this Coordination.
+ *
+ *
+ * Once a Participant is registered with this Coordination, it is guaranteed
+ * to receive a notification for either
+ * {@link Participant#ended(Coordination) normal} or
+ * {@link Participant#failed(Coordination) failure} termination when this
+ * Coordination is terminated.
+ *
+ *
+ * Participants are registered using their object identity. Once a
+ * Participant is registered with this Coordination, subsequent attempts to
+ * register the Participant again with this Coordination are ignored and the
+ * Participant is only notified once when this Coordination is terminated.
+ *
+ *
+ * A Participant can only be registered with a single active Coordination at
+ * a time. If a Participant is already registered with an active
+ * Coordination, attempts to register the Participation with another active
+ * Coordination will block until the Coordination the Participant is
+ * registered with terminates. Notice that in edge cases the notification to
+ * the Participant that this Coordination has terminated can happen before
+ * this method returns.
+ *
+ *
+ * Attempting to register a Participant with a {@link #isTerminated()
+ * terminated} Coordination will result in a CoordinationException being
+ * thrown.
+ *
+ *
+ * The ordering of notifying Participants must follow the order in which the
+ * Participants were registered.
+ *
+ * @param participant The Participant to register with this Coordination.
+ * The participant must not be {@code null}.
+ * @throws CoordinationException If the Participant could not be registered
+ * with this Coordination. This exception should normally not be
+ * caught by the caller but allowed to be caught by the initiator of
+ * this Coordination.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[PARTICIPATE]} for this Coordination.
+ */
+ void addParticipant(Participant participant);
+
+ /**
+ * Returns a snapshot of the Participants registered with this Coordination.
+ *
+ * @return A snapshot of the Participants registered with this Coordination.
+ * If no Participants are registered with this Coordination, the
+ * returned list will be empty. The list is ordered in the order the
+ * Participants were registered. The returned list is the property
+ * of the caller and can be modified by the caller.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[INITIATE]} for this Coordination.
+ */
+ List
+ * Participants can call this method to extend the timeout of this
+ * Coordination with at least the specified time. This can be done by
+ * Participants when they know a task will take more than normal time.
+ *
+ * This method returns the new deadline. Specifying a timeout extension of 0
+ * will return the existing deadline.
+ *
+ * @param timeMillis The time in milliseconds to extend the current timeout.
+ * If the initial timeout was specified as 0, no extension must take
+ * place. A zero must have no effect.
+ * @return The new deadline in milliseconds. If the specified time is 0, the
+ * existing deadline is returned. If this Coordination was created
+ * with an initial timeout of 0, no timeout is set and 0 is
+ * returned.
+ * @throws CoordinationException If this Coordination
+ * {@link #isTerminated() is terminated}.
+ * @throws IllegalArgumentException If the specified time is negative.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[PARTICIPATE]} for this Coordination.
+ */
+ long extendTimeout(long timeMillis);
+
+ /**
+ * Wait until this Coordination is terminated and all registered
+ * Participants have been notified.
+ *
+ * @param timeMillis Maximum time in milliseconds to wait. Specifying a time
+ * of 0 will wait until this Coordination is terminated.
+ * @throws InterruptedException If the wait is interrupted.
+ * @throws IllegalArgumentException If the specified time is negative.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[PARTICIPATE]} for this Coordination.
+ */
+
+ void join(long timeMillis) throws InterruptedException;
+
+ /**
+ * Push this Coordination object onto the thread local Coordination stack to
+ * make it the {@link Coordinator#peek() current Coordination}.
+ *
+ * @return This Coordination.
+ * @throws CoordinationException If this Coordination is already on the any
+ * thread's thread local Coordination stack or this Coordination
+ * {@link #isTerminated() is terminated}.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[INITIATE]} for this Coordination.
+ */
+ Coordination push();
+
+ /**
+ * Returns the thread in whose thread local Coordination stack this
+ * Coordination has been {@link #push() pushed}.
+ *
+ * @return The thread in whose thread local Coordination stack this
+ * Coordination has been pushed or {@code null} if this Coordination
+ * is not in any thread local Coordination stack.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[ADMIN]} for this Coordination.
+ */
+ Thread getThread();
+
+ /**
+ * Returns the bundle that created this Coordination. This is the bundle
+ * that obtained the {@link Coordinator} service that was used to create
+ * this Coordination.
+ *
+ * @return The bundle that created this Coordination.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[ADMIN]} for this Coordination.
+ */
+ Bundle getBundle();
+
+ /**
+ * Returns the Coordination enclosing this Coordination if this Coordination
+ * is on the thread local Coordination stack.
+ *
+ *
+ * When a Coordination is {@link #push() pushed} onto the thread local
+ * Coordination stack, the former {@link Coordinator#peek() current
+ * Coordination}, if any, is the enclosing Coordination of this
+ * Coordination. When this Coordination is {@link Coordinator#pop() removed}
+ * from the thread local Coordination stack, this Coordination no longer has
+ * an enclosing Coordination.
+ *
+ * @return The Coordination enclosing this Coordination if this Coordination
+ * is on the thread local Coordination stack or {@code null} if this
+ * Coordination is not on the thread local Coordination stack or has
+ * no enclosing Coordination.
+ * @throws SecurityException If the caller does not have {@code
+ * CoordinationPermission[ADMIN]} for this Coordination.
+ */
+ Coordination getEnclosingCoordination();
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/coordinator/CoordinationPermission.java osgi-compendium-4.3.0/src/org/osgi/service/coordinator/CoordinationPermission.java
--- osgi-compendium-4.2.0/src/org/osgi/service/coordinator/CoordinationPermission.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/coordinator/CoordinationPermission.java 2011-05-16 12:29:18.000000000 +0000
@@ -0,0 +1,808 @@
+/*
+ * Copyright (c) OSGi Alliance (2010, 2011). 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.service.coordinator;
+
+import java.io.IOException;
+import java.io.NotSerializableException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.ObjectStreamField;
+import java.security.AccessController;
+import java.security.BasicPermission;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.PrivilegedAction;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+
+/**
+ * A bundle's authority to create or use a {@link Coordination}.
+ *
+ *
+ * {@code CoordinationPermission} has three actions: {@code initiate},
+ * {@code participate} and {@code admin}.
+ *
+ * @ThreadSafe
+ * @version $Id: 5c0e011abe0732906361e08819354ec794e1e2fd $
+ */
+public class CoordinationPermission extends BasicPermission {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The action string {@code initiate}.
+ */
+ public final static String INITIATE = "initiate";
+ /**
+ * The action string {@code participate}.
+ */
+ public final static String PARTICIPATE = "participate";
+ /**
+ * The action string {@code admin}.
+ */
+ public final static String ADMIN = "admin";
+
+ private final static int ACTION_INITIATE = 0x00000001;
+ private final static int ACTION_PARTICIPATE = 0x00000002;
+ private final static int ACTION_ADMIN = 0x00000004;
+ private final static int ACTION_ALL = ACTION_INITIATE
+ | ACTION_PARTICIPATE
+ | ACTION_ADMIN;
+ final static int ACTION_NONE = 0;
+
+ /**
+ * The actions mask.
+ */
+ transient int action_mask;
+
+ /**
+ * The actions in canonical form.
+ *
+ * @serial
+ */
+ private volatile String actions = null;
+
+ /**
+ * The bundle used by this CoordinationPermission.
+ */
+ transient final Bundle bundle;
+
+ /**
+ * If this CoordinationPermission was constructed with a filter, this holds
+ * a Filter matching object used to evaluate the filter in implies.
+ */
+ transient Filter filter;
+
+ /**
+ * This map holds the properties of the permission, used to match a filter
+ * in implies. This is not initialized until necessary, and then cached in
+ * this object.
+ */
+ private transient volatile Map
+ * Examples:
+ *
+ *
+ * When a signer key is used within the filter expression the signer value
+ * must escape the special filter chars ('*', '(', ')').
+ *
+ * The name is specified as a filter expression. The filter gives access to
+ * the following attributes:
+ *
+ * This method checks that the filter of the target is implied by the
+ * coordination name of this object. The list of
+ * {@code CoordinationPermission} actions must either match or allow for the
+ * list of the target object to imply the target
+ * {@code CoordinationPermission} action.
+ *
+ *
+ * @param p The requested permission.
+ * @return {@code true} if the specified permission is implied by this
+ * object; {@code false} otherwise.
+ */
+ public boolean implies(Permission p) {
+ if (!(p instanceof CoordinationPermission)) {
+ return false;
+ }
+ CoordinationPermission requested = (CoordinationPermission) p;
+ if (bundle != null) {
+ return false;
+ }
+ // if requested permission has a filter, then it is an invalid argument
+ if (requested.filter != null) {
+ return false;
+ }
+ return implies0(requested, ACTION_NONE);
+ }
+
+ /**
+ * Internal implies method. Used by the implies and the permission
+ * collection implies methods.
+ *
+ * @param requested The requested CoordinationPermission which has already
+ * be validated as a proper argument. The requested
+ * CoordinationPermission must not have a filter expression.
+ * @param effective The effective actions with which to start.
+ * @return {@code true} if the specified permission is implied by this
+ * object; {@code false} otherwise.
+ */
+ boolean implies0(CoordinationPermission requested, int effective) {
+ /* check actions first - much faster */
+ effective |= action_mask;
+ final int desired = requested.action_mask;
+ if ((effective & desired) != desired) {
+ return false;
+ }
+ /* Get filter */
+ Filter f = filter;
+ if (f == null) {
+ // it's "*"
+ return true;
+ }
+ return f.matches(requested.getProperties());
+ }
+
+ /**
+ * Returns the canonical string representation of the
+ * {@code CoordinationPermission} actions.
+ *
+ *
+ * Always returns present {@code CoordinationPermission} actions in the
+ * following order: {@code admin}, {@code initiate}, {@code participate}.
+ *
+ * @return Canonical string representation of the
+ * {@code CoordinationPermission} actions.
+ */
+ public String getActions() {
+ String result = actions;
+ if (result == null) {
+ StringBuffer sb = new StringBuffer();
+ boolean comma = false;
+
+ int mask = action_mask;
+ if ((mask & ACTION_ADMIN) == ACTION_ADMIN) {
+ sb.append(ADMIN);
+ comma = true;
+ }
+
+ if ((mask & ACTION_INITIATE) == ACTION_INITIATE) {
+ if (comma)
+ sb.append(',');
+ sb.append(INITIATE);
+ comma = true;
+ }
+
+ if ((mask & ACTION_PARTICIPATE) == ACTION_PARTICIPATE) {
+ if (comma)
+ sb.append(',');
+ sb.append(PARTICIPATE);
+ comma = true;
+ }
+
+ actions = result = sb.toString();
+ }
+ return result;
+ }
+
+ /**
+ * Returns a new {@code PermissionCollection} object suitable for storing
+ * {@code CoordinationPermission} objects.
+ *
+ * @return A new {@code PermissionCollection} object.
+ */
+ public PermissionCollection newPermissionCollection() {
+ return new CoordinationPermissionCollection();
+ }
+
+ /**
+ * Determines the equality of two {@code CoordinationPermission} objects.
+ *
+ * This method checks that specified permission has the same name and
+ * {@code CoordinationPermission} actions as this
+ * {@code CoordinationPermission} object.
+ *
+ * @param obj The object to test for equality with this
+ * {@code CoordinationPermission} object.
+ * @return {@code true} if {@code obj} is a {@code CoordinationPermission},
+ * and has the same name and actions as this
+ * {@code CoordinationPermission} object; {@code false} otherwise.
+ */
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ }
+
+ if (!(obj instanceof CoordinationPermission)) {
+ return false;
+ }
+
+ CoordinationPermission cp = (CoordinationPermission) obj;
+
+ return (action_mask == cp.action_mask)
+ && getName().equals(cp.getName())
+ && ((bundle == cp.bundle) || ((bundle != null) && bundle
+ .equals(cp.bundle)));
+ }
+
+ /**
+ * Returns the hash code value for this object.
+ *
+ * @return A hash code value for this object.
+ */
+ public int hashCode() {
+ int h = 31 * 17 + getName().hashCode();
+ h = 31 * h + getActions().hashCode();
+ if (bundle != null) {
+ h = 31 * h + bundle.hashCode();
+ }
+ return h;
+ }
+
+ /**
+ * WriteObject is called to save the state of this permission object to a
+ * stream. The actions are serialized, and the superclass takes care of the
+ * name.
+ */
+ private synchronized void writeObject(java.io.ObjectOutputStream s)
+ throws IOException {
+ if (bundle != null) {
+ throw new NotSerializableException("cannot serialize");
+ }
+ // Write out the actions. The superclass takes care of the name
+ // call getActions to make sure actions field is initialized
+ if (actions == null)
+ getActions();
+ s.defaultWriteObject();
+ }
+
+ /**
+ * readObject is called to restore the state of this permission from a
+ * stream.
+ */
+ private synchronized void readObject(java.io.ObjectInputStream s)
+ throws IOException, ClassNotFoundException {
+ // Read in the action, then initialize the rest
+ s.defaultReadObject();
+ setTransients(parseFilter(getName()), parseActions(actions));
+ }
+
+ /**
+ * Called by {@code <@link CoordinationPermission#implies(Permission)>}.
+ * This method is only called on a requested permission which cannot have a
+ * filter set.
+ *
+ * @return a map of properties for this permission.
+ */
+ private Map
Bishop Ranch 6
diff -Nru osgi-compendium-4.2.0/debian/changelog osgi-compendium-4.3.0/debian/changelog
--- osgi-compendium-4.2.0/debian/changelog 2011-10-03 18:21:14.000000000 +0000
+++ osgi-compendium-4.3.0/debian/changelog 2011-11-09 19:43:15.000000000 +0000
@@ -1,3 +1,11 @@
+osgi-compendium (4.3.0-1) unstable; urgency=low
+
+ * New upstream release.
+ * Add Build-Depends on libgeronimo-jpa-2.0-spec-java.
+ * d/watch: Use new bndtools project on github.
+
+ -- Damien Raude-Morvan Acl
is an immutable class representing structured access to DMT
+ * {@code Acl} is an immutable class representing structured access to DMT
* ACLs. Under OMA DM the ACLs are defined as strings with an internal syntax.
* *
" indicating any
+ * DmtAdmin.getSession}), as well as " {@code *} " indicating any
* principal.
*
* <server-identifier> ::= All printable characters except
- * '='
, '&'
, '*'
, '+'
or white-space
+ * {@code '='}, {@code '&'}, {@code '*'}, {@code '+'} or white-space
* characters.
*
- * @version $Revision: 5673 $
+ * @version $Id: 13eb07de6924756e573ff2eb72db6b66e4e53cc7 $
*/
public final class Acl {
@@ -103,7 +103,7 @@
* Create an instance of the ACL from its canonic string representation.
*
* @param acl The string representation of the ACL as defined in OMA DM. If
- * null
or empty then it represents an empty list of
+ * {@code null} or empty then it represents an empty list of
* principals with no permissions.
* @throws IllegalArgumentException if acl is not a valid OMA DM ACL string
*/
@@ -159,7 +159,7 @@
/**
* Creates an instance with a specified list of principals and the
* permissions they hold. The two arrays run in parallel, that is
- * principals[i]
will hold permissions[i]
in
+ * {@code principals[i]} will hold {@code permissions[i]} in
* the ACL.
* principals
array
+ * appears multiple times in the {@code principals} array
*/
public Acl(String[] principals, int[] permissions) {
if (principals.length != permissions.length)
@@ -207,19 +207,19 @@
// ----- Private constructors -----//
/**
- * Creates an instance identical to the base
ACL except for
- * the permissions of the given principal
, which are
- * overwritten with the given permissions
.
+ * Creates an instance identical to the {@code base} ACL except for
+ * the permissions of the given {@code principal}, which are
+ * overwritten with the given {@code permissions}.
* Acl
(add, delete, set) are done
+ * modifications of an {@code Acl} (add, delete, set) are done
* through this method.
*
* @param base The ACL that provides all permissions except for permissions
* of the given principal.
* @param principal The entity to which permission should be granted.
* @param permissions The set of permissions to be given. The parameter can
- * be a logical or
of the permission constants defined
+ * be a logical {@code or} of the permission constants defined
* in this class.
*/
private Acl(Acl base, String principal, int permissions) {
@@ -254,12 +254,12 @@
// ----- Public methods -----//
/**
- * Checks whether the given object is equal to this Acl
- * instance. Two Acl
instances are equal if they allow the
+ * Checks whether the given object is equal to this {@code Acl}
+ * instance. Two {@code Acl} instances are equal if they allow the
* same set of permissions for the same set of principals.
*
- * @param obj the object to compare with this Acl
instance
- * @return true
if the parameter represents the same ACL as
+ * @param obj the object to compare with this {@code Acl} instance
+ * @return {@code true} if the parameter represents the same ACL as
* this instance
*/
public boolean equals(Object obj) {
@@ -285,31 +285,41 @@
}
/**
- * Returns the hash code for this ACL instance. If two Acl
+ * Returns the hash code for this ACL instance. If two {@code Acl}
* instances are equal according to the {@link #equals} method, then calling
* this method on each of them must produce the same integer result.
*
* @return hash code for this ACL
*/
- public int hashcode() {
+ public int hashCode() {
// Using the hash code of the canonical string representation, because
// the principalPermissions set is not canonical (see above).
return toString().hashCode();
}
+ /**
+ * Use {@link #hashCode()} instead.
+ *
+ * @return Result of {@link #hashCode()}
+ * @deprecated Use correct method {@link #hashCode()};
+ */
+ public int hashcode() {
+ return hashCode();
+ }
+
/**
- * Create a new Acl
instance from this Acl
with
+ * Create a new {@code Acl} instance from this {@code Acl} with
* the given permission added for the given principal. The already existing
* permissions of the principal are not affected.
*
* @param principal The entity to which permissions should be granted, or
* "*" to grant permissions to all principals.
* @param permissions The permissions to be given. The parameter can be a
- * logical or
of more permission constants defined in
+ * logical {@code or} of more permission constants defined in
* this class.
- * @return a new Acl
instance
- * @throws IllegalArgumentException if principal
is not a
- * valid principal name or if permissions
is not a
+ * @return a new {@code Acl} instance
+ * @throws IllegalArgumentException if {@code principal} is not a
+ * valid principal name or if {@code permissions} is not a
* valid combination of the permission constants defined in this
* class
*/
@@ -321,7 +331,7 @@
}
/**
- * Create a new Acl
instance from this Acl
with
+ * Create a new {@code Acl} instance from this {@code Acl} with
* the given permission revoked from the given principal. Other permissions
* of the principal are not affected.
* or
of more permission constants defined in
+ * logical {@code or} of more permission constants defined in
* this class.
- * @return a new Acl
instance
- * @throws IllegalArgumentException if principal
is not a
- * valid principal name, if permissions
is not a
+ * @return a new {@code Acl} instance
+ * @throws IllegalArgumentException if {@code principal} is not a
+ * valid principal name, if {@code permissions} is not a
* valid combination of the permission constants defined in this
* class, or if a globally granted permission would have been
* revoked from a specific principal
@@ -354,9 +364,9 @@
* to query the permissions that are granted globally, to all
* principals
* @return The permissions of the given principal. The returned
- * int
is a bitmask of the permission constants defined
+ * {@code int} is a bitmask of the permission constants defined
* in this class
- * @throws IllegalArgumentException if principal
is not a
+ * @throws IllegalArgumentException if {@code principal} is not a
* valid principal name
*/
public synchronized int getPermissions(String principal) {
@@ -375,14 +385,14 @@
/**
* Check whether the given permissions are granted to a certain principal.
* The requested permissions are specified as a bitfield, for example
- * (Acl.ADD | Acl.DELETE | Acl.GET)
.
+ * {@code (Acl.ADD | Acl.DELETE | Acl.GET)}.
*
* @param principal The entity to check, or "*" to check whether
* the given permissions are granted to all principals globally
* @param permissions The permissions to check
- * @return true
if the principal holds all the given permissions
- * @throws IllegalArgumentException if principal
is not a
- * valid principal name or if permissions
is not a
+ * @return {@code true} if the principal holds all the given permissions
+ * @throws IllegalArgumentException if {@code principal} is not a
+ * valid principal name or if {@code permissions} is not a
* valid combination of the permission constants defined in this
* class
*/
@@ -394,7 +404,7 @@
}
/**
- * Create a new Acl
instance from this Acl
where
+ * Create a new {@code Acl} instance from this {@code Acl} where
* all permissions for the given principal are overwritten with the given
* permissions.
* Acl
instance
- * @throws IllegalArgumentException if principal
is not a
- * valid principal name, if permissions
is not a
+ * @return a new {@code Acl} instance
+ * @throws IllegalArgumentException if {@code principal} is not a
+ * valid principal name, if {@code permissions} is not a
* valid combination of the permission constants defined in this
* class, or if a globally granted permission would have been
* revoked from a specific principal
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/DmtAdmin.java osgi-compendium-4.3.0/src/info/dmtree/DmtAdmin.java
--- osgi-compendium-4.2.0/src/info/dmtree/DmtAdmin.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/DmtAdmin.java 2011-05-17 09:55:04.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -17,11 +17,11 @@
/**
* An interface providing methods to open sessions and register listeners. The
- * implementation of DmtAdmin
should register itself in the OSGi
- * service registry as a service. DmtAdmin
is the entry point for
+ * implementation of {@code DmtAdmin} should register itself in the OSGi
+ * service registry as a service. {@code DmtAdmin} is the entry point for
* applications to use the DMT API.
* getSession
methods are used to open a session on a specified
+ * The {@code getSession} methods are used to open a session on a specified
* subtree of the DMT. A typical way of usage:
*
*
@@ -44,152 +44,152 @@
* management tree must support read operations on their nodes, while support
* for write operations depends on the Management Object. Management Objects
* supporting write access may support transactional write, non-transactional
- * write or both. Users of
DmtAdmin
should consult the Management
+ * write or both. Users of {@code DmtAdmin} should consult the Management
* Object specification and implementation for the supported update modes. If
* Management Object definition permits, implementations are encouraged to
* support both update modes.
* DmtEventListener
objects that are called when the structure or
+ * {@code DmtEventListener} objects that are called when the structure or
* content of the tree is changed. These methods are not needed in an OSGi
* environment, clients should register listeners through the Event Admin
* service.
*
- * @version $Revision: 5673 $
+ * @version $Id: d34854b75471e0738ef0458a6cf154f0bd3a581d $
*/
public interface DmtAdmin {
/**
- * Opens a DmtSession
for local usage on a given subtree of
+ * Opens a {@code DmtSession} for local usage on a given subtree of
* the DMT with non transactional write lock. This call is equivalent to the
* following:
- * getSession(null, subtreeUri, DmtSession.LOCK_TYPE_EXCLUSIVE)
+ * {@code getSession(null, subtreeUri, DmtSession.LOCK_TYPE_EXCLUSIVE)}
* subtreeUri
parameter must contain an absolute URI. It
- * can also be null
, in this case the session is opened with
+ * The {@code subtreeUri} parameter must contain an absolute URI. It
+ * can also be {@code null}, in this case the session is opened with
* the default session root, ".", that gives access to the whole
* tree.
* DmtPermission
- * for the subtreeUri
node with the Get action present.
+ * To perform this operation the caller must have {@code DmtPermission}
+ * for the {@code subtreeUri} node with the Get action present.
*
* @param subtreeUri the subtree on which DMT manipulations can be performed
* within the returned session
- * @return a DmtSession
object for the requested subtree
+ * @return a {@code DmtSession} object for the requested subtree
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have
- * URI_TOO_LONG
if subtreeUri
or
+ * INVALID_URI
if subtreeUri
is
+ * NODE_NOT_FOUND
if subtreeUri
+ * SESSION_CREATION_TIMEOUT
if the operation
+ * COMMAND_FAILED
if subtreeUri
+ * DmtPermission
for the given root node with the Get
+ * {@code DmtPermission} for the given root node with the Get
* action present
*/
DmtSession getSession(String subtreeUri) throws DmtException;
/**
- * Opens a DmtSession
for local usage on a specific DMT
+ * Opens a {@code DmtSession} for local usage on a specific DMT
* subtree with a given lock mode. This call is equivalent to the
- * following: getSession(null, subtreeUri, lockMode)
+ * following: {@code getSession(null, subtreeUri, lockMode)}
* subtreeUri
parameter must contain an absolute URI. It
- * can also be null
, in this case the session is opened with
+ * The {@code subtreeUri} parameter must contain an absolute URI. It
+ * can also be {@code null}, in this case the session is opened with
* the default session root, ".", that gives access to the whole
* tree.
* DmtPermission
- * for the subtreeUri
node with the Get action present.
+ * To perform this operation the caller must have {@code DmtPermission}
+ * for the {@code subtreeUri} node with the Get action present.
*
* @param subtreeUri the subtree on which DMT manipulations can be performed
* within the returned session
* @param lockMode one of the lock modes specified in
- * DmtSession
- * @return a DmtSession
object for the requested subtree
+ * {@code DmtSession}
+ * @return a {@code DmtSession} object for the requested subtree
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have
- * URI_TOO_LONG
if subtreeUri
or
+ * INVALID_URI
if subtreeUri
is
+ * NODE_NOT_FOUND
if subtreeUri
+ * FEATURE_NOT_SUPPORTED
if atomic sessions are
- * not supported by the implementation and lockMode
+ * SESSION_CREATION_TIMEOUT
if the operation
+ * COMMAND_FAILED
if subtreeUri
- * specifies a relative URI, if lockMode
is unknown,
+ * DmtPermission
for the given root node with the Get
+ * {@code DmtPermission} for the given root node with the Get
* action present
*/
DmtSession getSession(String subtreeUri, int lockMode) throws DmtException;
/**
- * Opens a DmtSession
on a specific DMT subtree using a
+ * Opens a {@code DmtSession} on a specific DMT subtree using a
* specific lock mode on behalf of a remote principal. If local management
* applications are using this method then they should provide
- * null
as the first parameter. Alternatively they can use
+ * {@code null} as the first parameter. Alternatively they can use
* other forms of this method without providing a principal string.
* subtreeUri
parameter must contain an absolute URI. It
- * can also be null
, in this case the session is opened with
+ * The {@code subtreeUri} parameter must contain an absolute URI. It
+ * can also be {@code null}, in this case the session is opened with
* the default session root, ".", that gives access to the whole
* tree.
* DmtPrincipalPermission
in case of
+ * This method is guarded by {@code DmtPrincipalPermission} in case of
* remote sessions. In addition, the caller must have Get access rights
- * (ACL in case of remote sessions, DmtPermission
in case of
- * local sessions) on the subtreeUri
node to perform this
+ * (ACL in case of remote sessions, {@code DmtPermission} in case of
+ * local sessions) on the {@code subtreeUri} node to perform this
* operation.
*
* @param principal the identifier of the remote server on whose behalf the
- * data manipulation is performed, or null
for local
+ * data manipulation is performed, or {@code null} for local
* sessions
* @param subtreeUri the subtree on which DMT manipulations can be performed
* within the returned session
* @param lockMode one of the lock modes specified in
- * DmtSession
- * @return a DmtSession
object for the requested subtree
+ * {@code DmtSession}
+ * @return a {@code DmtSession} object for the requested subtree
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException in case of remote sessions, if the caller does
- * not have the required URI_TOO_LONG
if subtreeUri
or
+ * INVALID_URI
if subtreeUri
is
+ * NODE_NOT_FOUND
if subtreeUri
+ * PERMISSION_DENIED
if principal
is
- * not null
and the ACL of the node does not allow the
- * Get
operation for the principal on the given root
+ * FEATURE_NOT_SUPPORTED
if atomic sessions are
- * not supported by the implementation and lockMode
+ * SESSION_CREATION_TIMEOUT
if the operation
+ * COMMAND_FAILED
if subtreeUri
- * specifies a relative URI, if lockMode
is unknown,
+ * DmtPrincipalPermission
with a
- * target matching the principal
parameter, or in case
+ * not have the required {@code DmtPrincipalPermission} with a
+ * target matching the {@code principal} parameter, or in case
* of local sessions, if the caller does not have
- * DmtPermission
for the given root node with the Get
+ * {@code DmtPermission} for the given root node with the Get
* action present
*/
DmtSession getSession(String principal, String subtreeUri, int lockMode)
@@ -202,7 +202,7 @@
* delivered to the registered listener if at least one affected node is
* within this subtree. The events can also be filtered by specifying a
* bitmask of relevant event types (e.g.
- * DmtEvent.ADDED | DmtEvent.REPLACED | DmtEvent.SESSION_CLOSED
).
+ * {@code DmtEvent.ADDED | DmtEvent.REPLACED | DmtEvent.SESSION_CLOSED}).
* Only event types included in the bitmask will be delivered to the
* listener.
* listener
was already registered, calling
+ * If the specified {@code listener} was already registered, calling
* this method will update the registration.
*
* @param type a bitmask of event types the caller is interested in
* @param uri the URI of the root node of a subtree, must not be
- * null
+ * {@code null}
* @param listener the listener to be registered, must not be
- * null
+ * {@code null}
* @throws SecurityException if the caller doesn't have the necessary GET
- * DmtPermission
for the given URI
- * @throws NullPointerException if the uri
or
- * listener
parameter is null
- * @throws IllegalArgumentException if the type
parameter
+ * {@code DmtPermission} for the given URI
+ * @throws NullPointerException if the {@code uri} or
+ * {@code listener} parameter is {@code null}
+ * @throws IllegalArgumentException if the {@code type} parameter
* contains invalid bits (not corresponding to any event type
- * defined in DmtEvent
), or if the uri
+ * defined in {@code DmtEvent}), or if the {@code uri}
* parameter is invalid (is not an absolute URI or is syntactically
* incorrect)
*/
@@ -237,32 +237,32 @@
* delivered to the registered listener if at least one affected node is
* within this subtree. The events can also be filtered by specifying a
* bitmask of relevant event types (e.g.
- * DmtEvent.ADDED | DmtEvent.REPLACED | DmtEvent.SESSION_CLOSED
).
+ * {@code DmtEvent.ADDED | DmtEvent.REPLACED | DmtEvent.SESSION_CLOSED}).
* Only event types included in the bitmask will be delivered to the
* listener.
* listener
was already registered, calling
+ * If the specified {@code listener} was already registered, calling
* this method will update the registration.
*
* @param principal the management server identity the caller is acting on
- * behalf of, must not be null
+ * behalf of, must not be {@code null}
* @param type a bitmask of event types the caller is interested in
* @param uri the URI of the root node of a subtree, must not be
- * null
+ * {@code null}
* @param listener the listener to be registered, must not be
- * null
+ * {@code null}
* @throws SecurityException if the caller doesn't have the necessary
- * DmtPrincipalPermission
to use the specified
+ * {@code DmtPrincipalPermission} to use the specified
* principal
- * @throws NullPointerException if the principal
,
- * uri
or listener
parameter is
- * null
- * @throws IllegalArgumentException if the type
parameter
+ * @throws NullPointerException if the {@code principal},
+ * {@code uri} or {@code listener} parameter is
+ * {@code null}
+ * @throws IllegalArgumentException if the {@code type} parameter
* contains invalid bits (not corresponding to any event type
- * defined in DmtEvent
), or if the uri
+ * defined in {@code DmtEvent}), or if the {@code uri}
* parameter is invalid (is not an absolute URI or is syntactically
* incorrect)
*/
@@ -274,9 +274,9 @@
* will not receive change notifications.
*
* @param listener the listener to be unregistered, must not be
- * null
- * @throws NullPointerException if the listener
parameter is
- * null
+ * {@code null}
+ * @throws NullPointerException if the {@code listener} parameter is
+ * {@code null}
*/
void removeEventListener(DmtEventListener listener);
}
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/DmtData.java osgi-compendium-4.3.0/src/info/dmtree/DmtData.java
--- osgi-compendium-4.2.0/src/info/dmtree/DmtData.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/DmtData.java 2011-05-17 09:55:04.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -26,73 +26,73 @@
* An immutable data structure representing the contents of a leaf or interior
* node. This structure represents only the value and the format property of the
* node, all other properties (like MIME type) can be set and read using the
- * DmtSession
interface.
+ * {@code DmtSession} interface.
* null
format can be created using the static
+ * Nodes of {@code null} format can be created using the static
* {@link #NULL_VALUE} constant instance of this class.
* String
. The application is responsible for the
+ * specified as a {@code String}. The application is responsible for the
* proper encoding of the data according to the specified format.
*
- * @version $Revision: 5673 $
+ * @version $Id: 6c2015a5ae3d771d4d09128428373b61fe832523 $
*/
public final class DmtData {
/**
- * The node holds an OMA DM int
value.
+ * The node holds an OMA DM {@code int} value.
*/
public static final int FORMAT_INTEGER = 0x0001;
/**
- * The node holds an OMA DM float
value.
+ * The node holds an OMA DM {@code float} value.
*/
public static final int FORMAT_FLOAT = 0x0002;
/**
- * The node holds an OMA DM chr
value.
+ * The node holds an OMA DM {@code chr} value.
*/
public static final int FORMAT_STRING = 0x0004;
/**
- * The node holds an OMA DM bool
value.
+ * The node holds an OMA DM {@code bool} value.
*/
public static final int FORMAT_BOOLEAN = 0x0008;
/**
- * The node holds an OMA DM date
value.
+ * The node holds an OMA DM {@code date} value.
*/
public static final int FORMAT_DATE = 0x0010;
/**
- * The node holds an OMA DM time
value.
+ * The node holds an OMA DM {@code time} value.
*/
public static final int FORMAT_TIME = 0x0020;
/**
- * The node holds an OMA DM bin
value. The value of the node
- * corresponds to the Java byte[]
type.
+ * The node holds an OMA DM {@code bin} value. The value of the node
+ * corresponds to the Java {@code byte[]} type.
*/
public static final int FORMAT_BINARY = 0x0040;
/**
- * The node holds an OMA DM b64
value. Like
+ * The node holds an OMA DM {@code b64} value. Like
* {@link #FORMAT_BINARY}, this format is also represented by the Java
- * byte[]
type, the difference is only in the corresponding
+ * {@code byte[]} type, the difference is only in the corresponding
* OMA DM format.
*/
public static final int FORMAT_BASE64 = 0x0080;
/**
- * The node holds an OMA DM xml
value.
+ * The node holds an OMA DM {@code xml} value.
*/
public static final int FORMAT_XML = 0x0100;
/**
- * The node holds an OMA DM null
value. This corresponds to
- * the Java null
type.
+ * The node holds an OMA DM {@code null} value. This corresponds to
+ * the Java {@code null} type.
*/
public static final int FORMAT_NULL = 0x0200;
@@ -107,7 +107,7 @@
public static final int FORMAT_NODE = 0x0400;
/**
- * The node holds raw protocol data encoded as String
. The
+ * The node holds raw protocol data encoded as {@code String}. The
* {@link #getFormatName()} method can be used to get the actual format
* name.
*/
@@ -138,7 +138,7 @@
}
/**
- * Constant instance representing a leaf node of null
format.
+ * Constant instance representing a leaf node of {@code null} format.
*/
public static final DmtData NULL_VALUE = new DmtData();
// FORMAT_NAMES must be initialized by the time the constr. is called
@@ -160,7 +160,7 @@
private final Object complex;
/**
- * Create a DmtData
instance of null
format.
+ * Create a {@code DmtData} instance of {@code null} format.
* This constructor is private and used only to create the public
* {@link #NULL_VALUE} constant.
*/
@@ -177,8 +177,8 @@
}
/**
- * Create a DmtData
instance of chr
format
- * with the given string value. The null
string argument is
+ * Create a {@code DmtData} instance of {@code chr} format
+ * with the given string value. The {@code null} string argument is
* valid.
*
* @param str the string value to set
@@ -196,7 +196,7 @@
}
/**
- * Create a DmtData
instance of node
format
+ * Create a {@code DmtData} instance of {@code node} format
* with the given object value. The value represents complex data associated
* with an interior node.
* null
immutable object.
+ * The given value must be a non-{@code null} immutable object.
*
* @param complex the complex data object to set
*/
@@ -224,7 +224,7 @@
}
/**
- * Create a DmtData
instance of the specified format and set
+ * Create a {@code DmtData} instance of the specified format and set
* its value based on the given string. Only the following string-based
* formats can be created using this constructor:
*
@@ -233,23 +233,23 @@
* validity is not checked by this constructor)
*
- * The null
string argument is only valid if the format is
+ * The {@code null} string argument is only valid if the format is
* string or XML.
*
* @param value the string, XML, date or time value to set
- * @param format the format of the DmtData
instance to be
+ * @param format the format of the {@code DmtData} instance to be
* created, must be one of the formats specified above
- * @throws IllegalArgumentException if format
is not one of
- * the allowed formats, or value
is not a valid
+ * @throws IllegalArgumentException if {@code format} is not one of
+ * the allowed formats, or {@code value} is not a valid
* string for the given format
* @throws NullPointerException if a date or time is constructed and
- * value
is null
+ * {@code value} is {@code null}
*/
public DmtData(String value, int format) {
switch (format) {
@@ -278,7 +278,7 @@
}
/**
- * Create a DmtData
instance of int
format and
+ * Create a {@code DmtData} instance of {@code int} format and
* set its value.
*
* @param integer the integer value to set
@@ -296,7 +296,7 @@
}
/**
- * Create a DmtData
instance of float
format
+ * Create a {@code DmtData} instance of {@code float} format
* and set its value.
*
* @param flt the float value to set
@@ -314,7 +314,7 @@
}
/**
- * Create a DmtData
instance of bool
format
+ * Create a {@code DmtData} instance of {@code bool} format
* and set its value.
*
* @param bool the boolean value to set
@@ -332,11 +332,11 @@
}
/**
- * Create a DmtData
instance of bin
format and
+ * Create a {@code DmtData} instance of {@code bin} format and
* set its value.
*
- * @param bytes the byte array to set, must not be null
- * @throws NullPointerException if bytes
is null
+ * @param bytes the byte array to set, must not be {@code null}
+ * @throws NullPointerException if {@code bytes} is {@code null}
*/
public DmtData(byte[] bytes) {
if (bytes == null)
@@ -354,15 +354,15 @@
}
/**
- * Create a DmtData
instance of bin
or
- * b64
format and set its value. The chosen format is
- * specified by the base64
parameter.
- *
- * @param bytes the byte array to set, must not be null
- * @param base64 if true
, the new instance will have
- * b64
format, if false
, it will have
- * bin
format
- * @throws NullPointerException if bytes
is null
+ * Create a {@code DmtData} instance of {@code bin} or
+ * {@code b64} format and set its value. The chosen format is
+ * specified by the {@code base64} parameter.
+ *
+ * @param bytes the byte array to set, must not be {@code null}
+ * @param base64 if {@code true}, the new instance will have
+ * {@code b64} format, if {@code false}, it will have
+ * {@code bin} format
+ * @throws NullPointerException if {@code bytes} is {@code null}
*/
public DmtData(byte[] bytes, boolean base64) {
if (bytes == null)
@@ -380,16 +380,16 @@
}
/**
- * Create a DmtData
instance in {@link #FORMAT_RAW_STRING}
- * format. The data is provided encoded as a String
. The
- * actual data format is specified in formatName
. The
- * encoding used in data
must conform to this format.
+ * Create a {@code DmtData} instance in {@link #FORMAT_RAW_STRING}
+ * format. The data is provided encoded as a {@code String}. The
+ * actual data format is specified in {@code formatName}. The
+ * encoding used in {@code data} must conform to this format.
*
- * @param formatName the name of the format, must not be null
+ * @param formatName the name of the format, must not be {@code null}
* @param data the data encoded according to the specified format, must not
- * be null
- * @throws NullPointerException if formatName
or
- * data
is null
+ * be {@code null}
+ * @throws NullPointerException if {@code formatName} or
+ * {@code data} is {@code null}
*/
public DmtData(String formatName, String data) {
if(formatName == null)
@@ -409,16 +409,16 @@
}
/**
- * Create a DmtData
instance in {@link #FORMAT_RAW_BINARY}
+ * Create a {@code DmtData} instance in {@link #FORMAT_RAW_BINARY}
* format. The data is provided encoded as binary. The actual data format is
- * specified in formatName
. The encoding used in
- * data
must conform to this format.
+ * specified in {@code formatName}. The encoding used in
+ * {@code data} must conform to this format.
*
- * @param formatName the name of the format, must not be null
+ * @param formatName the name of the format, must not be {@code null}
* @param data the data encoded according to the specified format, must not
- * be null
- * @throws NullPointerException if formatName
or
- * data
is null
+ * be {@code null}
+ * @throws NullPointerException if {@code formatName} or
+ * {@code data} is {@code null}
*/
public DmtData(String formatName, byte[] data) {
if(formatName == null)
@@ -438,7 +438,7 @@
}
/**
- * Gets the value of a node with string (chr
) format.
+ * Gets the value of a node with string ({@code chr}) format.
*
* @return the string value
* @throws DmtIllegalStateException if the format of the node is not string
@@ -453,7 +453,7 @@
/**
* Gets the value of a node with date format. The returned date string is
* formatted according to the ISO 8601 definition of a calendar date in
- * complete representation, basic format (pattern CCYYMMDD).
+ * complete representation, basic format (pattern {@code CCYYMMDD}).
*
* @return the date value
* @throws DmtIllegalStateException if the format of the node is not date
@@ -470,8 +470,8 @@
* formatted according to the ISO 8601 definition of the time of day. The
* exact format depends on the value the object was initialized with: either
* local time, complete representation, basic format (pattern
- * hhmmss) or Coordinated Universal Time, basic format (pattern
- * hhmmssZ).
+ * {@code hhmmss}) or Coordinated Universal Time, basic format (pattern
+ * {@code hhmmssZ}).
*
* @return the time value
* @throws DmtIllegalStateException if the format of the node is not time
@@ -484,11 +484,11 @@
}
/**
- * Gets the value of a node with xml
format.
+ * Gets the value of a node with {@code xml} format.
*
* @return the XML value
* @throws DmtIllegalStateException if the format of the node is not
- * xml
+ * {@code xml}
*/
public String getXml() {
if (format == FORMAT_XML)
@@ -498,7 +498,7 @@
}
/**
- * Gets the value of a node with integer (int
) format.
+ * Gets the value of a node with integer ({@code int}) format.
*
* @return the integer value
* @throws DmtIllegalStateException if the format of the node is not integer
@@ -511,11 +511,11 @@
}
/**
- * Gets the value of a node with float
format.
+ * Gets the value of a node with {@code float} format.
*
* @return the float value
* @throws DmtIllegalStateException if the format of the node is not
- * float
+ * {@code float}
*/
public float getFloat() {
if (format == FORMAT_FLOAT)
@@ -525,7 +525,7 @@
}
/**
- * Gets the value of a node with boolean (bool
) format.
+ * Gets the value of a node with boolean ({@code bool}) format.
*
* @return the boolean value
* @throws DmtIllegalStateException if the format of the node is not boolean
@@ -538,7 +538,7 @@
}
/**
- * Gets the value of a node with binary (bin
) format.
+ * Gets the value of a node with binary ({@code bin}) format.
*
* @return the binary value
* @throws DmtIllegalStateException if the format of the node is not binary
@@ -571,12 +571,12 @@
}
/**
- * Gets the value of a node in raw String
+ * Gets the value of a node in raw {@code String}
* ({@link #FORMAT_RAW_STRING}) format.
*
- * @return the data value in raw String
format
+ * @return the data value in raw {@code String} format
* @throws DmtIllegalStateException if the format of the node is not raw
- * String
+ * {@code String}
*/
public String getRawString() {
if (format == FORMAT_RAW_STRING)
@@ -587,7 +587,7 @@
}
/**
- * Gets the value of a node with base 64 (b64
) format.
+ * Gets the value of a node with base 64 ({@code b64}) format.
*
* @return the binary value
* @throws DmtIllegalStateException if the format of the node is not base 64.
@@ -606,7 +606,7 @@
}
/**
- * Gets the complex data associated with an interior node (node
+ * Gets the complex data associated with an interior node ({@code node}
* format).
* node
+ * {@code node}
*/
public Object getNode() {
if(format == FORMAT_NODE)
@@ -637,12 +637,12 @@
}
/**
- * Returns the format of this DmtData
as String
.
+ * Returns the format of this {@code DmtData} as {@code String}.
* For the predefined data formats this is the OMA DM defined name of the
* format. For {@link #FORMAT_RAW_STRING} and {@link #FORMAT_RAW_BINARY}
* this is the format specified when the object was created.
*
- * @return the format name as String
+ * @return the format name as {@code String}
*/
public String getFormatName() {
return formatName;
@@ -655,7 +655,7 @@
* null
+ * the data is {@code null}
* DmtData
. This
+ * Gets the string representation of the {@code DmtData}. This
* method works for all formats.
* null
". Data of string or XML format containing the Java
- * null
value is represented by an empty string.
+ * "{@code null}". Data of string or XML format containing the Java
+ * {@code null} value is represented by an empty string.
*
- * @return the string representation of this DmtData
instance
+ * @return the string representation of this {@code DmtData} instance
*/
public String toString() {
switch (format) {
@@ -735,16 +735,16 @@
}
/**
- * Compares the specified object with this DmtData
instance.
- * Two DmtData
objects are considered equal if their format
+ * Compares the specified object with this {@code DmtData} instance.
+ * Two {@code DmtData} objects are considered equal if their format
* is the same, and their data (selected by the format) is equal.
* DmtData
- * @return true if the argument represents the same DmtData
+ * @param obj the object to compare with this {@code DmtData}
+ * @return true if the argument represents the same {@code DmtData}
* as this object
*/
public boolean equals(Object obj) {
@@ -787,7 +787,7 @@
}
/**
- * Returns the hash code value for this DmtData
instance. The
+ * Returns the hash code value for this {@code DmtData} instance. The
* hash code is calculated based on the data (selected by the format) of
* this object.
*
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/DmtEvent.java osgi-compendium-4.3.0/src/info/dmtree/DmtEvent.java
--- osgi-compendium-4.2.0/src/info/dmtree/DmtEvent.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/DmtEvent.java 2011-05-17 09:55:04.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -17,7 +17,7 @@
/**
* Event class storing the details of a change in the tree.
- * DmtEvent
is used by DmtAdmin
to notify registered
+ * {@code DmtEvent} is used by {@code DmtAdmin} to notify registered
* {@link DmtEventListener EventListeners} about important changes. Events are
* generated after every successful DMT change, and also when sessions are
* opened or closed. If a {@link DmtSession} is opened in atomic mode, DMT
@@ -28,13 +28,13 @@
* renamed or copied, in this order. Events are also generated when sessions are
* opened and closed.
* type
of the event describes the change that triggered the
+ * The {@code type} of the event describes the change that triggered the
* event delivery. Each event carries the unique identifier of the session in
* which the described change happened. The events describing changes in the DMT
* carry the list of affected nodes. In case of {@link #COPIED} or
* {@link #RENAMED} events, the event carries the list of new nodes as well.
* DmtEvent
is delivered to a listener, the event contains
+ * When a {@code DmtEvent} is delivered to a listener, the event contains
* only those node URIs that the listener has access to. This access control
* decision is based on the principal specified when the listener was
* registered:
@@ -48,7 +48,7 @@
* corresponding node.
*
*
- * @version $Revision: 5673 $
+ * @version $Id: 506872c6a60ee9170672b0e6cb2bc9688d70ad57 $
*/
public interface DmtEvent {
@@ -106,7 +106,7 @@
/**
* This method can be used to query the subject nodes of this event. The
- * method returns null
for {@link #SESSION_OPENED} and
+ * method returns {@code null} for {@link #SESSION_OPENED} and
* {@link #SESSION_CLOSED}.
* null
.
+ * this method returns {@code null}.
* DmtAdmin
uses this method to notify the registered
+ * {@code DmtAdmin} uses this method to notify the registered
* listeners about the change. This method is called asynchronously from the
* actual event occurrence.
*
- * @param event the DmtEvent
describing the change in detail
+ * @param event the {@code DmtEvent} describing the change in detail
*/
void changeOccurred(DmtEvent event);
}
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/DmtException.java osgi-compendium-4.3.0/src/info/dmtree/DmtException.java
--- osgi-compendium-4.2.0/src/info/dmtree/DmtException.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/DmtException.java 2011-05-17 09:55:04.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -20,7 +20,7 @@
/**
* Checked exception received when a DMT operation fails. Beside the exception
- * message, a DmtException
always contains an error code (one of
+ * message, a {@code DmtException} always contains an error code (one of
* the constants specified in this class), and may optionally contain the URI of
* the related node, and information about the cause of the exception.
* Throwable
instance, or a list of such instances if several
+ * {@code Throwable} instance, or a list of such instances if several
* problems occurred during the execution of a method. An example for the latter
- * is the close
method of DmtSession
that tries to
+ * is the {@code close} method of {@code DmtSession} that tries to
* close multiple plugins, and has to report the exceptions of all failures.
* String
node
- * URI, the other accepts a String[]
node path. The former is used
+ * Each constructor has two variants, one accepts a {@code String} node
+ * URI, the other accepts a {@code String[]} node path. The former is used
* by the DmtAdmin implementation, the latter by the plugins, who receive the
* node URI as an array of segment names. The constructors are otherwise
* identical.
* printStackTrace(PrintWriter)
method is
+ * parameters, and the {@code printStackTrace(PrintWriter)} method is
* extended to print the stack trace of all causing throwables as well.
*
- * @version $Revision: 5837 $
+ * @version $Id: 4c28c365160136f6d2da2229ab0ba127dea78527 $
*/
public class DmtException extends Exception {
private static final long serialVersionUID = -63006267148118655L;
@@ -137,8 +137,8 @@
/**
* The requested node creation operation failed because the target already
* exists. This can occur if the node is created directly (with one of the
- * create...
methods), or indirectly (during a
- * copy
operation).
+ * {@code create...} methods), or indirectly (during a
+ * {@code copy} operation).
* MetaNode
objects of the affected nodes, for example in the
+ * {@code MetaNode} objects of the affected nodes, for example in the
* following situations:
*
*
* MetaNode.CMD_EXECUTE
+ * (e.g. executing a node that lacks the {@code MetaNode.CMD_EXECUTE}
* access type)
* MetaNode
+ * violation, even if it cannot be described by the {@code MetaNode}
* class. For example, detecting a multi-node constraint violation while
* committing an atomic session should result in this error.
* null
or syntactically invalid. This covers the following
+ * {@code null} or syntactically invalid. This covers the following
* cases:
*
*
* .
" at a position
+ * ..
" or the URI contains such
+ * null
if the operation was not associated with a node.
+ * {@code null} if the operation was not associated with a node.
*/
private final String uri;
@@ -332,13 +332,13 @@
private final int code;
/**
- * The message associated with the exception, or null
if there
+ * The message associated with the exception, or {@code null} if there
* is no error message.
*/
private final String message;
/**
- * The list of originating exceptions, or empty list or null
if
+ * The list of originating exceptions, or empty list or {@code null} if
* there are no originating exceptions.
*/
private final Throwable[] causes;
@@ -353,15 +353,15 @@
// ----- Constructors -----//
/**
- * Create an instance of the exception. The uri
and
- * message
parameters are optional. No originating exception
+ * Create an instance of the exception. The {@code uri} and
+ * {@code message} parameters are optional. No originating exception
* is specified.
*
* @param uri the node on which the failed DMT operation was issued, or
- * null
if the operation is not associated with a node
+ * {@code null} if the operation is not associated with a node
* @param code the error code of the failure
* @param message the message associated with the exception, or
- * null
if there is no error message
+ * {@code null} if there is no error message
*/
public DmtException(String uri, int code, String message) {
this(uri, code, message, new Throwable[0], false);
@@ -369,15 +369,15 @@
/**
* Create an instance of the exception, specifying the cause exception. The
- * uri
, message
and cause
+ * {@code uri}, {@code message} and {@code cause}
* parameters are optional.
*
* @param uri the node on which the failed DMT operation was issued, or
- * null
if the operation is not associated with a node
+ * {@code null} if the operation is not associated with a node
* @param code the error code of the failure
* @param message the message associated with the exception, or
- * null
if there is no error message
- * @param cause the originating exception, or null
if there
+ * {@code null} if there is no error message
+ * @param cause the originating exception, or {@code null} if there
* is no originating exception
*/
public DmtException(String uri, int code, String message, Throwable cause) {
@@ -390,7 +390,7 @@
* exceptions and whether the exception is a fatal one. This constructor is
* meant to be used by plugins wishing to indicate that a serious error
* occurred which should invalidate the ongoing atomic session. The
- * uri
, message
and causes
+ * {@code uri}, {@code message} and {@code causes}
* parameters are optional.
* null
if the operation is not associated with a node
+ * {@code null} if the operation is not associated with a node
* @param code the error code of the failure
* @param message the message associated with the exception, or
- * null
if there is no error message
+ * {@code null} if there is no error message
* @param causes the list of originating exceptions, or empty list or
- * null
if there are no originating exceptions
+ * {@code null} if there are no originating exceptions
* @param fatal whether the exception is fatal
*/
public DmtException(String uri, int code, String message, Vector causes,
@@ -430,11 +430,11 @@
* the path was given as a URI string.
*
* @param path the path of the node on which the failed DMT operation was
- * issued, or null
if the operation is not associated
+ * issued, or {@code null} if the operation is not associated
* with a node
* @param code the error code of the failure
* @param message the message associated with the exception, or
- * null
if there is no error message
+ * {@code null} if there is no error message
* @see #DmtException(String, int, String)
*/
public DmtException(String[] path, int code, String message) {
@@ -447,12 +447,12 @@
* behaves in exactly the same way as if the path was given as a URI string.
*
* @param path the path of the node on which the failed DMT operation was
- * issued, or null
if the operation is not associated
+ * issued, or {@code null} if the operation is not associated
* with a node
* @param code the error code of the failure
* @param message the message associated with the exception, or
- * null
if there is no error message
- * @param cause the originating exception, or null
if there
+ * {@code null} if there is no error message
+ * @param cause the originating exception, or {@code null} if there
* is no originating exception
* @see #DmtException(String, int, String, Throwable)
*/
@@ -467,13 +467,13 @@
* if the path was given as a URI string.
*
* @param path the path of the node on which the failed DMT operation was
- * issued, or null
if the operation is not associated
+ * issued, or {@code null} if the operation is not associated
* with a node
* @param code the error code of the failure
* @param message the message associated with the exception, or
- * null
if there is no error message
+ * {@code null} if there is no error message
* @param causes the list of originating exceptions, or empty list or
- * null
if there are no originating exceptions
+ * {@code null} if there are no originating exceptions
* @param fatal whether the exception is fatal
* @see #DmtException(String, int, String, Vector, boolean)
*/
@@ -486,10 +486,10 @@
/**
* Get the node on which the failed DMT operation was issued. Some
- * operations like DmtSession.close()
don't require an URI,
- * in this case this method returns null
.
+ * operations like {@code DmtSession.close()} don't require an URI,
+ * in this case this method returns {@code null}.
*
- * @return the URI of the node, or null
+ * @return the URI of the node, or {@code null}
*/
public String getURI() {
return uri;
@@ -509,7 +509,7 @@
* Get the message associated with this exception. The returned string also
* contains the associated URI (if any) and the exception code. The
* resulting message has the following format (parts in square brackets are
- * only included if the field inside them is not null
):
+ * only included if the field inside them is not {@code null}):
*
*
* <exception_code>[: '<uri>'][: <error_message>]
@@ -528,12 +528,12 @@
}
/**
- * Get the cause of this exception. Returns non-
null
, if
+ * Get the cause of this exception. Returns non-{@code null}, if
* this exception is caused by one or more other exceptions (like a
- * NullPointerException
in a DmtPlugin). If there are more
+ * {@code NullPointerException} in a DmtPlugin). If there are more
* than one cause exceptions, the first one is returned.
*
- * @return the cause of this exception, or null
if no cause
+ * @return the cause of this exception, or {@code null} if no cause
* was given
*/
public Throwable getCause() {
@@ -565,7 +565,7 @@
* causes that were specified for this exception are also printed, together
* with their backtraces.
*
- * @param s PrintStream
to use for output
+ * @param s {@code PrintStream} to use for output
*/
public void printStackTrace(PrintStream s) {
super.printStackTrace(s);
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/DmtIllegalStateException.java osgi-compendium-4.3.0/src/info/dmtree/DmtIllegalStateException.java
--- osgi-compendium-4.2.0/src/info/dmtree/DmtIllegalStateException.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/DmtIllegalStateException.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2006, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2006, 2010). 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.
@@ -20,7 +20,7 @@
* Unchecked illegal state exception. This class is used in DMT because
* java.lang.IllegalStateException does not exist in CLDC.
*
- * @version $Revision: 6083 $
+ * @version $Id: 497b7af9fb2f578792af298367c30e454ac2b104 $
*/
public class DmtIllegalStateException extends RuntimeException {
private static final long serialVersionUID = 2015244852018469700L;
@@ -63,10 +63,10 @@
}
/**
- * Returns the cause of this exception or null
if no cause was
+ * Returns the cause of this exception or {@code null} if no cause was
* set.
*
- * @return The cause of this exception or null
if no cause was
+ * @return The cause of this exception or {@code null} if no cause was
* set.
*/
public Throwable getCause() {
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/DmtSession.java osgi-compendium-4.3.0/src/info/dmtree/DmtSession.java
--- osgi-compendium-4.2.0/src/info/dmtree/DmtSession.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/DmtSession.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -20,7 +20,7 @@
/**
* DmtSession provides concurrent access to the DMT. All DMT manipulation
* commands for management applications are available on the
- * DmtSession
interface. The session is associated with a root node
+ * {@code DmtSession} interface. The session is associated with a root node
* which limits the subtree in which the operations can be executed within this
* session.
* false
in case of an invalid URI.
+ * method which returns {@code false} in case of an invalid URI.
* DmtSession
that accesses the tree in any way can
- * throw DmtIllegalStateException
if the session has been closed or
+ * Each method of {@code DmtSession} that accesses the tree in any way can
+ * throw {@code DmtIllegalStateException} if the session has been closed or
* invalidated (due to timeout, fatal exceptions, or unexpectedly unregistered
* plugins).
*
- * @version $Revision: 5673 $
+ * @version $Id: 3e598cf3f60216bdc289e749ad8703710c0d990d $
*/
public interface DmtSession {
/**
- * Sessions created with LOCK_TYPE_SHARED
lock allows
+ * Sessions created with {@code LOCK_TYPE_SHARED} lock allows
* read-only access to the tree, but can be shared between multiple readers.
*/
int LOCK_TYPE_SHARED = 0;
/**
- * LOCK_TYPE_EXCLUSIVE
lock guarantees full access to the
+ * {@code LOCK_TYPE_EXCLUSIVE} lock guarantees full access to the
* tree, but can not be shared with any other locks.
*/
int LOCK_TYPE_EXCLUSIVE = 1;
/**
- * LOCK_TYPE_ATOMIC
is an exclusive lock with transactional
+ * {@code LOCK_TYPE_ATOMIC} is an exclusive lock with transactional
* functionality. Commands of an atomic session will either fail or succeed
* together, if a single command fails then the whole session will be rolled
* back.
@@ -71,7 +71,7 @@
/**
* The session is closed, DMT manipulation operations are not available,
- * they throw DmtIllegalStateException
if tried.
+ * they throw {@code DmtIllegalStateException} if tried.
*/
int STATE_CLOSED = 1;
@@ -80,7 +80,7 @@
* include the timeout of the session, any DmtException with the 'fatal'
* flag set, or the case when a plugin service is unregistered while in use
* by the session. DMT manipulation operations are not available, they throw
- * DmtIllegalStateException
if tried.
+ * {@code DmtIllegalStateException} if tried.
*/
int STATE_INVALID = 2;
@@ -103,10 +103,10 @@
/**
* Gives the name of the principal on whose behalf the session was created.
* Local sessions do not have an associated principal, in this case
- * null
is returned.
+ * {@code null} is returned.
*
* @return the identifier of the remote server that initiated the session,
- * or null
for local sessions
+ * or {@code null} for local sessions
*/
String getPrincipal();
@@ -119,7 +119,7 @@
int getSessionId();
/**
- * Get the root URI associated with this session. Gives ".
"
+ * Get the root URI associated with this session. Gives "{@code .}"
* if the session was created without specifying a root, which means that
* the target of this session is the whole DMT.
*
@@ -137,8 +137,8 @@
* happen due to some multi-node semantic constraints defined by a specific
* implementation. For example, node A can be required to always have
* children A/B, A/C and A/D. If this condition is broken when
- * commit()
is executed, the method will fail, and throw a
- * METADATA_MISMATCH
exception.
+ * {@code commit()} is executed, the method will fail, and throw a
+ * {@code METADATA_MISMATCH} exception.
* TRANSACTION_ERROR
exception thrown by this method.
+ * {@code TRANSACTION_ERROR} exception thrown by this method.
* CONCURRENT_ACCESS
is thrown.
+ * the code {@code CONCURRENT_ACCESS} is thrown.
*
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was not opened using the
- * METADATA_MISMATCH
if the operation failed
+ * CONCURRENT_ACCESS
if it is detected that some
+ * TRANSACTION_ERROR
if an error occurred during
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * LOCK_TYPE_ATOMIC
lock type, or if the session is
+ * {@code LOCK_TYPE_ATOMIC} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation
@@ -183,10 +183,10 @@
* the creation of this object that starts the session, and all subsequent
* {@link #commit} and {@link #rollback} calls.
*
- * @throws DmtException with the error code ROLLBACK_FAILED
+ * @throws DmtException with the error code {@code ROLLBACK_FAILED}
* in case the rollback did not succeed
* @throws DmtIllegalStateException if the session was not opened using the
- * LOCK_TYPE_ATOMIC
lock type, or if the session is
+ * {@code LOCK_TYPE_ATOMIC} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation
@@ -195,28 +195,28 @@
/**
* Closes a session. If the session was opened with atomic lock mode, the
- * DmtSession
must first persist the changes made to the DMT
- * by calling commit()
on all (transactional) plugins
+ * {@code DmtSession} must first persist the changes made to the DMT
+ * by calling {@code commit()} on all (transactional) plugins
* participating in the session. See the documentation of the
* {@link #commit} method for details and possible errors during this
* operation.
* DmtSession.STATE_CLOSED
+ * The state of the session changes to {@code DmtSession.STATE_CLOSED}
* if the close operation completed successfully, otherwise it becomes
- * DmtSession.STATE_INVALID
.
+ * {@code DmtSession.STATE_INVALID}.
*
* @throws DmtException with the following possible error codes:
*
- *
@@ -237,37 +237,37 @@
*
* @param nodeUri the node on which the execute operation is issued
* @param data the parameter of the execute operation, can be
- * METADATA_MISMATCH
in case of atomic sessions,
+ * CONCURRENT_ACCESS
in case of atomic sessions,
+ * TRANSACTION_ERROR
in case of atomic sessions,
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if an underlying plugin failed
+ * null
+ * {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if the node does not exist and
+ * PERMISSION_DENIED
if the session is
+ * Execute
operation for the associated
+ * allow the {@code Execute} operation for the associated
* principal
- * METADATA_MISMATCH
if the node cannot be
+ * MetaNode.CMD_EXECUTE
access type)
- * DATA_STORE_FAILURE
if an error occurred while
+ * {@code MetaNode.CMD_EXECUTE} access type)
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the node with the Exec action
+ * {@code DmtPermission} for the node with the Exec action
* present
*
* @see #execute(String, String, String)
@@ -282,44 +282,44 @@
* The semantics of an execute operation and the data parameter it takes
* depends on the definition of the managed object on which the command is
* issued. If a correlation ID is specified, it should be used as the
- * correlator
parameter for notifications sent in response to this
+ * {@code correlator} parameter for notifications sent in response to this
* execute operation.
*
* @param nodeUri the node on which the execute operation is issued
* @param correlator an identifier to associate this operation with any
- * notifications sent in response to it, can be null
if not
+ * notifications sent in response to it, can be {@code null} if not
* needed
* @param data the parameter of the execute operation, can be
- * null
+ * {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if the node does not exist and
+ * PERMISSION_DENIED
if the session is
+ * Execute
operation for the associated
+ * allow the {@code Execute} operation for the associated
* principal
- * METADATA_MISMATCH
if the node cannot be
+ * MetaNode.CMD_EXECUTE
access type)
- * DATA_STORE_FAILURE
if an error occurred while
+ * {@code MetaNode.CMD_EXECUTE} access type)
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the node with the Exec action
+ * {@code DmtPermission} for the node with the Exec action
* present
* @see #execute(String, String)
*/
@@ -328,37 +328,37 @@
/**
* Get the Access Control List associated with a given node. The returned
- * Acl
object does not take inheritance into account, it
+ * {@code Acl} object does not take inheritance into account, it
* gives the ACL specifically given to the node.
*
* @param nodeUri the URI of the node
* @return the Access Control List belonging to the node or
- * null
if none defined
+ * {@code null} if none defined
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session is already closed or
* invalidated
* @throws SecurityException in case of local sessions, if the caller does
- * not have URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * METADATA_MISMATCH
if node information cannot
+ * MetaNode.CMD_GET
access type)
- * DATA_STORE_FAILURE
if an error occurred while
+ * {@code MetaNode.CMD_GET} access type)
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get
+ * not have {@code DmtPermission} for the node with the Get
* action present
* @see #getEffectiveNodeAcl
*/
@@ -366,7 +366,7 @@
/**
* Gives the Access Control List in effect for a given node. The returned
- * Acl
takes inheritance into account, that is if there is no
+ * {@code Acl} takes inheritance into account, that is if there is no
* ACL defined for the node, it will be derived from the closest ancestor
* having an ACL defined.
*
@@ -374,29 +374,29 @@
* @return the Access Control List belonging to the node
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session is already closed or
* invalidated
* @throws SecurityException in case of local sessions, if the caller does
- * not have URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * METADATA_MISMATCH
if node information cannot
+ * MetaNode.CMD_GET
access type)
- * DATA_STORE_FAILURE
if an error occurred while
+ * {@code MetaNode.CMD_GET} access type)
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get
+ * not have {@code DmtPermission} for the node with the Get
* action present
* @see #getNodeAcl
*/
@@ -404,49 +404,49 @@
/**
* Set the Access Control List associated with a given node. To perform this
- * operation, the caller needs to have replace rights (Acl.REPLACE
+ * operation, the caller needs to have replace rights ({@code Acl.REPLACE}
* or the corresponding Java permission depending on the session type) as
* described below:
*
- *
* nodeUri
specifies a leaf node, replace rights are
+ * nodeUri
specifies an interior node, replace rights
+ * acl
is null
or an empty ACL
+ * If the given {@code acl} is {@code null} or an empty ACL
* (not specifying any permissions for any principals), then the ACL of the
* node is deleted, and the node will inherit the ACL from its parent node.
*
* @param nodeUri the URI of the node
* @param acl the Access Control List to be set on the node, can be
- * null
+ * {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Replace
operation
+ * (see above) does not allow the {@code Replace} operation
* for the associated principal
- * COMMAND_NOT_ALLOWED
if the command attempts
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException in case of local sessions, if the caller does
- * not have DmtPermission
for the node or its parent
+ * not have {@code DmtPermission} for the node or its parent
* (see above) with the Replace action present
*/
void setNodeAcl(String nodeUri, Acl acl) throws DmtException;
@@ -477,48 +477,48 @@
*
* @param nodeUri the node or root of a subtree to be copied
* @param newNodeUri the URI of the new node or root of a subtree
- * @param recursive false
if only a single node is copied,
- * true
if the whole subtree is copied
+ * @param recursive {@code false} if only a single node is copied,
+ * {@code true} if the whole subtree is copied
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or
- * newNodeUri
or any segment of them is too long, or
+ * INVALID_URI
if nodeUri
or
- * newNodeUri
is null
or syntactically
+ * NODE_NOT_FOUND
if nodeUri
- * points to a non-existing node, or if newNodeUri
+ * NODE_ALREADY_EXISTS
if
- * newNodeUri
points to a node that already exists
- * PERMISSION_DENIED
if the session is
+ * Get
operation, or the ACL of
- * the parent of the target node does not allow the Add
+ * does not allow the {@code Get} operation, or the ACL of
+ * the parent of the target node does not allow the {@code Add}
* operation for the associated principal
- * COMMAND_NOT_ALLOWED
if nodeUri
- * is an ancestor of newNodeUri
, or if any of the
+ * METADATA_MISMATCH
if any of the meta-data
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if either URI is not within
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the copied node(s) with the Get
+ * {@code DmtPermission} for the copied node(s) with the Get
* action present, or for the parent of the target node with the Add
* action
*/
@@ -534,51 +534,51 @@
* descriptions below.
* MetaNode.CMD_ADD
access
+ * creating it. The node must have {@code MetaNode.CMD_ADD} access
* type, it must be defined as a non-permanent interior node, the node name
* must conform to the valid names, and the creation of the new node must
* not cause the maximum occurrence number to be exceeded.
* NODE_NOT_FOUND
error code is returned (see
+ * {@code NODE_NOT_FOUND} error code is returned (see
* {@link #getMetaNode(String)}).
*
* @param nodeUri the URI of the node to create
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * NODE_ALREADY_EXISTS
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Add
operation for the associated
+ * not allow the {@code Add} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the parent node is not
+ * METADATA_MISMATCH
if the node could not be
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the parent node with the Add
+ * {@code DmtPermission} for the parent node with the Add
* action present
*/
void createInteriorNode(String nodeUri) throws DmtException;
@@ -594,14 +594,14 @@
* descriptions below.
* MetaNode.CMD_ADD
access
+ * creating it. The node must have {@code MetaNode.CMD_ADD} access
* type, it must be defined as a non-permanent interior node, the node name
* must conform to the valid names, and the creation of the new node must
* not cause the maximum occurrence number to be exceeded.
* NODE_NOT_FOUND
error code is returned (see
+ * {@code NODE_NOT_FOUND} error code is returned (see
* {@link #getMetaNode(String)}).
* null
+ * @param type the type URI of the interior node, can be {@code null}
* if no node type is defined
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * NODE_ALREADY_EXISTS
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Add
operation for the associated
+ * not allow the {@code Add} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the parent node is not
+ * METADATA_MISMATCH
if the node could not be
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the parent node with the Add
+ * {@code DmtPermission} for the parent node with the Add
* action present
* @see #createInteriorNode(String)
* @see DmtException with error code
- * METADATA_MISMATCH
. Note that a node might have a default
+ * {@code DmtException} with error code
+ * {@code METADATA_MISMATCH}. Note that a node might have a default
* value or MIME type even if there is no meta-data for the node or its
* meta-data does not specify the default.
* MetaNode.CMD_ADD
access
+ * creating it. The node must have {@code MetaNode.CMD_ADD} access
* type, it must be defined as a non-permanent leaf node, the node name must
* conform to the valid names, and the creation of the new node must not
* cause the maximum occurrence number to be exceeded.
* NODE_NOT_FOUND
error code is returned (see
+ * {@code NODE_NOT_FOUND} error code is returned (see
* {@link #getMetaNode(String)}).
*
* @param nodeUri the URI of the node to create
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * NODE_ALREADY_EXISTS
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Add
operation for the associated
+ * not allow the {@code Add} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the parent node is not
+ * METADATA_MISMATCH
if the node could not be
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the parent node with the Add
+ * {@code DmtPermission} for the parent node with the Add
* action present
* @see #createLeafNode(String, DmtData)
*/
@@ -724,10 +724,10 @@
/**
* Create a leaf node with a given value and the default MIME type. If the
- * specified value is null
, the default value is taken. If
+ * specified value is {@code null}, the default value is taken. If
* the node does not have a default MIME type or value (if needed), this
- * method will throw a DmtException
with error code
- * METADATA_MISMATCH
. Note that a node might have a default
+ * method will throw a {@code DmtException} with error code
+ * {@code METADATA_MISMATCH}. Note that a node might have a default
* value or MIME type even if there is no meta-data for the node or its
* meta-data does not specify the default.
* MetaNode.CMD_ADD
access
+ * creating it. The node must have {@code MetaNode.CMD_ADD} access
* type, it must be defined as a non-permanent leaf node, the node name must
* conform to the valid names, the node value must conform to the value
* constraints, and the creation of the new node must not cause the maximum
@@ -747,59 +747,59 @@
* NODE_NOT_FOUND
error code is returned (see
+ * {@code NODE_NOT_FOUND} error code is returned (see
* {@link #getMetaNode(String)}).
* null
format can be created by using
+ * Nodes of {@code null} format can be created by using
* {@link DmtData#NULL_VALUE} as second argument.
*
* @param nodeUri the URI of the node to create
* @param value the value to be given to the new node, can be
- * null
+ * {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * NODE_ALREADY_EXISTS
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Add
operation for the associated
+ * not allow the {@code Add} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the parent node is not
+ * METADATA_MISMATCH
if the node could not be
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the parent node with the Add
+ * {@code DmtPermission} for the parent node with the Add
* action present
*/
void createLeafNode(String nodeUri, DmtData value) throws DmtException;
/**
* Create a leaf node with a given value and MIME type. If the specified
- * value or MIME type is null
, their default values are
+ * value or MIME type is {@code null}, their default values are
* taken. If the node does not have the necessary defaults, this method will
- * throw a DmtException
with error code
- * METADATA_MISMATCH
. Note that a node might have a default
+ * throw a {@code DmtException} with error code
+ * {@code METADATA_MISMATCH}. Note that a node might have a default
* value or MIME type even if there is no meta-data for the node or its
* meta-data does not specify the default.
* MetaNode.CMD_ADD
access
+ * creating it. The node must have {@code MetaNode.CMD_ADD} access
* type, it must be defined as a non-permanent leaf node, the node name must
* conform to the valid names, the node value must conform to the value
* constraints, the MIME type must be among the listed types, and the
@@ -820,10 +820,10 @@
* NODE_NOT_FOUND
error code is returned (see
+ * {@code NODE_NOT_FOUND} error code is returned (see
* {@link #getMetaNode(String)}).
* null
format can be created by using
+ * Nodes of {@code null} format can be created by using
* {@link DmtData#NULL_VALUE} as second argument.
* null
+ * {@code null}
* @param mimeType the MIME type to be given to the new node, can be
- * null
+ * {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * NODE_ALREADY_EXISTS
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Add
operation for the associated
+ * not allow the {@code Add} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the parent node is not
+ * METADATA_MISMATCH
if the node could not be
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
- * current session's subtree, if mimeType
is not a
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the parent node with the Add
+ * {@code DmtPermission} for the parent node with the Add
* action present
* @see #createLeafNode(String, DmtData)
* @see RFC 2045
@@ -885,42 +885,42 @@
* MetaNode.CMD_DELETE
access type, and if zero occurrences
+ * {@code MetaNode.CMD_DELETE} access type, and if zero occurrences
* of the node are not allowed, it must not be the last one.
*
* @param nodeUri the URI of the node
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Delete
operation for the associated
+ * allow the {@code Delete} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the target node is the
+ * METADATA_MISMATCH
if the node could not be
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the node with the Delete action
+ * {@code DmtPermission} for the node with the Delete action
* present
*/
void deleteNode(String nodeUri) throws DmtException;
@@ -936,97 +936,97 @@
* before performing the rename operation. Neither node can be permanent,
* their leaf/interior property must match, and the name change must not
* violate any of the cardinality constraints. The original node must have
- * the MetaNode.CMD_REPLACE
access type, and the name of the
+ * the {@code MetaNode.CMD_REPLACE} access type, and the name of the
* new node must conform to the valid names.
*
* @param nodeUri the URI of the node to rename
* @param newName the new name property of the node
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
- * segment of it is too long, if nodeUri
has too many
- * segments, or if newName
is too long
- * INVALID_URI
if nodeUri
or
- * newName
is null
or syntactically
+ * NODE_NOT_FOUND
if nodeUri
+ * NODE_ALREADY_EXISTS
if there already exists a
- * sibling of nodeUri
with the name
- * newName
- * PERMISSION_DENIED
if the session is
+ * Replace
operation for the associated
+ * allow the {@code Replace} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the target node is the
+ * METADATA_MISMATCH
if the node could not be
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the node with the Replace action
+ * {@code DmtPermission} for the node with the Replace action
* present
*/
void renameNode(String nodeUri, String newName) throws DmtException;
/**
* Set the value of a leaf or interior node to its default. The default
- * can be defined by the node's MetaNode
. The method throws a
- * METADATA_MISMATCH
exception if the node does not have a
+ * can be defined by the node's {@code MetaNode}. The method throws a
+ * {@code METADATA_MISMATCH} exception if the node does not have a
* default value.
*
* @param nodeUri the URI of the node
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Replace
operation for the associated
+ * allow the {@code Replace} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
in non-atomic sessions if
+ * METADATA_MISMATCH
if the node is permanent or
+ * MetaNode.CMD_REPLACE
access type), or if there is
+ * {@code MetaNode.CMD_REPLACE} access type), or if there is
* no default value defined for this node
- * FEATURE_NOT_SUPPORTED
if the specified node is
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the node with the Replace action
+ * {@code DmtPermission} for the node with the Replace action
* present
* @see #setNodeValue
*/
@@ -1034,14 +1034,14 @@
/**
* Set the value of a leaf or interior node. The format of the node is
- * contained in the DmtData
object. For interior nodes, the
- * format must be FORMAT_NODE
, while for leaf nodes this
+ * contained in the {@code DmtData} object. For interior nodes, the
+ * format must be {@code FORMAT_NODE}, while for leaf nodes this
* format must not be used.
* null
, the default value is taken.
+ * If the specified value is {@code null}, the default value is taken.
* In this case, if the node does not have a default value, this method will
- * throw a DmtException
with error code
- * METADATA_MISMATCH
. Nodes of null
format can be
+ * throw a {@code DmtException} with error code
+ * {@code METADATA_MISMATCH}. Nodes of {@code null} format can be
* set by using {@link DmtData#NULL_VALUE} as second argument.
* null
+ * @param data the data to be set, can be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Replace
operation for the associated
+ * allow the {@code Replace} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the given data has
- * FORMAT_NODE
format but the node is a leaf node (or
+ * METADATA_MISMATCH
if the node is permanent or
+ * MetaNode.CMD_REPLACE
access type), or if the given
+ * {@code MetaNode.CMD_REPLACE} access type), or if the given
* value does not conform to the meta-data value constraints
- * FEATURE_NOT_SUPPORTED
if the specified node is
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the node with the Replace action
+ * {@code DmtPermission} for the node with the Replace action
* present
*/
void setNodeValue(String nodeUri, DmtData data) throws DmtException;
@@ -1098,44 +1098,44 @@
* encoding must not exceed 255 bytes.
*
* @param nodeUri the URI of the node
- * @param title the title text of the node, can be null
+ * @param title the title text of the node, can be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Replace
operation for the associated
+ * allow the {@code Replace} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
in non-atomic sessions if
+ * METADATA_MISMATCH
if the node cannot be
+ * MetaNode.CMD_REPLACE
access type)
- * FEATURE_NOT_SUPPORTED
if the Title property
+ * {@code MetaNode.CMD_REPLACE} access type)
+ * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the title string is too
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the node with the Replace action
+ * {@code DmtPermission} for the node with the Replace action
* present
*/
void setNodeTitle(String nodeUri, String title) throws DmtException;
@@ -1145,12 +1145,12 @@
* data it contains. The type of an interior node is a URI identifying a DDF
* document.
* null
type string means that there is
+ * For interior nodes, a {@code null} type string means that there is
* no DDF document overriding the tree structure defined by the ancestors.
* For leaf nodes, it requests that the default MIME type is used for the
* given node. If the node does not have a default MIME type this method
- * will throw a DmtException
with error code
- * METADATA_MISMATCH
. Note that a node might have a default
+ * will throw a {@code DmtException} with error code
+ * {@code METADATA_MISMATCH}. Note that a node might have a default
* MIME type even if there is no meta-data for the node or its meta-data
* does not specify the default.
* null
+ * @param type the type of the node, can be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws DmtIllegalStateException if the session was opened using the
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Replace
operation for the associated
+ * allow the {@code Replace} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
in non-atomic sessions if
+ * METADATA_MISMATCH
if the node is permanent or
+ * MetaNode.CMD_REPLACE
access type), and in case of
- * leaf nodes, if null
is given and there is no
+ * {@code MetaNode.CMD_REPLACE} access type), and in case of
+ * leaf nodes, if {@code null} is given and there is no
* default MIME type, or the given MIME type is not allowed
- * TRANSACTION_ERROR
in an atomic session if the
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * LOCK_TYPE_SHARED
lock type, or if the session is
+ * {@code LOCK_TYPE_SHARED} lock type, or if the session is
* already closed or invalidated
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the node with the Replace action
+ * {@code DmtPermission} for the node with the Replace action
* present
* @see RFC 2045
* @see null entries.
+ * {@code null} entries.
*
* @param nodeUri the URI of the node
* @return the list of child node names as a string array or an empty string
* array if the node has no children
* @throws DmtException with the following possible error codes:
*
- *
@@ -1245,7 +1245,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the specified node is
+ * METADATA_MISMATCH
if node information cannot
+ * MetaNode.CMD_GET
access type)
- * DATA_STORE_FAILURE
if an error occurred while
+ * {@code MetaNode.CMD_GET} access type)
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get action
+ * {@code DmtPermission} for the node with the Get action
* present
*/
String[] getChildNodeNames(String nodeUri) throws DmtException;
@@ -1254,7 +1254,7 @@
* Get the meta data which describes a given node. Meta data can only be
* inspected, it can not be changed.
* MetaNode
object returned to the client is the
+ * The {@code MetaNode} object returned to the client is the
* combination of the meta data returned by the data plugin (if any) plus
* the meta data returned by the DmtAdmin. If there are differences in the
* meta data elements known by the plugin and the DmtAdmin then the plugin
@@ -1263,31 +1263,31 @@
* Note, that a node does not have to exist for having meta-data associated
* with it. This method may provide meta-data for any node that can possibly
* exist in the tree (any node defined in the specification). For nodes that
- * are not defined, it may throw DmtException
with the error
- * code NODE_NOT_FOUND
. To allow easier implementation of
+ * are not defined, it may throw {@code DmtException} with the error
+ * code {@code NODE_NOT_FOUND}. To allow easier implementation of
* plugins that do not provide meta-data, it is allowed to return
- * null
for any node, regardless of whether it is defined or
+ * {@code null} for any node, regardless of whether it is defined or
* not.
*
* @param nodeUri the URI of the node
* @return a MetaNode which describes meta data information, can be
- * null
if there is no meta data available for the
+ * {@code null} if there is no meta data available for the
* given node
* @throws DmtException with the following possible error codes:
*
- *
@@ -1296,7 +1296,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get action
+ * {@code DmtPermission} for the node with the Get action
* present
*/
MetaNode getMetaNode(String nodeUri) throws DmtException;
@@ -1311,27 +1311,27 @@
* @return the size of the data in the node
* @throws DmtException with the following possible error codes:
*
- *
@@ -1340,7 +1340,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * COMMAND_NOT_ALLOWED
if the specified node is
+ * METADATA_MISMATCH
if node information cannot
+ * MetaNode.CMD_GET
access type)
- * FEATURE_NOT_SUPPORTED
if the Size property is
+ * {@code MetaNode.CMD_GET} access type)
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get action
+ * {@code DmtPermission} for the node with the Get action
* present
* @see DmtData#getSize
*/
@@ -1353,25 +1353,25 @@
* @return the timestamp of the last modification
* @throws DmtException with the following possible error codes:
*
- *
@@ -1380,7 +1380,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * METADATA_MISMATCH
if node information cannot
+ * MetaNode.CMD_GET
access type)
- * FEATURE_NOT_SUPPORTED
if the Timestamp
+ * {@code MetaNode.CMD_GET} access type)
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get action
+ * {@code DmtPermission} for the node with the Get action
* present
*/
Date getNodeTimestamp(String nodeUri) throws DmtException;
@@ -1389,29 +1389,29 @@
* Get the title of a node. There might be no title property set for a node.
*
* @param nodeUri the URI of the node
- * @return the title of the node, or null
if the node has no
+ * @return the title of the node, or {@code null} if the node has no
* title
* @throws DmtException with the following possible error codes:
*
- *
@@ -1420,7 +1420,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * METADATA_MISMATCH
if node information cannot
+ * MetaNode.CMD_GET
access type)
- * FEATURE_NOT_SUPPORTED
if the Title property
+ * {@code MetaNode.CMD_GET} access type)
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get action
+ * {@code DmtPermission} for the node with the Get action
* present
*/
String getNodeTitle(String nodeUri) throws DmtException;
@@ -1428,29 +1428,29 @@
/**
* Get the type of a node. The type of leaf node is the MIME type of the
* data it contains. The type of an interior node is a URI identifying a DDF
- * document; a null
type means that there is no DDF document
+ * document; a {@code null} type means that there is no DDF document
* overriding the tree structure defined by the ancestors.
*
* @param nodeUri the URI of the node
- * @return the type of the node, can be null
+ * @return the type of the node, can be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
@@ -1459,7 +1459,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * METADATA_MISMATCH
if node information cannot
+ * MetaNode.CMD_GET
access type)
- * DATA_STORE_FAILURE
if an error occurred while
+ * {@code MetaNode.CMD_GET} access type)
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get action
+ * {@code DmtPermission} for the node with the Get action
* present
*/
String getNodeType(String nodeUri) throws DmtException;
@@ -1470,27 +1470,27 @@
* read all nodes in the subtree under the given node.
*
* @param nodeUri the URI of the node to retrieve
- * @return the data of the node, can not be null
+ * @return the data of the node, can not be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
@@ -1499,7 +1499,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated principal
- * METADATA_MISMATCH
if the node value cannot be
+ * the {@code Get} operation for the associated principal
+ * MetaNode.CMD_GET
access type)
- * FEATURE_NOT_SUPPORTED
if the specified node is
+ * {@code MetaNode.CMD_GET} access type)
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node (and all its descendants
+ * {@code DmtPermission} for the node (and all its descendants
* in case of interior nodes) with the Get action present
*/
DmtData getNodeValue(String nodeUri) throws DmtException;
@@ -1514,25 +1514,25 @@
* @return the version of the node
* @throws DmtException with the following possible error codes:
*
- *
@@ -1541,7 +1541,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * METADATA_MISMATCH
if node information cannot
+ * MetaNode.CMD_GET
access type)
- * FEATURE_NOT_SUPPORTED
if the Version property
+ * {@code MetaNode.CMD_GET} access type)
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get action
+ * {@code DmtPermission} for the node with the Get action
* present
*/
int getNodeVersion(String nodeUri) throws DmtException;
@@ -1553,22 +1553,22 @@
* @return true if the given node is a leaf node
* @throws DmtException with the following possible error codes:
*
- *
@@ -1577,7 +1577,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * URI_TOO_LONG
if nodeUri
or a
+ * INVALID_URI
if nodeUri
is
- * null
or syntactically invalid
- * NODE_NOT_FOUND
if nodeUri
+ * PERMISSION_DENIED
if the session is
+ * Get
operation for the associated
+ * allow the {@code Get} operation for the associated
* principal
- * METADATA_MISMATCH
if node information cannot
+ * MetaNode.CMD_GET
access type)
- * DATA_STORE_FAILURE
if an error occurred while
+ * {@code MetaNode.CMD_GET} access type)
+ * COMMAND_FAILED
if the URI is not within the
+ * DmtPermission
for the node with the Get action
+ * {@code DmtPermission} for the node with the Get action
* present
*/
boolean isLeafNode(String nodeUri) throws DmtException;
@@ -1592,7 +1592,7 @@
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation, or,
* in case of local sessions, if the caller does not have
- * DmtPermission
for the node with the Get action
+ * {@code DmtPermission} for the node with the Get action
* present
*/
boolean isNodeUri(String nodeUri);
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/MetaNode.java osgi-compendium-4.3.0/src/info/dmtree/MetaNode.java
--- osgi-compendium-4.2.0/src/info/dmtree/MetaNode.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/MetaNode.java 2011-05-17 09:55:04.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -36,7 +36,7 @@
* necessarily sufficient: the plugin may carry out more thorough (more
* expensive) checks when the node is actually created or set.
* MetaNode
is available for a node, the DmtAdmin must use the
+ * If a {@code MetaNode} is available for a node, the DmtAdmin must use the
* information provided by it to filter out invalid requests on that node.
* However, not all methods on this interface are actually used for this
* purpose, as many of them (e.g. {@link #getFormat} or {@link #getValidNames})
@@ -48,17 +48,17 @@
* enforce the constraints defined by it - such methods are only for external
* use, for example in user interfaces.
* null
if a certain piece
+ * Most of the methods of this class return {@code null} if a certain piece
* of meta information is not defined for the node or providing this information
* is not supported. Methods of this class do not throw exceptions.
*
- * @version $Revision: 5673 $
+ * @version $Id: c89bb47db0043e3ae9d2dc45ecb0f1f8e7bf73fa $
*/
public interface MetaNode {
/**
* Constant for the ADD access type. If {@link #can(int)} returns
- * true
for this operation, this node can potentially be
+ * {@code true} for this operation, this node can potentially be
* added to its parent. Nodes with {@link #PERMANENT} or {@link #AUTOMATIC}
* scope typically do not have this access type.
*/
@@ -66,28 +66,28 @@
/**
* Constant for the DELETE access type. If {@link #can(int)} returns
- * true
for this operation, the node can potentially be
+ * {@code true} for this operation, the node can potentially be
* deleted.
*/
int CMD_DELETE = 1;
/**
* Constant for the EXECUTE access type. If {@link #can(int)} returns
- * true
for this operation, the node can potentially be
+ * {@code true} for this operation, the node can potentially be
* executed.
*/
int CMD_EXECUTE = 2;
/**
* Constant for the REPLACE access type. If {@link #can(int)} returns
- * true
for this operation, the value and other properties of
+ * {@code true} for this operation, the value and other properties of
* the node can potentially be modified.
*/
int CMD_REPLACE = 3;
/**
* Constant for the GET access type. If {@link #can(int)} returns
- * true
for this operation, the value, the list of child nodes
+ * {@code true} for this operation, the value, the list of child nodes
* (in case of interior nodes) and the properties of the node can
* potentially be retrieved.
*/
@@ -126,8 +126,8 @@
* Check whether the given operation is valid for this node. If no meta-data
* is provided for a node, all operations are valid.
*
- * @param operation One of the MetaNode.CMD_...
constants.
- * @return false
if the operation is not valid for this node
+ * @param operation One of the {@code MetaNode.CMD_...} constants.
+ * @return {@code false} if the operation is not valid for this node
* or the operation code is not one of the allowed constants
*/
boolean can(int operation);
@@ -135,7 +135,7 @@
/**
* Check whether the node is a leaf node or an internal one.
*
- * @return true
if the node is a leaf node
+ * @return {@code true} if the node is a leaf node
*/
boolean isLeaf();
@@ -157,15 +157,15 @@
/**
* Get the explanation string associated with this node. Can be
- * null
if no description is provided for this node.
+ * {@code null} if no description is provided for this node.
*
- * @return node description string or null
for no description
+ * @return node description string or {@code null} for no description
*/
String getDescription();
/**
* Get the number of maximum occurrences of this type of nodes on the same
- * level in the DMT. Returns Integer.MAX_VALUE
if there is no
+ * level in the DMT. Returns {@code Integer.MAX_VALUE} if there is no
* upper limit. Note that if the occurrence is greater than 1 then this node
* can not have siblings with different metadata. In other words, if
* different types of nodes coexist on the same level, their occurrence can
@@ -180,14 +180,14 @@
* Check whether zero occurrence of this node is valid. If no meta-data is
* returned for a node, zero occurrences are allowed.
*
- * @return true
if zero occurrence of this node is valid
+ * @return {@code true} if zero occurrence of this node is valid
*/
boolean isZeroOccurrenceAllowed();
/**
* Get the default value of this node if any.
*
- * @return The default value or null
if not defined
+ * @return The default value or {@code null} if not defined
*/
DmtData getDefault();
@@ -196,15 +196,15 @@
* returned list must be the default MIME type.
* null
is returned by this method. In this case
+ * node or if {@code null} is returned by this method. In this case
* the default MIME type cannot be retrieved from the meta-data, but the
* node may still have a default. This hidden default (if it exists) can be
- * utilized by passing null
as the type parameter of
+ * utilized by passing {@code null} as the type parameter of
* {@link DmtSession#setNodeType(String, String)} or
* {@link DmtSession#createLeafNode(String, DmtData, String)}.
*
* @return the list of allowed MIME types for this node, starting with the
- * default MIME type, or null
if all types are
+ * default MIME type, or {@code null} if all types are
* allowed
*/
String[] getMimeTypes();
@@ -213,7 +213,7 @@
* Get the maximum allowed value associated with a node of numeric format.
* If no meta-data is provided for a node, there is no upper limit to its
* value. This method is only meaningful if the node has integer or float
- * format. The returned limit has double
type, as this can be
+ * format. The returned limit has {@code double} type, as this can be
* used to denote both integer and float limits with full precision. The
* actual maximum should be the largest integer or float number that does
* not exceed the returned value.
@@ -223,7 +223,7 @@
* calls {@link #isValidValue} for checking the value, its behaviour should
* be consistent with this method.
*
- * @return the allowed maximum, or Double.MAX_VALUE
if there
+ * @return the allowed maximum, or {@code Double.MAX_VALUE} if there
* is no upper limit defined or the node's format is not integer or
* float
*/
@@ -233,7 +233,7 @@
* Get the minimum allowed value associated with a node of numeric format.
* If no meta-data is provided for a node, there is no lower limit to its
* value. This method is only meaningful if the node has integer or float
- * format. The returned limit has double
type, as this can be
+ * format. The returned limit has {@code double} type, as this can be
* used to denote both integer and float limits with full precision. The
* actual minimum should be the smallest integer or float number that is
* larger than the returned value.
@@ -243,7 +243,7 @@
* calls {@link #isValidValue} for checking the value, its behaviour should
* be consistent with this method.
*
- * @return the allowed minimum, or Double.MIN_VALUE
if there
+ * @return the allowed minimum, or {@code Double.MIN_VALUE} if there
* is no lower limit defined or the node's format is not integer or
* float
*/
@@ -251,7 +251,7 @@
/**
* Return an array of DmtData objects if valid values are defined for the
- * node, or null
otherwise. If no meta-data is provided for a
+ * node, or {@code null} otherwise. If no meta-data is provided for a
* node, all values are considered valid.
* null
if not
+ * @return the valid values for this node, or {@code null} if not
* defined
*/
DmtData[] getValidValues();
@@ -291,7 +291,7 @@
* {@link #getFormat()} contains {@link DmtData#FORMAT_RAW_STRING} or
* {@link DmtData#FORMAT_RAW_BINARY}: it specifies precisely which raw
* format(s) are actually supported. If the node cannot contain data in one
- * of the raw types, this method must return null
.
+ * of the raw types, this method must return {@code null}.
* null
if raw formats are not supported
+ * {@code null} if raw formats are not supported
*/
String[] getRawFormatNames();
@@ -311,21 +311,21 @@
* {@link #getMin} and {@link #getMax} methods (if applicable), as the Dmt
* Admin only calls this method for value validation.
* true
even if not all aspects of the
+ * This method may return {@code true} even if not all aspects of the
* value have been checked, expensive operations (for example those that
* require external resources) need not be performed here. The actual value
* setting method may still indicate that the value is invalid.
*
* @param value the value to check for validity
- * @return false
if the specified value is found to be
+ * @return {@code false} if the specified value is found to be
* invalid for the node described by this meta-node,
- * true
otherwise
+ * {@code true} otherwise
*/
boolean isValidValue(DmtData value);
/**
* Return an array of Strings if valid names are defined for the node, or
- * null
if no valid name list is defined or if this piece of
+ * {@code null} if no valid name list is defined or if this piece of
* meta info is not supported. If no meta-data is provided for a node, all
* names are considered valid.
* null
if
+ * @return the valid values for this node name, or {@code null} if
* not defined
*/
String[] getValidNames();
@@ -347,22 +347,22 @@
* {@link #getValidNames} (if any), the DmtAdmin only calls this method for
* name validation.
* true
even if not all aspects of the
+ * This method may return {@code true} even if not all aspects of the
* name have been checked, expensive operations (for example those that
* require external resources) need not be performed here. The actual node
* creation may still indicate that the node name is invalid.
*
* @param name the node name to check for validity
- * @return false
if the specified name is found to be invalid
- * for the node described by this meta-node, true
+ * @return {@code false} if the specified name is found to be invalid
+ * for the node described by this meta-node, {@code true}
* otherwise
*/
boolean isValidName(String name);
/**
* Returns the list of extension property keys, if the provider of this
- * MetaNode
provides proprietary extensions to node meta
- * data. The method returns null
if the node doesn't provide
+ * {@code MetaNode} provides proprietary extensions to node meta
+ * data. The method returns {@code null} if the node doesn't provide
* such extensions.
*
* @return the array of supported extension property keys
@@ -371,13 +371,13 @@
/**
* Returns the value for the specified extension property key. This method
- * only works if the provider of this MetaNode
provides
+ * only works if the provider of this {@code MetaNode} provides
* proprietary extensions to node meta data.
*
* @param key the key for the extension property
- * @return the value of the requested property, cannot be null
+ * @return the value of the requested property, cannot be {@code null}
* @throws IllegalArgumentException if the specified key is not supported by
- * this MetaNode
+ * this {@code MetaNode}
*/
Object getExtensionProperty(String key);
}
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/notification/AlertItem.java osgi-compendium-4.3.0/src/info/dmtree/notification/AlertItem.java
--- osgi-compendium-4.2.0/src/info/dmtree/notification/AlertItem.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/notification/AlertItem.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -20,7 +20,7 @@
/**
* Immutable data structure carried in an alert (client initiated notification).
- * The AlertItem
describes details of various notifications that
+ * The {@code AlertItem} describes details of various notifications that
* can be sent by the client, for example as alerts in the OMA DM protocol. The
* use cases include the client sending a session request to the server (alert
* 1201), the client notifying the server of completion of a software update
@@ -30,14 +30,14 @@
* The data syntax and semantics varies widely between various alerts, so does
* the optionality of particular parameters of an alert item. If an item, such
* as source or type, is not defined, the corresponding getter method returns
- * null
. For example, for alert 1201 (client-initiated session) all
- * elements will be null
.
+ * {@code null}. For example, for alert 1201 (client-initiated session) all
+ * elements will be {@code null}.
* AlertItem
class corresponds to the OMA DM
+ * The syntax used in {@code AlertItem} class corresponds to the OMA DM
* alert format. {@link NotificationService} implementations on other management
* protocols should map these constructs to the underlying protocol.
*
- * @version $Revision: 5673 $
+ * @version $Id: 8ed4f9c425e774840eaaae00e924798be8b997f2 $
*/
public class AlertItem {
@@ -52,16 +52,16 @@
/**
* Create an instance of the alert item. The constructor takes all possible
* data entries as parameters. Any of these parameters can be
- * null
. The semantics of the parameters may be refined by
+ * {@code null}. The semantics of the parameters may be refined by
* the definition of a specific alert, identified by its alert code (see
* {@link NotificationService#sendNotification}). In case of Generic Alerts
- * for example (code 1226), the mark
parameter contains a
+ * for example (code 1226), the {@code mark} parameter contains a
* severity string.
*
* @param source the URI of the node which is the source of the alert item
* @param type a MIME type or a URN that identifies the type of the data in
* the alert item
- * @param data a DmtData
object that contains the format and
+ * @param data a {@code DmtData} object that contains the format and
* value of the data in the alert item
* @param mark the mark parameter of the alert item
*/
@@ -75,17 +75,17 @@
/**
* Create an instance of the alert item, specifying the source node URI as
* an array of path segments. The constructor takes all possible data
- * entries as parameters. Any of these parameters can be null
.
+ * entries as parameters. Any of these parameters can be {@code null}.
* The semantics of the parameters may be refined by the definition of a
* specific alert, identified by its alert code (see
* {@link NotificationService#sendNotification}). In case of Generic Alerts
- * for example (code 1226), the mark
parameter contains a
+ * for example (code 1226), the {@code mark} parameter contains a
* severity string.
*
* @param source the path of the node which is the source of the alert item
* @param type a MIME type or a URN that identifies the type of the data in
* the alert item
- * @param data a DmtData
object that contains the format and
+ * @param data a {@code DmtData} object that contains the format and
* value of the data in the alert item
* @param mark the mark parameter of the alert item
*/
@@ -105,7 +105,7 @@
* associated with the alert item.
*
* @return the URI of the node which is the source of this alert, or
- * null
if there is no source
+ * {@code null} if there is no source
*/
public String getSource() {
return source;
@@ -118,7 +118,7 @@
* the alert item.
*
* @return the type type associated with the alert item, or
- * null
if there is no type
+ * {@code null} if there is no type
*/
public String getType() {
return type;
@@ -130,7 +130,7 @@
* the alert code in {@link NotificationService#sendNotification}. There
* might be no mark associated with the alert item.
*
- * @return the mark associated with the alert item, or null
+ * @return the mark associated with the alert item, or {@code null}
* if there is no mark
*/
public String getMark() {
@@ -139,11 +139,11 @@
/**
* Get the data associated with the alert item. The returned
- * DmtData
object contains the format and the value of the
+ * {@code DmtData} object contains the format and the value of the
* data in the alert item. There might be no data associated with the alert
* item.
*
- * @return the data associated with the alert item, or null
+ * @return the data associated with the alert item, or {@code null}
* if there is no data
*/
public DmtData getData() {
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/notification/NotificationService.java osgi-compendium-4.3.0/src/info/dmtree/notification/NotificationService.java
--- osgi-compendium-4.2.0/src/info/dmtree/notification/NotificationService.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/notification/NotificationService.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -20,16 +20,16 @@
/**
* NotificationService enables sending aynchronous notifications to a management
- * server. The implementation of NotificationService
should
+ * server. The implementation of {@code NotificationService} should
* register itself in the OSGi service registry as a service.
*
- * @version $Revision: 5673 $
+ * @version $Id: b7acf86bcc10a1d479456ba684e01ba8b18166cf $
*/
public interface NotificationService {
/**
* Sends a notification to a named principal. It is the responsibility of
- * the NotificationService
to route the notification to the
+ * the {@code NotificationService} to route the notification to the
* given principal using the registered
* {@link info.dmtree.notification.spi.RemoteAlertSender} services.
* AlertPermission
with a target string matching the
- * specified principal name. If the principal
parameter is
- * null
(the principal name is not known), the target of the
- * AlertPermission
must be "*".
+ * an {@code AlertPermission} with a target string matching the
+ * specified principal name. If the {@code principal} parameter is
+ * {@code null} (the principal name is not known), the target of the
+ * {@code AlertPermission} must be "*".
* null
or 0
- * (except principal
), it should send a protocol
+ * When this method is called with all its parameters {@code null} or 0
+ * (except {@code principal}), it should send a protocol
* specific default notification to initiate a management session. For
* example, in case of OMA DM this is alert 1201 "Client Initiated Session".
- * The principal
parameter can be used to determine the
+ * The {@code principal} parameter can be used to determine the
* recipient of the session initiation request.
*
* @param principal the principal name which is the recipient of this
- * notification, can be null
+ * notification, can be {@code null}
* @param code the alert code, can be 0 if not needed
* @param correlator optional field that contains the correlation identifier
- * of an associated exec command, can be null
if not
+ * of an associated exec command, can be {@code null} if not
* needed
* @param items the data of the alert items carried in this alert, can be
- * null
or empty if not needed
+ * {@code null} or empty if not needed
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the required
- * UNAUTHORIZED
when the remote server rejected
+ * ALERT_NOT_ROUTED
when the alert can not be
+ * REMOTE_ERROR
in case of communication
+ * COMMAND_FAILED
for unspecified errors
+ * FEATURE_NOT_SUPPORTED
if the underlying
+ * AlertPermission
with a target matching the
- * principal
parameter, as described above
+ * {@code AlertPermission} with a target matching the
+ * {@code principal} parameter, as described above
*/
void sendNotification(String principal, int code, String correlator,
AlertItem[] items) throws DmtException;
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/notification/package.html osgi-compendium-4.3.0/src/info/dmtree/notification/package.html
--- osgi-compendium-4.2.0/src/info/dmtree/notification/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/notification/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-
-
-info.dmtree.security
package.
-
-Import-Package: info.dmtree.notification;version="[1.0,2.0)"
-
-
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/notification/package-info.java osgi-compendium-4.3.0/src/info/dmtree/notification/package-info.java
--- osgi-compendium-4.2.0/src/info/dmtree/notification/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/notification/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Device Management Tree Notification Package Version 1.0.
+ *
+ * NotificationService
interface do not interact directly with this
-package.
-
-Import-Package: info.dmtree.notification.spi;version="[1.0,2.0)"
-
-
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/notification/spi/package-info.java osgi-compendium-4.3.0/src/info/dmtree/notification/spi/package-info.java
--- osgi-compendium-4.2.0/src/info/dmtree/notification/spi/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/notification/spi/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Device Management Tree Notification SPI Package Version 1.0.
+ *
+ * String
array of principal names
- * in the principals
registration property. If this property is not
+ * This can be done by providing a {@code String} array of principal names
+ * in the {@code principals} registration property. If this property is not
* registered, the service will be treated as the default sender. The default
* alert sender is only used when a more specific alert sender cannot be found.
* principals
registration property is used when the
+ * The {@code principals} registration property is used when the
* {@link info.dmtree.notification.NotificationService#sendNotification} method
- * is called, to find the proper RemoteAlertSender
for the given
+ * is called, to find the proper {@code RemoteAlertSender} for the given
* destination. If the caller does not specify a principal, the alert is only
* sent if the Notification Sender finds a default alert sender, or if the
* choice is unambiguous for some other reason (for example if only one alert
* sender is registered).
*
- * @version $Revision: 5673 $
+ * @version $Id: 885f0d730d8f9ff88b872f95dee8a91daf97e2d4 $
*/
public interface RemoteAlertSender {
/**
@@ -50,15 +50,15 @@
* command, a correlation identifier can be specified to provide the
* association between the execute and the alert.
* principal
parameter specifies which server the alert
- * should be sent to. This parameter can be null
if the
+ * The {@code principal} parameter specifies which server the alert
+ * should be sent to. This parameter can be {@code null} if the
* client does not know the name of the destination. The alert should still
* be delivered if possible; for example if the alert sender is only
* connected to one destination.
* DmtException
with the
- * code REMOTE_ERROR
.
+ * sender of the event, wrapped in a {@code DmtException} with the
+ * code {@code REMOTE_ERROR}.
* null
+ * be sent, can be {@code null}
* @param code the alert code, can be 0 if not needed
* @param correlator the correlation identifier of an associated EXEC
- * command, or null
if there is no associated EXEC
+ * command, or {@code null} if there is no associated EXEC
* @param items the data of the alert items carried in this alert, can be
- * empty or null
if no alert items are needed
+ * empty or {@code null} if no alert items are needed
* @throws Exception if the alert can not be sent to the server
*/
void sendAlert(String principal, int code, String correlator,
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/package.html osgi-compendium-4.3.0/src/info/dmtree/package.html
--- osgi-compendium-4.2.0/src/info/dmtree/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,16 +0,0 @@
-
-info.dmtree.security
package, and DMT plugin interfaces can be found in
-the info.dmtree.spi
package. Asynchronous notifications to remote
-management servers can be sent using the interfaces in the
-info.dmtree.notification
package.
-
-Import-Package: info.dmtree;version="[1.0,2.0)"
-
-
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/packageinfo osgi-compendium-4.3.0/src/info/dmtree/packageinfo
--- osgi-compendium-4.2.0/src/info/dmtree/packageinfo 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/packageinfo 2010-06-15 15:43:58.000000000 +0000
@@ -1 +1 @@
-version 1.0.1
+version 1.0.2
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/package-info.java osgi-compendium-4.3.0/src/info/dmtree/package-info.java
--- osgi-compendium-4.2.0/src/info/dmtree/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/package-info.java 2011-05-17 09:55:04.000000000 +0000
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Device Management Tree Package Version 1.0.
+ *
+ * DmtAdmin
, which
+ * This method is used to obtain access to {@code DmtAdmin}, which
* enables applications to manipulate the Device Management Tree.
*
* @return a DmtAdmin service object
@@ -67,7 +67,7 @@
}
/**
- * This method is used to obtain access to NotificationService
,
+ * This method is used to obtain access to {@code NotificationService},
* which enables applications to send asynchronous notifications to
* management servers.
*
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/registry/package.html osgi-compendium-4.3.0/src/info/dmtree/registry/package.html
--- osgi-compendium-4.2.0/src/info/dmtree/registry/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/registry/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,15 +0,0 @@
-
-DmtServiceFactory
class contained in this package provides methods
-for retrieving NotificationService
and DmtAdmin
-service implementations.
-
-Import-Package: info.dmtree.registry;version="[1.0,2.0)"
-
-
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/registry/package-info.java osgi-compendium-4.3.0/src/info/dmtree/registry/package-info.java
--- osgi-compendium-4.2.0/src/info/dmtree/registry/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/registry/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Device Management Tree Registry Package Version 1.0.
+ *
+ * AlertPermission
has a target string which controls the principal
+ * {@code AlertPermission} has a target string which controls the principal
* names where alerts can be sent. A wildcard is allowed at the end of the
* target string, to allow sending alerts to any principal with a name matching
* the given prefix. The "*" target means that alerts can be sent to
* any destination.
*
- * @version $Revision: 5673 $
+ * @version $Id: 2cd204e37cfce557d5466f62fe324e30ac807456 $
*/
public class AlertPermission extends Permission {
private static final long serialVersionUID = -3206463101788245739L;
@@ -44,13 +44,13 @@
private final String serverId;
/**
- * Creates a new AlertPermission
object with its name set to
+ * Creates a new {@code AlertPermission} object with its name set to
* the target string. Name must be non-null and non-empty.
*
- * @param target the name of a principal, can end with *
to
+ * @param target the name of a principal, can end with {@code *} to
* match any principal identifier with the given prefix
- * @throws NullPointerException if name
is null
- * @throws IllegalArgumentException if name
is empty
+ * @throws NullPointerException if {@code name} is {@code null}
+ * @throws IllegalArgumentException if {@code name} is empty
*/
public AlertPermission(String target) {
super(target);
@@ -71,18 +71,18 @@
}
/**
- * Creates a new AlertPermission
object using the 'canonical'
+ * Creates a new {@code AlertPermission} object using the 'canonical'
* two argument constructor. In this version this class does not define any
* actions, the second argument of this constructor must be "*" so that this
* class can later be extended in a backward compatible way.
*
- * @param target the name of the server, can end with *
to
+ * @param target the name of the server, can end with {@code *} to
* match any server identifier with the given prefix
* @param actions no actions defined, must be "*" for forward compatibility
- * @throws NullPointerException if name
or
- * actions
is null
- * @throws IllegalArgumentException if name
is empty or
- * actions
is not "*"
+ * @throws NullPointerException if {@code name} or
+ * {@code actions} is {@code null}
+ * @throws IllegalArgumentException if {@code name} is empty or
+ * {@code actions} is not "*"
*/
public AlertPermission(String target, String actions) {
this(target);
@@ -102,7 +102,7 @@
* target string.
*
* @param obj the object to compare to this AlertPermission instance
- * @return true
if the parameter represents the same
+ * @return {@code true} if the parameter represents the same
* permissions as this instance
*/
public boolean equals(Object obj) {
@@ -118,7 +118,7 @@
}
/**
- * Returns the action list (always *
in the current version).
+ * Returns the action list (always {@code *} in the current version).
*
* @return the action string "*"
*/
@@ -253,7 +253,7 @@
/**
* Returns an enumeration of all the AlertPermission objects in the
- * container. The returned value cannot be null
.
+ * container. The returned value cannot be {@code null}.
*
* @return an enumeration of all the AlertPermission objects
*/
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/security/DmtPermission.java osgi-compendium-4.3.0/src/info/dmtree/security/DmtPermission.java
--- osgi-compendium-4.2.0/src/info/dmtree/security/DmtPermission.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/security/DmtPermission.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -48,8 +48,8 @@
*
* This means that owner of this permission has Get access on every child node
* of ./OSGi/bundles. The asterix does not necessarily have to follow a '/'
- * character. For example the "./OSGi/a*"
target matches
- * the ./OSGi/applications
subtree.
+ * character. For example the {@code "./OSGi/a*"} target matches
+ * the {@code ./OSGi/applications} subtree.
*
- *
* "*"
, which matches all valid
+ * *
- * character (for example "./OSGi/L*"
), which matches all valid
+ * *
character is itself a valid URI character, it
+ * Since the {@code *} character is itself a valid URI character, it
* can appear as the last character of a valid absolute URI. To distinguish
- * this case from using *
as a wildcard, the *
- * character at the end of the URI must be escaped with the \
- * charater. For example the URI "./a*"
matches
- * "./a"
, "./aa"
, "./a/b"
etc. while
- * "./a\*"
matches "./a*"
only.
+ * this case from using {@code *} as a wildcard, the {@code *}
+ * character at the end of the URI must be escaped with the {@code \}
+ * charater. For example the URI {@code "./a*"} matches
+ * {@code "./a"}, {@code "./aa"}, {@code "./a/b"} etc. while
+ * {@code "./a\*"} matches {@code "./a*"} only.
* null
+ * {@code null}
* @throws IllegalArgumentException if any of the parameters are invalid
*/
public DmtPermission(String dmtUri, String actions) {
@@ -209,7 +209,7 @@
* mask containing all actions.
*
* @param obj the object to compare to this DmtPermission instance
- * @return true
if the parameter represents the same
+ * @return {@code true} if the parameter represents the same
* permissions as this instance
*/
public boolean equals(Object obj) {
@@ -252,7 +252,7 @@
/**
* Checks if this DmtPermission object "implies" the specified
- * permission. This method returns false
if and only if at
+ * permission. This method returns {@code false} if and only if at
* least one of the following conditions are fulfilled for the specified
* permission:
*
@@ -434,7 +434,7 @@
/**
* Returns an enumeration of all the DmtPermission objects in the container.
- * The returned value cannot be
null
.
+ * The returned value cannot be {@code null}.
*
* @return an enumeration of all the DmtPermission objects
*/
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/security/DmtPrincipalPermission.java osgi-compendium-4.3.0/src/info/dmtree/security/DmtPrincipalPermission.java
--- osgi-compendium-4.2.0/src/info/dmtree/security/DmtPrincipalPermission.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/security/DmtPrincipalPermission.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -28,13 +28,13 @@
* management server. Only protocol adapters communicating with management
* servers should be granted this permission.
* DmtPrincipalPermission
has a target string which controls the
+ * {@code DmtPrincipalPermission} has a target string which controls the
* name of the principal on whose behalf the protocol adapter can act. A
* wildcard is allowed at the end of the target string, to allow using any
* principal name with the given prefix. The "*" target means the
* adapter can create a session in the name of any principal.
*
- * @version $Revision: 5673 $
+ * @version $Id: f2894cf7a413e4308702b8f943b70556f6697d77 $
*/
public class DmtPrincipalPermission extends Permission {
private static final long serialVersionUID = 6388752177325038332L;
@@ -46,13 +46,13 @@
private final String principal;
/**
- * Creates a new DmtPrincipalPermission
object with its name
+ * Creates a new {@code DmtPrincipalPermission} object with its name
* set to the target string. Name must be non-null and non-empty.
*
- * @param target the name of the principal, can end with *
to
+ * @param target the name of the principal, can end with {@code *} to
* match any principal with the given prefix
- * @throws NullPointerException if name
is null
- * @throws IllegalArgumentException if name
is empty
+ * @throws NullPointerException if {@code name} is {@code null}
+ * @throws IllegalArgumentException if {@code name} is empty
*/
public DmtPrincipalPermission(String target) {
super(target);
@@ -73,18 +73,18 @@
}
/**
- * Creates a new DmtPrincipalPermission
object using the
+ * Creates a new {@code DmtPrincipalPermission} object using the
* 'canonical' two argument constructor. In this version this class does not
* define any actions, the second argument of this constructor must be "*"
* so that this class can later be extended in a backward compatible way.
*
- * @param target the name of the principal, can end with *
to
+ * @param target the name of the principal, can end with {@code *} to
* match any principal with the given prefix
* @param actions no actions defined, must be "*" for forward compatibility
- * @throws NullPointerException if name
or
- * actions
is null
- * @throws IllegalArgumentException if name
is empty or
- * actions
is not "*"
+ * @throws NullPointerException if {@code name} or
+ * {@code actions} is {@code null}
+ * @throws IllegalArgumentException if {@code name} is empty or
+ * {@code actions} is not "*"
*/
public DmtPrincipalPermission(String target, String actions) {
this(target);
@@ -104,7 +104,7 @@
* same target string.
*
* @param obj the object to compare to this DmtPrincipalPermission instance
- * @return true
if the parameter represents the same
+ * @return {@code true} if the parameter represents the same
* permissions as this instance
*/
public boolean equals(Object obj) {
@@ -120,7 +120,7 @@
}
/**
- * Returns the action list (always *
in the current version).
+ * Returns the action list (always {@code *} in the current version).
*
* @return the action string "*"
*/
@@ -255,7 +255,7 @@
/**
* Returns an enumeration of all the DmtPrincipalPermission objects in the
- * container. The returned value cannot be null
.
+ * container. The returned value cannot be {@code null}.
*
* @return an enumeration of all the DmtPrincipalPermission objects
*/
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/security/package.html osgi-compendium-4.3.0/src/info/dmtree/security/package.html
--- osgi-compendium-4.2.0/src/info/dmtree/security/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/security/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,12 +0,0 @@
-
-
-Import-Package: info.dmtree.security;version="[1.0,2.0)"
-
-
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/security/package-info.java osgi-compendium-4.3.0/src/info/dmtree/security/package-info.java
--- osgi-compendium-4.2.0/src/info/dmtree/security/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/security/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Device Management Tree Security Package Version 1.0.
+ *
+ * String
array in the dataRootURIs
registration
+ * {@code String} array in the {@code dataRootURIs} registration
* parameter.
* open...
methods to
+ * plugin, the DmtAdmin calls one of the {@code open...} methods to
* retrieve a plugin session object for processing the request. The called
* method depends on the lock type of the current session. In case of
* {@link #openReadWriteSession(String[], DmtSession)} and
* {@link #openAtomicSession(String[], DmtSession)}, the plugin may return
- * null
to indicate that the specified lock type is not supported.
+ * {@code null} to indicate that the specified lock type is not supported.
* In this case the DmtAdmin may call
* {@link #openReadOnlySession(String[], DmtSession)} to start a read-only
* plugin session, which can be used as long as there are no write operations on
* the nodes handled by this plugin.
* sessionRoot
parameter of each method is a String array
+ * The {@code sessionRoot} parameter of each method is a String array
* containing the segments of the URI pointing to the root of the session. This
* is an absolute path, so the first segment is always ".". Special
* characters appear escaped in the segments.
* DmtSession
to a node
+ * first reference is made within a {@code DmtSession} to a node
* which is handled by this plugin. Session information is given as it is
* needed for sending alerts back from the plugin.
* null
+ * current session, must not be {@code null}
* @param session the session from which this plugin instance is accessed,
- * must not be null
+ * must not be {@code null}
* @return a plugin session capable of executing read operations
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if some underlying operation failed because of
@@ -79,7 +79,7 @@
/**
* This method is called to signal the start of a non-atomic read-write
- * session when the first reference is made within a NODE_NOT_FOUND
if sessionRoot
+ * COMMAND_FAILED
if some unspecified error is
+ * DmtSession
+ * session when the first reference is made within a {@code DmtSession}
* to a node which is handled by this plugin. Session information is given
* as it is needed for sending alerts back from the plugin.
* null
+ * session, must not be {@code null}
* @param session the session from which this plugin instance is accessed,
- * must not be null
+ * must not be {@code null}
* @return a plugin session capable of executing read-write operations, or
- * null
if the plugin does not support non-atomic
+ * {@code null} if the plugin does not support non-atomic
* read-write sessions
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if some underlying operation failed because of
@@ -108,7 +108,7 @@
/**
* This method is called to signal the start of an atomic read-write session
- * when the first reference is made within a NODE_NOT_FOUND
if sessionRoot
+ * COMMAND_FAILED
if some unspecified error is
+ * DmtSession
to a
+ * when the first reference is made within a {@code DmtSession} to a
* node which is handled by this plugin. Session information is given as it
* is needed for sending alerts back from the plugin.
* null
+ * session, must not be {@code null}
* @param session the session from which this plugin instance is accessed,
- * must not be null
+ * must not be {@code null}
* @return a plugin session capable of executing read-write operations in an
- * atomic block, or null
if the plugin does not
+ * atomic block, or {@code null} if the plugin does not
* support atomic read-write sessions
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if some underlying operation failed because of
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/spi/ExecPlugin.java osgi-compendium-4.3.0/src/info/dmtree/spi/ExecPlugin.java
--- osgi-compendium-4.2.0/src/info/dmtree/spi/ExecPlugin.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/spi/ExecPlugin.java 2011-05-17 09:55:04.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -24,10 +24,10 @@
* NODE_NOT_FOUND
if sessionRoot
+ * COMMAND_FAILED
if some unspecified error is
+ * String
array in the execRootURIs
registration
+ * {@code String} array in the {@code execRootURIs} registration
* parameter.
*
- * @version $Revision: 5673 $
+ * @version $Id: c79828948f304c0f55a835af04f01d5861adeb1d $
*/
public interface ExecPlugin {
@@ -39,31 +39,31 @@
* depends on the definition of the managed object on which the command is
* issued. Session information is given as it is needed for sending alerts
* back from the plugin. If a correlation ID is specified, it should be used
- * as the correlator
parameter for alerts sent in response to
+ * as the {@code correlator} parameter for alerts sent in response to
* this execute operation.
* nodePath
parameter contains an array of path segments
+ * The {@code nodePath} parameter contains an array of path segments
* identifying the node to be executed in the subtree of this plugin. This
* is an absolute path, so the first segment is always ".".
* Special characters appear escaped in the segments.
*
* @param session a reference to the session in which the operation was
- * issued, must not be null
+ * issued, must not be {@code null}
* @param nodePath the absolute path of the node to be executed, must not be
- * null
+ * {@code null}
* @param correlator an identifier to associate this operation with any
- * alerts sent in response to it, can be null
+ * alerts sent in response to it, can be {@code null}
* @param data the parameter of the execute operation, can be
- * null
+ * {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @see DmtSession#execute(String, String)
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/spi/package.html osgi-compendium-4.3.0/src/info/dmtree/spi/package.html
--- osgi-compendium-4.2.0/src/info/dmtree/spi/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/spi/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,13 +0,0 @@
-
-
-NODE_NOT_FOUND
if the node does not exist and
+ * METADATA_MISMATCH
if the command failed
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * DmtAdmin
interface do not interact directly with these.
-
-Import-Package: info.dmtree.spi;version="[1.0,2.0)"
-
-
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/spi/package-info.java osgi-compendium-4.3.0/src/info/dmtree/spi/package-info.java
--- osgi-compendium-4.2.0/src/info/dmtree/spi/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/spi/package-info.java 2011-05-17 09:55:04.000000000 +0000
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Device Management Tree SPI Package Version 1.0.
+ *
+ * ReadableDataSession
.
+ * not apply for an instance that is only a {@code ReadableDataSession}.
* For example, the {@link #close} method description also contains information
* about its behaviour when invoked as part of a transactional session.
* nodePath
parameters appearing in this interface always
+ * The {@code nodePath} parameters appearing in this interface always
* contain an array of path segments identifying a node in the subtree of this
* plugin. This parameter contains an absolute path, so the first segment is
* always ".". Special characters appear escaped in the segments.
@@ -43,7 +43,7 @@
* before delegating the call to a plugin. Therefore plugins can take certain
* circumstances for granted: that the path is valid and is within the subtree
* of the plugin and the session, the command can be applied to the given node
- * (e.g. the target of getChildNodeNames
is an interior node), etc.
+ * (e.g. the target of {@code getChildNodeNames} is an interior node), etc.
* All errors described by the error codes {@link DmtException#INVALID_URI},
* {@link DmtException#URI_TOO_LONG}, {@link DmtException#PERMISSION_DENIED},
* {@link DmtException#COMMAND_NOT_ALLOWED} and
@@ -57,7 +57,7 @@
* indicate such discrepancies.
* isNodeUri
call). However,
+ * plugin (except, of course, before the {@code isNodeUri} call). However,
* some small amount of time elapses between the check and the call, so in case
* of plugins where the node structure can change independantly from the DMT,
* the target node might disappear in that time. For example, a whole subtree
@@ -71,7 +71,7 @@
* fit into any other category, the {@link DmtException#COMMAND_FAILED} code
* should be used.
*
- * @version $Revision: 5673 $
+ * @version $Id: fdc501943df679cda179475a1f1257112d8fadfd $
*/
public interface ReadableDataSession {
/**
@@ -84,11 +84,11 @@
* @param nodePath the absolute path of the node that has changed
* @throws DmtException with the following possible error codes:
*
- *
*/
@@ -107,11 +107,11 @@
* This method should not perform any data manipulation, only cleanup
* operations. In non-atomic read-write sessions the data manipulation
* should be done instantly during each tree operation, while in atomic
- * sessions the NODE_NOT_FOUND
if nodePath
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * DmtAdmin
always calls
+ * sessions the {@code DmtAdmin} always calls
* {@link TransactionalDataSession#commit} automatically before the session
* is actually closed.
*
- * @throws DmtException with the error code COMMAND_FAILED
if
+ * @throws DmtException with the error code {@code COMMAND_FAILED} if
* the plugin failed to close for any reason
*/
void close() throws DmtException;
@@ -120,7 +120,7 @@
* Get the list of children names of a node. The returned array contains the
* names - not the URIs - of the immediate children nodes of the given node.
* The returned child names must be mangled ({@link info.dmtree.Uri#mangle(String)}).
- * The returned array may contain null
entries, but these are
+ * The returned array may contain {@code null} entries, but these are
* removed by the DmtAdmin before returning it to the client.
*
* @param nodePath the absolute path of the node
@@ -128,13 +128,13 @@
* array if the node has no children
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -153,29 +153,29 @@
* specific to the plugin returned by this method is complemented by meta
* data from the DmtAdmin before returning it to the client. If there are
* differences in the meta data elements known by the plugin and the
- * NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the information could
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * DmtAdmin
then the plugin specific elements take
+ * {@code DmtAdmin} then the plugin specific elements take
* precedence.
* DmtException
- * may be thrown with the NODE_NOT_FOUND
error code. To allow
+ * the plugin). For nodes that are not defined, a {@code DmtException}
+ * may be thrown with the {@code NODE_NOT_FOUND} error code. To allow
* easier implementation of plugins that do not provide meta-data, it is
- * allowed to return null
for any node, regardless of whether
+ * allowed to return {@code null} for any node, regardless of whether
* it is defined or not.
*
* @param nodePath the absolute path of the node
* @return a MetaNode which describes meta data information, can be
- * null
if there is no meta data available for the
+ * {@code null} if there is no meta data available for the
* given node
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -193,15 +193,15 @@
* @return the size of the data in the node
* @throws DmtException with the following possible error codes:
* NODE_NOT_FOUND
if nodeUri
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ *
- *
* @throws SecurityException if the caller does not have the necessary
@@ -217,15 +217,15 @@
* @return the timestamp of the last modification
* @throws DmtException with the following possible error codes:
* NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the information could
+ * FEATURE_NOT_SUPPORTED
if the Size property is
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ *
- *
* @throws SecurityException if the caller does not have the necessary
@@ -237,19 +237,19 @@
* Get the title of a node. There might be no title property set for a node.
*
* @param nodePath the absolute path of the node
- * @return the title of the node, or NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the information could
+ * FEATURE_NOT_SUPPORTED
if the Timestamp
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * null
if the node has no
+ * @return the title of the node, or {@code null} if the node has no
* title
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -260,20 +260,20 @@
/**
* Get the type of a node. The type of leaf node is the MIME type of the
* data it contains. The type of an interior node is a URI identifying a DDF
- * document; a NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the information could
+ * FEATURE_NOT_SUPPORTED
if the Title property
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * null
type means that there is no DDF document
+ * document; a {@code null} type means that there is no DDF document
* overriding the tree structure defined by the ancestors.
*
* @param nodePath the absolute path of the node
- * @return the type of the node, can be null
+ * @return the type of the node, can be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -296,13 +296,13 @@
* @return true if the given node is a leaf node
* @throws DmtException with the following possible error codes:
* NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the information could
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ *
- *
* @throws SecurityException if the caller does not have the necessary
@@ -314,18 +314,18 @@
* Get the data contained in a leaf or interior node.
*
* @param nodePath the absolute path of the node to retrieve
- * @return the data of the leaf node, must not be NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the information could
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * null
+ * @return the data of the leaf node, must not be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -343,15 +343,15 @@
* @return the version of the node
* @throws DmtException with the following possible error codes:
* NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the information could
+ * FEATURE_NOT_SUPPORTED
if the specified node is
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ *
- *
* @throws SecurityException if the caller does not have the necessary
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/spi/ReadWriteDataSession.java osgi-compendium-4.3.0/src/info/dmtree/spi/ReadWriteDataSession.java
--- osgi-compendium-4.2.0/src/info/dmtree/spi/ReadWriteDataSession.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/spi/ReadWriteDataSession.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -24,7 +24,7 @@
* Provides non-atomic read-write access to the part of the tree handled by the
* plugin that created this session.
* NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the information could
+ * FEATURE_NOT_SUPPORTED
if the Version property
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * nodePath
parameters appearing in this interface always
+ * The {@code nodePath} parameters appearing in this interface always
* contain an array of path segments identifying a node in the subtree of this
* plugin. This parameter contains an absolute path, so the first segment is
* always ".". Special characters appear escaped in the segments.
@@ -36,7 +36,7 @@
* caller before delegating the call to a plugin. Therefore plugins can take
* certain circumstances for granted: that the path is valid and is within the
* subtree of the plugin and the session, the command can be applied to the
- * given node (e.g. the target of setNodeValue
is a leaf node),
+ * given node (e.g. the target of {@code setNodeValue} is a leaf node),
* etc. All errors described by the error codes {@link DmtException#INVALID_URI}, {@link DmtException#URI_TOO_LONG}, {@link DmtException#PERMISSION_DENIED},
* {@link DmtException#COMMAND_NOT_ALLOWED} and
* {@link DmtException#TRANSACTION_ERROR} are fully filtered out before control
@@ -64,7 +64,7 @@
* fit into any other category, the {@link DmtException#COMMAND_FAILED} code
* should be used.
*
- * @version $Revision: 5673 $
+ * @version $Id: fbde6c1121240b239e8a907c6427eeb242e78322 $
*/
public interface ReadWriteDataSession extends ReadableDataSession {
@@ -76,22 +76,22 @@
* @param nodePath an absolute path specifying the node or the root of a
* subtree to be copied
* @param newNodePath the absolute path of the new node or root of a subtree
- * @param recursive false
if only a single node is copied,
- * true
if the whole subtree is copied
+ * @param recursive {@code false} if only a single node is copied,
+ * {@code true} if the whole subtree is copied
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -106,19 +106,19 @@
* specified, is a URI identifying a DDF document.
*
* @param nodePath the absolute path of the node to create
- * @param type the type URI of the interior node, can be NODE_NOT_FOUND
if nodePath
- * points to a non-existing node, or if newNodePath
+ * NODE_ALREADY_EXISTS
if
- * newNodePath
points to a node that already exists
- * METADATA_MISMATCH
if the node could not be
+ * FEATURE_NOT_SUPPORTED
if the copy operation
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * null
+ * @param type the type URI of the interior node, can be {@code null}
* if no node type is defined
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -130,25 +130,25 @@
/**
* Create a leaf node with a given value and MIME type. If the specified
- * value or MIME type is NODE_NOT_FOUND
if nodePath
+ * NODE_ALREADY_EXISTS
if nodeUri
+ * METADATA_MISMATCH
if the node could not be
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * null
, their default values must be
+ * value or MIME type is {@code null}, their default values must be
* taken.
*
* @param nodePath the absolute path of the node to create
* @param value the value to be given to the new node, can be
- * null
+ * {@code null}
* @param mimeType the MIME type to be given to the new node, can be
- * null
+ * {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -167,13 +167,13 @@
* @param nodePath the absolute path of the node to delete
* @throws DmtException with the following possible error codes:
* NODE_NOT_FOUND
if nodePath
+ * NODE_ALREADY_EXISTS
if nodePath
+ * METADATA_MISMATCH
if the node could not be
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ *
- *
* @throws SecurityException if the caller does not have the necessary
@@ -193,17 +193,17 @@
* @param newName the new name property of the node
* @throws DmtException with the following possible error codes:
* NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the node could not be
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ *
- *
* @throws SecurityException if the caller does not have the necessary
@@ -217,18 +217,18 @@
* not to exceed the limit of 255 bytes in UTF-8 encoding.
*
* @param nodePath the absolute path of the node
- * @param title the title text of the node, can be NODE_NOT_FOUND
if nodePath
+ * NODE_ALREADY_EXISTS
if there already exists a
- * sibling of nodePath
with the name
- * newName
- * METADATA_MISMATCH
if the node could not be
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * null
+ * @param title the title text of the node, can be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -242,22 +242,22 @@
* data it contains. The type of an interior node is a URI identifying a DDF
* document.
* NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the title could not be
+ * FEATURE_NOT_SUPPORTED
if the Title property
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * null
type should remove the
+ * For interior nodes, the {@code null} type should remove the
* reference (if any) to a DDF document overriding the tree structure
* defined by the ancestors. For leaf nodes, it requests that the default
* MIME type is used for the given node.
*
* @param nodePath the absolute path of the node
- * @param type the type of the node, can be null
+ * @param type the type of the node, can be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -268,27 +268,27 @@
/**
* Set the value of a leaf or interior node. The format of the node is
- * contained in the NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the type could not be
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * DmtData
object. For interior nodes, the
- * format is FORMAT_NODE
, while for leaf nodes this format is
+ * contained in the {@code DmtData} object. For interior nodes, the
+ * format is {@code FORMAT_NODE}, while for leaf nodes this format is
* never used.
* null
, the default value must be
- * taken; if there is no default value, a DmtException
with
- * error code METADATA_MISMATCH
must be thrown.
+ * If the specified value is {@code null}, the default value must be
+ * taken; if there is no default value, a {@code DmtException} with
+ * error code {@code METADATA_MISMATCH} must be thrown.
*
* @param nodePath the absolute path of the node
- * @param data the data to be set, can be null
+ * @param data the data to be set, can be {@code null}
* @throws DmtException with the following possible error codes:
*
- *
* @throws SecurityException if the caller does not have the necessary
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/spi/TransactionalDataSession.java osgi-compendium-4.3.0/src/info/dmtree/spi/TransactionalDataSession.java
--- osgi-compendium-4.2.0/src/info/dmtree/spi/TransactionalDataSession.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/spi/TransactionalDataSession.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -22,7 +22,7 @@
* Provides atomic read-write access to the part of the tree handled by the
* plugin that created this session.
*
- * @version $Revision: 5673 $
+ * @version $Id: fa17127995f9e650baec161d4d767a9aef510cb9 $
*/
public interface TransactionalDataSession extends ReadWriteDataSession {
@@ -36,25 +36,25 @@
* happen due to some multi-node semantic constraints defined by a specific
* implementation. For example, node A can be required to always have
* children A/B, A/C and A/D. If this condition is broken when
- * NODE_NOT_FOUND
if nodePath
+ * METADATA_MISMATCH
if the value could not be
+ * FEATURE_NOT_SUPPORTED
if the specified node is
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * commit()
is executed, the method will fail, and throw a
- * METADATA_MISMATCH
exception.
+ * {@code commit()} is executed, the method will fail, and throw a
+ * {@code METADATA_MISMATCH} exception.
* CONCURRENT_ACCESS
is thrown.
+ * the code {@code CONCURRENT_ACCESS} is thrown.
*
* @throws DmtException with the following possible error codes
*
- *
* @throws SecurityException if the caller does not have the necessary
@@ -68,7 +68,7 @@
* the creation of this object that starts the session, and all subsequent
* {@link #commit} and {@link #rollback} calls.
*
- * @throws DmtException with the error code METADATA_MISMATCH
if the operation failed
+ * CONCURRENT_ACCESS
if it is detected that some
+ * DATA_STORE_FAILURE
if an error occurred while
+ * COMMAND_FAILED
if some unspecified error is
+ * ROLLBACK_FAILED
+ * @throws DmtException with the error code {@code ROLLBACK_FAILED}
* in case the rollback did not succeed
* @throws SecurityException if the caller does not have the necessary
* permissions to execute the underlying management operation
diff -Nru osgi-compendium-4.2.0/src/info/dmtree/Uri.java osgi-compendium-4.3.0/src/info/dmtree/Uri.java
--- osgi-compendium-4.2.0/src/info/dmtree/Uri.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/info/dmtree/Uri.java 2011-05-17 09:55:04.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -29,9 +29,9 @@
*
- *
*
- * @version $Revision: 5673 $
+ * @version $Id: 5289414c7bb0af15b3db2b8d2174181321f739c4 $
*/
public final class Uri {
/*
@@ -170,7 +170,7 @@
* Returns a node name that is valid for the tree operation methods, based
* on the given node name. This transformation is not idempotent, so it must
* not be called with a parameter that is the result of a previous
- * '/'
\u002F) is the separator of the node names.
+ * "\/"
). The backslash must be escaped with a double backslash sequence. A
+ * {@code "\/"}). The backslash must be escaped with a double backslash sequence. A
* backslash found must be ignored when it is not followed by a slash or
* backslash.
* [-a-zA-Z0-9_.!~*'()]
are most efficient.
+ * restricted to the URI set {@code [-a-zA-Z0-9_.!~*'()]} are most efficient.
* '/'
+ * "."
and not "./"
.
+ * {@code "."} and not {@code "./"}.
* "../"
to traverse the tree upwards.
- * "./"
must not be used
+ * sequence {@code "../"} to traverse the tree upwards.
+ * mangle
method call.
+ * {@code mangle} method call.
*
@@ -184,7 +184,7 @@
* skip the mangling if the node name is known to be valid (though it is
* always safe to call this method).
*
*
* @param nodeName the node name to be mangled (if necessary), must not be
- * nodeName
as described
+ * The method returns the normalized {@code nodeName} as described
* below. Invalid node names are normalized in different ways, depending on
* the cause. If the length of the name does not exceed the limit, but the
* name contains '/' or '\' characters, then these are simply escaped by
@@ -199,11 +199,11 @@
* null
or empty
+ * {@code null} or empty
* @return the normalized node name that is valid for tree operations
- * @throws NullPointerException if nodeName
is
- * null
- * @throws IllegalArgumentException if nodeName
is empty
+ * @throws NullPointerException if {@code nodeName} is
+ * {@code null}
+ * @throws IllegalArgumentException if {@code nodeName} is empty
*/
public static String mangle(String nodeName) {
return mangle(nodeName, getMaxSegmentNameLength());
@@ -214,13 +214,13 @@
* already be mangled.
* ""
) is returned.
+ * ({@code ""}) is returned.
*
* @param path a possibly empty array of URI segments, must not be
- * null
+ * {@code null}
* @return the URI created from the specified segments
* @throws NullPointerException if the specified path or any of its
- * segments are null
+ * segments are {@code null}
* @throws IllegalArgumentException if the specified path contains too many
* or malformed segments or the resulting URI is too long
*/
@@ -265,7 +265,7 @@
* @param segment the URI segment
* @return URI segment length
* @throws NullPointerException if the specified segment is
- * null
+ * {@code null}
* @throws IllegalArgumentException if the specified URI segment is
* malformed
*/
@@ -307,9 +307,9 @@
* an array of URI segments. Special characters in the returned segments are
* escaped. The returned array may be empty if the specifed URI was empty.
*
- * @param uri the URI to be split, must not be null
+ * @param uri the URI to be split, must not be {@code null}
* @return an array of URI segments created by splitting the specified URI
- * @throws NullPointerException if the specified URI is null
+ * @throws NullPointerException if the specified URI is {@code null}
* @throws IllegalArgumentException if the specified URI is malformed
*/
public static String[] toPath(String uri) {
@@ -353,7 +353,7 @@
* Returns the maximum allowed number of URI segments. The returned value is
* implementation specific.
* Integer.MAX_VALUE
indicates that there
+ * The return value of {@code Integer.MAX_VALUE} indicates that there
* is no upper limit on the number of URI segments.
*
* @return maximum number of URI segments supported by the implementation
@@ -367,7 +367,7 @@
* specific. The length of the URI is defined as the number of bytes in the
* unescaped, UTF-8 encoded represenation of the URI.
* Integer.MAX_VALUE
indicates that there
+ * The return value of {@code Integer.MAX_VALUE} indicates that there
* is no upper limit on the length of URIs.
*
* @return maximum URI length supported by the implementation
@@ -382,7 +382,7 @@
* number of bytes in the unescaped, UTF-8 encoded represenation of the
* segment.
* Integer.MAX_VALUE
indicates that there
+ * The return value of {@code Integer.MAX_VALUE} indicates that there
* is no upper limit on the length of segment names.
*
* @return maximum URI segment length supported by the implementation
@@ -396,10 +396,10 @@
* contains the complete path to a node in the DMT starting from the DMT
* root (".").
*
- * @param uri the URI to be checked, must not be null
and must
+ * @param uri the URI to be checked, must not be {@code null} and must
* contain a valid URI
* @return whether the specified URI is absolute
- * @throws NullPointerException if the specified URI is null
+ * @throws NullPointerException if the specified URI is {@code null}
* @throws IllegalArgumentException if the specified URI is malformed
*/
public static boolean isAbsoluteUri(String uri) {
@@ -416,7 +416,7 @@
* Checks whether the specified URI is valid. A URI is considered valid if
* it meets the following constraints:
*
- *
* The exact definition of the length of a URI and its segments is
- * given in the descriptions of the null
;
+ * getMaxUriLength()
and
- * getMaxSegmentNameLength()
methods.
+ * given in the descriptions of the {@code getMaxUriLength()} and
+ * {@code getMaxSegmentNameLength()} methods.
*
* @param uri the URI to be validated
* @return whether the specified URI is valid
diff -Nru osgi-compendium-4.2.0/src/META-INF/MANIFEST.MF osgi-compendium-4.3.0/src/META-INF/MANIFEST.MF
--- osgi-compendium-4.2.0/src/META-INF/MANIFEST.MF 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/META-INF/MANIFEST.MF 2011-09-08 14:54:04.000000000 +0000
@@ -1,86 +1,69 @@
-Manifest-Version: 1.0
-Created-By: 1.5.0_11 (Sun Microsystems Inc.)
-Bundle-License: http://opensource.org/licenses/apache2.0.php; link="ht
- tp://www.apache.org/licenses/LICENSE-2.0"; description="Apache Licens
- e, Version 2.0"
-Import-Package: info.dmtree;resolution:=optional;version="[1.0,2)",inf
- o.dmtree.notification;resolution:=optional;version="[1.0,2)",info.dmt
- ree.notification.spi;resolution:=optional;version="[1.0,2)",info.dmtr
- ee.registry;resolution:=optional;version="[1.0,2)",info.dmtree.securi
- ty;resolution:=optional;version="[1.0,2)",info.dmtree.spi;resolution:
- =optional;version="[1.0,2)",javax.microedition.io;resolution:=optiona
- l,javax.servlet;resolution:=optional,javax.servlet.http;resolution:=o
- ptional,javax.xml.parsers;resolution:=optional,org.osgi.application;r
- esolution:=optional;version="[1.0,2)",org.osgi.framework;resolution:=
- optional;version="[1.5,2)",org.osgi.service.application;resolution:=o
- ptional;version="[1.1,2)",org.osgi.service.blueprint.container;resolu
- tion:=optional;version="[1.0,2)",org.osgi.service.blueprint.reflect;r
- esolution:=optional;version="[1.0,2)",org.osgi.service.cm;resolution:
- =optional;version="[1.3,2)",org.osgi.service.component;resolution:=op
- tional;version="[1.1,2)",org.osgi.service.condpermadmin;resolution:=o
- ptional;version="[1.1,2)",org.osgi.service.deploymentadmin;resolution
- :=optional;version="[1.1,2)",org.osgi.service.deploymentadmin.spi;res
- olution:=optional;version="[1.0,2)",org.osgi.service.device;resolutio
- n:=optional;version="[1.1,2)",org.osgi.service.event;resolution:=opti
- onal;version="[1.2,2)",org.osgi.service.http;resolution:=optional;ver
- sion="[1.2,2)",org.osgi.service.io;resolution:=optional;version="[1.0
- ,2)",org.osgi.service.log;resolution:=optional;version="[1.3,2)",org.
- osgi.service.metatype;resolution:=optional;version="[1.1,2)",org.osgi
- .service.monitor;resolution:=optional;version="[1.0,2)",org.osgi.serv
- ice.prefs;resolution:=optional;version="[1.1,2)",org.osgi.service.pro
- visioning;resolution:=optional;version="[1.2,2)",org.osgi.service.upn
- p;resolution:=optional;version="[1.1,2)",org.osgi.service.useradmin;r
- esolution:=optional;version="[1.1,2)",org.osgi.service.wireadmin;reso
- lution:=optional;version="[1.0,2)",org.osgi.util.cdma;resolution:=opt
- ional;version="[1.0,2)",org.osgi.util.gsm;resolution:=optional;versio
- n="[1.0,2)",org.osgi.util.measurement;resolution:=optional;version="[
- 1.0,2)",org.osgi.util.mobile;resolution:=optional;version="[1.0,2)",o
- rg.osgi.util.position;resolution:=optional;version="[1.0,2)",org.osgi
- .util.tracker;resolution:=optional;version="[1.4,2)",org.osgi.util.xm
- l;resolution:=optional;version="[1.0,2)"
-Bnd-LastModified: 1251758748671
-Export-Package: info.dmtree;version="1.0.1",info.dmtree.spi;uses:="inf
- o.dmtree";version="1.0",info.dmtree.registry;uses:="org.osgi.framewor
- k,info.dmtree,info.dmtree.notification";version="1.0",info.dmtree.not
- ification.spi;uses:="info.dmtree.notification";version="1.0",info.dmt
- ree.security;uses:="info.dmtree";version="1.0",info.dmtree.notificati
- on;uses:="info.dmtree";version="1.0",org.osgi.application;uses:="org.
- osgi.framework";version="1.0",org.osgi.service.application;uses:="org
- .osgi.framework";version="1.1",org.osgi.service.blueprint.container;u
- ses:="org.osgi.service.blueprint.reflect,org.osgi.framework";version=
- "1.0",org.osgi.service.blueprint.reflect;version="1.0",org.osgi.servi
- ce.cm;uses:="org.osgi.framework";version="1.3",org.osgi.service.compo
- nent;uses:="org.osgi.framework";version="1.1",org.osgi.service.deploy
- mentadmin.spi;uses:="org.osgi.service.deploymentadmin,org.osgi.framew
- ork";version="1.0.1",org.osgi.service.deploymentadmin;uses:="org.osgi
- .framework";version="1.1",org.osgi.service.device;uses:="org.osgi.fra
- mework";version="1.1",org.osgi.service.event;uses:="org.osgi.framewor
- k";version="1.2",org.osgi.service.http;uses:="javax.servlet.http,java
- x.servlet";version="1.2.1",org.osgi.service.io;uses:="javax.microedit
- ion.io";version="1.0",org.osgi.service.log;uses:="org.osgi.framework"
- ;version="1.3",org.osgi.service.metatype;uses:="org.osgi.framework";v
- ersion="1.1",org.osgi.service.monitor;version="1.0",org.osgi.service.
- prefs;version="1.1.1",org.osgi.service.provisioning;version="1.2",org
- .osgi.service.upnp;version="1.1",org.osgi.service.useradmin;uses:="or
- g.osgi.framework";version="1.1",org.osgi.service.wireadmin;uses:="org
- .osgi.framework";version="1.0",org.osgi.util.measurement;version="1.0
- .1",org.osgi.util.position;uses:="org.osgi.util.measurement";version=
- "1.0.1",org.osgi.util.cdma;uses:="org.osgi.framework,org.osgi.service
- .condpermadmin";version="1.0",org.osgi.util.gsm;uses:="org.osgi.frame
- work,org.osgi.service.condpermadmin";version="1.0.1",org.osgi.util.mo
- bile;uses:="org.osgi.framework,org.osgi.service.condpermadmin";versio
- n="1.0",org.osgi.util.tracker;uses:="org.osgi.framework";version="1.4
- ",org.osgi.util.xml;uses:="javax.xml.parsers,org.osgi.framework";vers
- ion="1.0.1"
-Bundle-Version: 4.2.0.200908310645
-Bundle-Copyright: Copyright (c) OSGi Alliance (2000, 2009). All Rights
- Reserved.
-Bundle-Name: osgi.cmpn
-Bundle-Description: OSGi Service Platform Release 4 Version 4.2, Compe
- ndium Interfaces and Classes for use in compiling bundles.
-Bundle-Vendor: OSGi Alliance
+Manifest-Version: 1
+Bnd-LastModified: 1315493643159
+Bundle-Copyright: Copyright (c) OSGi Alliance (2000, 2011). All Rights R
+ eserved.
+Bundle-Description: OSGi Service Platform Release 4 Version 4.3, Compend
+ ium Interfaces and Classes for use in compiling bundles.
+Bundle-License: http://opensource.org/licenses/apache2.0.php; link="http
+ ://www.apache.org/licenses/LICENSE-2.0"; description="Apache License, V
+ ersion 2.0"
Bundle-ManifestVersion: 2
+Bundle-Name: osgi.cmpn
Bundle-SymbolicName: osgi.cmpn
-Tool: Bnd-0.0.356
+Bundle-Vendor: OSGi Alliance
+Bundle-Version: 4.3.0.201109081654
+Created-By: 1.6.0_27 (Apple Inc.)
DynamicImport-Package: *
-
+Export-Package: info.dmtree.registry;uses:="info.dmtree.notification,inf
+ o.dmtree,org.osgi.framework";version="1.0",info.dmtree.spi;uses:="info.
+ dmtree";version="1.0",info.dmtree.notification.spi;uses:="info.dmtree.n
+ otification";version="1.0",info.dmtree.notification;uses:="info.dmtree"
+ ;version="1.0",info.dmtree;version="1.0.2",info.dmtree.security;uses:="
+ info.dmtree";version="1.0",org.osgi.application;uses:="org.osgi.framewo
+ rk";version="1.0",org.osgi.jmx.framework;uses:="org.osgi.jmx,javax.mana
+ gement.openmbean";version="1.5",org.osgi.jmx.service.permissionadmin;ve
+ rsion="1.2",org.osgi.jmx.service.provisioning;uses:="javax.management.o
+ penmbean";version="1.2",org.osgi.jmx.service.coordinator;uses:="org.osg
+ i.jmx,javax.management.openmbean";version="1.0",org.osgi.jmx.service.cm
+ ;uses:="javax.management.openmbean";version="1.3",org.osgi.jmx.service.
+ useradmin;uses:="org.osgi.jmx,javax.management.openmbean";version="1.1.
+ 1",org.osgi.jmx;uses:="javax.management.openmbean";version="1.0",org.os
+ gi.service.application;uses:="org.osgi.framework";version="1.1",org.osg
+ i.service.blueprint.reflect;version="1.0.1",org.osgi.service.blueprint.
+ container;uses:="org.osgi.service.blueprint.reflect,org.osgi.framework"
+ ;version="1.0.2",org.osgi.service.cm;uses:="org.osgi.framework";version
+ ="1.3",org.osgi.service.component;uses:="org.osgi.framework";version="1
+ .1",org.osgi.service.component.annotations;version="1.0",org.osgi.servi
+ ce.coordinator;uses:="org.osgi.framework";version="1.0",org.osgi.servic
+ e.deploymentadmin.spi;uses:="org.osgi.framework,org.osgi.service.deploy
+ mentadmin";version="1.0.1",org.osgi.service.deploymentadmin;uses:="org.
+ osgi.framework";version="1.1",org.osgi.service.device;uses:="org.osgi.f
+ ramework";version="1.1",org.osgi.service.event;uses:="org.osgi.framewor
+ k";version="1.3",org.osgi.service.http;uses:="javax.servlet.http,javax.
+ servlet";version="1.2.1",org.osgi.service.io;uses:="javax.microedition.
+ io";version="1.0",org.osgi.service.jdbc;uses:="javax.sql";version="1.0"
+ ,org.osgi.service.jndi;uses:="javax.naming.directory,javax.naming";vers
+ ion="1.0",org.osgi.service.jpa;uses:="javax.persistence";version="1.0",
+ org.osgi.service.log;uses:="org.osgi.framework";version="1.3",org.osgi.
+ service.metatype;uses:="org.osgi.framework";version="1.2",org.osgi.serv
+ ice.monitor;version="1.0",org.osgi.service.prefs;version="1.1.1",org.os
+ gi.service.provisioning;version="1.2",org.osgi.service.remoteserviceadm
+ in;uses:="org.osgi.framework";version="1.0.1",org.osgi.service.upnp;ver
+ sion="1.1",org.osgi.service.useradmin;uses:="org.osgi.framework";versio
+ n="1.1",org.osgi.service.wireadmin;uses:="org.osgi.framework";version="
+ 1.0.1",org.osgi.util.cdma;uses:="org.osgi.service.condpermadmin,org.osg
+ i.framework";version="1.0",org.osgi.util.gsm;uses:="org.osgi.service.co
+ ndpermadmin,org.osgi.framework";version="1.0.1",org.osgi.util.measureme
+ nt;version="1.0.1",org.osgi.util.mobile;uses:="org.osgi.service.condper
+ madmin,org.osgi.framework";version="1.0",org.osgi.util.position;uses:="
+ org.osgi.util.measurement";version="1.0.1",org.osgi.util.tracker;uses:=
+ "org.osgi.framework";version="1.5",org.osgi.util.xml;uses:="org.osgi.fr
+ amework,javax.xml.parsers";version="1.0.1"
+Import-Package: javax.management.openmbean;resolution:=optional,javax.mi
+ croedition.io;resolution:=optional,javax.naming;resolution:=optional,ja
+ vax.naming.directory;resolution:=optional,javax.persistence;resolution:
+ =optional,javax.servlet;resolution:=optional,javax.servlet.http;resolut
+ ion:=optional,javax.sql;resolution:=optional,javax.xml.parsers;resoluti
+ on:=optional,org.osgi.framework;resolution:=optional,org.osgi.service.c
+ ondpermadmin;resolution:=optional
+Tool: Bnd-1.44.0
diff -Nru osgi-compendium-4.2.0/src/org/osgi/application/ApplicationContext.java osgi-compendium-4.3.0/src/org/osgi/application/ApplicationContext.java
--- osgi-compendium-4.2.0/src/org/osgi/application/ApplicationContext.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/application/ApplicationContext.java 2011-09-08 14:18:36.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2005, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2005, 2011). 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.
@@ -23,73 +23,73 @@
import org.osgi.framework.ServiceRegistration;
/**
- * ApplicationContext
is the access point for an OSGi-aware
- * application to the features of the OSGi Service Platform. Each application
- * instance will have its own ApplicationContext
instance, which
- * will not be reused after destroying the corresponding application instance.
+ * {@code ApplicationContext} is the access point for an OSGi-aware application
+ * to the features of the OSGi Service Platform. Each application instance will
+ * have its own {@code ApplicationContext} instance, which will not be reused
+ * after destroying the corresponding application instance.
* ApplicationContext
using
- * the {@link Framework#getApplicationContext} method.
+ * Application instances can obtain their {@code ApplicationContext} using the
+ * {@link Framework#getApplicationContext(Object)} method.
* ApplicationContext
instance is bound to the
+ * The lifecycle of an {@code ApplicationContext} instance is bound to the
* lifecycle of the corresponding application instance. The
- * ApplicationContext
becomes available when the application is
- * started and it is invalidated when the application instance is stopped (i.e.
- * the "stop" method of the application activator object returned). All method
- * calls (except {@link #getApplicationId()} and {@link #getInstanceId()}) to an
- * invalidated context object result an IllegalStateException
.
+ * {@code ApplicationContext} becomes available when the application is started
+ * and it is invalidated when the application instance is stopped (i.e. the
+ * "stop" method of the application activator object returned). All method calls
+ * (except {@link #getApplicationId()} and {@link #getInstanceId()}) to an
+ * invalidated context object result an {@code IllegalStateException}.
*
* @see org.osgi.application.Framework
*
- * @version $Revision: 7937 $
+ * @version $Id: b86dd158983b7a8aafa2a8023d76ef15b3e68125 $
*/
public interface ApplicationContext {
/**
* Adds the specified {@link ApplicationServiceListener} object to this context
- * application instance's list of listeners. The specified referenceName
is a
+ * application instance's list of listeners. The specified {@code referenceName} is a
* reference name specified in the descriptor of the corresponding application. The registered
- * listener> will only receive the {@link ApplicationServiceEvent}s related to the referred service.
+ * {@code listener} will only receive the {@link ApplicationServiceEvent}s related to the referred service.
*
listener
was already added, calling this method will overwrite the previous
+ * If the {@code listener} was already added, calling this method will overwrite the previous
* registration.
* null
+ * not be {@code null}
* @param referenceName the reference name of a service from the descriptor of the corresponding
- * application. It must not be null
.
+ * application. It must not be {@code null}.
* @throws java.lang.IllegalStateException
* If this context application instance has stopped.
- * @throws java.lang.NullPointerException If listener
or referenceName
- * is null
+ * @throws java.lang.NullPointerException If {@code listener} or {@code referenceName}
+ * is {@code null}
* @throws java.lang.IllegalArgumentException If there is no service in the
- * application descriptor with the specified referenceName
.
+ * application descriptor with the specified {@code referenceName}.
*/
public void addServiceListener(ApplicationServiceListener listener, String referenceName) throws java.lang.IllegalArgumentException;
/**
* Adds the specified {@link ApplicationServiceListener} object to this context
- * application instance's list of listeners. The referenceNames
parameter is an
+ * application instance's list of listeners. The {@code referenceNames} parameter is an
* array of reference name specified in the descriptor of the corresponding application. The registered
- * listener> will only receive the {@link ApplicationServiceEvent}s related to the referred
+ * {@code listener} will only receive the {@link ApplicationServiceEvent}s related to the referred
* services.
*
listener
was already added, calling this method will overwrite the previous
+ * If the {@code listener} was already added, calling this method will overwrite the previous
* registration.
* null
+ * be {@code null}
* @param referenceNames and array of service reference names from the descriptor of the corresponding
- * application. It must not be null
and it must not be empty.
+ * application. It must not be {@code null} and it must not be empty.
* @throws java.lang.IllegalStateException
* If this context application instance has stopped.
- * @throws java.lang.NullPointerException If listener
or referenceNames
- * is null
- * @throws java.lang.IllegalArgumentException If referenceNames
array is empty or it
+ * @throws java.lang.NullPointerException If {@code listener} or {@code referenceNames}
+ * is {@code null}
+ * @throws java.lang.IllegalArgumentException If {@code referenceNames} array is empty or it
* contains unknown references
*/
public void addServiceListener(ApplicationServiceListener listener, String[] referenceNames) throws java.lang.IllegalArgumentException;
@@ -98,7 +98,7 @@
* Removes the specified {@link org.osgi.application.ApplicationServiceListener} object from this
* context application instances's list of listeners.
* listener
is not contained in this context application
+ * If {@code listener} is not contained in this context application
* instance's list of listeners, this method does nothing.
*
* @param listener
@@ -107,18 +107,19 @@
* If this context application instance has stopped.
*/
public void removeServiceListener(ApplicationServiceListener listener);
-
- /**
- * This method returns the identifier of the corresponding application instance.
- * This identifier is guaranteed to be unique within the scope of the device.
- *
- * Note: this method can safely be called on an invalid
- * ApplicationContext
as well.
- *
- * @see org.osgi.service.application.ApplicationHandle#getInstanceId()
- *
- * @return the unique identifier of the corresponding application instance
- */
+
+ /**
+ * This method returns the identifier of the corresponding application
+ * instance. This identifier is guaranteed to be unique within the scope of
+ * the device.
+ *
+ * Note: this method can safely be called on an invalid
+ * {@code ApplicationContext} as well.
+ *
+ * @see org.osgi.service.application.ApplicationHandle#getInstanceId()
+ *
+ * @return the unique identifier of the corresponding application instance
+ */
public String getInstanceId();
/**
@@ -127,7 +128,7 @@
* different application type.
* ApplicationContext
as well.
+ * {@code ApplicationContext} as well.
*
* @see org.osgi.service.application.ApplicationDescriptor#getApplicationId()
*
@@ -137,7 +138,7 @@
/**
* This method returns the service object for the specified
- * referenceName
. If the cardinality of the reference is
+ * {@code referenceName}. If the cardinality of the reference is
* 0..n or 1..n and multiple services are bound to the reference, the
* service with the highest ranking (as specified in its
* {@link org.osgi.framework.Constants#SERVICE_RANKING} property) is returned. If there
@@ -147,13 +148,13 @@
*
* @param referenceName
* The name of a reference as specified in a reference element in
- * this context applications's description. It must not be null
- * @return A service object for the referenced service or null
+ * this context applications's description. It must not be {@code null}
+ * @return A service object for the referenced service or {@code null}
* if the reference cardinality is 0..1 or 0..n and no bound service
* is available.
- * @throws java.lang.NullPointerException If referenceName
is null
.
+ * @throws java.lang.NullPointerException If {@code referenceName} is {@code null}.
* @throws java.lang.IllegalArgumentException If there is no service in the
- * application descriptor with the specified referenceName
.
+ * application descriptor with the specified {@code referenceName}.
* @throws java.lang.IllegalStateException
* If this context application instance has stopped.
*/
@@ -161,52 +162,52 @@
/**
* This method returns the service objects for the specified
- * referenceName
.
+ * {@code referenceName}.
*
* @param referenceName
* The name of a reference as specified in a reference element in
* this context applications's description. It must not be
- * null
.
+ * {@code null}.
* @return An array of service object for the referenced service or
- * null
if the reference cardinality is 0..1 or 0..n
+ * {@code null} if the reference cardinality is 0..1 or 0..n
* and no bound service is available.
- * @throws java.lang.NullPointerException If referenceName
is null
.
+ * @throws java.lang.NullPointerException If {@code referenceName} is {@code null}.
* @throws java.lang.IllegalArgumentException If there is no service in the
- * application descriptor with the specified referenceName
.
+ * application descriptor with the specified {@code referenceName}.
* @throws java.lang.IllegalStateException
* If this context application instance has stopped.
*/
public Object[] locateServices(String referenceName);
-
- /**
- * Returns the startup parameters specified when calling the
- * {@link org.osgi.service.application.ApplicationDescriptor#launch}
- * method.
- * null
or empty {@link java.lang.String} (""
),
- * the value can be any object including null
.
- *
- * @return a {@link java.util.Map} containing the startup arguments.
- * It can be null
.
- * @throws java.lang.IllegalStateException
- * If this context application instance has stopped.
- */
+
+ /**
+ * Returns the startup parameters specified when calling the
+ * {@code org.osgi.service.application.ApplicationDescriptor#launch(Map)}
+ * method.
+ * locateService
or locateServices
methods.
+ * {@code locateService} or {@code locateServices} methods.
*
* @param serviceObject A service object the application is bound to.
* It must not be null.
* @return The service properties associated with the specified service
* object.
- * @throws NullPointerException if the specified serviceObject
- * is null
+ * @throws NullPointerException if the specified {@code serviceObject}
+ * is {@code null}
* @throws IllegalArgumentException if the application is not
* bound to the specified service object or it is not a service
* object at all.
@@ -215,88 +216,89 @@
*/
public Map getServiceProperties(Object serviceObject);
-
- /**
+ /**
* Registers the specified service object with the specified properties
* under the specified class names into the Framework. A
* {@link org.osgi.framework.ServiceRegistration} object is returned. The
- * {@link org.osgi.framework.ServiceRegistration} object is for the private use of the
- * application registering the service and should not be shared with other
- * applications. The registering application is defined to be the context application.
- * Bundles can locate the service by using either the
- * {@link org.osgi.framework.BundleContext#getServiceReferences} or
- * {@link org.osgi.framework.BundleContext#getServiceReference} method. Other applications
- * can locate this service by using {@link #locateService(String)} or {@link #locateServices(String)}
- * method, if they declared their dependence on the registered service.
+ * {@link org.osgi.framework.ServiceRegistration} object is for the private
+ * use of the application registering the service and should not be shared
+ * with other applications. The registering application is defined to be the
+ * context application. Bundles can locate the service by using either the
+ * {@link org.osgi.framework.BundleContext#getServiceReferences(String, String)}
+ * or {@link org.osgi.framework.BundleContext#getServiceReference(String)}
+ * method. Other applications can locate this service by using
+ * {@link #locateService(String)} or {@link #locateServices(String)} method,
+ * if they declared their dependence on the registered service.
*
*
- *
*
* @param clazzes The class names under which the service can be located.
* The class names in this array will be stored in the service's
- * properties under the key {@link org.osgi.framework.Constants#OBJECTCLASS}.
- * This parameter must not be service
is not a ServiceFactory
,
- * an IllegalArgumentException
is thrown if
- * service
is not an instanceof
all the
- * classes named.
+ * Dictionary
(which may be null
): a property
- * named {@link org.osgi.framework.Constants#SERVICE_ID} identifying the registration number of
- * the service and a property named {@link org.osgi.framework.Constants#OBJECTCLASS} containing
- * all the specified classes. If any of these properties have already been
- * specified by the registering bundle, their values will be overwritten by
- * the Framework.
- * ServiceRegistration
object for this registration is
+ * null
.
- * @param service The service object or a ServiceFactory
- * object.
+ * properties under the key
+ * {@link org.osgi.framework.Constants#OBJECTCLASS}. This parameter
+ * must not be {@code null}.
+ * @param service The service object or a {@code ServiceFactory} object.
* @param properties The properties for this service. The keys in the
- * properties object must all be String
objects. See
- * {@link org.osgi.framework.Constants} for a list of standard service property keys.
- * Changes should not be made to this object after calling this
- * method. To update the service's properties the
- * {@link org.osgi.framework.ServiceRegistration#setProperties} method must be called.
- * The set of properties may be null
if the service
- * has no properties.
+ * properties object must all be {@code String} objects. See
+ * {@link org.osgi.framework.Constants} for a list of standard
+ * service property keys. Changes should not be made to this object
+ * after calling this method. To update the service's properties the
+ * {@link org.osgi.framework.ServiceRegistration#setProperties(Dictionary)}
+ * method must be called. The set of properties may be {@code null}
+ * if the service has no properties.
*
- * @return A {@link org.osgi.framework.ServiceRegistration} object for use by the application
- * registering the service to update the service's properties or to
- * unregister the service.
+ * @return A {@link org.osgi.framework.ServiceRegistration} object for use
+ * by the application registering the service to update the
+ * service's properties or to unregister the service.
*
* @throws java.lang.IllegalArgumentException If one of the following is
* true:
*
- *
- * @throws NullPointerException if service
is null
.
- * service
is not a ServiceFactory
- * object and is not an instance of all the named classes in
- * clazzes
.
- * properties
contains case variants of the same
- * key name.
+ * clazzes
is null
- *
+ * @throws NullPointerException if {@code clazzes} is {@code null}
+ *
* @throws java.lang.SecurityException If the caller does not have the
- * ServicePermission
to register the service for all
- * the named classes and the Java Runtime Environment supports
+ * {@code ServicePermission} to register the service for all the
+ * named classes and the Java Runtime Environment supports
* permissions.
*
* @throws java.lang.IllegalStateException If this ApplicationContext is no
* longer valid.
*
- * @see org.osgi.framework.BundleContext#registerService(java.lang.String[], java.lang.Object, java.util.Dictionary)
+ * @see org.osgi.framework.BundleContext#registerService(java.lang.String[],
+ * java.lang.Object, java.util.Dictionary)
* @see org.osgi.framework.ServiceRegistration
* @see org.osgi.framework.ServiceFactory
*/
@@ -311,35 +313,35 @@
* This method is otherwise identical to
* {@link #registerService(java.lang.String[], java.lang.Object,
* java.util.Dictionary)} and is provided as a convenience when
- * service
will only be registered under a single class name.
+ * {@code service} will only be registered under a single class name.
* Note that even in this case the value of the service's
* {@link Constants#OBJECTCLASS} property will be an array of strings,
* rather than just a single string.
*
* @param clazz The class name under which the service can be located. It
- * must not be null
- * @param service The service object or a ServiceFactory
+ * must not be {@code null}
+ * @param service The service object or a {@code ServiceFactory}
* object.
* @param properties The properties for this service.
*
- * @return A ServiceRegistration
object for use by the application
+ * @return A {@code ServiceRegistration} object for use by the application
* registering the service to update the service's properties or to
* unregister the service.
*
* @throws java.lang.IllegalArgumentException If one of the following is
* true:
*
- *
- * @throws NullPointerException if service
is null
.
- * service
is not a ServiceFactory
+ * clazz
.
- * properties
contains case variants of the same
+ * {@code clazz}.
+ * clazz
is null
+ * @throws NullPointerException if {@code clazz} is {@code null}
*
* @throws java.lang.SecurityException If the caller does not have the
- * ServicePermission
to register the service
+ * {@code ServicePermission} to register the service
* the named class and the Java Runtime Environment supports
* permissions.
*
diff -Nru osgi-compendium-4.2.0/src/org/osgi/application/ApplicationServiceEvent.java osgi-compendium-4.3.0/src/org/osgi/application/ApplicationServiceEvent.java
--- osgi-compendium-4.2.0/src/org/osgi/application/ApplicationServiceEvent.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/application/ApplicationServiceEvent.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2005, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2005, 2010). 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.
@@ -22,11 +22,11 @@
/**
* An event from the Framework describing a service lifecycle change.
* ApplicationServiceEvent
objects are delivered to a
- * ApplicationServiceListener
objects when a change occurs in this service's
- * lifecycle. The delivery of an ApplicationServiceEvent
is
+ * {@code ApplicationServiceEvent} objects are delivered to a
+ * {@code ApplicationServiceListener} objects when a change occurs in this service's
+ * lifecycle. The delivery of an {@code ApplicationServiceEvent} is
* always triggered by a {@link org.osgi.framework.ServiceEvent}.
- * ApplicationServiceEvent
extends the content of ServiceEvent
+ * {@code ApplicationServiceEvent} extends the content of {@code ServiceEvent}
* with the service object the event is referring to as applications has no means to
* find the corresponding service object for a {@link org.osgi.framework.ServiceReference}.
* A type code is used to identify the event type for future
@@ -38,7 +38,7 @@
* @see org.osgi.framework.ServiceEvent
* @see ApplicationServiceListener
*
- * @version $Revision: 7937 $
+ * @version $Id: bf3629f6023fe5a3897d1cfdcd441630187c3909 $
*/
public class ApplicationServiceEvent extends ServiceEvent {
@@ -50,13 +50,13 @@
*
* @param type The event type. Available type codes are defines in
* {@link org.osgi.framework.ServiceEvent}
- * @param reference A ServiceReference
object to the service
- * that had a lifecycle change. This reference will be used as the source
+ * @param reference A {@code ServiceReference} object to the service
+ * that had a lifecycle change. This reference will be used as the {@code source}
* in the {@link java.util.EventObject} baseclass, therefore, it must not be
* null.
* @param serviceObject The service object bound to this application instance. It can
- * be null
if this application is not bound to this service yet.
- * @throws IllegalArgumentException if the specified reference
is null.
+ * be {@code null} if this application is not bound to this service yet.
+ * @throws IllegalArgumentException if the specified {@code reference} is null.
*/
public ApplicationServiceEvent(int type, ServiceReference reference, Object serviceObject) {
super(type, reference);
@@ -67,11 +67,11 @@
* This method returns the service object of this service bound to the listener
* application instance. A service object becomes bound to the application when it
* first obtains a service object reference to that service by calling the
- * ApplicationContext.locateService
or locateServices
+ * {@code ApplicationContext.locateService} or {@code locateServices}
* methods. If the application is not bound to the service yet, this method returns
- * null
.
+ * {@code null}.
*
- * @return the service object bound to the listener application or null
+ * @return the service object bound to the listener application or {@code null}
* if it isn't bound to this service yet.
*/
public Object getServiceObject() {
diff -Nru osgi-compendium-4.2.0/src/org/osgi/application/ApplicationServiceListener.java osgi-compendium-4.3.0/src/org/osgi/application/ApplicationServiceListener.java
--- osgi-compendium-4.2.0/src/org/osgi/application/ApplicationServiceListener.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/application/ApplicationServiceListener.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2005, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2005, 2010). 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.
@@ -21,38 +21,38 @@
import org.osgi.framework.*;
/**
- * An ApplicationServiceEvent
listener. When a
- * ServiceEvent
is
- * fired, it is converted to an ApplictionServiceEvent
- * and it is synchronously delivered to an ApplicationServiceListener
.
+ * An {@code ApplicationServiceEvent} listener. When a
+ * {@code ServiceEvent} is
+ * fired, it is converted to an {@code ApplictionServiceEvent}
+ * and it is synchronously delivered to an {@code ApplicationServiceListener}.
*
* ApplicationServiceListener
is a listener interface that may be
+ * {@code ApplicationServiceListener} is a listener interface that may be
* implemented by an application developer.
* ApplicationServiceListener
object is registered with the Framework
- * using the ApplicationContext.addServiceListener
method.
- * ApplicationServiceListener
objects are called with an
- * ApplicationServiceEvent
object when a service is registered, modified, or
+ * An {@code ApplicationServiceListener} object is registered with the Framework
+ * using the {@code ApplicationContext.addServiceListener} method.
+ * {@code ApplicationServiceListener} objects are called with an
+ * {@code ApplicationServiceEvent} object when a service is registered, modified, or
* is in the process of unregistering.
*
* ApplicationServiceEvent
object delivery to
- * ApplicationServiceListener
+ * {@code ApplicationServiceEvent} object delivery to
+ * {@code ApplicationServiceListener}
* objects is filtered by the filter specified when the listener was registered.
* If the Java Runtime Environment supports permissions, then additional
- * filtering is done. ApplicationServiceEvent
objects are only delivered to
+ * filtering is done. {@code ApplicationServiceEvent} objects are only delivered to
* the listener if the application which defines the listener object's class has the
- * appropriate ServicePermission
to get the service using at
+ * appropriate {@code ServicePermission} to get the service using at
* least one of the named classes the service was registered under, and the application
* specified its dependence on the corresponding service in the application metadata.
*
* ApplicationServiceEvent
object delivery to ApplicationServiceListener
+ * {@code ApplicationServiceEvent} object delivery to {@code ApplicationServiceListener}
* objects is further filtered according to package sources as defined in
* {@link ServiceReference#isAssignableTo(Bundle, String)}.
*
- * @version $Revision: 7937 $
+ * @version $Id: fdd38c556d5784e412d68175a59f6f83c92aa4cc $
* @see ApplicationServiceEvent
* @see ServicePermission
*/
@@ -60,7 +60,7 @@
/**
* Receives notification that a service has had a lifecycle change.
*
- * @param event The ApplicationServiceEvent
object.
+ * @param event The {@code ApplicationServiceEvent} object.
*/
public void serviceChanged(ApplicationServiceEvent event);
}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/application/Framework.java osgi-compendium-4.3.0/src/org/osgi/application/Framework.java
--- osgi-compendium-4.2.0/src/org/osgi/application/Framework.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/application/Framework.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2005, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2005, 2010). 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.
@@ -22,7 +22,7 @@
* Using this class, OSGi-aware applications can obtain their
* {@link ApplicationContext}.
*
- * @version $Revision: 5673 $
+ * @version $Id: 68f0c39e8c8c0ea02ae2c20154bba8bf1e6ba7bc $
*/
public final class Framework {
@@ -42,8 +42,8 @@
* application instance must return the same context object
*
* @param applicationInstance is the activator object of an application instance
- * @throws java.lang.NullPointerException If applicationInstance
- * is null
+ * @throws java.lang.NullPointerException If {@code applicationInstance}
+ * is {@code null}
* @throws java.lang.IllegalArgumentException if called with an object that is not
* the activator object of an application.
* @return the {@link ApplicationContext} of the specified application instance.
diff -Nru osgi-compendium-4.2.0/src/org/osgi/application/package.html osgi-compendium-4.3.0/src/org/osgi/application/package.html
--- osgi-compendium-4.2.0/src/org/osgi/application/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/application/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,10 +0,0 @@
-
-
-Import-Package: org.osgi.application; version="[1.0,2.0)"
-
-
diff -Nru osgi-compendium-4.2.0/src/org/osgi/application/package-info.java osgi-compendium-4.3.0/src/org/osgi/application/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/application/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/application/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Foreign Application Package Version 1.0.
+ *
+ *
+ *
+ */
+ Item STATE_ITEM = new Item(STATE, "The state of the bundle",
+ SimpleType.STRING, INSTALLED, RESOLVED, STARTING, ACTIVE, STOPPING,
+ UNINSTALLED, UNKNOWN);
+ /**
+ * The key LAST_MODIFIED, used in {@link #LAST_MODIFIED_ITEM}.
+ */
+ String LAST_MODIFIED = "LastModified";
+
+ /**
+ * The item containing the last modified time in the {@link #BUNDLE_TYPE}.
+ * The key is {@link #LAST_MODIFIED} and the the type is
+ * {@link SimpleType#LONG}.
+ */
+ Item LAST_MODIFIED_ITEM = new Item(LAST_MODIFIED,
+ "The last modification time of the bundle", SimpleType.LONG);
+ /**
+ * The key PERSISTENTLY_STARTED, used in {@link #PERSISTENTLY_STARTED_ITEM}.
+ */
+ String PERSISTENTLY_STARTED = "PersistentlyStarted";
+
+ /**
+ * The item containing the indication of persistently started in
+ * {@link #BUNDLE_TYPE}. The key is {@link #PERSISTENTLY_STARTED} and the
+ * the type is {@link SimpleType#BOOLEAN}.
+ */
+ Item PERSISTENTLY_STARTED_ITEM = new Item(PERSISTENTLY_STARTED,
+ "Whether the bundle is persistently started", SimpleType.BOOLEAN);
+ /**
+ * The key REMOVAL_PENDING, used in {@link #REMOVAL_PENDING_ITEM}.
+ */
+ String REMOVAL_PENDING = "RemovalPending";
+
+ /**
+ * The item containing the indication of removal pending in
+ * {@link #BUNDLE_TYPE}. The key is {@link #REMOVAL_PENDING} and the type is
+ * {@link SimpleType#BOOLEAN}.
+ */
+ Item REMOVAL_PENDING_ITEM = new Item(REMOVAL_PENDING,
+ "Whether the bundle is pending removal", SimpleType.BOOLEAN);
+ /**
+ * The key REQUIRED, used in {@link #REQUIRED_ITEM}.
+ */
+ String REQUIRED = "Required";
+
+ /**
+ * The item containing the required status in {@link #BUNDLE_TYPE}. The key
+ * is {@link #REQUIRED} and the the type is {@link SimpleType#BOOLEAN}.
+ */
+ Item REQUIRED_ITEM = new Item(REQUIRED, "Whether the bundle is required",
+ SimpleType.BOOLEAN);
+ /**
+ * The key FRAGMENT, used in {@link #FRAGMENT_ITEM}.
+ */
+ String FRAGMENT = "Fragment";
+
+ /**
+ * The item containing the fragment status in {@link #BUNDLE_TYPE}. The key
+ * is {@link #FRAGMENT} and the the type is {@link SimpleType#BOOLEAN}.
+ */
+ Item FRAGMENT_ITEM = new Item(FRAGMENT, "Whether the bundle is a fragment",
+ SimpleType.BOOLEAN);
+ /**
+ * The key REGISTERED_SERVICES, used in {@link #REGISTERED_SERVICES_ITEM}.
+ */
+ String REGISTERED_SERVICES = "RegisteredServices";
+
+ /**
+ * The item containing the registered services of the bundle in
+ * {@link #BUNDLE_TYPE}. The key is {@link #REGISTERED_SERVICES} and the the
+ * type is {@link JmxConstants#LONG_ARRAY_TYPE}.
+ */
+ Item REGISTERED_SERVICES_ITEM = new Item(REGISTERED_SERVICES,
+ "The registered services of the bundle",
+ JmxConstants.LONG_ARRAY_TYPE);
+ /**
+ * The key SERVICES_IN_USE, used in {@link #SERVICES_IN_USE_ITEM}.
+ */
+ String SERVICES_IN_USE = "ServicesInUse";
+
+ /**
+ * The item containing the services in use by this bundle in
+ * {@link #BUNDLE_TYPE}. The key is {@link #SERVICES_IN_USE} and the the
+ * type is {@link JmxConstants#LONG_ARRAY_TYPE}.
+ */
+ Item SERVICES_IN_USE_ITEM = new Item(SERVICES_IN_USE,
+ "The services in use by the bundle", JmxConstants.LONG_ARRAY_TYPE);
+ /**
+ * The key HEADERS, used in {@link #HEADERS_ITEM}.
+ */
+ String HEADERS = "Headers";
+
+ /**
+ * The item containing the bundle headers in {@link #BUNDLE_TYPE}. The key
+ * is {@link #HEADERS} and the the type is {@link #HEADERS_TYPE}.
+ */
+ Item HEADERS_ITEM = new Item(HEADERS, "The headers of the bundle",
+ HEADERS_TYPE);
+
+ /**
+ * The key EXPORTED_PACKAGES, used in {@link #EXPORTED_PACKAGES_ITEM}.
+ */
+ String EXPORTED_PACKAGES = "ExportedPackages";
+
+ /**
+ * The item containing the exported package names in {@link #BUNDLE_TYPE}
+ * .The key is {@link #EXPORTED_PACKAGES} and the the type is
+ * {@link JmxConstants#STRING_ARRAY_TYPE}.
+ */
+ Item EXPORTED_PACKAGES_ITEM = new Item(EXPORTED_PACKAGES,
+ "The exported packages of the bundle",
+ JmxConstants.STRING_ARRAY_TYPE);
+ /**
+ * The key IMPORTED_PACKAGES, used in {@link #EXPORTED_PACKAGES_ITEM}.
+ */
+ String IMPORTED_PACKAGES = "ImportedPackages";
+
+ /**
+ * The item containing the imported package names in {@link #BUNDLE_TYPE}
+ * .The key is {@link #IMPORTED_PACKAGES} and the the type is
+ * {@link JmxConstants#STRING_ARRAY_TYPE}.
+ */
+ Item IMPORTED_PACKAGES_ITEM = new Item(IMPORTED_PACKAGES,
+ "The imported packages of the bundle",
+ JmxConstants.STRING_ARRAY_TYPE);
+ /**
+ * The key FRAGMENTS, used in {@link #FRAGMENTS_ITEM}.
+ */
+ String FRAGMENTS = "Fragments";
+
+ /**
+ * The item containing the list of fragments the bundle is host to in
+ * {@link #BUNDLE_TYPE}. The key is {@link #FRAGMENTS} and the type is
+ * {@link JmxConstants#LONG_ARRAY_TYPE}.
+ */
+ Item FRAGMENTS_ITEM = new Item(FRAGMENTS,
+ "The fragments of which the bundle is host",
+ JmxConstants.LONG_ARRAY_TYPE);
+ /**
+ * The key HOSTS, used in {@link #HOSTS_ITEM}.
+ */
+ String HOSTS = "Hosts";
+
+ /**
+ * The item containing the bundle identifiers representing the hosts in
+ * {@link #BUNDLE_TYPE}. The key is {@link #HOSTS} and the type is
+ * {@link JmxConstants#LONG_ARRAY_TYPE}
+ */
+ Item HOSTS_ITEM = new Item(HOSTS,
+ "The fragments of which the bundle is host",
+ JmxConstants.LONG_ARRAY_TYPE);
+ /**
+ * The key REQUIRED_BUNDLES, used in {@link #REQUIRED_BUNDLES_ITEM}.
+ */
+ String REQUIRED_BUNDLES = "RequiredBundles";
+
+ /**
+ * The item containing the required bundles in {@link #BUNDLE_TYPE}. The key
+ * is {@link #REQUIRED_BUNDLES} and the type is
+ * {@link JmxConstants#LONG_ARRAY_TYPE}
+ */
+ Item REQUIRED_BUNDLES_ITEM = new Item(REQUIRED_BUNDLES,
+ "The required bundles the bundle", JmxConstants.LONG_ARRAY_TYPE);
+ /**
+ * The key REQUIRING_BUNDLES, used in {@link #REQUIRING_BUNDLES_ITEM}.
+ */
+ String REQUIRING_BUNDLES = "RequiringBundles";
+
+ /**
+ * The item containing the bundles requiring this bundle in
+ * {@link #BUNDLE_TYPE}. The key is {@link #REQUIRING_BUNDLES} and the type
+ * is {@link JmxConstants#LONG_ARRAY_TYPE}
+ */
+ Item REQUIRING_BUNDLES_ITEM = new Item(REQUIRING_BUNDLES,
+ "The bundles requiring the bundle", JmxConstants.LONG_ARRAY_TYPE);
+
+ /**
+ * The key EVENT, used in {@link #EVENT_ITEM}.
+ */
+ String EVENT = "BundleEvent";
+
+ /**
+ * The item containing the event type. The key is {@link #EVENT} and the type is {@link SimpleType#INTEGER}
+ */
+ Item EVENT_ITEM = new Item(
+ EVENT,
+ "The type of the event: {INSTALLED=1, STARTED=2, STOPPED=4, UPDATED=8, UNINSTALLED=16}",
+ SimpleType.INTEGER);
+
+ /**
+ * The Composite Type that represents a bundle event. This composite consists of:
+ *
+ *
+ */
+ CompositeType BUNDLE_EVENT_TYPE = Item.compositeType("BUNDLE_EVENT",
+ "This type encapsulates OSGi bundle events", IDENTIFIER_ITEM,
+ LOCATION_ITEM, SYMBOLIC_NAME_ITEM, EVENT_ITEM);
+
+ /**
+ * The Composite Type that represents a bundle. This composite consist of:
+ *
+ *
+ * It is used by {@link #BUNDLES_TYPE}.
+ */
+ CompositeType BUNDLE_TYPE = Item.compositeType("BUNDLE",
+ "This type encapsulates OSGi bundles", EXPORTED_PACKAGES_ITEM,
+ FRAGMENT_ITEM, FRAGMENTS_ITEM, HEADERS_ITEM, HOSTS_ITEM,
+ IDENTIFIER_ITEM, IMPORTED_PACKAGES_ITEM, LAST_MODIFIED_ITEM,
+ LOCATION_ITEM, PERSISTENTLY_STARTED_ITEM, REGISTERED_SERVICES_ITEM,
+ REMOVAL_PENDING_ITEM, REQUIRED_ITEM, REQUIRED_BUNDLES_ITEM,
+ REQUIRING_BUNDLES_ITEM, START_LEVEL_ITEM, STATE_ITEM,
+ SERVICES_IN_USE_ITEM, SYMBOLIC_NAME_ITEM, VERSION_ITEM);
+
+ /**
+ * The Tabular Type for a list of bundles. The row type is
+ * {@link #BUNDLE_TYPE} and the index is {@link #IDENTIFIER}.
+ */
+ TabularType BUNDLES_TYPE = Item.tabularType("BUNDLES", "A list of bundles",
+ BUNDLE_TYPE,
+ IDENTIFIER);
+
+ /**
+ * Answer the list of identifiers of the bundles this bundle depends upon
+ *
+ * @param bundleIdentifier
+ * the bundle identifier
+ * @return the list of bundle identifiers
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ long[] getRequiredBundles(long bundleIdentifier) throws IOException;
+
+ /**
+ * Answer the bundle state of the system in tabular form.
+ *
+ * Each row of the returned table represents a single bundle. The Tabular
+ * Data consists of Composite Data that is type by {@link #BUNDLES_TYPE}.
+ *
+ * @return the tabular representation of the bundle state
+ * @throws IOException
+ */
+ TabularData listBundles() throws IOException;
+
+ /**
+ * Answer the list of exported packages for this bundle.
+ *
+ * @param bundleId
+ * @return the array of package names, combined with their version in the
+ * format <packageName;version>
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ String[] getExportedPackages(long bundleId) throws IOException;
+
+ /**
+ * Answer the list of the bundle ids of the fragments associated with this
+ * bundle
+ *
+ * @param bundleId
+ * @return the array of bundle identifiers
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ long[] getFragments(long bundleId) throws IOException;
+
+ /**
+ * Answer the headers for the bundle uniquely identified by the bundle id.
+ * The Tabular Data is typed by the {@link #HEADERS_TYPE}.
+ *
+ * @param bundleId
+ * the unique identifier of the bundle
+ * @return the table of associated header key and values
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ TabularData getHeaders(long bundleId) throws IOException;
+
+ /**
+ * Answer the list of bundle ids of the bundles which host a fragment
+ *
+ * @param fragment
+ * the bundle id of the fragment
+ * @return the array of bundle identifiers
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ long[] getHosts(long fragment) throws IOException;
+
+ /**
+ * Answer the array of the packages imported by this bundle
+ *
+ * @param bundleId
+ * the bundle identifier
+ * @return the array of package names, combined with their version in the
+ * format <packageName;version>
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ String[] getImportedPackages(long bundleId) throws IOException;
+
+ /**
+ * Answer the last modified time of a bundle
+ *
+ * @param bundleId
+ * the unique identifier of a bundle
+ * @return the last modified time
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ long getLastModified(long bundleId) throws IOException;
+
+ /**
+ * Answer the list of service identifiers representing the services this
+ * bundle exports
+ *
+ * @param bundleId
+ * the bundle identifier
+ * @return the list of service identifiers
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ long[] getRegisteredServices(long bundleId) throws IOException;
+
+ /**
+ * Answer the list of identifiers of the bundles which require this bundle
+ *
+ * @param bundleIdentifier
+ * the bundle identifier
+ * @return the list of bundle identifiers
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ long[] getRequiringBundles(long bundleIdentifier) throws IOException;
+
+ /**
+ * Answer the list of service identifiers which refer to the the services
+ * this bundle is using
+ *
+ * @param bundleIdentifier
+ * the bundle identifier
+ * @return the list of service identifiers
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ long[] getServicesInUse(long bundleIdentifier) throws IOException;
+
+ /**
+ * Answer the start level of the bundle
+ *
+ * @param bundleId
+ * the identifier of the bundle
+ * @return the start level
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ int getStartLevel(long bundleId) throws IOException;
+
+ /**
+ * Answer the symbolic name of the state of the bundle
+ *
+ * @param bundleId
+ * the identifier of the bundle
+ * @return the string name of the bundle state
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ String getState(long bundleId) throws IOException;
+
+ /**
+ * Answer the symbolic name of the bundle
+ *
+ * @param bundleId
+ * the identifier of the bundle
+ * @return the symbolic name
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ String getSymbolicName(long bundleId) throws IOException;
+
+ /**
+ * Answer if the bundle is persistently started when its start level is
+ * reached
+ *
+ * @param bundleId
+ * the identifier of the bundle
+ * @return true if the bundle is persistently started
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ boolean isPersistentlyStarted(long bundleId) throws IOException;
+
+ /**
+ * Answer whether the bundle is a fragment or not
+ *
+ * @param bundleId
+ * the identifier of the bundle
+ * @return true if the bundle is a fragment
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ boolean isFragment(long bundleId) throws IOException;
+
+ /**
+ * Answer true if the bundle is pending removal
+ *
+ * @param bundleId
+ * the identifier of the bundle
+ * @return true if the bundle is pending removal
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ boolean isRemovalPending(long bundleId) throws IOException;
+
+ /**
+ * Answer true if the bundle is required by another bundle
+ *
+ * @param bundleId
+ * the identifier of the bundle
+ * @return true if the bundle is required by another bundle
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ boolean isRequired(long bundleId) throws IOException;
+
+ /**
+ * Answer the location of the bundle.
+ *
+ * @param bundleId
+ * the identifier of the bundle
+ * @return The location string of this bundle
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ String getLocation(long bundleId) throws IOException;
+
+ /**
+ * Answer the location of the bundle.
+ *
+ * @param bundleId
+ * the identifier of the bundle
+ * @return The location string of this bundle
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the bundle indicated does not exist
+ */
+ String getVersion(long bundleId) throws IOException;
+
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/framework/FrameworkMBean.java osgi-compendium-4.3.0/src/org/osgi/jmx/framework/FrameworkMBean.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/framework/FrameworkMBean.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/framework/FrameworkMBean.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,488 @@
+/*
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.framework;
+
+import java.io.IOException;
+
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.SimpleType;
+
+import org.osgi.jmx.Item;
+import org.osgi.jmx.JmxConstants;
+
+/**
+ * The FrameworkMbean provides mechanisms to exert control over the framework.
+ * For many operations, it provides a batch mechanism to avoid excessive message
+ * passing when interacting remotely.
+ *
+ * @version $Id: b95a0e27e0d89274ccbb2bd3470cea284fb95907 $
+ * @ThreadSafe
+ */
+public interface FrameworkMBean {
+ /**
+ * The fully qualified object name of this mbean.
+ */
+ String OBJECTNAME = JmxConstants.OSGI_CORE
+ + ":type=framework,version=1.5";
+
+ /**
+ * The SUCCESS, used in {@link #SUCCESS_ITEM}.
+ */
+ String SUCCESS = "Success";
+
+ /**
+ * The item that indicates if this operation was successful. The key is
+ * {@link #SUCCESS} and the type is {@link SimpleType#BOOLEAN}. It is used
+ * in {@link #BATCH_ACTION_RESULT_TYPE} and
+ * {@link #BATCH_INSTALL_RESULT_TYPE}.
+ */
+ Item SUCCESS_ITEM = new Item(
+ SUCCESS,
+ "Whether the operation was successful",
+ SimpleType.BOOLEAN);
+
+ /**
+ * The key ERROR, used in {@link #ERROR_ITEM}.
+ */
+ String ERROR = "Error";
+
+ /**
+ * The item containing the error message of the batch operation. The key is
+ * {@link #ERROR} and the type is {@link SimpleType#STRING}. It is used in
+ * {@link #BATCH_ACTION_RESULT_TYPE} and {@link #BATCH_INSTALL_RESULT_TYPE}.
+ */
+ Item ERROR_ITEM = new Item(
+ ERROR,
+ "The error message if unsuccessful",
+ SimpleType.STRING);
+
+ /**
+ * The key COMPLETED, used in {@link #COMPLETED_ITEM}.
+ */
+ String COMPLETED = "Completed";
+
+ /**
+ * The item containing the list of bundles completing the batch operation.
+ * The key is {@link #COMPLETED} and the type is
+ * {@link JmxConstants#LONG_ARRAY_TYPE}. It is used in
+ * {@link #BATCH_ACTION_RESULT_TYPE} and {@link #BATCH_INSTALL_RESULT_TYPE}.
+ */
+ Item COMPLETED_ITEM = new Item(
+ COMPLETED,
+ "The bundle ids of the successfully completed installs",
+ JmxConstants.LONG_ARRAY_TYPE);
+
+ /**
+ * The key for BUNDLE_IN_ERROR. This key is used with two different items:
+ * {@link #BUNDLE_IN_ERROR_ID_ITEM} and
+ * {@link #BUNDLE_IN_ERROR_LOCATION_ITEM} that each have a different type
+ * for this key. It is used in {@link #BATCH_ACTION_RESULT_TYPE} and
+ * {@link #BATCH_INSTALL_RESULT_TYPE}.
+ */
+ String BUNDLE_IN_ERROR = "BundleInError";
+
+ /**
+ * The item containing the bundle which caused the error during the batch
+ * operation. This item describes the bundle in error as an id. The key is
+ * {@link #BUNDLE_IN_ERROR} and the type is {@link SimpleType#LONG}. It is
+ * used in {@link #BATCH_ACTION_RESULT_TYPE}.
+ *
+ * @see #BUNDLE_IN_ERROR_LOCATION_ITEM BUNDLE_IN_ERROR_LOCATION_ITEM for the
+ * item that has a location for the bundle in error.
+ */
+ Item BUNDLE_IN_ERROR_ID_ITEM = new Item(
+ BUNDLE_IN_ERROR,
+ "The id of the bundle causing the error",
+ SimpleType.LONG);
+
+ /**
+ * The key REMAINING, used in {@link #REMAINING_ID_ITEM} and
+ * {@link #REMAINING_LOCATION_ITEM}.
+ */
+ String REMAINING = "Remaining";
+
+ /**
+ * The item containing the list of remaining bundles unprocessed by the
+ * failing batch operation. The key is {@link #REMAINING} and the type is
+ * {@link JmxConstants#LONG_ARRAY_TYPE}. It is used in
+ * {@link #BATCH_ACTION_RESULT_TYPE} and {@link #BATCH_INSTALL_RESULT_TYPE}.
+ */
+ Item REMAINING_ID_ITEM = new Item(
+ REMAINING,
+ "The ids of the remaining bundles",
+ JmxConstants.LONG_ARRAY_TYPE);
+
+ /**
+ * The Composite Type for a batch action result.
+ * {@link #refreshBundle(long)} and {@link #refreshBundles(long[])}.
+ * Notice that a batch action result returns uses an id for the
+ * {@link #BUNDLE_IN_ERROR} while the {@link #BATCH_INSTALL_RESULT_TYPE}
+ * uses a location.
+ *
+ * This Composite Type consists of the following items:
+ *
+ *
+ */
+ CompositeType BATCH_ACTION_RESULT_TYPE = Item
+ .compositeType(
+ "BUNDLE_ACTION_RESULT",
+ "This type encapsulates a bundle batch install action result",
+ BUNDLE_IN_ERROR_ID_ITEM,
+ COMPLETED_ITEM,
+ ERROR_ITEM,
+ REMAINING_ID_ITEM,
+ SUCCESS_ITEM //
+ );
+
+ /**
+ * The item containing the bundle which caused the error during the batch
+ * operation. This item describes the bundle in error as a location. The key
+ * is {@link #BUNDLE_IN_ERROR} and the type is {@link SimpleType#STRING}. It
+ * is used in {@link #BATCH_INSTALL_RESULT_TYPE}.
+ *
+ * @see #BUNDLE_IN_ERROR_ID_ITEM BUNDLE_IN_ERROR_ID_ITEM for the item that
+ * has the id for the bundle in error.
+ */
+ Item BUNDLE_IN_ERROR_LOCATION_ITEM = new Item(
+ BUNDLE_IN_ERROR,
+ "The location of the bundle causing the error",
+ SimpleType.STRING);
+
+ /**
+ * The item containing the list of remaining bundles unprocessed by the
+ * failing batch operation. The key is {@link #REMAINING} and the type is
+ * {@link JmxConstants#STRING_ARRAY_TYPE}. It is used in
+ * {@link #BATCH_ACTION_RESULT_TYPE} and {@link #BATCH_INSTALL_RESULT_TYPE}.
+ */
+ Item REMAINING_LOCATION_ITEM = new Item(
+ REMAINING,
+ "The locations of the remaining bundles",
+ JmxConstants.STRING_ARRAY_TYPE);
+
+ /**
+ * The Composite Type which represents the result of a batch install
+ * operation. It is used in {@link #installBundles(String[])} and
+ * {@link #installBundlesFromURL(String[], String[])}.
+ *
+ * This Composite Type consists of the following items:
+ *
+ *
+ */
+ CompositeType BATCH_INSTALL_RESULT_TYPE = Item
+ .compositeType(
+ "BATCH_INSTALL_RESULT",
+ "This type encapsulates a bundle batch install action result",
+ BUNDLE_IN_ERROR_LOCATION_ITEM,
+ COMPLETED_ITEM,
+ ERROR_ITEM,
+ REMAINING_LOCATION_ITEM,
+ SUCCESS_ITEM //
+ );
+
+ /**
+ * Retrieve the framework start level
+ *
+ * @return the framework start level
+ * @throws IOException if the operation failed
+ */
+ int getFrameworkStartLevel() throws IOException;
+
+ /**
+ * Answer the initial start level assigned to a bundle when it is first
+ * started
+ *
+ * @return the start level
+ * @throws IOException if the operation failed
+ */
+ int getInitialBundleStartLevel() throws IOException;
+
+ /**
+ * Install the bundle indicated by the bundleLocations
+ *
+ * @param location the location of the bundle to install
+ * @return the bundle id the installed bundle
+ * @throws IOException if the operation does not succeed
+ */
+ long installBundle(String location) throws IOException;
+
+ /**
+ * Install the bundle indicated by the bundleLocations
+ *
+ * @param location the location to assign to the bundle
+ * @param url the URL which will supply the bytes for the bundle
+ * @return the bundle id the installed bundle
+ * @throws IOException if the operation does not succeed
+ */
+ long installBundleFromURL(String location, String url) throws IOException;
+
+ /**
+ * Batch install the bundles indicated by the list of bundleLocationUrls
+ *
+ * @see #BATCH_INSTALL_RESULT_TYPE BATCH_INSTALL_RESULT_TYPE for the precise
+ * specification of the CompositeData type representing the returned
+ * result.
+ *
+ * @param locations the array of locations of the bundles to install
+ * @return the resulting state from executing the operation
+ * @throws IOException if the operation does not succeed
+ */
+ CompositeData installBundles(String[] locations) throws IOException;
+
+ /**
+ * Batch install the bundles indicated by the list of bundleLocationUrls
+ *
+ * @see #BATCH_INSTALL_RESULT_TYPE BATCH_INSTALL_RESULT_TYPE
+ * BatchBundleResult for the precise specification of the CompositeData
+ * type representing the returned result.
+ *
+ * @param locations the array of locations to assign to the installed
+ * bundles
+ * @param urls the array of urls which supply the bundle bytes
+ * @return the resulting state from executing the operation
+ * @throws IOException if the operation does not succeed
+ */
+ CompositeData installBundlesFromURL(String[] locations, String[] urls)
+ throws IOException;
+
+ /**
+ * Force the update, replacement or removal of the packages identified by
+ * the specified bundle.
+ *
+ * @param bundleIdentifier the bundle identifier
+ * @throws IOException if the operation failed
+ */
+ void refreshBundle(long bundleIdentifier) throws IOException;
+
+ /**
+ * Force the update, replacement or removal of the packages identified by
+ * the list of bundles.
+ *
+ * @param bundleIdentifiers The identifiers of the bundles to refresh, or
+ * {@code null} for all bundles with packages pending removal.
+ * @throws IOException if the operation failed
+ */
+ void refreshBundles(long[] bundleIdentifiers) throws IOException;
+
+ /**
+ * Resolve the bundle indicated by the unique symbolic name and version
+ *
+ * @param bundleIdentifier the bundle identifier
+ * @return {@code true} if the bundle was resolved, false otherwise
+ * @throws IOException if the operation does not succeed
+ * @throws IllegalArgumentException if the bundle indicated does not exist
+ */
+ boolean resolveBundle(long bundleIdentifier) throws IOException;
+
+ /**
+ * Batch resolve the bundles indicated by the list of bundle identifiers
+ *
+ * @param bundleIdentifiers The identifiers of the bundles to resolve, or
+ * {@code null} to resolve all unresolved bundles.
+ * @return {@code true} if the bundles were resolved, false otherwise
+ * @throws IOException if the operation does not succeed
+ */
+ boolean resolveBundles(long[] bundleIdentifiers) throws IOException;
+
+ /**
+ * Restart the framework by updating the system bundle
+ *
+ * @throws IOException if the operation failed
+ */
+ void restartFramework() throws IOException;
+
+ /**
+ * Set the start level for the bundle identifier
+ *
+ * @param bundleIdentifier the bundle identifier
+ * @param newlevel the new start level for the bundle
+ * @throws IOException if the operation failed
+ */
+ void setBundleStartLevel(long bundleIdentifier, int newlevel)
+ throws IOException;
+
+ /**
+ * Set the start levels for the list of bundles.
+ *
+ * @see #BATCH_ACTION_RESULT_TYPE BATCH_ACTION_RESULT_TYPE for the precise
+ * specification of the CompositeData type representing the returned
+ * result.
+ *
+ * @param bundleIdentifiers the array of bundle identifiers
+ * @param newlevels the array of new start level for the bundles
+ * @return the resulting state from executing the operation
+ * @throws IOException if the operation failed
+ */
+ CompositeData setBundleStartLevels(long[] bundleIdentifiers, int[] newlevels)
+ throws IOException;
+
+ /**
+ * Set the start level for the framework
+ *
+ * @param newlevel the new start level
+ * @throws IOException if the operation failed
+ */
+ void setFrameworkStartLevel(int newlevel) throws IOException;
+
+ /**
+ * Set the initial start level assigned to a bundle when it is first started
+ *
+ * @param newlevel the new start level
+ * @throws IOException if the operation failed
+ */
+ void setInitialBundleStartLevel(int newlevel) throws IOException;
+
+ /**
+ * Shutdown the framework by stopping the system bundle
+ *
+ * @throws IOException if the operation failed
+ */
+ void shutdownFramework() throws IOException;
+
+ /**
+ * Start the bundle indicated by the bundle identifier
+ *
+ * @param bundleIdentifier the bundle identifier
+ * @throws IOException if the operation does not succeed
+ * @throws IllegalArgumentException if the bundle indicated does not exist
+ */
+ void startBundle(long bundleIdentifier) throws IOException;
+
+ /**
+ * Batch start the bundles indicated by the list of bundle identifier
+ *
+ * @see #BATCH_ACTION_RESULT_TYPE BATCH_ACTION_RESULT_TYPE for the precise
+ * specification of the CompositeData type representing the returned
+ * result.
+ *
+ * @param bundleIdentifiers the array of bundle identifiers
+ * @return the resulting state from executing the operation
+ * @throws IOException if the operation does not succeed
+ */
+ CompositeData startBundles(long[] bundleIdentifiers) throws IOException;
+
+ /**
+ * Stop the bundle indicated by the bundle identifier
+ *
+ * @param bundleIdentifier the bundle identifier
+ * @throws IOException if the operation does not succeed
+ * @throws IllegalArgumentException if the bundle indicated does not exist
+ */
+ void stopBundle(long bundleIdentifier) throws IOException;
+
+ /**
+ * Batch stop the bundles indicated by the list of bundle identifier
+ *
+ * @see #BATCH_ACTION_RESULT_TYPE BATCH_ACTION_RESULT_TYPE for the precise
+ * specification of the CompositeData type representing the returned
+ * result.
+ *
+ * @param bundleIdentifiers the array of bundle identifiers
+ * @return the resulting state from executing the operation
+ * @throws IOException if the operation does not succeed
+ */
+ CompositeData stopBundles(long[] bundleIdentifiers) throws IOException;
+
+ /**
+ * Uninstall the bundle indicated by the bundle identifier
+ *
+ * @param bundleIdentifier the bundle identifier
+ * @throws IOException if the operation does not succeed
+ * @throws IllegalArgumentException if the bundle indicated does not exist
+ */
+ void uninstallBundle(long bundleIdentifier) throws IOException;
+
+ /**
+ * Batch uninstall the bundles indicated by the list of bundle identifiers
+ *
+ * @see #BATCH_ACTION_RESULT_TYPE BATCH_ACTION_RESULT_TYPE for the precise
+ * specification of the CompositeData type representing the returned
+ * result.
+ *
+ * @param bundleIdentifiers the array of bundle identifiers
+ * @return the resulting state from executing the operation
+ * @throws IOException if the operation does not succeed
+ */
+ CompositeData uninstallBundles(long[] bundleIdentifiers) throws IOException;
+
+ /**
+ * Update the bundle indicated by the bundle identifier
+ *
+ * @param bundleIdentifier the bundle identifier
+ * @throws IOException if the operation does not succeed
+ * @throws IllegalArgumentException if the bundle indicated does not exist
+ */
+ void updateBundle(long bundleIdentifier) throws IOException;
+
+ /**
+ * Update the bundle identified by the bundle identifier
+ *
+ * @param bundleIdentifier the bundle identifier
+ * @param url the URL to use to update the bundle
+ * @throws IOException if the operation does not succeed
+ * @throws IllegalArgumentException if the bundle indicated does not exist
+ */
+ void updateBundleFromURL(long bundleIdentifier, String url) throws IOException;
+
+ /**
+ * Batch update the bundles indicated by the list of bundle identifier.
+ *
+ * @see #BATCH_ACTION_RESULT_TYPE BATCH_ACTION_RESULT_TYPE for the precise
+ * specification of the CompositeData type representing the returned
+ * result.
+ *
+ * @param bundleIdentifiers the array of bundle identifiers
+ * @return the resulting state from executing the operation
+ * @throws IOException if the operation does not succeed
+ */
+ CompositeData updateBundles(long[] bundleIdentifiers) throws IOException;
+
+ /**
+ * Update the bundle uniquely identified by the bundle symbolic name and
+ * version using the contents of the supplied urls.
+ *
+ * @see #BATCH_ACTION_RESULT_TYPE BATCH_ACTION_RESULT_TYPE for the precise
+ * specification of the CompositeData type representing the returned
+ * result.
+ *
+ * @param bundleIdentifiers the array of bundle identifiers
+ * @param urls the array of URLs to use to update the bundles
+ * @return the resulting state from executing the operation
+ * @throws IOException if the operation does not succeed
+ * @throws IllegalArgumentException if the bundle indicated does not exist
+ */
+ CompositeData updateBundlesFromURL(long[] bundleIdentifiers, String[] urls)
+ throws IOException;
+
+ /**
+ * Update the framework by updating the system bundle.
+ *
+ * @throws IOException if the operation failed
+ */
+ void updateFramework() throws IOException;
+
+ }
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/framework/packageinfo osgi-compendium-4.3.0/src/org/osgi/jmx/framework/packageinfo
--- osgi-compendium-4.2.0/src/org/osgi/jmx/framework/packageinfo 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/framework/packageinfo 2010-06-15 15:44:04.000000000 +0000
@@ -0,0 +1 @@
+version 1.5
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/framework/package-info.java osgi-compendium-4.3.0/src/org/osgi/jmx/framework/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/framework/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/framework/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * OSGi JMX Framework Package Version 1.5.
+ *
+ *
+ *
+ * The key is defined as {@link #NAME} and {@link #EXPORTING_BUNDLES}
+ */
+ CompositeType PACKAGE_TYPE = Item
+ .compositeType(
+ "PACKAGE",
+ "This type encapsulates an OSGi package",
+ EXPORTING_BUNDLES_ITEM,
+ IMPORTING_BUNDLES_ITEM,
+ NAME_ITEM,
+ REMOVAL_PENDING_ITEM,
+ VERSION_ITEM);
+
+ /**
+ * The Tabular Type used in {@link #listPackages()}. They key is
+ * {@link #NAME}, {@link #VERSION}, and {@link #EXPORTING_BUNDLES}.
+ */
+ TabularType PACKAGES_TYPE = Item.tabularType("PACKAGES",
+ "A table of packages",
+ PACKAGE_TYPE, NAME,
+ VERSION, EXPORTING_BUNDLES);
+
+ /**
+ * Answer the identifier of the bundle exporting the package
+ *
+ * @param packageName - the package name
+ * @param version - the version of the package
+ * @return the bundle identifiers exporting such a package
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the package indicated does not exist
+ */
+ long[] getExportingBundles(String packageName, String version)
+ throws IOException;
+
+ /**
+ * Answer the list of identifiers of the bundles importing the package
+ *
+ * @param packageName The package name
+ * @param version The version of the package
+ * @param exportingBundle The exporting bundle for the given package
+ * @return the list of bundle identifiers
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the package indicated does not exist
+ *
+ */
+ long[] getImportingBundles(String packageName, String version,
+ long exportingBundle) throws IOException;
+
+ /**
+ * Answer the package state of the system in tabular form
+ *
+ * The Tabular Data is typed by {@link #PACKAGES_TYPE}, which has
+ * {@link #PACKAGE_TYPE} as its Composite Type.
+ *
+ * @return the tabular representation of the package state
+ * @throws IOException When fails
+ */
+ TabularData listPackages() throws IOException;
+
+ /**
+ * Answer if this package is exported by a bundle which has been updated or
+ * uninstalled
+ *
+ * @param packageName The package name
+ * @param version The version of the package
+ * @param exportingBundle The bundle exporting the package
+ * @return true if this package is being exported by a bundle that has been
+ * updated or uninstalled.
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the package indicated does not exist
+ */
+ boolean isRemovalPending(String packageName, String version, long exportingBundle)
+ throws IOException;
+
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/framework/ServiceStateMBean.java osgi-compendium-4.3.0/src/org/osgi/jmx/framework/ServiceStateMBean.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/framework/ServiceStateMBean.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/framework/ServiceStateMBean.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.framework;
+
+import java.io.IOException;
+
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.SimpleType;
+import javax.management.openmbean.TabularData;
+import javax.management.openmbean.TabularType;
+
+import org.osgi.jmx.Item;
+import org.osgi.jmx.JmxConstants;
+
+/**
+ * This MBean represents the Service state of the framework. This MBean also
+ * emits events that clients can use to get notified of the changes in the
+ * service state of the framework.
+ *
+ * @version $Id: 52e2ca739e54283040bde80cbd2e0e8bad3022d4 $
+ * @ThreadSafe
+ */
+public interface ServiceStateMBean {
+ /**
+ * The fully qualified object name of this mbean.
+ */
+ String OBJECTNAME = JmxConstants.OSGI_CORE
+ + ":type=serviceState,version=1.5";
+ /**
+ * The key BUNDLE_IDENTIFIER, used in {@link #BUNDLE_IDENTIFIER_ITEM}.
+ */
+ String BUNDLE_IDENTIFIER = "BundleIdentifier";
+ /**
+ * The item containing the bundle identifier in {@link #SERVICE_TYPE}. The
+ * key is {@link #BUNDLE_IDENTIFIER} and the type is {@link SimpleType#LONG}
+ * .
+ */
+ Item BUNDLE_IDENTIFIER_ITEM = new Item(BUNDLE_IDENTIFIER,
+ "The identifier of the bundle the service belongs to",
+ SimpleType.LONG);
+
+ /**
+ * The key OBJECT_CLASS, used {@link #OBJECT_CLASS_ITEM}.
+ */
+ String OBJECT_CLASS = "objectClass";
+
+ /**
+ * The item containing the interfaces of the service in
+ * {@link #SERVICE_TYPE}. The key is {@link #OBJECT_CLASS} and the type is
+ * {@link JmxConstants#STRING_ARRAY_TYPE}.
+ */
+ Item OBJECT_CLASS_ITEM = new Item(
+ OBJECT_CLASS,
+ "An string array containing the interfaces under which the service has been registered",
+ JmxConstants.STRING_ARRAY_TYPE);
+
+ /**
+ * The key IDENTIFIER, used {@link #IDENTIFIER_ITEM}.
+ */
+ String IDENTIFIER = "Identifier";
+
+ /**
+ * The item containing the service identifier in {@link #SERVICE_TYPE}. The
+ * key is {@link #IDENTIFIER} and the type is {@link SimpleType#LONG}.
+ */
+ Item IDENTIFIER_ITEM = new Item(IDENTIFIER,
+ "The identifier of the service", SimpleType.LONG);
+
+ /**
+ * The key USING_BUNDLES, used in {@link #USING_BUNDLES_ITEM}.
+ */
+ String USING_BUNDLES = "UsingBundles";
+
+ /**
+ * The item containing the bundles using the service in
+ * {@link #SERVICE_TYPE}. The key is {@link #USING_BUNDLES} and the type is
+ * {@link JmxConstants#LONG_ARRAY_TYPE}.
+ */
+ Item USING_BUNDLES_ITEM = new Item(USING_BUNDLES,
+ "The bundles using the service", JmxConstants.LONG_ARRAY_TYPE);
+
+ /**
+ * The Composite Type for a CompositeData representing a service. This type
+ * consists of:
+ *
+ *
+ */
+ CompositeType SERVICE_TYPE = Item.compositeType("SERVICE",
+ "This type encapsulates an OSGi service", BUNDLE_IDENTIFIER_ITEM,
+ IDENTIFIER_ITEM, OBJECT_CLASS_ITEM,
+ USING_BUNDLES_ITEM);
+
+ /**
+ * The Tabular Type for a Service table. The rows consists of
+ * {@link #SERVICE_TYPE} Composite Data and the index is {@link #IDENTIFIER}
+ * .
+ */
+ TabularType SERVICES_TYPE = Item.tabularType("SERVICES",
+ "The table of all services", SERVICE_TYPE, IDENTIFIER);
+
+ /**
+ * The key BUNDLE_LOCATION, used in {@link #SERVICE_EVENT_TYPE}.
+ */
+ String BUNDLE_LOCATION = "BundleLocation";
+ /**
+ * The item containing the bundle location in {@link #EVENT_ITEM}. The key
+ * is {@link #BUNDLE_LOCATION} and the the type is {@link SimpleType#STRING}
+ * .
+ */
+ Item BUNDLE_LOCATION_ITEM = new Item(BUNDLE_LOCATION,
+ "The location of the bundle", SimpleType.STRING);
+ /**
+ * The key BUNDLE_SYMBOLIC_NAME, used in {@link #SERVICE_EVENT_TYPE}.
+ */
+ String BUNDLE_SYMBOLIC_NAME = "BundleSymbolicName";
+
+ /**
+ * The item containing the symbolic name in {@link #EVENT}. The key is
+ * {@link #BUNDLE_SYMBOLIC_NAME} and the the type is
+ * {@link SimpleType#STRING}.
+ */
+ Item BUNDLE_SYMBOLIC_NAME_ITEM = new Item(BUNDLE_SYMBOLIC_NAME,
+ "The symbolic name of the bundle", SimpleType.STRING);
+
+ /**
+ * The key EVENT, used in {@link #EVENT_ITEM}.
+ */
+ String EVENT = "ServiceEvent";
+
+ /**
+ * The item containing the event type. The key is {@link #EVENT} and the
+ * type is {@link SimpleType#INTEGER}
+ */
+ Item EVENT_ITEM = new Item(
+ EVENT,
+ "The eventType of the event: {REGISTERED=1, MODIFIED=2 UNREGISTERING=3}",
+ SimpleType.INTEGER);
+
+ /**
+ * The Composite Type that represents a service event. This composite
+ * consists of:
+ *
+ *
+ */
+ CompositeType SERVICE_EVENT_TYPE = Item.compositeType("SERVICE_EVENT",
+ "This type encapsulates OSGi service events", IDENTIFIER_ITEM,
+ OBJECT_CLASS_ITEM, BUNDLE_IDENTIFIER_ITEM, BUNDLE_LOCATION_ITEM,
+ BUNDLE_SYMBOLIC_NAME_ITEM, EVENT_ITEM);
+
+ /**
+ * Answer the list of interfaces that this service implements
+ *
+ * @param serviceId
+ * the identifier of the service
+ * @return the list of interfaces
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the service indicated does not exist
+ */
+ public String[] getObjectClass(long serviceId) throws IOException;
+
+ /**
+ * Answer the bundle identifier of the bundle which registered the service
+ *
+ * @param serviceId
+ * the identifier of the service
+ * @return the identifier for the bundle
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the service indicated does not exist
+ */
+ long getBundleIdentifier(long serviceId) throws IOException;
+
+ /**
+ * Answer the map of properties associated with this service
+ *
+ * @see JmxConstants#PROPERTIES_TYPE JmxConstants.PROPERTIES_TYPE for the
+ * details of the TabularType
+ *
+ * @param serviceId the identifier of the service
+ * @return the table of properties. These include the standard mandatory
+ * service.id and objectClass properties as defined in the
+ * {@code org.osgi.framework.Constants} interface
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the service indicated does not exist
+ */
+ TabularData getProperties(long serviceId) throws IOException;
+
+ /**
+ * Answer the service state of the system in tabular form.
+ *
+ * @see #SERVICES_TYPE SERVICES_TYPE for the details of the TabularType
+ *
+ * @return the tabular representation of the service state
+ * @throws IOException If the operation fails
+ * @throws IllegalArgumentException if the service indicated does not exist
+ */
+ TabularData listServices() throws IOException;
+
+ /**
+ * Answer the list of identifiers of the bundles that use the service
+ *
+ * @param serviceId
+ * the identifier of the service
+ * @return the list of bundle identifiers
+ * @throws IOException
+ * if the operation fails
+ * @throws IllegalArgumentException
+ * if the service indicated does not exist
+ */
+ long[] getUsingBundles(long serviceId) throws IOException;
+
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/jmx/Item.java osgi-compendium-4.3.0/src/org/osgi/jmx/Item.java
--- osgi-compendium-4.2.0/src/org/osgi/jmx/Item.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/jmx/Item.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) OSGi Alliance (2009, 2010). 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.Collections;
+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. The 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 $Id: e31c07c09ad1cdab0c611e269bfe8059473da855 $
+ * @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}
+ * @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
+ *
+ *
+ *
+ */
+ CompositeType ROLE_TYPE = Item
+ .compositeType(
+ "ROLE",
+ "Mapping of org.osgi.service.useradmin.Role for remote management purposes. User and Group extend Role",
+ NAME_ITEM,
+ TYPE_ITEM);
+
+ /**
+ * The CREDENTIALS key, used in {@link #CREDENTIALS_ITEM}.
+ */
+ String CREDENTIALS = "Credentials";
+
+ /**
+ * The item containing the credentials of a user. The key is
+ * {@link #CREDENTIALS} and the type is {@link JmxConstants#PROPERTIES_TYPE} .
+ */
+ Item CREDENTIALS_ITEM = new Item(
+ CREDENTIALS,
+ "The credentials for this user",
+ JmxConstants.PROPERTIES_TYPE);
+
+ /**
+ * A Composite Type for a User. A User contains its Role description and
+ * adds the credentials. It extends {@link #ROLE_TYPE} and adds
+ * {@link #CREDENTIALS_ITEM}.
+ *
+ * This type extends the {@link #ROLE_TYPE}. It adds:
+ *
+ *
+ */
+ CompositeType USER_TYPE = Item
+ .extend(
+ ROLE_TYPE,
+ "USER",
+ "Mapping of org.osgi.service.useradmin.User for remote management purposes. User extends Role");
+
+ /**
+ * The MEMBERS key, used in {@link #MEMBERS_ITEM}.
+ */
+ String MEMBERS = "Members";
+
+ /**
+ * The item containing the members of a group. The key is {@link #MEMBERS}
+ * and the type is {@link JmxConstants#STRING_ARRAY_TYPE}. It is used in
+ * {@link #GROUP_TYPE}.
+ */
+ Item MEMBERS_ITEM = new Item(
+ MEMBERS,
+ "The members of this group",
+ JmxConstants.STRING_ARRAY_TYPE);
+
+ /**
+ * The REQUIRED_MEMBERS key, used in {@link #REQUIRED_MEMBERS_ITEM}.
+ */
+ String REQUIRED_MEMBERS = "RequiredMembers";
+
+ /**
+ * The item containing the required members of a group. The key is
+ * {@link #REQUIRED_MEMBERS} and the type is
+ * {@link JmxConstants#STRING_ARRAY_TYPE}. It is used in
+ * {@link #GROUP_TYPE} .
+ */
+ Item REQUIRED_MEMBERS_ITEM = new Item(
+ REQUIRED_MEMBERS,
+ "The required members of this group",
+ JmxConstants.STRING_ARRAY_TYPE);
+
+ /**
+ * The Composite Type for a Group. It extends {@link #USER_TYPE} and adds
+ * {@link #MEMBERS_ITEM}, and {@link #REQUIRED_MEMBERS_ITEM}.
+ *
+ * This type extends the {@link #USER_TYPE}. It adds:
+ *
+ *
+ */
+ CompositeType GROUP_TYPE = Item
+ .extend(
+ USER_TYPE,
+ "GROUP",
+ "Mapping of org.osgi.service.useradmin.Group for remote management purposes. Group extends User which in turn extends Role",
+ MEMBERS_ITEM,
+ REQUIRED_MEMBERS_ITEM);
+
+ /**
+ * Add credentials to a user, associated with the supplied key
+ *
+ * @param key The key of the credential to add
+ * @param value The value of the credential to add
+ * @param username The name of the user that gets the credential.
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the user name is not a User
+ */
+ void addCredential(String key, byte[] value, String username)
+ throws IOException;
+
+ /**
+ * Add credentials to a user, associated with the supplied key
+ *
+ * @param key The key of the credential to add
+ * @param value The value of the credential to add
+ * @param username The name of the user that gets the credential.
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the username is not a User
+ */
+ void addCredentialString(String key, String value, String username)
+ throws IOException;
+
+ /**
+ * Add a member to the group.
+ *
+ * @param groupname The group name that receives the {@code rolename}
+ * as member.
+ * @param rolename The {@code rolename} (User or Group) that must be
+ * added.
+ * @return {@code true} if the role was added to the group
+ * @throws IOException if the operation fails
+ *
+ */
+ boolean addMember(String groupname, String rolename) throws IOException;
+
+ /**
+ * Add or update a property on a role
+ *
+ * @param key The key of the property to add
+ * @param value The value of the property to add ({@code String})
+ * @param rolename The role name
+ * @throws IOException if the operation fails
+ */
+ void addPropertyString(String key, String value, String rolename)
+ throws IOException;
+
+ /**
+ * Add or update a property on a role.
+ *
+ * @param key The added property key
+ * @param value The added byte[] property value
+ * @param rolename The role name that receives the property
+ * @throws IOException if the operation fails
+ */
+ void addProperty(String key, byte[] value, String rolename)
+ throws IOException;
+
+ /**
+ * Add a required member to the group
+ *
+ * @param groupname The group name that is addded
+ * @param rolename The role that
+ * @return true if the role was added to the group
+ * @throws IOException if the operation fails
+ */
+ boolean addRequiredMember(String groupname, String rolename)
+ throws IOException;
+
+ /**
+ * Create a User
+ *
+ * @param name Name of the user to create
+ * @throws IOException if the operation fails
+ */
+ void createUser(String name) throws IOException;
+
+ /**
+ * Create a Group
+ *
+ * @param name Name of the group to create
+ * @throws IOException if the operation fails
+ */
+ void createGroup(String name) throws IOException;
+
+ /**
+ * This method was specified in error and must not be used.
+ *
+ * @param name Ignored.
+ * @throws IOException This method will throw an exception if called.
+ * @deprecated This method was specified in error. It does not function and
+ * must not be used. Use either {@link #createUser(String)} or
+ * {@link #createGroup(String)}.
+ */
+ void createRole(String name) throws IOException;
+
+ /**
+ * Answer the authorization for the user name.
+ *
+ * The Composite Data is typed by {@link #AUTORIZATION_TYPE}.
+ *
+ * @param user The user name
+ * @return the Authorization typed by {@link #AUTORIZATION_TYPE}.
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the user name is not a User
+ */
+ CompositeData getAuthorization(String user) throws IOException;
+
+ /**
+ * Answer the credentials associated with a user.
+ *
+ * The returned Tabular Data is typed by
+ * {@link JmxConstants#PROPERTIES_TYPE}.
+ *
+ * @param username The user name
+ * @return the credentials associated with the user, see
+ * {@link JmxConstants#PROPERTIES_TYPE}
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the user name is not a User
+ */
+ TabularData getCredentials(String username) throws IOException;
+
+ /**
+ * Answer the Group associated with the group name.
+ *
+ * The returned Composite Data is typed by {@link #GROUP_TYPE}
+ *
+ * @param groupname The group name
+ * @return the Group, see {@link #GROUP_TYPE}
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the group name is not a Group
+ */
+ CompositeData getGroup(String groupname) throws IOException;
+
+ /**
+ * Answer the list of group names
+ *
+ * @return The list of group names
+ * @throws IOException if the operation fails
+ */
+ String[] listGroups() throws IOException;
+
+ /**
+ * Answer the list of group names
+ *
+ * @param filter The filter to apply
+ * @return The list of group names
+ * @throws IOException if the operation fails
+ */
+ String[] getGroups(String filter) throws IOException;
+
+ /**
+ * Answer the list of implied roles for a user
+ *
+ * @param username The name of the user that has the implied roles
+ * @return The list of role names
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the username is not a User
+ */
+ String[] getImpliedRoles(String username) throws IOException;
+
+ /**
+ * Answer the the user names which are members of the group
+ *
+ * @param groupname The name of the group to get the members from
+ * @return The list of user names
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the {@code groupname} is not a
+ * group
+ */
+ String[] getMembers(String groupname) throws IOException;
+
+ /**
+ * Answer the properties associated with a role.
+ *
+ * The returned Tabular Data is typed by
+ * {@link JmxConstants#PROPERTIES_TYPE}.
+ *
+ * @param rolename The name of the role to get properties from
+ * @return the properties associated with the role, see
+ * {@link JmxConstants#PROPERTIES_TYPE}
+ * @throws IOException if the operation fails
+ */
+ TabularData getProperties(String rolename) throws IOException;
+
+ /**
+ * Answer the list of user names which are required members of this group
+ *
+ * @param groupname The name of the group to get the required members from
+ * @return The list of user names
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the group name is not a group
+ */
+ String[] getRequiredMembers(String groupname) throws IOException;
+
+ /**
+ * Answer the role associated with a name.
+ *
+ * The returned Composite Data is typed by {@link #ROLE_TYPE}.
+ *
+ * @param name The name of the role to get the data from
+ * @return the Role, see {@link #ROLE_TYPE}
+ * @throws IOException if the operation fails
+ */
+ CompositeData getRole(String name) throws IOException;
+
+ /**
+ * Answer the list of role names in the User Admin database
+ *
+ * @return The list of role names
+ * @throws IOException if the operation fails
+ */
+ String[] listRoles() throws IOException;
+
+ /**
+ * Answer the list of role names which match the supplied filter
+ *
+ * @param filter The string representation of the
+ * {@code org.osgi.framework.Filter} that is used to filter
+ * the roles by applying to the properties, if {@code null}
+ * all roles are returned.
+ *
+ * @return The list the role names
+ * @throws IOException if the operation fails
+ */
+ String[] getRoles(String filter) throws IOException;
+
+ /**
+ * Answer the User associated with the user name.
+ *
+ * The returned Composite Data is typed by {@link #USER_TYPE}.
+ *
+ * @param username The name of the requested user
+ * @return The User, see {@link #USER_TYPE}
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the {@code username} is not a
+ * User
+ */
+ CompositeData getUser(String username) throws IOException;
+
+ /**
+ * Answer the user name with the given property key-value pair from the User
+ * Admin service database.
+ *
+ * @param key The key to compare
+ * @param value The value to compare
+ * @return The User
+ * @throws IOException if the operation fails
+ */
+ String getUserWithProperty(String key, String value) throws IOException;
+
+ /**
+ * Answer the list of user names in the User Admin database
+ *
+ * @return The list of user names
+ * @throws IOException if the operation fails
+ */
+ String[] listUsers() throws IOException;
+
+ /**
+ * Answer the list of user names in the User Admin database
+ *
+ * @param filter The filter to apply
+ * @return The list of user names
+ * @throws IOException if the operation fails
+ */
+ String[] getUsers(String filter) throws IOException;
+
+ /**
+ * Remove the credential associated with the given user
+ *
+ * @param key The key of the credential to remove
+ * @param username The name of the user for which the credential must be
+ * removed
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the username is not a User
+ */
+ void removeCredential(String key, String username) throws IOException;
+
+ /**
+ * Remove a role from the group
+ *
+ * @param groupname The group name
+ * @param rolename
+ * @return true if the role was removed from the group
+ * @throws IOException if the operation fails
+ * @throws IllegalArgumentException if the groupname is not a Group
+ */
+ boolean removeMember(String groupname, String rolename) throws IOException;
+
+ /**
+ * Remove a property from a role
+ *
+ * @param key
+ * @param rolename
+ * @throws IOException if the operation fails
+ */
+ void removeProperty(String key, String rolename) throws IOException;
+
+ /**
+ * Remove the Role associated with the name
+ *
+ * @param name
+ * @return true if the remove succeeded
+ * @throws IOException if the operation fails
+ */
+ boolean removeRole(String name) throws IOException;
+
+ /**
+ * Remove the Group associated with the name
+ *
+ * @param name
+ * @return true if the remove succeeded
+ * @throws IOException if the operation fails
+ */
+ boolean removeGroup(String name) throws IOException;
+
+ /**
+ * Remove the User associated with the name
+ *
+ * @param name
+ * @return true if the remove succeeded
+ * @throws IOException if the operation fails
+ */
+ boolean removeUser(String name) throws IOException;
+
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/application/ApplicationAdminPermission.java osgi-compendium-4.3.0/src/org/osgi/service/application/ApplicationAdminPermission.java
--- osgi-compendium-4.2.0/src/org/osgi/service/application/ApplicationAdminPermission.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/application/ApplicationAdminPermission.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -33,11 +33,11 @@
* specified filter.
* lifecycle
, schedule
and lock
. The
- * permission schedule
implies the permission
- * lifecycle
.
+ * {@code lifecycle}, {@code schedule} and {@code lock}. The
+ * permission {@code schedule} implies the permission
+ * {@code lifecycle}.
*
- * @version $Revision: 6860 $
+ * @version $Id: 8c7941578972d6f61ed9aeffac374a0b8c294056 $
*/
public class ApplicationAdminPermission extends Permission {
private static final long serialVersionUID = 1L;
@@ -50,8 +50,8 @@
/**
* Allows scheduling of the target applications. The permission to
* schedule an application implies that the scheduler can also
- * manage the lifecycle of that application i.e. schedule
- * implies lifecycle
+ * manage the lifecycle of that application i.e. {@code schedule}
+ * implies {@code lifecycle}
*/
public static final String SCHEDULE_ACTION = "schedule";
@@ -63,35 +63,35 @@
private ApplicationDescriptor applicationDescriptor;
/**
- * Constructs an ApplicationAdminPermission. The filter
- * specifies the target application. The filter
is an
- * LDAP-style filter, the recognized properties are signer
- * and pid
. The pattern specified in the signer
+ * Constructs an ApplicationAdminPermission. The {@code filter}
+ * specifies the target application. The {@code filter} is an
+ * LDAP-style filter, the recognized properties are {@code signer}
+ * and {@code pid}. The pattern specified in the {@code signer}
* is matched with the Distinguished Name chain used to sign the application.
* Wildcards in a DN are not matched according to the filter string rules,
* but according to the rules defined for a DN chain. The attribute
- * pid
is matched with the PID of the application according to
+ * {@code pid} is matched with the PID of the application according to
* the filter string rules.
* filter
is null
then it matches
- * "*"
. If
- * actions
is "*"
then it identifies all the
+ * If the {@code filter} is {@code null} then it matches
+ * {@code "*"}. If
+ * {@code actions} is {@code "*"} then it identifies all the
* possible actions.
*
* @param filter
- * filter to identify application. The value null
- * is equivalent to "*"
and it indicates "all application".
+ * filter to identify application. The value {@code null}
+ * is equivalent to {@code "*"} and it indicates "all application".
* @param actions
* comma-separated list of the desired actions granted on the
* applications or "*" means all the actions. It must not be
- * null
. The order of the actions in the list is
+ * {@code null}. The order of the actions in the list is
* not significant.
* @throws InvalidSyntaxException
- * is thrown if the specified filter
is not syntactically
+ * is thrown if the specified {@code filter} is not syntactically
* correct.
*
* @exception NullPointerException
- * is thrown if the actions parameter is null
+ * is thrown if the actions parameter is {@code null}
*
* @see ApplicationDescriptor
* @see org.osgi.framework.AdminPermission
@@ -115,10 +115,10 @@
}
/**
- * This contructor should be used when creating ApplicationAdminPermission
- * instance for checkPermission
call.
- * @param application the tareget of the operation, it must not be null
- * @param actions the required operation. it must not be null
+ * This contructor should be used when creating {@code ApplicationAdminPermission}
+ * instance for {@code checkPermission} call.
+ * @param application the tareget of the operation, it must not be {@code null}
+ * @param actions the required operation. it must not be {@code null}
* @throws NullPointerException if any of the arguments is null.
*/
public ApplicationAdminPermission(ApplicationDescriptor application, String actions) {
@@ -136,10 +136,10 @@
/**
* This method can be used in the {@link java.security.ProtectionDomain}
- * implementation in the implies
method to insert the
+ * implementation in the {@code implies} method to insert the
* application ID of the current application into the permission being
* checked. This enables the evaluation of the
- * <<SELF>>
pseudo targets.
+ * {@code <<SELF>>} pseudo targets.
* @param applicationId the ID of the current application.
* @return the permission updated with the ID of the current application
*/
@@ -162,23 +162,23 @@
}
/**
- * Checks if the specified permission
is implied by this permission.
+ * Checks if the specified {@code permission} is implied by this permission.
* The method returns true under the following conditions:
*
*
* Otherwise the method returns false.
* @param otherPermission the implied permission
- * @return true if this permission implies the otherPermission
was created for a particular {@link ApplicationDescriptor}
+ * filter
of this permission mathes the ApplicationDescriptor
specified
- * in the otherPermission
. If the filter in this permission is the
- * <<SELF>>
pseudo target, then the currentApplicationId set in the
- * otherPermission
is compared to the application Id of the target
- * ApplicationDescriptor
.
+ * otherPermission
+ * {@code otherPermission}
* otherPermission
, false otherwise.
+ * @return true if this permission implies the {@code otherPermission}, false otherwise.
*/
public boolean implies(Permission otherPermission) {
if( otherPermission == null )
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/application/ApplicationDescriptor.java osgi-compendium-4.3.0/src/org/osgi/service/application/ApplicationDescriptor.java
--- osgi-compendium-4.2.0/src/org/osgi/service/application/ApplicationDescriptor.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/application/ApplicationDescriptor.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -31,7 +31,7 @@
* information about it. The application descriptor can be used for instance
* creation.
*
- * @version $Revision: 7938 $
+ * @version $Id: 1486beb82b5cf1974523306b034acfcbfeb6d73a $
*/
public abstract class ApplicationDescriptor {
@@ -118,14 +118,14 @@
/**
- * Constructs the ApplicationDescriptor
.
+ * Constructs the {@code ApplicationDescriptor}.
*
* @param applicationId
* The identifier of the application. Its value is also available
- * as the service.pid
service property of this
- * ApplicationDescriptor
service. This parameter must not
- * be null
.
- * @throws NullPointerException if the specified applicationId
is null.
+ * as the {@code service.pid} service property of this
+ * {@code ApplicationDescriptor} service. This parameter must not
+ * be {@code null}.
+ * @throws NullPointerException if the specified {@code applicationId} is null.
*/
protected ApplicationDescriptor(String applicationId) {
if(null == applicationId ) {
@@ -156,21 +156,21 @@
}
/**
- * This method verifies whether the specified pattern
+ * This method verifies whether the specified {@code pattern}
* matches the Distinguished Names of any of the certificate chains
* used to authenticate this application.
* pattern
must adhere to the
+ * The {@code pattern} must adhere to the
* syntax defined in {@link org.osgi.service.application.ApplicationAdminPermission}
* for signer attributes.
* ApplicationDescriptor
and filter.
+ * to match target {@code ApplicationDescriptor} and filter.
*
* @param pattern a pattern for a chain of Distinguished Names. It must not be null.
- * @return true
if the specified pattern matches at least
+ * @return {@code true} if the specified pattern matches at least
* one of the certificate chains used to authenticate this application
- * @throws NullPointerException if the specified pattern
is null.
+ * @throws NullPointerException if the specified {@code pattern} is null.
* @throws IllegalStateException if the application descriptor was
* unregistered
*/
@@ -179,10 +179,10 @@
/**
* Returns the properties of the application descriptor as key-value pairs.
* The return value contains the locale aware and unaware properties as
- * well. The returned Map
will include the service
- * properties of this ApplicationDescriptor
as well.
+ * well. The returned {@code Map} will include the service
+ * properties of this {@code ApplicationDescriptor} as well.
* getPropertiesSpecific
method
+ * This method will call the {@code getPropertiesSpecific} method
* to enable the container implementation to insert application model and/or
* container implementation specific properties.
* ""
)then raw (non-localized) values are returned.
+ * ({@code ""})then raw (non-localized) values are returned.
*
* @return copy of the service properties of this application descriptor service,
* according to the specified locale. If locale is null then the
@@ -232,22 +232,22 @@
* method.
*
* Localizable properties must be returned localized if the provided
- * locale
argument is not the empty String. The value
- * null
indicates to use the default locale, for other
+ * {@code locale} argument is not the empty String. The value
+ * {@code null} indicates to use the default locale, for other
* values the specified locale should be used.
*
* The returned {@link java.util.Map} must contain the standard OSGi service
* properties as well
* (e.g. service.id, service.vendor etc.) and specialized application
* descriptors may offer further service properties.
- * The returned Map
+ * The returned {@code Map}
* contains a snapshot of the properties. It will not reflect further changes in the
* property values nor will the update of the Map change the corresponding
* service property.
* @param locale the locale to be used for localizing the properties.
- * If null
the default locale should be used. If it is
- * the empty String (""
) then raw (non-localized) values
+ * If {@code null} the default locale should be used. If it is
+ * the empty String ({@code ""}) then raw (non-localized) values
* should be returned.
*
* @return the application model specific and/or container implementation
@@ -259,63 +259,59 @@
protected abstract Map getPropertiesSpecific(String locale);
/**
- * Launches a new instance of an application. The args
parameter specifies
- * the startup parameters for the instance to be launched, it may be null.
+ * Launches a new instance of an application. The {@code args} parameter
+ * specifies the startup parameters for the instance to be launched, it may
+ * be null.
*
*
* The caller has to have ApplicationAdminPermission(applicationPID,
* "launch") in order to be able to perform this operation.
* launchSpecific()
method to create and start an application
- * instance.
- * ApplicationHandle
returned by the
+ * Map
argument of the launch method contains startup
- * arguments for the
- * application. The keys used in the Map must be non-null, non-empty String
- * objects. They can be standard or application
- * specific. OSGi defines the
org.osgi.triggeringevent
- * key to be used to
- * pass the triggering event to a scheduled application, however
- * in the future it is possible that other well-known keys will be defined.
- * To avoid unwanted clashes of keys, the following rules should be applied:
+ * The {@code Map} argument of the launch method contains startup arguments
+ * for the application. The keys used in the Map must be non-null, non-empty
+ * {@code String} objects. They can be standard or application specific.
+ * OSGi defines the {@code org.osgi.triggeringevent} key to be used to pass
+ * the triggering event to a scheduled application, however in the future it
+ * is possible that other well-known keys will be defined. To avoid unwanted
+ * clashes of keys, the following rules should be applied:
*
- *
* org.osgi.
.null
. If launching an application fails,
- * the appropriate exception is thrown.
+ * This method never returns {@code null}. If launching an application
+ * fails, the appropriate exception is thrown.
*
- * @param arguments
- * Arguments for the newly launched application, may be null
+ * @param arguments Arguments for the newly launched application, may be
+ * null
*
- * @return the registered ApplicationHandle, which represents the newly
- * launched application instance. Never returns null
.
+ * @return the registered ApplicationHandle, which represents the newly
+ * launched application instance. Never returns {@code null}.
*
- * @throws SecurityException
- * if the caller doesn't have "lifecycle"
- * ApplicationAdminPermission for the application.
- * @throws ApplicationException
- * if starting the application failed
- * @throws IllegalStateException
- * if the application descriptor is unregistered
- * @throws IllegalArgumentException
- * if the specified Map
contains invalid keys
- * (null objects, empty String
or a key that is not
- * String
)
+ * @throws SecurityException if the caller doesn't have "lifecycle"
+ * ApplicationAdminPermission for the application.
+ * @throws ApplicationException if starting the application failed
+ * @throws IllegalStateException if the application descriptor is
+ * unregistered
+ * @throws IllegalArgumentException if the specified {@code Map} contains
+ * invalid keys (null objects, empty {@code String} or a key that is
+ * not {@code String})
*/
public final ApplicationHandle launch(Map arguments)
throws ApplicationException {
@@ -349,7 +345,7 @@
* The method is synchronous, it return only when the application instance was
* successfully started or the attempt to start it failed.
* null
. If launching the application
+ * This method must not return {@code null}. If launching the application
* failed, and exception must be thrown.
*
* @param arguments
@@ -387,65 +383,58 @@
* {@link ScheduledApplication} service in Service Registry, representing
* the created schedule.
* Map
argument of the method contains startup
- * arguments for the application. The keys used in the Map must be non-null,
- * non-empty String
objects. The argument values must be
- * of primitive types, wrapper classes of primitive types,
String
- * or arrays or collections of these.
- * ApplicationDescriptor
. This identifier can be specified
- * in the scheduleId
argument. If this argument is null
,
- * the identifier is automatically generated.
- *
- * @param scheduleId
- * the identifier of the created schedule. It can be null
,
- * in this case the identifier is automatically generated.
- * @param arguments
- * the startup arguments for the scheduled application, may be
- * null
- * @param topic
- * specifies the topic of the triggering event, it may contain a
- * trailing asterisk as wildcard, the empty string is treated as
- * "*", must not be null
- * @param eventFilter
- * specifies and LDAP filter to filter on the properties of the
- * triggering event, may be null
- * @param recurring
- * if the recurring parameter is false then the application will
- * be launched only once, when the event firstly occurs. If the
- * parameter is true then scheduling will take place for every
- * event occurrence; i.e. it is a recurring schedule
+ * The {@code Map} argument of the method contains startup arguments for the
+ * application. The keys used in the Map must be non-null, non-empty
+ * {@code String} objects. The argument values must be of primitive types,
+ * wrapper classes of primitive types, {@code String} or arrays or
+ * collections of these.
+ * null
- * @throws InvalidSyntaxException
- * if the specified eventFilter
is not syntactically correct
- * @throws ApplicationException
- * if the schedule couldn't be created. The possible error
- * codes are
- *
- *
- * @throws SecurityException
- * if the caller doesn't have "schedule"
- * ApplicationAdminPermission for the application.
- * @throws IllegalStateException
- * if the application descriptor is unregistered
- * @throws IllegalArgumentException
- * if the specified scheduleId
is already used
- * for this ApplicationDescriptor
- * Map
contains invalid keys
- * (null objects, empty String
or a key that is not
- * String
)
+ * @throws NullPointerException if the topic is {@code null}
+ * @throws InvalidSyntaxException if the specified {@code eventFilter} is
+ * not syntactically correct
+ * @throws ApplicationException if the schedule couldn't be created. The
+ * possible error codes are
+ *
+ *
+ * @throws SecurityException if the caller doesn't have "schedule"
+ * ApplicationAdminPermission for the application.
+ * @throws IllegalStateException if the application descriptor is
+ * unregistered
+ * @throws IllegalArgumentException if the specified {@code Map} contains
+ * invalid keys (null objects, empty {@code String} or a key that is
+ * not {@code String})
*/
public final ScheduledApplication schedule(String scheduleId, Map arguments, String topic,
String eventFilter, boolean recurring) throws InvalidSyntaxException,
@@ -485,7 +474,7 @@
/**
* This method is used to notify the container implementation that the
* corresponding application has been locked and it should update the
- * application.locked
service property accordingly.
+ * {@code application.locked} service property accordingly.
* @throws IllegalStateException
* if the application descriptor is unregistered
*/
@@ -514,7 +503,7 @@
/**
* This method is used to notify the container implementation that the
* corresponding application has been unlocked and it should update the
- * application.locked
service property accordingly.
+ * {@code application.locked} service property accordingly.
* @throws IllegalStateException
* if the application descriptor is unregistered
@@ -719,4 +708,4 @@
}
-}
\ No newline at end of file
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/application/ApplicationException.java osgi-compendium-4.3.0/src/org/osgi/service/application/ApplicationException.java
--- osgi-compendium-4.2.0/src/org/osgi/service/application/ApplicationException.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/application/ApplicationException.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2005, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2005, 2010). 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.
@@ -20,10 +20,10 @@
* This exception is used to indicate problems related to application lifecycle
* management.
*
- * ApplicationException
object is created by the Application Admin
+ * {@code ApplicationException} object is created by the Application Admin
* to denote an exception condition in the lifecycle of an application.
- * ApplicationException
s should not be created by developers.
- * ApplicationException
s are associated with an error code. This
+ * {@code ApplicationException}s should not be created by developers.
+ * {@code ApplicationException}s are associated with an error code. This
* code describes the type of problem reported in this exception. The possible
* codes are:
*
@@ -44,7 +44,7 @@
* startup arguments is invalid, for example its type is not permitted.
*
*
- * @version $Revision: 6083 $
+ * @version $Id: be377d8ecd052974b3c5952c95af5c3df7334759 $
*/
public class ApplicationException extends Exception {
private static final long serialVersionUID = -7173190453622508207L;
@@ -64,7 +64,7 @@
/**
* An exception was thrown by the application or the corresponding container
- * during launch. The exception is available from getCause()
.
+ * during launch. The exception is available from {@code getCause()}.
*/
public static final int APPLICATION_INTERNAL_ERROR = 0x03;
@@ -98,7 +98,7 @@
public static final int APPLICATION_INVALID_STARTUP_ARGUMENT = 0x07;
/**
- * Creates an ApplicationException
with the specified error code.
+ * Creates an {@code ApplicationException} with the specified error code.
* @param errorCode The code of the error
*/
public ApplicationException(int errorCode) {
@@ -107,7 +107,7 @@
}
/**
- * Creates a ApplicationException
that wraps another exception.
+ * Creates a {@code ApplicationException} that wraps another exception.
*
* @param errorCode The code of the error
* @param cause The cause of this exception.
@@ -118,7 +118,7 @@
}
/**
- * Creates an ApplicationException
with the specified error code.
+ * Creates an {@code ApplicationException} with the specified error code.
* @param errorCode The code of the error
* @param message The associated message
*/
@@ -128,7 +128,7 @@
}
/**
- * Creates a ApplicationException
that wraps another exception.
+ * Creates a {@code ApplicationException} that wraps another exception.
*
* @param errorCode The code of the error
* @param message The associated message.
@@ -140,10 +140,10 @@
}
/**
- * Returns the cause of this exception or null
if no cause was
+ * Returns the cause of this exception or {@code null} if no cause was
* set.
*
- * @return The cause of this exception or null
if no cause was
+ * @return The cause of this exception or {@code null} if no cause was
* set.
*/
public Throwable getCause() {
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/application/ApplicationHandle.java osgi-compendium-4.3.0/src/org/osgi/service/application/ApplicationHandle.java
--- osgi-compendium-4.2.0/src/org/osgi/service/application/ApplicationHandle.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/application/ApplicationHandle.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -30,7 +30,7 @@
* lifecycle state of the represented application instance. It defines constants
* for the lifecycle states.
*
- * @version $Revision: 5901 $
+ * @version $Id: 10f890813548235e11bb5cd7f9f1866dcb18d381 $
*/
public abstract class ApplicationHandle {
/*
@@ -72,7 +72,7 @@
/**
* The application instance is being stopped. This is the state of the
- * application instance during the execution of the destroy()
+ * application instance during the execution of the {@code destroy()}
* method.
*/
public final static String STOPPING = "STOPPING";
@@ -86,13 +86,13 @@
* instance is created. The instance identifier must remain static for the
* lifetime of the instance, it must remain the same even across framework
* restarts for the same application instance. This value must be the same
- * as the service.pid
service property of this application
+ * as the {@code service.pid} service property of this application
* handle.
* ApplicationDescriptor
and <index>
+ * corresponding {@code ApplicationDescriptor} and <index>
* is a unique integer index assigned by the application container.
* Even after destroying the application index the same index value should not
* be reused in a reasonably long timeframe.
@@ -100,7 +100,7 @@
* @param instanceId the instance identifier of the represented application
* instance. It must not be null.
*
- * @param descriptor the ApplicationDescriptor
of the represented
+ * @param descriptor the {@code ApplicationDescriptor} of the represented
* application instance. It must not be null.
*
* @throws NullPointerException if any of the arguments is null.
@@ -127,10 +127,10 @@
}
/**
- * Retrieves the ApplicationDescriptor
to which this
- * ApplicationHandle
belongs.
+ * Retrieves the {@code ApplicationDescriptor} to which this
+ * {@code ApplicationHandle} belongs.
*
- * @return The corresponding ApplicationDescriptor
+ * @return The corresponding {@code ApplicationDescriptor}
*/
public final ApplicationDescriptor getApplicationDescriptor() {
return descriptor;
@@ -152,18 +152,18 @@
* terminated. A negative, zero or positive value may be used.
*
*
ApplicationException
+ * application has not terminated then an {@code ApplicationException}
* is thrown.ApplicationException
is thrown.UnsupportedOperationException
. The application model should
+ * {@code UnsupportedOperationException}. The application model should
* override this method if exit values are supported.
* ApplicationHandle
must be unregistered.
+ * At the end the {@code ApplicationHandle} must be unregistered.
* This method should free all the resources related to this
- * ApplicationHandle
.
+ * {@code ApplicationHandle}.
* ApplicationAdminPermission
for the corresponding application.
+ * {@code ApplicationAdminPermission} for the corresponding application.
*
* @throws IllegalStateException
* if the application handle is unregistered
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/application/package.html osgi-compendium-4.3.0/src/org/osgi/service/application/package.html
--- osgi-compendium-4.2.0/src/org/osgi/service/application/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/application/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
-
-
-Import-Package: org.osgi.service.application; version="[1.1,2.0)"
-
-
-
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/application/package-info.java osgi-compendium-4.3.0/src/org/osgi/service/application/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/service/application/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/application/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Application Package Version 1.1.
+ *
+ * ScheduledApplication
instance has an identifier which is
+ * Each {@code ScheduledApplication} instance has an identifier which is
* unique within the scope of the application being scheduled.
* ScheduledApplication
instances are registered as services. The
+ * {@code ScheduledApplication} instances are registered as services. The
* {@link #APPLICATION_PID} service property contains the PID of the application
* being scheduled, the {@link #SCHEDULE_ID} service property contains the
* schedule identifier.
*
- * @version $Revision: 5673 $
+ * @version $Id: f3385ad4cf9ce8f802ab44bd9bc76f865960b6e0 $
*/
public interface ScheduledApplication {
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/BlueprintContainer.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/BlueprintContainer.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/BlueprintContainer.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/BlueprintContainer.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -30,7 +30,7 @@
*
* A Blueprint Container provides access to all managed components. These are
* the beans, services, and service references. Only bundles in the
- * ACTIVE
state (and also the STARTING
state for
+ * {@code ACTIVE} state (and also the {@code STARTING} state for
* bundles awaiting lazy activation) can have an associated Blueprint Container.
* A given Bundle Context has at most one associated Blueprint Container.
*
@@ -39,7 +39,8 @@
* registered as a service and its managed components can be queried.
*
* @ThreadSafe
- * @version $Revision: 7556 $
+ * @noimplement
+ * @version $Id: 0e041abe1ae37e4eb067acb39c1c51f532ab9d84 $
*/
public interface BlueprintContainer {
/**
@@ -48,7 +49,7 @@
* @return An immutable Set of Strings, containing the ids of all of the
* components managed within this Blueprint Container.
*/
- Set/* BlueprintEvent
objects are delivered to all registered
+ * {@code BlueprintEvent} objects are delivered to all registered
* {@link BlueprintListener} services. Blueprint Events must be asynchronously
* delivered in chronological order with respect to each listener.
*
@@ -59,7 +59,7 @@
* @see BlueprintListener
* @see EventConstants
* @Immutable
- * @version $Revision: 7590 $
+ * @version $Id: 29fce52f21d5583af483659f8cb06e664894d938 $
*/
public class BlueprintEvent {
@@ -90,7 +90,7 @@
* is sent after a timeout in the Grace Period, the
* {@link #getDependencies()} method must return an array of missing
* mandatory dependencies. The event must also contain the cause of the
- * failure as a Throwable
through the {@link #getCause()}
+ * failure as a {@code Throwable} through the {@link #getCause()}
* method.
*/
public static final int FAILURE = 5;
@@ -136,7 +136,7 @@
private final Bundle extenderBundle;
/**
* An array containing filters identifying the missing dependencies. Must
- * not be null
when the event type requires it.
+ * not be {@code null} when the event type requires it.
*
* @see #getDependencies()
*/
@@ -155,32 +155,32 @@
private final boolean replay;
/**
- * Create a simple BlueprintEvent
object.
+ * Create a simple {@code BlueprintEvent} object.
*
* @param type The type of this event.
* @param bundle The Blueprint bundle associated with this event. This
- * parameter must not be null
.
+ * parameter must not be {@code null}.
* @param extenderBundle The Blueprint extender bundle that is generating
- * this event. This parameter must not be null
.
+ * this event. This parameter must not be {@code null}.
*/
public BlueprintEvent(int type, Bundle bundle, Bundle extenderBundle) {
this(type, bundle, extenderBundle, null, null);
}
/**
- * Create a BlueprintEvent
object associated with a set of
+ * Create a {@code BlueprintEvent} object associated with a set of
* dependencies.
*
* @param type The type of this event.
* @param bundle The Blueprint bundle associated with this event. This
- * parameter must not be null
.
+ * parameter must not be {@code null}.
* @param extenderBundle The Blueprint extender bundle that is generating
- * this event. This parameter must not be null
.
- * @param dependencies An array of String
filters for each
+ * this event. This parameter must not be {@code null}.
+ * @param dependencies An array of {@code String} filters for each
* dependency associated with this event. Must be a non-empty array
* for event types {@link #GRACE_PERIOD} and {@link #WAITING}. It is
* optional for event type {@link #FAILURE}. Must be
- * null
for other event types.
+ * {@code null} for other event types.
*/
public BlueprintEvent(int type, Bundle bundle, Bundle extenderBundle,
String[] dependencies) {
@@ -188,16 +188,16 @@
}
/**
- * Create a BlueprintEvent
object associated with a failure
+ * Create a {@code BlueprintEvent} object associated with a failure
* cause.
*
* @param type The type of this event.
* @param bundle The Blueprint bundle associated with this event. This
- * parameter must not be null
.
+ * parameter must not be {@code null}.
* @param extenderBundle The Blueprint extender bundle that is generating
- * this event. This parameter must not be null
.
- * @param cause A Throwable
object describing the root cause of
- * the event. May be null
.
+ * this event. This parameter must not be {@code null}.
+ * @param cause A {@code Throwable} object describing the root cause of
+ * the event. May be {@code null}.
*/
public BlueprintEvent(int type, Bundle bundle, Bundle extenderBundle,
Throwable cause) {
@@ -205,21 +205,21 @@
}
/**
- * Create a BlueprintEvent
object associated with a failure
+ * Create a {@code BlueprintEvent} object associated with a failure
* cause and a set of dependencies.
*
* @param type The type of this event.
* @param bundle The Blueprint bundle associated with this event. This
- * parameter must not be null
.
+ * parameter must not be {@code null}.
* @param extenderBundle The Blueprint extender bundle that is generating
- * this event. This parameter must not be null
.
- * @param dependencies An array of String
filters for each
+ * this event. This parameter must not be {@code null}.
+ * @param dependencies An array of {@code String} filters for each
* dependency associated with this event. Must be a non-empty array
* for event types {@link #GRACE_PERIOD} and {@link #WAITING}. It is
* optional for event type {@link #FAILURE}. Must be
- * null
for other event types.
- * @param cause A Throwable
object describing the root cause of
- * this event. May be null
.
+ * {@code null} for other event types.
+ * @param cause A {@code Throwable} object describing the root cause of
+ * this event. May be {@code null}.
*/
public BlueprintEvent(int type, Bundle bundle, Bundle extenderBundle,
String[] dependencies, Throwable cause) {
@@ -227,7 +227,8 @@
this.timestamp = System.currentTimeMillis();
this.bundle = bundle;
this.extenderBundle = extenderBundle;
- this.dependencies = dependencies;
+ this.dependencies = dependencies == null ? null
+ : (String[]) dependencies.clone();;
this.cause = cause;
this.replay = false;
if (bundle == null) {
@@ -264,14 +265,14 @@
}
/**
- * Create a new BlueprintEvent
from the specified
- * BlueprintEvent
. The timestamp
property will be
+ * Create a new {@code BlueprintEvent} from the specified
+ * {@code BlueprintEvent}. The {@code timestamp} property will be
* copied from the original event and only the replay property will be
* overridden with the given value.
*
- * @param event The original BlueprintEvent
to copy. Must not
- * be null
.
- * @param replay true
if this event should be used as a replay
+ * @param event The original {@code BlueprintEvent} to copy. Must not
+ * be {@code null}.
+ * @param replay {@code true} if this event should be used as a replay
* event.
*/
public BlueprintEvent(BlueprintEvent event, boolean replay) {
@@ -337,7 +338,7 @@
*
* @return The filters identifying the missing dependencies that caused this
* event if the event type is one of {@link #WAITING},
- * {@link #GRACE_PERIOD} or {@link #FAILURE} or null
+ * {@link #GRACE_PERIOD} or {@link #FAILURE} or {@code null}
* for the other event types.
*/
public String[] getDependencies() {
@@ -347,7 +348,7 @@
/**
* Return the cause for this {@link #FAILURE} event.
*
- * @return The cause of the failure for this event. May be null
+ * @return The cause of the failure for this event. May be {@code null}
* .
*/
public Throwable getCause() {
@@ -357,8 +358,8 @@
/**
* Return whether this event is a replay event.
*
- * @return true
if this event is a replay event and
- * false
otherwise.
+ * @return {@code true} if this event is a replay event and
+ * {@code false} otherwise.
*/
public boolean isReplay() {
return replay;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/BlueprintListener.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/BlueprintListener.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/BlueprintListener.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/BlueprintListener.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -16,7 +16,7 @@
package org.osgi.service.blueprint.container;
/**
- * A BlueprintEvent
Listener.
+ * A {@code BlueprintEvent} Listener.
*
* s
to convert.
- * @param targetType The target type T
.
+ * @param sourceObject The source object {@code s} to convert.
+ * @param targetType The target type {@code T}.
*
- * @return true
if the conversion is possible,
- * false
otherwise.
+ * @return {@code true} if the conversion is possible,
+ * {@code false} otherwise.
*/
boolean canConvert(Object sourceObject, ReifiedType targetType);
/**
* Convert the specified object to an instance of the specified type.
*
- * @param sourceObject The source object s
to convert.
- * @param targetType The target type T
.
+ * @param sourceObject The source object {@code s} to convert.
+ * @param targetType The target type {@code T}.
* @return An instance with a type that is assignable from targetType's raw
* class
* @throws Exception If the conversion cannot succeed. This exception should
- * not be thrown when the {@link #canConvert canConvert} method has
- * returned true
.
+ * not be thrown when the {@link #canConvert(Object, ReifiedType)
+ * canConvert} method has returned {@code true}.
*/
Object convert(Object sourceObject, ReifiedType targetType)
throws Exception;
-}
\ No newline at end of file
+}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/EventConstants.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/EventConstants.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/EventConstants.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/EventConstants.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -23,7 +23,7 @@
* Each type of event is sent to a different topic:
*
* org/osgi/service/blueprint/container/
<event-type>
+ * {@code org/osgi/service/blueprint/container/}<event-type>
*
* Integer
and can take one of the values defined in
+ * {@code Integer} and can take one of the values defined in
* {@link BlueprintEvent}.
*/
public static final String TYPE = "type";
/**
- * The BlueprintEvent
object that caused this event. This
+ * The {@code BlueprintEvent} object that caused this event. This
* property is of type {@link BlueprintEvent}.
*/
public static final String EVENT = "event";
/**
* The time the event was created. This property is of type
- * Long
.
+ * {@code Long}.
*/
public static final String TIMESTAMP = "timestamp";
/**
* The Blueprint bundle associated with this event. This property is of type
- * Bundle
.
+ * {@code Bundle}.
*/
public static final String BUNDLE = "bundle";
/**
* The bundle id of the Blueprint bundle associated with this event. This
- * property is of type Long
.
+ * property is of type {@code Long}.
*/
public static final String BUNDLE_ID = "bundle.id";
/**
* The bundle symbolic name of the Blueprint bundle associated with this
- * event. This property is of type String
.
+ * event. This property is of type {@code String}.
*/
public static final String BUNDLE_SYMBOLICNAME = "bundle.symbolicName";
/**
* The bundle version of the Blueprint bundle associated with this event.
- * This property is of type Version
.
+ * This property is of type {@code Version}.
*/
public static final String BUNDLE_VERSION = "bundle.version";
/**
* The Blueprint extender bundle that is generating this event. This
- * property is of type Bundle
.
+ * property is of type {@code Bundle}.
*/
public static final String EXTENDER_BUNDLE = "extender.bundle";
/**
* The bundle id of the Blueprint extender bundle that is generating this
- * event. This property is of type Long
.
+ * event. This property is of type {@code Long}.
*/
public static final String EXTENDER_BUNDLE_ID = "extender.bundle.id";
/**
* The bundle symbolic of the Blueprint extender bundle that is generating
- * this event. This property is of type String
.
+ * this event. This property is of type {@code String}.
*/
public static final String EXTENDER_BUNDLE_SYMBOLICNAME = "extender.bundle.symbolicName";
/**
* The bundle version of the Blueprint extender bundle that is generating
- * this event. This property is of type Version
.
+ * this event. This property is of type {@code Version}.
*/
public static final String EXTENDER_BUNDLE_VERSION = "extender.bundle.version";
@@ -130,13 +130,13 @@
* for a {@link BlueprintEvent#FAILURE FAILURE},
* {@link BlueprintEvent#GRACE_PERIOD GRACE_PERIOD}, or
* {@link BlueprintEvent#WAITING WAITING} event. This property type is an
- * array of String
.
+ * array of {@code String}.
*/
public static final String DEPENDENCIES = "dependencies";
/**
* The cause for a {@link BlueprintEvent#FAILURE FAILURE} event. This
- * property is of type Throwable
.
+ * property is of type {@code Throwable}.
*/
public static final String CAUSE = "cause";
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/NoSuchComponentException.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/NoSuchComponentException.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/NoSuchComponentException.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/NoSuchComponentException.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -23,7 +23,7 @@
* instance or lookup Component Metadata using a component id that does not
* exist in the Blueprint Container.
*
- * @version $Revision: 7556 $
+ * @version $Id: 37c8a6a57a8512d56c1a655c5f29d9d1c3bdd717 $
*/
public class NoSuchComponentException extends RuntimeException {
private static final long serialVersionUID = 1L;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/package.html osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/package.html
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,21 +0,0 @@
-
-
-Import-Package: org.osgi.service.blueprint.container; version="[1.0,2.0)"
-
-BlueprintContainer
. An instance of this type is available
- inside a Blueprint Container as an implicitly defined component with the name
- "blueprintContainer".
-Type
class but
+ * with type parameters. This class models such a {@code Type} class but
* ensures that the type is reified. Reification means that the Type
- * graph associated with a Java 5 Type
instance is traversed until
+ * graph associated with a Java 5 {@code Type} instance is traversed until
* the type becomes a concrete class. This class is available with the
* {@link #getRawClass()} method. The optional type parameters are recursively
* represented as Reified Types.
@@ -30,23 +30,23 @@
* Object
+ * the Java 1.4 class and using a Reified Type based on the {@code Object}
* class for any requested type parameter.
*
* Type
instances into the
+ * must reify the different Java 5 {@code Type} instances into the
* reified form. That is, a form where the raw Class is available with its
* optional type parameters as Reified Types.
*
* @Immutable
- * @version $Revision: 7564 $
+ * @version $Id: eb26caecfc9b636d09a307d1a8c16b9c5697610c $
*/
public class ReifiedType {
private final static ReifiedType OBJECT = new ReifiedType(Object.class);
- private final Class clazz;
+ private final Class> clazz;
/**
* Create a Reified Type for a raw Java class without any generic type
@@ -55,7 +55,7 @@
*
* @param clazz The raw class of the Reified Type.
*/
- public ReifiedType(Class clazz) {
+ public ReifiedType(Class> clazz) {
this.clazz = clazz;
}
@@ -75,7 +75,7 @@
*
* @return The raw class represented by this type.
*/
- public Class getRawClass() {
+ public Class> getRawClass() {
return clazz;
}
@@ -83,7 +83,7 @@
* Return a type parameter for this type.
*
* The type parameter refers to a parameter in a generic type declaration
- * given by the zero-based index i
.
+ * given by the zero-based index {@code i}.
*
* For example, in the following example:
*
@@ -91,11 +91,11 @@
* Map<String, ? extends Metadata>
*
*
- * type parameter 0 is String
, and type parameter 1 is
- * Metadata
.
+ * type parameter 0 is {@code String}, and type parameter 1 is
+ * {@code Metadata}.
*
* Object
+ * This implementation returns a Reified Type that has {@code Object}
* as class. Any object is assignable to Object and therefore no conversion
* is then necessary. This is compatible with versions of Java language
* prior to Java 5.
@@ -104,7 +104,7 @@
* the generic type parameter information for Java 5 and later.
*
* @param i The zero-based index of the requested type parameter.
- * @return The ReifiedType
for the generic type parameter at
+ * @return The {@code ReifiedType} for the generic type parameter at
* the specified index.
*/
public ReifiedType getActualTypeArgument(int i) {
@@ -115,7 +115,7 @@
* Return the number of type parameters for this type.
*
* 0
. This method should be
+ * This implementation returns {@code 0}. This method should be
* overridden by a subclass that provides access to the generic type
* parameter information for Java 5 and later.
*
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/ServiceUnavailableException.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/ServiceUnavailableException.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/container/ServiceUnavailableException.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/container/ServiceUnavailableException.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -23,7 +23,7 @@
* This exception is thrown when an invocation is made on a service reference
* and a backing service is not available.
*
- * @version $Revision: 7556 $
+ * @version $Id: b1c32f13d90049a975b6bbaad66af8164c4d3ec3 $
*/
public class ServiceUnavailableException extends ServiceException {
private static final long serialVersionUID = 1L;
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/BeanArgument.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/BeanArgument.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/BeanArgument.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/BeanArgument.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -19,17 +19,17 @@
* Metadata for a factory method or constructor argument of a bean. The
* arguments of a bean are obtained from {@link BeanMetadata#getArguments()}.
*
- * This is specified by the argument
elements of a bean.
+ * This is specified by the {@code argument} elements of a bean.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: f37330b2be77a7f47fffb3ac738482fd6d76f912 $
*/
public interface BeanArgument {
/**
* Return the Metadata for the argument value.
*
- * This is specified by the value
attribute.
+ * This is specified by the {@code value} attribute.
*
* @return The Metadata for the argument value.
*/
@@ -39,21 +39,21 @@
* Return the name of the value type to match the argument and convert the
* value into when invoking the constructor or factory method.
*
- * This is specified by the type
attribute.
+ * This is specified by the {@code type} attribute.
*
* @return The name of the value type to convert the value into, or
- * null
if no type is specified.
+ * {@code null} if no type is specified.
*/
String getValueType();
/**
* Return the zero-based index into the parameter list of the factory method
* or constructor to be invoked for this argument. This is determined by
- * specifying the index
attribute for the bean. If not
+ * specifying the {@code index} attribute for the bean. If not
* explicitly set, this will return -1 and the initial ordering is defined
* by its position in the {@link BeanMetadata#getArguments()} list.
*
- * This is specified by the index
attribute.
+ * This is specified by the {@code index} attribute.
*
* @return The zero-based index of the parameter, or -1 if no index is
* specified.
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/BeanMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/BeanMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/BeanMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/BeanMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -21,22 +21,22 @@
* Metadata for a Bean component.
*
* bean
element.
+ * This is specified by the {@code bean} element.
*
* @ThreadSafe
- * @version $Revision: 7773 $
+ * @version $Id: 5ec670504683d0786d261fc70a40a408841b63db $
*/
public interface BeanMetadata extends Target, ComponentMetadata {
/**
- * The bean has singleton
scope.
+ * The bean has {@code singleton} scope.
*
* @see #getScope()
*/
static final String SCOPE_SINGLETON = "singleton";
/**
- * The bean has prototype
scope.
+ * The bean has {@code prototype} scope.
*
* @see #getScope()
*/
@@ -45,67 +45,67 @@
/**
* Return the name of the class specified for the bean.
*
- * This is specified by the class
attribute of the bean
+ * This is specified by the {@code class} attribute of the bean
* definition.
*
* @return The name of the class specified for the bean. If no class is
* specified in the bean definition, because the a factory component
- * is used instead, then this method will return null
.
+ * is used instead, then this method will return {@code null}.
*/
String getClassName();
/**
* Return the name of the init method specified for the bean.
*
- * This is specified by the init-method
attribute of the bean
+ * This is specified by the {@code init-method} attribute of the bean
* definition.
*
* @return The name of the init method specified for the bean, or
- * null
if no init method is specified.
+ * {@code null} if no init method is specified.
*/
String getInitMethod();
/**
* Return the name of the destroy method specified for the bean.
*
- * This is specified by the destroy-method
attribute of the
+ * This is specified by the {@code destroy-method} attribute of the
* bean definition.
*
* @return The name of the destroy method specified for the bean, or
- * null
if no destroy method is specified.
+ * {@code null} if no destroy method is specified.
*/
String getDestroyMethod();
/**
* Return the arguments for the factory method or constructor of the bean.
*
- * This is specified by the child argument
elements.
+ * This is specified by the child {@code argument} elements.
*
* @return An immutable List of {@link BeanArgument} objects for the factory
* method or constructor of the bean. The List is empty if no
* arguments are specified for the bean.
*/
- List/*
property
elements.
+ * This is specified by the child {@code property} elements.
*
* @return An immutable List of {@link BeanProperty} objects, with one entry
* for each property to be injected in the bean. The List is empty
* if no property injection is specified for the bean.
*
*/
- List /* factory-method
attribute of the
+ * This is specified by the {@code factory-method} attribute of the
* bean.
*
- * @return The name of the factory method of the bean or null
+ * @return The name of the factory method of the bean or {@code null}
* if no factory method is specified for the bean.
*/
String getFactoryMethod();
@@ -114,20 +114,20 @@
* Return the Metadata for the factory component on which to invoke the
* factory method for the bean.
*
- * This is specified by the factory-ref
attribute of the bean.
+ * This is specified by the {@code factory-ref} attribute of the bean.
*
* null
.
+ * this method will return {@code null}.
*
* When a factory method has been specified for the bean but a factory
* component has not been specified, the factory method must be invoked as a
* static method on the bean's class.
*
* @return The Metadata for the factory component on which to invoke the
- * factory method for the bean or null
if no factory
+ * factory method for the bean or {@code null} if no factory
* component is specified.
*/
Target getFactoryComponent();
@@ -135,7 +135,7 @@
/**
* Return the scope for the bean.
*
- * @return The scope for the bean. Returns null
if the scope
+ * @return The scope for the bean. Returns {@code null} if the scope
* has not been explicitly specified in the bean definition.
* @see #SCOPE_SINGLETON
* @see #SCOPE_PROTOTYPE
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/BeanProperty.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/BeanProperty.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/BeanProperty.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/BeanProperty.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -19,11 +19,11 @@
* Metadata for a property to be injected into a bean. The properties of a bean
* are obtained from {@link BeanMetadata#getProperties()}.
*
- * This is specified by the property
elements of a bean. Properties
+ * This is specified by the {@code property} elements of a bean. Properties
* are defined according to the Java Beans conventions.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: 47fadc2113c7d8547cb8886ab90f5c2715944603 $
*/
public interface BeanProperty {
@@ -31,7 +31,7 @@
* Return the name of the property to be injected. The name follows Java
* Beans conventions.
*
- * This is specified by the name
attribute.
+ * This is specified by the {@code name} attribute.
*
* @return The name of the property to be injected.
*/
@@ -40,7 +40,7 @@
/**
* Return the Metadata for the value to be injected into a bean.
*
- * This is specified by the value
attribute or in inlined text.
+ * This is specified by the {@code value} attribute or in inlined text.
*
* @return The Metadata for the value to be injected into a bean.
*/
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/CollectionMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/CollectionMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/CollectionMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/CollectionMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -23,7 +23,7 @@
* collection to a specific type.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: b10f2b0ce4be21fa056fe311845ee0df726a0019 $
*/
public interface CollectionMetadata extends NonNullMetadata {
@@ -31,18 +31,18 @@
/**
* Return the type of the collection.
*
- * The possible types are: array (Object[]
), Set
,
- * and List
. This information is specified in the element name.
+ * The possible types are: array ({@code Object[]}), {@code Set},
+ * and {@code List}. This information is specified in the element name.
*
- * @return The type of the collection. Object[]
is returned to
+ * @return The type of the collection. {@code Object[]} is returned to
* indicate an array.
*/
- Class/* > */getCollectionClass();
+ Class> getCollectionClass();
/**
* Return the type specified for the values of the collection.
*
- * The value-type
attribute specified this information.
+ * The {@code value-type} attribute specified this information.
*
* @return The type specified for the values of the collection.
*/
@@ -53,5 +53,5 @@
*
* @return A List of Metadata for the values of the collection.
*/
- List /* null
if this is an anonymously defined and/or
+ * {@code null} if this is an anonymously defined and/or
* inlined component.
*/
String getId();
@@ -53,9 +53,9 @@
/**
* Return the activation strategy for the component.
*
- * This is specified by the activation
attribute of a component
- * definition. If this is not set, then the default-activation
- * in the blueprint
element is used. If that is also not set,
+ * This is specified by the {@code activation} attribute of a component
+ * definition. If this is not set, then the {@code default-activation}
+ * in the {@code blueprint} element is used. If that is also not set,
* then the activation strategy is {@link #ACTIVATION_EAGER}.
*
* @return The activation strategy for the component.
@@ -65,11 +65,11 @@
int getActivation();
/**
- * Return the ids of any components listed in a depends-on
+ * Return the ids of any components listed in a {@code depends-on}
* attribute for the component.
*
* @return An immutable List of component ids that are explicitly declared
* as a dependency, or an empty List if none.
*/
- List/* component-id
attribute of a
+ * This is specified by the {@code component-id} attribute of a
* component.
*
* @return The id of the referenced component.
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/MapEntry.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/MapEntry.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/MapEntry.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/MapEntry.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -23,26 +23,26 @@
* {@link ServiceMetadata}.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: 5972123892814795a50d0bec3369551a0d3f7d73 $
*/
public interface MapEntry {
/**
* Return the Metadata for the key of the map entry.
*
- * This is specified by the key
attribute or element.
+ * This is specified by the {@code key} attribute or element.
*
* @return The Metadata for the key of the map entry. This must not be
- * null
.
+ * {@code null}.
*/
NonNullMetadata getKey();
/**
* Return the Metadata for the value of the map entry.
*
- * This is specified by the value
attribute or element.
+ * This is specified by the {@code value} attribute or element.
*
* @return The Metadata for the value of the map entry. This must not be
- * null
.
+ * {@code null}.
*/
Metadata getValue();
}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/MapMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/MapMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/MapMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/MapMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -21,18 +21,18 @@
* Metadata for a Map based value.
*
* map
element.
+ * This is specified by the {@code map} element.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: 1ed8bc562e356f82ab2deb0bbf695b63c3053c64 $
*/
public interface MapMetadata extends NonNullMetadata {
/**
* Return the name of the type of the map keys.
*
- * This is specified by the key-type
attribute of the map.
+ * This is specified by the {@code key-type} attribute of the map.
*
- * @return The name of the type of the map keys, or null
if
+ * @return The name of the type of the map keys, or {@code null} if
* none is specified.
*/
String getKeyType();
@@ -40,9 +40,9 @@
/**
* Return the name of the type of the map values.
*
- * This is specified by the value-type
attribute of the map.
+ * This is specified by the {@code value-type} attribute of the map.
*
- * @return The name of the type of the map values, or null
if
+ * @return The name of the type of the map values, or {@code null} if
* none is specified.
*/
String getValueType();
@@ -54,5 +54,5 @@
* the map. The List is empty if no entries are specified for the
* map.
*/
- List /* null
. All Metadata subtypes
+ * Metadata for a value that cannot {@code null}. All Metadata subtypes
* extend this type except for {@link NullMetadata}.
*
* null
.
+ * {@code null}.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: 33c902a7aa78a6e7b679dfc9064df8ad83a17024 $
*/
public interface NonNullMetadata extends Metadata {
// marker interface
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/NullMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/NullMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/NullMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/NullMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -16,16 +16,16 @@
package org.osgi.service.blueprint.reflect;
/**
- * Metadata for a value specified to be null
via the <null>
+ * Metadata for a value specified to be {@code null} via the <null>
* element.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: 3d06d7a23fca29fa9e08e0fa0605a90b2801b4f6 $
*/
public interface NullMetadata extends Metadata {
/**
- * Singleton instance of NullMetadata
.
+ * Singleton instance of {@code NullMetadata}.
*/
static final NullMetadata NULL = new NullMetadata() {
// empty body
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/package.html osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/package.html
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,14 +0,0 @@
-
-
-Import-Package: org.osgi.service.blueprint.reflect; version="[1.0,2.0)"
-
-java.util.Properties
based value.
+ * Metadata for a {@code java.util.Properties} based value.
*
* String
.
+ * of type {@code String}.
*
* props
element.
+ * This is specified by the {@code props} element.
*
* @ThreadSafe
- * @version $Revision: 7564 $
+ * @version $Id: 66e9ed7e3802bd39b5fc0dd6e9f6dd12a64225e2 $
*/
public interface PropsMetadata extends NonNullMetadata {
@@ -39,5 +39,5 @@
* the properties. The List is empty if no entries are specified for
* the properties.
*/
- List/* ref
attribute or via an inlined
+ * This is specified by the {@code ref} attribute or via an inlined
* component.
*
* @return The Metadata for the component that will receive bind and unbind
@@ -40,7 +40,7 @@
* Return the name of the bind method. The bind method will be invoked when
* a matching service is bound to the reference.
*
- * This is specified by the bind-method
attribute of the
+ * This is specified by the {@code bind-method} attribute of the
* reference listener.
*
* @return The name of the bind method.
@@ -51,7 +51,7 @@
* Return the name of the unbind method. The unbind method will be invoked
* when a matching service is unbound from the reference.
*
- * This is specified by the unbind-method
attribute of the
+ * This is specified by the {@code unbind-method} attribute of the
* reference listener.
*
* @return The name of the unbind method.
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/ReferenceListMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -19,10 +19,10 @@
* Metadata for a list of service references.
*
* reference-list
element.
+ * This is specified by the {@code reference-list} element.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: d95ec9510def987833b52133a68e6431fdf11b06 $
*/
public interface ReferenceListMetadata extends ServiceReferenceMetadata {
@@ -34,7 +34,7 @@
static final int USE_SERVICE_OBJECT = 1;
/**
- * Reference list values must be ServiceReference
objects.
+ * Reference list values must be {@code ServiceReference} objects.
*
* @see #getMemberType()
*/
@@ -42,13 +42,13 @@
/**
* Return whether the List will contain service object proxies or
- * ServiceReference
objects.
+ * {@code ServiceReference} objects.
*
- * This is specified by the member-type
attribute of the
+ * This is specified by the {@code member-type} attribute of the
* reference list.
*
* @return Whether the List will contain service object proxies or
- * ServiceReference
objects.
+ * {@code ServiceReference} objects.
* @see #USE_SERVICE_OBJECT
* @see #USE_SERVICE_REFERENCE
*/
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/ReferenceMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/ReferenceMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/ReferenceMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/ReferenceMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -20,10 +20,10 @@
* service registry.
*
* reference
element.
+ * This is specified by the {@code reference} element.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: e47861860c5a7916fb1f9a4593ebbcadb5ef05d2 $
*/
public interface ReferenceMetadata extends Target, ServiceReferenceMetadata {
@@ -31,7 +31,7 @@
* Return the timeout for service invocations when a backing service is is
* unavailable.
*
- * This is specified by the timeout
attribute of the reference.
+ * This is specified by the {@code timeout} attribute of the reference.
*
* @return The timeout, in milliseconds, for service invocations when a
* backing service is is unavailable.
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/RefMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/RefMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/RefMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/RefMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -20,13 +20,13 @@
* Container.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: b707a70876359ad1aa4cf33b28ad8d0237eb13d4 $
*/
public interface RefMetadata extends Target, NonNullMetadata {
/**
* Return the id of the referenced component.
*
- * This is specified by the component-id
attribute of a
+ * This is specified by the {@code component-id} attribute of a
* component.
*
* @return The id of the referenced component.
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/RegistrationListener.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/RegistrationListener.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/RegistrationListener.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/RegistrationListener.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -24,7 +24,7 @@
* when the registration listener is actuated.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: 3c35e47a95b492e40b6cb010af8821af4ad162de $
*/
public interface RegistrationListener {
@@ -32,7 +32,7 @@
* Return the Metadata for the component that will receive registration and
* unregistration events.
*
- * This is specified by the ref
attribute or via an inlined
+ * This is specified by the {@code ref} attribute or via an inlined
* component.
*
* @return The Metadata for the component that will receive registration and
@@ -45,7 +45,7 @@
* be invoked when the associated service is registered with the service
* registry.
*
- * This is specified by the registration-method
attribute of
+ * This is specified by the {@code registration-method} attribute of
* the registration listener.
*
* @return The name of the registration method.
@@ -57,7 +57,7 @@
* will be invoked when the associated service is unregistered from the
* service registry.
*
- * This is specified by the unregistration-method
attribute of
+ * This is specified by the {@code unregistration-method} attribute of
* the registration listener.
*
* @return The name of the unregistration method.
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/ServiceMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/ServiceMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/ServiceMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/ServiceMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -23,10 +23,10 @@
* enabled.
*
* service
element.
+ * This is specified by the {@code service} element.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: 00e0db1fed7a4a808fa0ad45f9116b47ca38db6f $
*/
public interface ServiceMetadata extends ComponentMetadata {
@@ -64,7 +64,7 @@
/**
* Return the Metadata for the component to be exported as a service.
*
- * This is specified inline or via the ref
attribute of the
+ * This is specified inline or via the {@code ref} attribute of the
* service.
*
* @return The Metadata for the component to be exported as a service.
@@ -75,20 +75,20 @@
* Return the type names of the interfaces that the service should be
* advertised as supporting.
*
- * This is specified in the interface
attribute or child
- * interfaces
element of the service.
+ * This is specified in the {@code interface} attribute or child
+ * {@code interfaces} element of the service.
*
- * @return An immutable List of String
for the type names of
+ * @return An immutable List of {@code String} for the type names of
* the interfaces that the service should be advertised as
- * supporting. The List is empty if using auto-export
+ * supporting. The List is empty if using {@code auto-export}
* or no interface names are specified for the service.
*/
- List/* auto-export
attribute of the
+ * This is specified by the {@code auto-export} attribute of the
* service.
*
* @return The auto-export mode for the service.
@@ -102,21 +102,21 @@
/**
* Return the user declared properties to be advertised with the service.
*
- * This is specified by the service-properties
element of the
+ * This is specified by the {@code service-properties} element of the
* service.
*
* @return An immutable List of {@link MapEntry} objects for the user
* declared properties to be advertised with the service. The List
* is empty if no service properties are specified for the service.
*/
- List/* service.ranking
service property.
+ * {@code service.ranking} service property.
*
- * This is specified by the ranking
attribute of the service.
+ * This is specified by the {@code ranking} attribute of the service.
*
* @return The ranking value to use when advertising the service.
*/
@@ -126,7 +126,7 @@
* Return the registration listeners to be notified when the service is
* registered and unregistered with the framework.
*
- * This is specified by the registration-listener
elements of
+ * This is specified by the {@code registration-listener} elements of
* the service.
*
* @return An immutable Collection of {@link RegistrationListener} objects
@@ -134,5 +134,5 @@
* with the framework. The Collection is empty if no registration
* listeners are specified for the service.
*/
- Collection /* availability
attribute of the
+ * This is specified in the {@code availability} attribute of the
* service reference.
*
* @return Whether or not a matching service is required at all times.
@@ -56,23 +56,23 @@
* Return the name of the interface type that a matching service must
* support.
*
- * This is specified in the interface
attribute of the service
+ * This is specified in the {@code interface} attribute of the service
* reference.
*
* @return The name of the interface type that a matching service must
- * support or null
when no interface name is specified.
+ * support or {@code null} when no interface name is specified.
*/
String getInterface();
/**
- * Return the value of the component-name
attribute of the
+ * Return the value of the {@code component-name} attribute of the
* service reference. This specifies the id of a component that is
* registered in the service registry. This will create an automatic filter,
* appended with the filter if set, to select this component based on its
- * automatic id
attribute.
+ * automatic {@code id} attribute.
*
- * @return The value of the component-name
attribute of the
- * service reference or null
if the attribute is not
+ * @return The value of the {@code component-name} attribute of the
+ * service reference or {@code null} if the attribute is not
* specified.
*/
String getComponentName();
@@ -80,23 +80,23 @@
/**
* Return the filter expression that a matching service must match.
*
- * This is specified by the filter
attribute of the service
+ * This is specified by the {@code filter} attribute of the service
* reference.
*
* @return The filter expression that a matching service must match or
- * null
if a filter is not specified.
+ * {@code null} if a filter is not specified.
*/
String getFilter();
/**
* Return the reference listeners to receive bind and unbind events.
*
- * This is specified by the reference-listener
elements of the
+ * This is specified by the {@code reference-listener} elements of the
* service reference.
*
* @return An immutable Collection of {@link ReferenceListener} objects to
* receive bind and unbind events. The Collection is empty if no
* reference listeners are specified for the service reference.
*/
- Collection /* bean
, reference
, and
- * ref
, where the ref
must refer to a bean or
+ * for method calls. These are {@code bean}, {@code reference}, and
+ * {@code ref}, where the {@code ref} must refer to a bean or
* reference component.
*
* @see BeanMetadata
* @see ReferenceMetadata
* @see RefMetadata
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: c567901de1e88b121edb6d441af56ddbaf1dc310 $
*/
public interface Target extends NonNullMetadata {
// marker interface
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/ValueMetadata.java osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/ValueMetadata.java
--- osgi-compendium-4.2.0/src/org/osgi/service/blueprint/reflect/ValueMetadata.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/blueprint/reflect/ValueMetadata.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2008, 2010). 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.
@@ -16,18 +16,18 @@
package org.osgi.service.blueprint.reflect;
/**
- * Metadata for a simple String
value that will be type-converted
+ * Metadata for a simple {@code String} value that will be type-converted
* if necessary before injecting.
*
* @ThreadSafe
- * @version $Revision: 7563 $
+ * @version $Id: cae08bd55676fbd8fdd4efe4b76677de3786fb7f $
*/
public interface ValueMetadata extends NonNullMetadata {
/**
* Return the unconverted string representation of the value.
*
- * This is specified by the value
attribute or text part of the
- * value
element.
+ * This is specified by the {@code value} attribute or text part of the
+ * {@code value} element.
*
* @return The unconverted string representation of the value.
*/
@@ -36,10 +36,10 @@
/**
* Return the name of the type to which the value should be converted.
*
- * This is specified by the type
attribute.
+ * This is specified by the {@code type} attribute.
*
* @return The name of the type to which the value should be converted or
- * null
if no type is specified.
+ * {@code null} if no type is specified.
*/
String getType();
}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationAdmin.java osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationAdmin.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationAdmin.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationAdmin.java 2011-09-08 14:21:52.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2011). 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.
@@ -25,9 +25,9 @@
*
* Configuration
- * objects. The actual configuration data is a Dictionary
of
- * properties inside a Configuration
object.
+ * persistently. This information is represented in {@code Configuration}
+ * objects. The actual configuration data is a {@code Dictionary} of properties
+ * inside a {@code Configuration} object.
*
* Configuration
objects for a Managed
- * Service Factory that is registered with the Framework.
+ * will maintain 0 or more {@code Configuration} objects for a Managed Service
+ * Factory that is registered with the Framework.
*
* service.pid
(persistent identifier or PID) must be used to
+ * named {@code service.pid} (persistent identifier or PID) must be used to
* identify this Managed Service or Managed Service Factory to the Configuration
* Admin service.
*
* service.pid
property matches the PID service property (
- * service.pid
) of the Managed Service. If found, it calls
- * {@link ManagedService#updated} method with the new properties. The
- * implementation of a Configuration Admin service must run these call-backs
+ * {@code service.pid} property matches the PID service property (
+ * {@code service.pid}) of the Managed Service. If found, it calls
+ * {@link ManagedService#updated(Dictionary)} method with the new properties.
+ * The implementation of a Configuration Admin service must run these call-backs
* asynchronously to allow proper synchronization.
*
* service.factoryPid
property matches the PID service property of
- * the Managed Service Factory. For each such Configuration
- * objects, it calls the ManagedServiceFactory.updated
method
- * asynchronously with the new properties. The calls to the updated
- * method of a ManagedServiceFactory
must be executed sequentially
- * and not overlap in time.
+ * {@code service.factoryPid} property matches the PID service property of the
+ * Managed Service Factory. For each such {@code Configuration} objects, it
+ * calls the {@code ManagedServiceFactory.updated} method asynchronously with
+ * the new properties. The calls to the {@code updated} method of a
+ * {@code ManagedServiceFactory} must be executed sequentially and not overlap
+ * in time.
*
* ConfigurationPermission[*,CONFIGURE]
.
+ * {@code ConfigurationPermission[*,CONFIGURE]}.
*
* Configuration
objects can be bound to a specified bundle
+ * {@code Configuration} objects can be bound to a specified bundle
* location. In this case, if a matching Managed Service or Managed Service
* Factory is registered by a bundle with a different location, then the
* Configuration Admin service must not do the normal callback, and it should
- * log an error. In the case where a Configuration
object is not
- * bound, its location field is null
, the Configuration Admin
- * service will bind it to the location of the bundle that registers the first
- * Managed Service or Managed Service Factory that has a corresponding PID
- * property. When a Configuration
object is bound to a bundle
- * location in this manner, the Configuration Admin service must detect if the
- * bundle corresponding to the location is uninstalled. If this occurs, the
- * Configuration
object is unbound, that is its location field is
- * set back to null
.
+ * log an error. In the case where a {@code Configuration} object is not bound,
+ * its location field is {@code null}, the Configuration Admin service will bind
+ * it to the location of the bundle that registers the first Managed Service or
+ * Managed Service Factory that has a corresponding PID property. When a
+ * {@code Configuration} object is bound to a bundle location in this manner,
+ * the Configuration Admin service must detect if the bundle corresponding to
+ * the location is uninstalled. If this occurs, the {@code Configuration} object
+ * is unbound, that is its location field is set back to {@code null}.
*
* ConfigurationAdmin
must use a
+ * {@code ConfigurationAdmin} must use a
* {@link org.osgi.framework.ServiceFactory} to support this concept.
*
- * @version $Revision: 7356 $
+ * @noimplement
+ * @version $Id: 4c457a1b011c5da0a5b179a86fd7d22c3df39147 $
*/
public interface ConfigurationAdmin {
/**
* Configuration property naming the Factory PID in the configuration
- * dictionary. The property's value is of type String
.
+ * dictionary. The property's value is of type {@code String}.
*
* @since 1.1
*/
public final static String SERVICE_FACTORYPID = "service.factoryPid";
/**
* Configuration property naming the location of the bundle that is
- * associated with a a Configuration
object. This property can
+ * associated with a a {@code Configuration} object. This property can
* be searched for but must not appear in the configuration dictionary for
- * security reason. The property's value is of type String
.
+ * security reason. The property's value is of type {@code String}.
*
* @since 1.1
*/
public final static String SERVICE_BUNDLELOCATION = "service.bundleLocation";
/**
- * Create a new factory Configuration
object with a new PID.
+ * Create a new factory {@code Configuration} object with a new PID.
*
- * The properties of the new Configuration
object are
- * null
until the first time that its
+ * The properties of the new {@code Configuration} object are
+ * {@code null} until the first time that its
* {@link Configuration#update(Dictionary)} method is called.
*
* factoryPid
maps to a
+ * It is not required that the {@code factoryPid} maps to a
* registered Managed Service Factory.
* Configuration
object is bound to the location of the
+ * The {@code Configuration} object is bound to the location of the
* calling bundle.
*
- * @param factoryPid PID of factory (not null
).
- * @return A new Configuration
object.
+ * @param factoryPid PID of factory (not {@code null}).
+ * @return A new {@code Configuration} object.
* @throws IOException if access to persistent storage fails.
- * @throws SecurityException if caller does not have ConfigurationPermission[*,CONFIGURE]
and factoryPid
is bound to another bundle.
+ * @throws SecurityException if caller does not have {@code ConfigurationPermission[*,CONFIGURE]} and {@code factoryPid} is bound to another bundle.
*/
public Configuration createFactoryConfiguration(String factoryPid)
throws IOException;
/**
- * Create a new factory Configuration
object with a new PID.
+ * Create a new factory {@code Configuration} object with a new PID.
*
- * The properties of the new Configuration
object are
- * null
until the first time that its
+ * The properties of the new {@code Configuration} object are
+ * {@code null} until the first time that its
* {@link Configuration#update(Dictionary)} method is called.
*
* factoryPid
maps to a
+ * It is not required that the {@code factoryPid} maps to a
* registered Managed Service Factory.
*
* Configuration
is bound to the location specified. If
- * this location is null
it will be bound to the location of
+ * The {@code Configuration} is bound to the location specified. If
+ * this location is {@code null} it will be bound to the location of
* the first bundle that registers a Managed Service Factory with a
* corresponding PID.
*
- * @param factoryPid PID of factory (not null
).
- * @param location A bundle location string, or null
.
- * @return a new Configuration
object.
+ * @param factoryPid PID of factory (not {@code null}).
+ * @param location A bundle location string, or {@code null}.
+ * @return a new {@code Configuration} object.
* @throws IOException if access to persistent storage fails.
- * @throws SecurityException if caller does not have ConfigurationPermission[*,CONFIGURE]
.
+ * @throws SecurityException if caller does not have {@code ConfigurationPermission[*,CONFIGURE]}.
*/
public Configuration createFactoryConfiguration(String factoryPid, String location)
throws IOException;
/**
- * Get an existing Configuration
object from the persistent
- * store, or create a new Configuration
object.
+ * Get an existing {@code Configuration} object from the persistent
+ * store, or create a new {@code Configuration} object.
*
* Configuration
with this PID already exists in
+ * If a {@code Configuration} with this PID already exists in
* Configuration Admin service return it. The location parameter is ignored
* in this case.
*
* Configuration
object. This new object
- * is bound to the location and the properties are set to null
.
- * If the location parameter is null
, it will be set when a
+ * Else, return a new {@code Configuration} object. This new object
+ * is bound to the location and the properties are set to {@code null}.
+ * If the location parameter is {@code null}, it will be set when a
* Managed Service with the corresponding PID is registered for the first
* time.
*
* @param pid Persistent identifier.
- * @param location The bundle location string, or null
.
- * @return An existing or new Configuration
object.
+ * @param location The bundle location string, or {@code null}.
+ * @return An existing or new {@code Configuration} object.
* @throws IOException if access to persistent storage fails.
- * @throws SecurityException if the caller does not have ConfigurationPermission[*,CONFIGURE]
.
+ * @throws SecurityException if the caller does not have {@code ConfigurationPermission[*,CONFIGURE]}.
*/
public Configuration getConfiguration(String pid, String location)
throws IOException;
/**
- * Get an existing or new Configuration
object from the
+ * Get an existing or new {@code Configuration} object from the
* persistent store.
*
- * If the Configuration
object for this PID does not exist,
- * create a new Configuration
object for that PID, where
- * properties are null
. Bind its location to the calling
+ * If the {@code Configuration} object for this PID does not exist,
+ * create a new {@code Configuration} object for that PID, where
+ * properties are {@code null}. Bind its location to the calling
* bundle's location.
*
* Configuration
object
- * is null
, set it to the calling bundle's location.
+ * Otherwise, if the location of the existing {@code Configuration} object
+ * is {@code null}, set it to the calling bundle's location.
*
* @param pid persistent identifier.
- * @return an existing or new Configuration
matching the PID.
+ * @return an existing or new {@code Configuration} matching the PID.
* @throws IOException if access to persistent storage fails.
- * @throws SecurityException if the Configuration
object is bound to a location different from that of the calling bundle and it has no ConfigurationPermission[*,CONFIGURE]
.
+ * @throws SecurityException if the {@code Configuration} object is bound to a location different from that of the calling bundle and it has no {@code ConfigurationPermission[*,CONFIGURE]}.
*/
public Configuration getConfiguration(String pid) throws IOException;
/**
- * List the current Configuration
objects which match the
+ * List the current {@code Configuration} objects which match the
* filter.
*
* Configuration
objects with non- null
+ * Only {@code Configuration} objects with non- {@code null}
* properties are considered current. That is,
- * Configuration.getProperties()
is guaranteed not to return
- * null
for each of the returned Configuration
+ * {@code Configuration.getProperties()} is guaranteed not to return
+ * {@code null} for each of the returned {@code Configuration}
* objects.
*
* Configuration
objects that are bound to the
+ * Normally only {@code Configuration} objects that are bound to the
* location of the calling bundle are returned, or all if the caller has
- * ConfigurationPermission[*,CONFIGURE]
.
+ * {@code ConfigurationPermission[*,CONFIGURE]}.
*
*
- *
- * The filter can also be service.pid
-String
- the PID under which
- * this is registeredservice.factoryPid
-String
- the factory if
- * applicableservice.bundleLocation
-String
- the bundle
- * locationnull
, meaning that all
- * Configuration
objects should be returned.
+ * The filter can also be {@code null}, meaning that all
+ * {@code Configuration} objects should be returned.
*
- * @param filter A filter string, or null
to retrieve all
- * Configuration
objects.
- * @return All matching Configuration
objects, or
- * null
if there aren't any.
+ * @param filter A filter string, or {@code null} to retrieve all
+ * {@code Configuration} objects.
+ * @return All matching {@code Configuration} objects, or
+ * {@code null} if there aren't any.
* @throws IOException if access to persistent storage fails
* @throws InvalidSyntaxException if the filter string is invalid
*/
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationEvent.java osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationEvent.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationEvent.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationEvent.java 2011-09-08 14:18:36.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2011). 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.
@@ -23,8 +23,8 @@
* A Configuration Event.
*
* ConfigurationEvent
objects are delivered to all registered
- * ConfigurationListener
service objects. ConfigurationEvents
+ * {@code ConfigurationEvent} objects are delivered to all registered
+ * {@code ConfigurationListener} service objects. ConfigurationEvents
* must be asynchronously delivered in chronological order with respect to each
* listener.
*
@@ -38,50 +38,50 @@
* Additional event types may be defined in the future.
*
* ConfigurationEvent
objects do not
- * provide Configuration
objects, so no sensitive configuration
+ * Security Considerations. {@code ConfigurationEvent} objects do not
+ * provide {@code Configuration} objects, so no sensitive configuration
* information is available from the event. If the listener wants to locate the
- * Configuration
object for the specified pid, it must use
- * ConfigurationAdmin
.
+ * {@code Configuration} object for the specified pid, it must use
+ * {@code ConfigurationAdmin}.
*
* @see ConfigurationListener
*
- * @version $Revision: 6180 $
+ * @version $Id: 1526c66aa050bcada07d3656e07fbf7711810821 $
* @since 1.2
*/
public class ConfigurationEvent {
/**
- * A Configuration
has been updated.
+ * A {@code Configuration} has been updated.
*
* ConfigurationEvent
type that indicates that a
- * Configuration
object has been updated with new properties.
+ * This {@code ConfigurationEvent} type that indicates that a
+ * {@code Configuration} object has been updated with new properties.
*
* An event is fired when a call to {@link Configuration#update(Dictionary)}
* successfully changes a configuration.
*
* CM_UPDATED
is 1.
+ * The value of {@code CM_UPDATED} is 1.
*/
public static final int CM_UPDATED = 1;
/**
- * A Configuration
has been deleted.
+ * A {@code Configuration} has been deleted.
*
* ConfigurationEvent
type that indicates that a
- * Configuration
object has been deleted.
+ * This {@code ConfigurationEvent} type that indicates that a
+ * {@code Configuration} object has been deleted.
*
* An event is fired when a call to {@link Configuration#delete()}
* successfully deletes a configuration.
*
* CM_DELETED
is 2.
+ * The value of {@code CM_DELETED} is 2.
*/
public static final int CM_DELETED = 2;
/**
* Type of this event.
*
- * @see #getType
+ * @see #getType()
*/
private final int type;
/**
@@ -98,15 +98,15 @@
private final ServiceReference reference;
/**
- * Constructs a ConfigurationEvent
object from the given
- * ServiceReference
object, event type, and pids.
+ * Constructs a {@code ConfigurationEvent} object from the given
+ * {@code ServiceReference} object, event type, and pids.
*
- * @param reference The ServiceReference
object of the
- * Configuration Admin service that created this event.
- * @param type The event type. See {@link #getType}.
+ * @param reference The {@code ServiceReference} object of the Configuration
+ * Admin service that created this event.
+ * @param type The event type. See {@link #getType()}.
* @param factoryPid The factory pid of the associated configuration if the
* target of the configuration is a ManagedServiceFactory. Otherwise
- * null
if the target of the configuration is a
+ * {@code null} if the target of the configuration is a
* ManagedService.
* @param pid The pid of the associated configuration.
*/
@@ -126,7 +126,7 @@
*
* @return Returns the factory pid of the associated configuration if the
* target of the configuration is a ManagedServiceFactory. Otherwise
- * null
if the target of the configuration is a
+ * {@code null} if the target of the configuration is a
* ManagedService.
*/
public String getFactoryPid() {
@@ -158,10 +158,10 @@
}
/**
- * Return the ServiceReference
object of the Configuration
+ * Return the {@code ServiceReference} object of the Configuration
* Admin service that created this event.
*
- * @return The ServiceReference
object for the Configuration
+ * @return The {@code ServiceReference} object for the Configuration
* Admin service that created this event.
*/
public ServiceReference getReference() {
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationException.java osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationException.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationException.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationException.java 2011-04-20 16:34:38.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2010). 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.
@@ -16,10 +16,10 @@
package org.osgi.service.cm;
/**
- * An Exception
class to inform the Configuration Admin service
+ * An {@code Exception} class to inform the Configuration Admin service
* of problems with configuration data.
*
- * @version $Revision: 6083 $
+ * @version $Id: c9fb6fbf0fb8fc75291a073348fa0f4e56f248a7 $
*/
public class ConfigurationException extends Exception {
static final long serialVersionUID = -1690090413441769377L;
@@ -28,10 +28,10 @@
private final String reason;
/**
- * Create a ConfigurationException
object.
+ * Create a {@code ConfigurationException} object.
*
* @param property name of the property that caused the problem,
- * null
if no specific property was the cause
+ * {@code null} if no specific property was the cause
* @param reason reason for failure
*/
public ConfigurationException(String property, String reason) {
@@ -41,10 +41,10 @@
}
/**
- * Create a ConfigurationException
object.
+ * Create a {@code ConfigurationException} object.
*
* @param property name of the property that caused the problem,
- * null
if no specific property was the cause
+ * {@code null} if no specific property was the cause
* @param reason reason for failure
* @param cause The cause of this exception.
* @since 1.2
@@ -76,10 +76,10 @@
}
/**
- * Returns the cause of this exception or null
if no cause was
+ * Returns the cause of this exception or {@code null} if no cause was
* set.
*
- * @return The cause of this exception or null
if no cause was
+ * @return The cause of this exception or {@code null} if no cause was
* set.
* @since 1.2
*/
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/Configuration.java osgi-compendium-4.3.0/src/org/osgi/service/cm/Configuration.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/Configuration.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/Configuration.java 2011-07-21 13:53:52.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2010). 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.
@@ -19,78 +19,79 @@
import java.util.Dictionary;
/**
- * The configuration information for a ManagedService
or
- * ManagedServiceFactory
object.
+ * The configuration information for a {@code ManagedService} or
+ * {@code ManagedServiceFactory} object.
*
* The Configuration Admin service uses this interface to represent the
- * configuration information for a ManagedService
or for a
- * service instance of a ManagedServiceFactory
.
+ * configuration information for a {@code ManagedService} or for a
+ * service instance of a {@code ManagedServiceFactory}.
*
* Configuration
object contains a configuration dictionary and
+ * A {@code Configuration} object contains a configuration dictionary and
* allows the properties to be updated via this object. Bundles wishing to
* receive configuration dictionaries do not need to use this class - they
- * register a ManagedService
or
- * ManagedServiceFactory
. Only administrative bundles, and
+ * register a {@code ManagedService} or
+ * {@code ManagedServiceFactory}. Only administrative bundles, and
* bundles wishing to update their own configurations need to use this class.
*
* String
objects as keys. However, case is preserved from the
+ * {@code String} objects as keys. However, case is preserved from the
* last set key/value.
* Bundle.getLocation()
). The purpose of binding a
- * Configuration
object to a location is to make it impossible
+ * {@code Bundle.getLocation()}). The purpose of binding a
+ * {@code Configuration} object to a location is to make it impossible
* for another bundle to forge a PID that would match this configuration. When a
* configuration is bound to a specific location, and a bundle with a different
- * location registers a corresponding ManagedService
object or
- * ManagedServiceFactory
object, then the configuration is not
+ * location registers a corresponding {@code ManagedService} object or
+ * {@code ManagedServiceFactory} object, then the configuration is not
* passed to the updated method of that object.
*
* null
, it is not yet bound to
+ * If a configuration's location is {@code null}, it is not yet bound to
* a location. It will become bound to the location of the first bundle that
- * registers a ManagedService
or
- * ManagedServiceFactory
object with the corresponding PID.
+ * registers a {@code ManagedService} or
+ * {@code ManagedServiceFactory} object with the corresponding PID.
* Configuration
object is used for configuring both a
+ * The same {@code Configuration} object is used for configuring both a
* Managed Service Factory and a Managed Service. When it is important to
* differentiate between these two the term "factory configuration" is used.
*
- * @version $Revision: 5673 $
+ * @noimplement
+ * @version $Id: fe3cdfcf23da63bf0a03565f478dfe4d0e8b6d58 $
*/
public interface Configuration {
/**
- * Get the PID for this Configuration
object.
+ * Get the PID for this {@code Configuration} object.
*
- * @return the PID for this Configuration
object.
+ * @return the PID for this {@code Configuration} object.
* @throws IllegalStateException if this configuration has been deleted
*/
public String getPid();
/**
- * Return the properties of this Configuration
object.
+ * Return the properties of this {@code Configuration} object.
*
- * The Dictionary
object returned is a private copy for the
+ * The {@code Dictionary} object returned is a private copy for the
* caller and may be changed without influencing the stored configuration.
* The keys in the returned dictionary are case insensitive and are always
- * of type String
.
+ * of type {@code String}.
*
* null
.
+ * been called, this method returns {@code null}.
*
* @return A private copy of the properties for the caller or
- * null
. These properties must not contain the
+ * {@code null}. These properties must not contain the
* "service.bundleLocation" property. The value of this property may
- * be obtained from the getBundleLocation
method.
+ * be obtained from the {@code getBundleLocation} method.
* @throws IllegalStateException if this configuration has been deleted
*/
public Dictionary getProperties();
/**
- * Update the properties of this Configuration
object.
+ * Update the properties of this {@code Configuration} object.
*
* Stores the properties in persistent storage after adding or overwriting
* the following properties:
@@ -99,7 +100,7 @@
* String
.
+ * These system properties are all of type {@code String}.
*
* ConfigurationListener
s with a
- * ConfigurationEvent.CM_UPDATED
event.
+ * {@code ConfigurationListener}s with a
+ * {@code ConfigurationEvent.CM_UPDATED} event.
*
* @param properties the new set of properties for this configuration
* @throws IOException if update cannot be made persistent
- * @throws IllegalArgumentException if the Dictionary
object
+ * @throws IllegalArgumentException if the {@code Dictionary} object
* contains invalid configuration types or contains case variants of
* the same key name.
* @throws IllegalStateException if this configuration has been deleted
@@ -121,19 +122,19 @@
public void update(Dictionary properties) throws IOException;
/**
- * Delete this Configuration
object.
+ * Delete this {@code Configuration} object.
*
* Removes this configuration object from the persistent store. Notify
* asynchronously the corresponding Managed Service or Managed Service
- * Factory. A ManagedService
object is notified by a call to
- * its updated
method with a null
properties
- * argument. A ManagedServiceFactory
object is notified by a
- * call to its deleted
method.
+ * Factory. A {@code ManagedService} object is notified by a call to
+ * its {@code updated} method with a {@code null} properties
+ * argument. A {@code ManagedServiceFactory} object is notified by a
+ * call to its {@code deleted} method.
*
* ConfigurationListener
s with a
- * ConfigurationEvent.CM_DELETED
event.
+ * {@code ConfigurationListener}s with a
+ * {@code ConfigurationEvent.CM_DELETED} event.
*
* @throws IOException If delete fails
* @throws IllegalStateException if this configuration has been deleted
@@ -142,25 +143,25 @@
/**
* For a factory configuration return the PID of the corresponding Managed
- * Service Factory, else return null
.
+ * Service Factory, else return {@code null}.
*
- * @return factory PID or null
+ * @return factory PID or {@code null}
* @throws IllegalStateException if this configuration has been deleted
*/
public String getFactoryPid();
/**
- * Update the Configuration
object with the current
+ * Update the {@code Configuration} object with the current
* properties.
*
- * Initiate the updated
callback to the Managed Service or
+ * Initiate the {@code updated} callback to the Managed Service or
* Managed Service Factory with the current properties asynchronously.
*
* ConfigurationPlugin
object.
+ * Factory via its {@code ConfigurationPlugin} object.
*
* @see ConfigurationPlugin
* @throws IOException if update cannot access the properties in persistent
@@ -170,20 +171,20 @@
public void update() throws IOException;
/**
- * Bind this Configuration
object to the specified bundle
+ * Bind this {@code Configuration} object to the specified bundle
* location.
*
- * If the bundleLocation parameter is null
then the
- * Configuration
object will not be bound to a location. It
+ * If the bundleLocation parameter is {@code null} then the
+ * {@code Configuration} object will not be bound to a location. It
* will be set to the bundle's location before the first time a Managed
- * Service/Managed Service Factory receives this Configuration
+ * Service/Managed Service Factory receives this {@code Configuration}
* object via the updated method and before any plugins are called. The
* bundle location will be set persistently.
*
- * @param bundleLocation a bundle location or null
+ * @param bundleLocation a bundle location or {@code null}
* @throws IllegalStateException If this configuration has been deleted.
* @throws SecurityException If the caller does not have
- * ConfigurationPermission[*,CONFIGURE]
.
+ * {@code ConfigurationPermission[*,CONFIGURE]}.
*/
public void setBundleLocation(String bundleLocation);
@@ -191,14 +192,14 @@
* Get the bundle location.
*
* Returns the bundle location to which this configuration is bound, or
- * null
if it is not yet bound to a bundle location.
+ * {@code null} if it is not yet bound to a bundle location.
*
* @return location to which this configuration is bound, or
- * null
.
- * @throws IllegalStateException If this Configuration
object
+ * {@code null}.
+ * @throws IllegalStateException If this {@code Configuration} object
* has been deleted.
* @throws SecurityException If the caller does not have
- * ConfigurationPermission[*,CONFIGURE]
.
+ * {@code ConfigurationPermission[*,CONFIGURE]}.
*/
public String getBundleLocation();
@@ -207,9 +208,9 @@
*
* Two Configuration objects are equal when their PIDs are equal.
*
- * @param other Configuration
object to compare against
- * @return true
if equal, false
if not a
- * Configuration
object or one with a different PID.
+ * @param other {@code Configuration} object to compare against
+ * @return {@code true} if equal, {@code false} if not a
+ * {@code Configuration} object or one with a different PID.
*/
public boolean equals(Object other);
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationListener.java osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationListener.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationListener.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationListener.java 2011-06-13 15:35:44.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -16,33 +16,33 @@
package org.osgi.service.cm;
/**
- * Listener for Configuration Events. When a ConfigurationEvent
+ * Listener for Configuration Events. When a {@code ConfigurationEvent}
* is fired, it is asynchronously delivered to a
- * ConfigurationListener
.
+ * {@code ConfigurationListener}.
*
* ConfigurationListener
objects are registered with the
+ * {@code ConfigurationListener} objects are registered with the
* Framework service registry and are notified with a
- * ConfigurationEvent
object when an event is fired.
+ * {@code ConfigurationEvent} object when an event is fired.
* ConfigurationListener
objects can inspect the received
- * ConfigurationEvent
object to determine its type, the pid of
- * the Configuration
object with which it is associated, and the
+ * {@code ConfigurationListener} objects can inspect the received
+ * {@code ConfigurationEvent} object to determine its type, the pid of
+ * the {@code Configuration} object with which it is associated, and the
* Configuration Admin service that fired the event.
*
* ServicePermission[ConfigurationListener,REGISTER]
to
- * register a ConfigurationListener
service.
+ * require {@code ServicePermission[ConfigurationListener,REGISTER]} to
+ * register a {@code ConfigurationListener} service.
*
- * @version $Revision: 5673 $
+ * @version $Id: bc0872c4df2541cba4060a0036f8aeb24a608051 $
* @since 1.2
*/
public interface ConfigurationListener {
/**
* Receives notification of a Configuration that has changed.
*
- * @param event The ConfigurationEvent
.
+ * @param event The {@code ConfigurationEvent}.
*/
public void configurationEvent(ConfigurationEvent event);
}
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationPermission.java osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationPermission.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationPermission.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationPermission.java 2011-07-21 13:53:52.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -28,14 +28,14 @@
* This permission has only a single action: CONFIGURE.
*
* @ThreadSafe
- * @version $Revision: 6381 $
+ * @version $Id: 6b918f50972aaa9890b9a2d613ddd08598509280 $
* @since 1.2
*/
public final class ConfigurationPermission extends BasicPermission {
static final long serialVersionUID = 5716868734811965383L;
/**
- * The action string configure
.
+ * The action string {@code configure}.
*/
public final static String CONFIGURE = "configure";
@@ -43,7 +43,7 @@
* Create a new ConfigurationPermission.
*
* @param name Name must be "*".
- * @param actions configure
(canonical order).
+ * @param actions {@code configure} (canonical order).
*/
public ConfigurationPermission(String name, String actions) {
@@ -59,12 +59,12 @@
}
/**
- * Determines if a ConfigurationPermission
object "implies"
+ * Determines if a {@code ConfigurationPermission} object "implies"
* the specified permission.
*
* @param p The target permission to check.
- * @return true
if the specified permission is implied by
- * this object; false
otherwise.
+ * @return {@code true} if the specified permission is implied by
+ * this object; {@code false} otherwise.
*/
public boolean implies(Permission p) {
@@ -72,14 +72,14 @@
}
/**
- * Determines the equality of two ConfigurationPermission
+ * Determines the equality of two {@code ConfigurationPermission}
* objects.
* ConfigurationPermission
objects are equal.
+ * Two {@code ConfigurationPermission} objects are equal.
*
* @param obj The object being compared for equality with this object.
- * @return true
if obj
is equivalent to this
- * ConfigurationPermission
; false
+ * @return {@code true} if {@code obj} is equivalent to this
+ * {@code ConfigurationPermission}; {@code false}
* otherwise.
*/
public boolean equals(Object obj) {
@@ -100,24 +100,24 @@
/**
* Returns the canonical string representation of the
- * ConfigurationPermission
actions.
+ * {@code ConfigurationPermission} actions.
*
* ConfigurationPermission
actions in
- * the following order: CONFIGURE
+ * Always returns present {@code ConfigurationPermission} actions in
+ * the following order: {@code CONFIGURE}
*
* @return Canonical string representation of the
- * ConfigurationPermission
actions.
+ * {@code ConfigurationPermission} actions.
*/
public String getActions() {
return CONFIGURE;
}
/**
- * Returns a new PermissionCollection
object suitable for
- * storing ConfigurationPermission
s.
+ * Returns a new {@code PermissionCollection} object suitable for
+ * storing {@code ConfigurationPermission}s.
*
- * @return A new PermissionCollection
object.
+ * @return A new {@code PermissionCollection} object.
*/
public PermissionCollection newPermissionCollection() {
return new ConfigurationPermissionCollection();
@@ -125,7 +125,7 @@
}
/**
- * Stores a set of ConfigurationPermission
permissions.
+ * Stores a set of {@code ConfigurationPermission} permissions.
*
* @see java.security.Permission
* @see java.security.Permissions
@@ -141,7 +141,7 @@
private volatile boolean hasElement;
/**
- * Creates an empty ConfigurationPermissionCollection object.
+ * Creates an empty {@code ConfigurationPermissionCollection} object.
*
*/
public ConfigurationPermissionCollection() {
@@ -150,13 +150,13 @@
/**
* Adds the specified permission to the
- * ConfigurationPermissionCollection. The key for the hash is
+ * {@code ConfigurationPermissionCollection}. The key for the hash is
* the interface name of the service.
*
- * @param permission The Permission object to add.
+ * @param permission The {@code Permission} object to add.
*
* @exception IllegalArgumentException If the permission is not an
- * ConfigurationPermission.
+ * {@code ConfigurationPermission}.
*
* @exception SecurityException If this ConfigurationPermissionCollection
* object has been marked read-only.
@@ -177,7 +177,7 @@
/**
* Determines if the specified set of permissions implies the permissions
- * expressed in the parameter permission.
+ * expressed in the parameter {@code permission}.
*
* @param p The Permission object to compare.
*
@@ -190,9 +190,9 @@
}
/**
- * Returns an enumeration of an ConfigurationPermission object.
+ * Returns an enumeration of an {@code ConfigurationPermission} object.
*
- * @return Enumeration of an ConfigurationPermission object.
+ * @return Enumeration of an {@code ConfigurationPermission} object.
*/
public Enumeration elements() {
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationPlugin.java osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationPlugin.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/ConfigurationPlugin.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/ConfigurationPlugin.java 2011-07-21 13:53:52.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2010). 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.
@@ -24,13 +24,13 @@
* update.
*
* ConfigurationPlugin
object in order to
+ * A bundle registers a {@code ConfigurationPlugin} object in order to
* process configuration updates before they reach the Managed Service or
* Managed Service Factory. The Configuration Admin service will detect
* registrations of Configuration Plugin services and must call these services
- * every time before it calls the ManagedService
or
- * ManagedServiceFactory
- * updated
method. The
+ * every time before it calls the {@code ManagedService} or
+ * {@code ManagedServiceFactory}
+ * {@code updated} method. The
* Configuration Plugin service thus has the opportunity to view and modify the
* properties before they are passed to the Managed Service or Managed Service
* Factory.
@@ -39,24 +39,24 @@
* Configuration Plugin (plugin) services have full read/write access to all
* configuration information. Therefore, bundles using this facility should be
* trusted. Access to this facility should be limited with
- * ServicePermission[ConfigurationPlugin,REGISTER]
.
+ * {@code ServicePermission[ConfigurationPlugin,REGISTER]}.
* Implementations of a Configuration Plugin service should assure that they
* only act on appropriate configurations.
*
* Integer
service.cmRanking
registration
+ * The {@code Integer} {@code service.cmRanking} registration
* property may be specified. Not specifying this registration property, or
- * setting it to something other than an Integer
, is the same as
- * setting it to the Integer
zero. The
- * service.cmRanking
property determines the order in which
+ * setting it to something other than an {@code Integer}, is the same as
+ * setting it to the {@code Integer} zero. The
+ * {@code service.cmRanking} property determines the order in which
* plugins are invoked. Lower ranked plugins are called before higher ranked
* ones. In the event of more than one plugin having the same value of
- * service.cmRanking
, then the Configuration Admin service
+ * {@code service.cmRanking}, then the Configuration Admin service
* arbitrarily chooses the order in which they are called.
*
* service.cmRanking< 0
or
- * service.cmRanking > 1000
should not make modifications to
+ * By convention, plugins with {@code service.cmRanking< 0} or
+ * {@code service.cmRanking > 1000} should not make modifications to
* the properties.
*
* cm.target
registration
+ * A plugin may optionally specify a {@code cm.target} registration
* property whose value is the PID of the Managed Service or Managed Service
* Factory whose configuration updates the plugin is intended to intercept. The
* plugin will then only be called with configuration updates that are targeted
* at the Managed Service or Managed Service Factory with the specified PID.
- * Omitting the cm.target
registration property means that the
+ * Omitting the {@code cm.target} registration property means that the
* plugin is called for all configuration updates.
*
- * @version $Revision: 5673 $
+ * @version $Id: 3b134aa21524b8f9cd461f040a8899334eb07d2a $
*/
public interface ConfigurationPlugin {
/**
@@ -82,7 +82,7 @@
* Factory configuration dictionaries a Configuration Plugin service
* receives.
*
- * This property contains a String[]
of PIDs. A Configuration
+ * This property contains a {@code String[]} of PIDs. A Configuration
* Admin service must call a Configuration Plugin service only when this
* property is not set, or the target service's PID is listed in this
* property.
@@ -91,10 +91,10 @@
/**
* A service property to specify the order in which plugins are invoked.
*
- * This property contains an Integer
ranking of the plugin.
+ * This property contains an {@code Integer} ranking of the plugin.
* Not specifying this registration property, or setting it to something
- * other than an Integer
, is the same as setting it to the
- * Integer
zero. This property determines the order in which
+ * other than an {@code Integer}, is the same as setting it to the
+ * {@code Integer} zero. This property determines the order in which
* plugins are invoked. Lower ranked plugins are called before higher ranked
* ones.
*
@@ -106,15 +106,15 @@
* View and possibly modify the a set of configuration properties before
* they are sent to the Managed Service or the Managed Service Factory. The
* Configuration Plugin services are called in increasing order of their
- * service.cmRanking
property. If this property is undefined
- * or is a non- Integer
type, 0 is used.
+ * {@code service.cmRanking} property. If this property is undefined
+ * or is a non- {@code Integer} type, 0 is used.
*
* service.cmRanking
of this plugin is in the range
- * 0 <= service.cmRanking <= 1000
.
+ * {@code service.cmRanking} of this plugin is in the range
+ * {@code 0 <= service.cmRanking <= 1000}.
* Exception
, the Configuration
+ * If this method throws any {@code Exception}, the Configuration
* Admin service must catch it and should log it.
*
* @param reference reference to the Managed Service or Managed Service
@@ -122,7 +122,7 @@
* @param properties The configuration properties. This argument must not
* contain the "service.bundleLocation" property. The value of this
* property may be obtained from the
- * Configuration.getBundleLocation
method.
+ * {@code Configuration.getBundleLocation} method.
*/
public void modifyConfiguration(ServiceReference reference,
Dictionary properties);
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/ManagedServiceFactory.java osgi-compendium-4.3.0/src/org/osgi/service/cm/ManagedServiceFactory.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/ManagedServiceFactory.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/ManagedServiceFactory.java 2011-07-21 13:53:52.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2001, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2001, 2010). 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.
@@ -29,10 +29,10 @@
* Configuration
object that has a PID. When such a
- * Configuration
is updated, the Configuration Admin service
- * calls the ManagedServiceFactory
updated method with the new
- * properties. When updated
is called with a new PID, the Managed
+ * {@code Configuration} object that has a PID. When such a
+ * {@code Configuration} is updated, the Configuration Admin service
+ * calls the {@code ManagedServiceFactory} updated method with the new
+ * properties. When {@code updated} is called with a new PID, the Managed
* Service Factory should create a new factory instance based on these
* configuration properties. When called with a PID that it has seen before, it
* should update that existing service instance with the new configuration
@@ -44,7 +44,7 @@
* created. The semantics of a factory instance are defined by the Managed
* Service Factory. However, if the factory instance is registered as a service
* object with the service registry, its PID should match the PID of the
- * corresponding Configuration
object (but it should not
+ * corresponding {@code Configuration} object (but it should not
* be registered as a Managed Service!).
*
* Configuration
object is new for the
+ * If the PID of the {@code Configuration} object is new for the
* Managed Service Factory, then create a new factory instance, using the
- * configuration properties
provided. Else, update the
- * service instance with the provided properties
.
+ * configuration {@code properties} provided. Else, update the
+ * service instance with the provided {@code properties}.
*
* properties
should be copied to its registry
+ * configuration {@code properties} should be copied to its registry
* properties. This is not mandatory and security sensitive properties
* should obviously not be copied.
*
* Exception
, the Configuration
+ * If this method throws any {@code Exception}, the Configuration
* Admin service must catch it and should log it.
*
* ManagedServiceFactory
+ * This implies that implementors of the {@code ManagedServiceFactory}
* class can be assured that the callback will not take place during
* registration when they execute the registration in a synchronized method.
*
@@ -136,7 +136,7 @@
* @param properties A copy of the configuration properties. This argument
* must not contain the service.bundleLocation" property. The value
* of this property may be obtained from the
- * Configuration.getBundleLocation
method.
+ * {@code Configuration.getBundleLocation} method.
* @throws ConfigurationException when the configuration properties are
* invalid.
*/
@@ -149,7 +149,7 @@
* Remove the factory instance associated with the PID. If the instance was
* registered with the service registry, it should be unregistered.
* Exception
, the Configuration
+ * If this method throws any {@code Exception}, the Configuration
* Admin service must catch it and should log it.
* service.pid
property set to some unique identifier called a
+ * {@code service.pid} property set to some unique identifier called a
* PID.
*
* Configuration
object
- * corresponding to this PID, it will callback the updated()
- * method of the ManagedService
object, passing the properties of
- * that Configuration
object.
+ * If the Configuration Admin service has a {@code Configuration} object
+ * corresponding to this PID, it will callback the {@code updated()}
+ * method of the {@code ManagedService} object, passing the properties of
+ * that {@code Configuration} object.
*
* Configuration
object, then it calls back
- * with a null
properties argument. Registering a Managed Service
- * will always result in a callback to the updated()
method
+ * If it has no such {@code Configuration} object, then it calls back
+ * with a {@code null} properties argument. Registering a Managed Service
+ * will always result in a callback to the {@code updated()} method
* provided the Configuration Admin service is, or becomes active. This callback
* must always be done asynchronously.
*
* updated()
methods is
- * called on that Configuration
object, the
- * ManagedService.updated()
method with the new properties is
- * called. If the delete()
method is called on that
- * Configuration
object, ManagedService.updated()
- * is called with a null
for the properties parameter. All these
+ * Else, every time that either of the {@code updated()} methods is
+ * called on that {@code Configuration} object, the
+ * {@code ManagedService.updated()} method with the new properties is
+ * called. If the {@code delete()} method is called on that
+ * {@code Configuration} object, {@code ManagedService.updated()}
+ * is called with a {@code null} for the properties parameter. All these
* callbacks must be done asynchronously.
*
*
+ * {@code
* null
- *
+ * }
* )
* registration.setProperties( getDefaults() );
* else {
@@ -105,21 +105,21 @@
* registration properties. This will allow the Configuration Admin service to
* set properties on services which can then be used by other applications.
*
- * @version $Revision: 5673 $
+ * @version $Id: 6dc466c566ce80e1cd8dfc4d78e4a9c699c7b655 $
*/
public interface ManagedService {
/**
* Update the configuration for a Managed Service.
*
* updated(Dictionary)
detects any
+ * When the implementation of {@code updated(Dictionary)} detects any
* kind of error in the configuration properties, it should create a new
- * ConfigurationException
which describes the problem. This
+ * {@code ConfigurationException} which describes the problem. This
* can allow a management system to provide useful information to a human
* administrator.
*
* Exception
, the
+ * If this method throws any other {@code Exception}, the
* Configuration Admin service must catch it and should log it.
* null
. This argument must not contain the
+ * {@code null}. This argument must not contain the
* "service.bundleLocation" property. The value of this property may
- * be obtained from the Configuration.getBundleLocation
+ * be obtained from the {@code Configuration.getBundleLocation}
* method.
* @throws ConfigurationException when the update fails
*/
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/package.html osgi-compendium-4.3.0/src/org/osgi/service/cm/package.html
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
-
-
-Import-Package: org.osgi.service.cm; version="[1.3,2.0)"
-
-
-
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/cm/package-info.java osgi-compendium-4.3.0/src/org/osgi/service/cm/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/service/cm/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/cm/package-info.java 2011-07-21 13:53:52.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Configuration Admin Package Version 1.3.
+ *
+ * {}
must be specified.
+ *
+ * Dictionary
- * object returned by the Bundle.getHeaders
method.
+ * The attribute value may be retrieved from the {@code Dictionary}
+ * object returned by the {@code Bundle.getHeaders} method.
*/
public static final String SERVICE_COMPONENT = "Service-Component";
/**
* A component property for a component configuration that contains the name
- * of the component as specified in the name
attribute of the
- * component
element. The value of this property must be of
- * type String
.
+ * of the component as specified in the {@code name} attribute of the
+ * {@code component} element. The value of this property must be of
+ * type {@code String}.
*/
public final static String COMPONENT_NAME = "component.name";
/**
* A component property that contains the generated id for a component
* configuration. The value of this property must be of type
- * Long
.
+ * {@code Long}.
*
* factory
attribute. The value of this property
- * must be of type String
.
+ * value of the {@code factory} attribute. The value of this property
+ * must be of type {@code String}.
*/
public final static String COMPONENT_FACTORY = "component.factory";
/**
* The suffix for reference target properties. These properties contain the
* filter to select the target services for a reference. The value of this
- * property must be of type String
.
+ * property must be of type {@code String}.
*/
public final static String REFERENCE_TARGET_SUFFIX = ".target";
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentContext.java osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentContext.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentContext.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentContext.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -31,28 +31,29 @@
* A component instance may have an activate method. If a component instance has
* a suitable and accessible activate method, this method will be called when a
* component configuration is activated. If the activate method takes a
- * ComponentContext
argument, it will be passed the component
+ * {@code ComponentContext} argument, it will be passed the component
* instance's Component Context object. If the activate method takes a
- * BundleContext
argument, it will be passed the component
+ * {@code BundleContext} argument, it will be passed the component
* instance's Bundle Context object. If the activate method takes a
- * Map
argument, it will be passed an unmodifiable Map containing
+ * {@code Map} argument, it will be passed an unmodifiable Map containing
* the component properties.
*
* ComponentContext
argument, it will be passed the
+ * takes a {@code ComponentContext} argument, it will be passed the
* component instance's Component Context object. If the deactivate method takes
- * a BundleContext
argument, it will be passed the component
+ * a {@code BundleContext} argument, it will be passed the component
* instance's Bundle Context object. If the deactivate method takes a
- * Map
argument, it will be passed an unmodifiable Map containing
- * the component properties. If the deactivate method takes an int
- * or Integer
argument, it will be passed the reason code for the
+ * {@code Map} argument, it will be passed an unmodifiable Map containing
+ * the component properties. If the deactivate method takes an {@code int}
+ * or {@code Integer} argument, it will be passed the reason code for the
* component instance's deactivation.
*
* @ThreadSafe
- * @version $Revision: 6462 $
+ * @noimplement
+ * @version $Id: 78c996676c92ad2d2457f75337b3d97a18c88e5d $
*/
public interface ComponentContext {
/**
@@ -67,19 +68,19 @@
* Returns the service object for the specified reference name.
*
* 0..n
or
- * 1..n
and multiple services are bound to the reference, the
+ * If the cardinality of the reference is {@code 0..n} or
+ * {@code 1..n} and multiple services are bound to the reference, the
* service with the highest ranking (as specified in its
- * Constants.SERVICE_RANKING
property) is returned. If there is
+ * {@code Constants.SERVICE_RANKING} property) is returned. If there is
* a tie in ranking, the service with the lowest service ID (as specified in
- * its Constants.SERVICE_ID
property); that is, the service
+ * its {@code Constants.SERVICE_ID} property); that is, the service
* that was registered first is returned.
*
* @param name The name of a reference as specified in a
- * reference
element in this component's description.
- * @return A service object for the referenced service or null
- * if the reference cardinality is 0..1
or
- * 0..n
and no bound service is available.
+ * {@code reference} element in this component's description.
+ * @return A service object for the referenced service or {@code null}
+ * if the reference cardinality is {@code 0..1} or
+ * {@code 0..n} and no bound service is available.
* @throws ComponentException If the Service Component Runtime catches an
* exception while activating the bound service.
*/
@@ -87,16 +88,16 @@
/**
* Returns the service object for the specified reference name and
- * ServiceReference
.
+ * {@code ServiceReference}.
*
* @param name The name of a reference as specified in a
- * reference
element in this component's description.
- * @param reference The ServiceReference
to a bound service.
- * This must be a ServiceReference
provided to the
+ * {@code reference} element in this component's description.
+ * @param reference The {@code ServiceReference} to a bound service.
+ * This must be a {@code ServiceReference} provided to the
* component via the bind or unbind method for the specified
* reference name.
- * @return A service object for the referenced service or null
- * if the specified ServiceReference
is not a bound
+ * @return A service object for the referenced service or {@code null}
+ * if the specified {@code ServiceReference} is not a bound
* service for the specified reference name.
* @throws ComponentException If the Service Component Runtime catches an
* exception while activating the bound service.
@@ -107,12 +108,12 @@
* Returns the service objects for the specified reference name.
*
* @param name The name of a reference as specified in a
- * reference
element in this component's description.
+ * {@code reference} element in this component's description.
* @return An array of service objects for the referenced service or
- * null
if the reference cardinality is
- * 0..1
or 0..n
and no bound service is
- * available. If the reference cardinality is 0..1
or
- * 1..1
and a bound service is available, the array
+ * {@code null} if the reference cardinality is
+ * {@code 0..1} or {@code 0..n} and no bound service is
+ * available. If the reference cardinality is {@code 0..1} or
+ * {@code 1..1} and a bound service is available, the array
* will have exactly one element.
* @throws ComponentException If the Service Component Runtime catches an
* exception while activating a bound service.
@@ -120,25 +121,25 @@
public Object[] locateServices(String name);
/**
- * Returns the BundleContext
of the bundle which contains this
+ * Returns the {@code BundleContext} of the bundle which contains this
* component.
*
- * @return The BundleContext
of the bundle containing this
+ * @return The {@code BundleContext} of the bundle containing this
* component.
*/
public BundleContext getBundleContext();
/**
* If the component instance is registered as a service using the
- * servicefactory="true"
attribute, then this method
+ * {@code servicefactory="true"} attribute, then this method
* returns the bundle using the service provided by the component instance.
* null
if:
+ * This method will return {@code null} if:
*
*
*
* @return The bundle using the component instance as a service or
- * servicefactory="true"
attribute, then all bundles
+ * {@code servicefactory="true"} attribute, then all bundles
* using the service provided by the component instance will share the same
* component instance.
* null
.
+ * {@code null}.
*/
public Bundle getUsingBundle();
@@ -162,7 +163,7 @@
* Enables the specified component name. The specified component name must
* be in the same bundle as this component.
*
- * @param name The name of a component or null
to indicate all
+ * @param name The name of a component or {@code null} to indicate all
* components in the bundle.
*/
public void enableComponent(String name);
@@ -177,14 +178,14 @@
/**
* If the component instance is registered as a service using the
- * service
element, then this method returns the service
+ * {@code service} element, then this method returns the service
* reference of the service provided by this component instance.
* null
if the component instance is
+ * This method will return {@code null} if the component instance is
* not registered as a service.
*
- * @return The ServiceReference
object for the component
- * instance or null
if the component instance is not
+ * @return The {@code ServiceReference} object for the component
+ * instance or {@code null} if the component instance is not
* registered as a service.
*/
public ServiceReference getServiceReference();
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentException.java osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentException.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentException.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentException.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -19,7 +19,7 @@
/**
* Unchecked exception which may be thrown by the Service Component Runtime.
*
- * @version $Revision: 6083 $
+ * @version $Id: ce00b5bdbe563ef48a1e76cfc6ce88ce2e13298b $
*/
public class ComponentException extends RuntimeException {
static final long serialVersionUID = -7438212656298726924L;
@@ -28,7 +28,7 @@
* Construct a new ComponentException with the specified message and cause.
*
* @param message The message for the exception.
- * @param cause The cause of the exception. May be null
.
+ * @param cause The cause of the exception. May be {@code null}.
*/
public ComponentException(String message, Throwable cause) {
super(message, cause);
@@ -46,17 +46,17 @@
/**
* Construct a new ComponentException with the specified cause.
*
- * @param cause The cause of the exception. May be null
.
+ * @param cause The cause of the exception. May be {@code null}.
*/
public ComponentException(Throwable cause) {
super(cause);
}
/**
- * Returns the cause of this exception or null
if no cause was
+ * Returns the cause of this exception or {@code null} if no cause was
* set.
*
- * @return The cause of this exception or null
if no cause was
+ * @return The cause of this exception or {@code null} if no cause was
* set.
*/
public Throwable getCause() {
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentFactory.java osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentFactory.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentFactory.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentFactory.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -19,14 +19,15 @@
import java.util.Dictionary;
/**
- * When a component is declared with the factory
attribute on its
- * component
element, the Service Component Runtime will register
+ * When a component is declared with the {@code factory} attribute on its
+ * {@code component} element, the Service Component Runtime will register
* a Component Factory service to allow new component configurations to be
* created and activated rather than automatically creating and activating
* component configuration as necessary.
*
* @ThreadSafe
- * @version $Revision: 5654 $
+ * @noimplement
+ * @version $Id: 7ec637e902c10319017d2a7c9e67bc76127dbce4 $
*/
public interface ComponentFactory {
/**
@@ -34,11 +35,11 @@
* may be provided for the component configuration.
*
* @param properties Additional properties for the component configuration
- * or null
if there are no additional properties.
- * @return A ComponentInstance
object encapsulating the
+ * or {@code null} if there are no additional properties.
+ * @return A {@code ComponentInstance} object encapsulating the
* component instance of the component configuration. The component
* configuration has been activated and, if the component specifies
- * a service
element, the component instance has been
+ * a {@code service} element, the component instance has been
* registered as a service.
* @throws ComponentException If the Service Component Runtime is unable to
* activate the component configuration.
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentInstance.java osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentInstance.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/ComponentInstance.java 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/ComponentInstance.java 2010-11-10 13:03:48.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) OSGi Alliance (2004, 2008). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (2004, 2010). 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.
@@ -26,7 +26,8 @@
* created when the component configuration is activated again.
*
* @ThreadSafe
- * @version $Revision: 5654 $
+ * @noimplement
+ * @version $Id: 153a0cbf3bc5bd82afeceea35cfd6dcd8498083e $
*/
public interface ComponentInstance {
/**
@@ -39,7 +40,7 @@
/**
* Returns the component instance of the activated component configuration.
*
- * @return The component instance or null
if the component
+ * @return The component instance or {@code null} if the component
* configuration has been deactivated.
*/
public Object getInstance();
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/package.html osgi-compendium-4.3.0/src/org/osgi/service/component/package.html
--- osgi-compendium-4.2.0/src/org/osgi/service/component/package.html 2011-10-03 17:57:47.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/package.html 1970-01-01 00:00:00.000000000 +0000
@@ -1,11 +0,0 @@
-
-
-Import-Package: org.osgi.service.component; version="[1.1,2.0)"
-
-
-
diff -Nru osgi-compendium-4.2.0/src/org/osgi/service/component/package-info.java osgi-compendium-4.3.0/src/org/osgi/service/component/package-info.java
--- osgi-compendium-4.2.0/src/org/osgi/service/component/package-info.java 1970-01-01 00:00:00.000000000 +0000
+++ osgi-compendium-4.3.0/src/org/osgi/service/component/package-info.java 2010-11-10 13:03:48.000000000 +0000
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) OSGi Alliance (2010). 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.
+ */
+
+/**
+ * Service Component Package Version 1.1.
+ *
+ *
+ * void foo() {
+ * Coordination c = coordinator.create("work", 0);
+ * try {
+ * doWork(c);
+ * }
+ * catch (Exception e) {
+ * c.fail(e);
+ * }
+ * finally {
+ * c.end();
+ * }
+ * }
+ *
+ *
+ * @ThreadSafe
+ * @noimplement
+ * @version $Id: 3094850161a4b3ea5c235d1e0df6d9174b8f40e3 $
+ */
+
+public interface Coordination {
+
+ /**
+ * A singleton exception that will be the failure cause when a Coordination
+ * times out.
+ */
+ Exception TIMEOUT = new Exception("TIMEOUT");
+
+ /**
+ * A singleton exception that will be the failure cause when the
+ * Coordinations created by a bundle are terminated because the bundle
+ * released the Coordinator service.
+ */
+ Exception RELEASED = new Exception("RELEASED");
+
+ /**
+ * Returns the id assigned to this Coordination.
+ *
+ * The id is assigned by the {@link Coordinator} service which created this
+ * Coordination and is unique among all the Coordinations created by the
+ * Coordinator service and must not be reused as long as the Coordinator
+ * service remains registered. The id must be positive and monotonically
+ * increases for each Coordination created by the Coordinator service.
+ *
+ * @return The id assigned to this Coordination.
+ */
+ long getId();
+
+ /**
+ * Returns the name of this Coordination.
+ *
+ * The name is specified when this Coordination was created.
+ *
+ * @return The name of this Coordination.
+ *
+ */
+ String getName();
+
+ /**
+ * Terminate this Coordination normally.
+ *
+ *
+ * (coordination.name=com.acme.*)
+ * (&(signer=\*,o=ACME,c=US)(coordination.name=com.acme.*))
+ * (signer=\*,o=ACME,c=US)
+ *
+ *
+ *
+ *
+ * Filter attribute names are processed in a case sensitive manner.
+ *
+ * @param filter A filter expression. Filter attribute names are processed
+ * in a case sensitive manner. A special value of {@code "*"} can be
+ * used to match all coordinations.
+ * @param actions {@code admin}, {@code initiate} or {@code participate}
+ * (canonical order).
+ * @throws IllegalArgumentException If the filter has an invalid syntax.
+ */
+ public CoordinationPermission(String filter, String actions) {
+ this(parseFilter(filter), parseActions(actions));
+ }
+
+ /**
+ * Creates a new requested {@code CoordinationPermission} object to be used
+ * by the code that must perform {@code checkPermission}.
+ * {@code CoordinationPermission} objects created with this constructor
+ * cannot be added to an {@code CoordinationPermission} permission
+ * collection.
+ *
+ * @param coordinationName The name of the requested Coordination.
+ * @param coordinationBundle The bundle which
+ * {@link Coordination#getBundle() created} the requested
+ * Coordination.
+ * @param actions {@code admin}, {@code initiate} or {@code participate}
+ * (canonical order).
+ */
+ public CoordinationPermission(String coordinationName,
+ Bundle coordinationBundle, String actions) {
+ super(coordinationName);
+ setTransients(null, parseActions(actions));
+ this.bundle = coordinationBundle;
+ if (coordinationName == null) {
+ throw new NullPointerException("coordinationName must not be null");
+ }
+ if (coordinationBundle == null) {
+ throw new NullPointerException(
+ "coordinationBundle must not be null");
+ }
+ }
+
+ /**
+ * Package private constructor used by CoordinationPermissionCollection.
+ *
+ * @param filter name filter
+ * @param mask action mask
+ */
+ CoordinationPermission(Filter filter, int mask) {
+ super((filter == null) ? "*" : filter.toString());
+ setTransients(filter, mask);
+ this.bundle = null;
+ }
+
+ /**
+ * Called by constructors and when deserialized.
+ *
+ * @param filter Permission's filter or {@code null} for wildcard.
+ * @param mask action mask
+ */
+ private void setTransients(Filter filter, int mask) {
+ this.filter = filter;
+ if ((mask == ACTION_NONE) || ((mask & ACTION_ALL) != mask)) {
+ throw new IllegalArgumentException("invalid action string");
+ }
+ this.action_mask = mask;
+ }
+
+ /**
+ * Parse action string into action mask.
+ *
+ * @param actions Action string.
+ * @return action mask.
+ */
+ private static int parseActions(String actions) {
+ boolean seencomma = false;
+
+ int mask = ACTION_NONE;
+
+ if (actions == null) {
+ return mask;
+ }
+
+ char[] a = actions.toCharArray();
+
+ int i = a.length - 1;
+ if (i < 0)
+ return mask;
+
+ while (i != -1) {
+ char c;
+
+ // skip whitespace
+ while ((i != -1)
+ && ((c = a[i]) == ' ' || c == '\r' || c == '\n'
+ || c == '\f' || c == '\t'))
+ i--;
+
+ // check for the known strings
+ int matchlen;
+
+ if (i >= 4 && (a[i - 4] == 'a' || a[i - 4] == 'A')
+ && (a[i - 3] == 'd' || a[i - 3] == 'D')
+ && (a[i - 2] == 'm' || a[i - 2] == 'M')
+ && (a[i - 1] == 'i' || a[i - 1] == 'I')
+ && (a[i] == 'n' || a[i] == 'N')) {
+ matchlen = 5;
+ mask |= ACTION_ADMIN;
+
+ }
+ else
+ if (i >= 7 && (a[i - 7] == 'i' || a[i - 7] == 'I')
+ && (a[i - 6] == 'n' || a[i - 6] == 'N')
+ && (a[i - 5] == 'i' || a[i - 5] == 'I')
+ && (a[i - 4] == 't' || a[i - 4] == 'T')
+ && (a[i - 3] == 'i' || a[i - 3] == 'I')
+ && (a[i - 2] == 'a' || a[i - 2] == 'A')
+ && (a[i - 1] == 't' || a[i - 1] == 'T')
+ && (a[i] == 'e' || a[i] == 'E')) {
+ matchlen = 8;
+ mask |= ACTION_INITIATE;
+
+ }
+ else {
+ if (i >= 10 && (a[i - 10] == 'p' || a[i - 10] == 'P')
+ && (a[i - 9] == 'a' || a[i - 9] == 'A')
+ && (a[i - 8] == 'r' || a[i - 8] == 'R')
+ && (a[i - 7] == 't' || a[i - 7] == 'T')
+ && (a[i - 6] == 'i' || a[i - 6] == 'I')
+ && (a[i - 5] == 'c' || a[i - 5] == 'C')
+ && (a[i - 4] == 'i' || a[i - 4] == 'I')
+ && (a[i - 3] == 'p' || a[i - 3] == 'P')
+ && (a[i - 2] == 'a' || a[i - 2] == 'A')
+ && (a[i - 1] == 't' || a[i - 1] == 'T')
+ && (a[i] == 'e' || a[i] == 'E')) {
+ matchlen = 11;
+ mask |= ACTION_PARTICIPATE;
+
+ }
+ else {
+ // parse error
+ throw new IllegalArgumentException(
+ "invalid permission: " + actions);
+ }
+ }
+
+ // make sure we didn't just match the tail of a word
+ // like "ackbarfadmin". Also, skip to the comma.
+ seencomma = false;
+ while (i >= matchlen && !seencomma) {
+ switch (a[i - matchlen]) {
+ case ',' :
+ seencomma = true;
+ /* FALLTHROUGH */
+ case ' ' :
+ case '\r' :
+ case '\n' :
+ case '\f' :
+ case '\t' :
+ break;
+ default :
+ throw new IllegalArgumentException(
+ "invalid permission: " + actions);
+ }
+ i--;
+ }
+
+ // point i at the location of the comma minus one (or -1).
+ i -= matchlen;
+ }
+
+ if (seencomma) {
+ throw new IllegalArgumentException("invalid permission: " + actions);
+ }
+
+ return mask;
+ }
+
+ /**
+ * Parse filter string into a Filter object.
+ *
+ * @param filterString The filter string to parse.
+ * @return a Filter for this bundle.
+ * @throws IllegalArgumentException If the filter syntax is invalid.
+ */
+ private static Filter parseFilter(String filterString) {
+ filterString = filterString.trim();
+ if (filterString.equals("*")) {
+ return null;
+ }
+ try {
+ return FrameworkUtil.createFilter(filterString);
+ }
+ catch (InvalidSyntaxException e) {
+ IllegalArgumentException iae = new IllegalArgumentException(
+ "invalid filter");
+ iae.initCause(e);
+ throw iae;
+ }
+ }
+
+ /**
+ * Determines if the specified permission is implied by this object.
+ *
+ *
Device Access Package Version 1.1. -
Bundles wishing to use this package must list the package -in the Import-Package header of the bundle's manifest. -For example: -
-Import-Package: org.osgi.service.device; version="[1.1,2.0)" --