[jboss-cvs] JBossAS SVN: r90104 - in projects/jboss-man/branches/Branch_2_1/managed/src: test/java/org/jboss/test/managed/factory/test and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 11 15:23:47 EDT 2009


Author: ispringer
Date: 2009-06-11 15:23:46 -0400 (Thu, 11 Jun 2009)
New Revision: 90104

Modified:
   projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedCommon.java
   projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedComponent.java
   projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedDeployment.java
   projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedObject.java
   projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java
   projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/PlatformMBeanUnitTestCase.java
Log:
added notes in Javadoc notating methods/classes that should not be used on the client side; made some other Javadoc improvements; removed a few unused imports; fixed a broken unit test


Modified: projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedCommon.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedCommon.java	2009-06-11 17:15:12 UTC (rev 90103)
+++ projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedCommon.java	2009-06-11 19:23:46 UTC (rev 90104)
@@ -30,9 +30,8 @@
 import org.jboss.managed.api.annotation.ManagementRuntimeRef;
 
 /**
- * ManagedCommon is used to hold common
- * properties that both, server side and client side,
- * object can see                                    .
+ * ManagedCommon is used to hold common properties of managed
+ * objects that both server side and client side can see.                                    .
  *
  * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @author Scott.Stark at jboss.org

Modified: projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedComponent.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedComponent.java	2009-06-11 17:15:12 UTC (rev 90103)
+++ projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedComponent.java	2009-06-11 19:23:46 UTC (rev 90104)
@@ -25,7 +25,7 @@
 import java.util.Map;
 
 /**
- * A runtime component associated with a deployment.
+ * A manageable entity - the client side view of a {@link ManagedObject}.
  * 
  * @author Scott.Stark at jboss.org
  * @version $Revision$
@@ -52,6 +52,9 @@
 
    /**
     * Get the annotations associated with the managed component
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
     * @return the annotations associated with the managed component
     */
    public Map<String, Annotation> getAnnotations();

Modified: projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedDeployment.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedDeployment.java	2009-06-11 17:15:12 UTC (rev 90103)
+++ projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedDeployment.java	2009-06-11 19:23:46 UTC (rev 90104)
@@ -25,8 +25,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.jboss.managed.api.ManagedProperty;
-
 /**
  * A collection of ManagedComponent and structural information
  * about a deployment.
@@ -52,36 +50,44 @@
    };
 
    /**
-    * Get the full name of the associated DeploymentUnit.
-    * @return full name of the DeploymentUnit
+    * Get the full name of the associated DeploymentUnit
+    * (e.g. vfsfile:/C:/opt/jboss-eap-5.0.0-SNAPSHOT/server/default/deploy/foo.ear/).
+    * @return the full name of the DeploymentUnit
+    *         (e.g. vfsfile:/C:/opt/jboss-eap-5.0.0-SNAPSHOT/server/default/deploy/foo.ear/)
     */
    public String getName();
+
    /**
-    * Get the simple name (x.ear) for the deployment
-    * @return simple name of the deployment
+    * Get the simple name (e.g. foo.ear) for the deployment
+    * @return the simple name (e.g. foo.ear) of the deployment
     */
    public String getSimpleName();
+
    /**
     * Get the phase this deployment is associated with
     * @return the phase
     */
    public DeploymentPhase getDeploymentPhase();
+
    /**
     * Get the deployment state of the deployment. 
     * @return the deployment state
     */
    public DeploymentState getDeploymentState();
+
    /**
     * Add a deployment/module type
     * @param type
     * @return true if the type was added, false if it already exists
     */
    public boolean addType(String type);
+
    /**
     * Get the deployment/module types.
     * @return deployment types
     */
    public Set<String> getTypes();
+
    /**
     * Get the deployment/module types.
     * @param types
@@ -94,6 +100,7 @@
     * @return the property names
     */
    public Set<String> getPropertyNames();
+
    /**
     * Get a property
     * 
@@ -110,12 +117,33 @@
    public Map<String, ManagedProperty> getProperties();
 
    /**
-    * Get the managed object names
-    * 
-    * @return the property names
+    * Get the names of the child managed objects.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
+    * @return the names of the child managed objects
     */
    public Set<String> getManagedObjectNames();
+
+   /**
+    * Gets the child managed objects.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
+    * @return the child managed objects
+    */
    public Map<String, ManagedObject> getManagedObjects();
+
+   /**
+    * Gets the child managed object with the specified name. Returns null if there is no child managed object with that
+    * name.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
+    * @param name the managed object name
+    * @return the child managed object with the specified name, or null if there is no child managed object with that
+    *         name
+    */
    public ManagedObject getManagedObject(String name);
 
    /**
@@ -124,13 +152,19 @@
     */
    public ManagedDeployment getParent();
 
+   /**
+    * Gets the nested ManagedComponent with the specified name.
+    * @param name the child component's name
+    * @return the child ManagedComponent with the specified name
+    */
    public ManagedComponent getComponent(String name);
 
    /**
-    * Get the ManagedComponents for the deployment module.
-    * @return ManagedComponents for the deployment module.
+    * Get the nested ManagedComponents for the deployment module.
+    * @return the nested ManagedComponents for the deployment module.
     */
    public Map<String, ManagedComponent> getComponents();
+
    /**
     * Get the nested deployment modules.
     * @return nested deployment modules.
@@ -150,6 +184,7 @@
     * @param comp the component
     */
    public void addComponent(String name, ManagedComponent comp);
+
    /**
     * 
     * @param name the name
@@ -163,16 +198,19 @@
     * @return the template names
     */
    public Set<String> getDeploymentTemplateNames();
+
    /**
     * Add a deployment
-    * @param deplymentBaseName
+    * @param deploymentBaseName
     * @param info
     * @return the deployment
     */
-   public ManagedDeployment addModule(String deplymentBaseName, DeploymentTemplateInfo info);
+   public ManagedDeployment addModule(String deploymentBaseName, DeploymentTemplateInfo info);
 
    /**
     * Get an attachment from the deployment.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
     * 
     * @see #setAttachment(String, Object)
     * 
@@ -185,6 +223,8 @@
     * Get an attachment from the deployment,
     * uses the expected type as both the name
     * and to cast the resulting object.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
     * 
     * @param <T> the expected type
     * @param expectedType the expected type
@@ -198,6 +238,8 @@
     * are serialized to external clients like admin tools, so the attachment
     * type should be restricted to jdk types and commonly provided management
     * related classes.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
     * 
     * @param name the name
     * @param attachment the attachment, pass null to remove an attachment

Modified: projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedObject.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedObject.java	2009-06-11 17:15:12 UTC (rev 90103)
+++ projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedObject.java	2009-06-11 19:23:46 UTC (rev 90104)
@@ -24,19 +24,19 @@
 import java.lang.annotation.Annotation;
 import java.util.Map;
 
-import org.jboss.managed.api.annotation.ManagementRuntimeRef;
-
 /**
- * ManagedObject is an interface for a manageable element. It
+ * ManagedObject is an interface for a manageable entity. It
  * consists of:
  * - a name/name type for a registry/references
  * - an attachment name to associate the ManagedObject with a
  *    deployment attachment
  * - annotations from the metadata making up the ManagedObject
  * - the attachment instance
- * - the ManagedPropertys for the interface
- * - the ManagedOperations for the interface 
- * 
+ * - the {@link ManagedProperty}s for the entity
+ * - the {@link ManagedOperation}s for the entity
+ *
+ * <b>NOTE:</b> Clients should not use this class - it is intended for server-side use only.
+ *
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @author Scott.Stark at jboss.org
  * @version $Revision$

Modified: projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java	2009-06-11 17:15:12 UTC (rev 90103)
+++ projects/jboss-man/branches/Branch_2_1/managed/src/main/java/org/jboss/managed/api/ManagedProperty.java	2009-06-11 19:23:46 UTC (rev 90104)
@@ -34,7 +34,9 @@
 import org.jboss.metatype.api.values.MetaValue;
 
 /**
- * ManagedProperty.
+ * A property associated with a {@link ManagedDeployment}, {@link ManagedObject}, or {@link ManagedComponent}. The
+ * property's name is a String and its value is a {@link MetaValue}. A property also has additional metadata associated
+ * with it, such as constraints on its value, a mandatory flag, a read-only flag, etc.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @author Scott.Stark at jboss.org
@@ -44,19 +46,40 @@
 {
    /**
     * Get the managed object the property is associated with.
-    * 
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
     * @return the managed object
     */
    ManagedObject getManagedObject();
+
+   /**
+    * Set the managed object the property is associated with.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
+    * @param managedObject the managed object
+    */
    void setManagedObject(ManagedObject managedObject);
 
    /**
-    * Get the ManagedObject 
+    * Get the target ManagedObject.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
     * @see {@linkplain ManagementObjectRef}
     * @return the ManagedObject the property references, null
     *    if there is no reference or its unresolved.
     */
    ManagedObject getTargetManagedObject();
+
+   /**
+    * Set the target ManagedObject.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
+    * @param target the target ManagedObject
+    */
    void setTargetManagedObject(ManagedObject target);
 
    /**
@@ -125,12 +148,18 @@
 
    /**
     * Get the annotations associated with the property
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
     * @return the annotations associated with the property
     */
    Map<String, Annotation> getAnnotations();
 
    /**
     * Does the property have the annotation referenced by key.
+    *
+    * <b>NOTE:</b> Clients should not use this method - it is intended for server-side use only.
+    *
     * @param key the key into {@link #getAnnotations()}
     * @return true if the annotation exists, false otherwise.
     */
@@ -237,10 +266,10 @@
     * @return true is the property has been removed.
     */
    boolean isRemoved();
+
    /**
     * Set whether a property has been marked as removed from its ManagedObject.
     * @param flag - true is the property has been removed, false if not.
     */
    void setRemoved(boolean flag);
-
 }

Modified: projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/PlatformMBeanUnitTestCase.java
===================================================================
--- projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/PlatformMBeanUnitTestCase.java	2009-06-11 17:15:12 UTC (rev 90103)
+++ projects/jboss-man/branches/Branch_2_1/managed/src/test/java/org/jboss/test/managed/factory/test/PlatformMBeanUnitTestCase.java	2009-06-11 19:23:46 UTC (rev 90104)
@@ -294,7 +294,7 @@
       Set<ManagedOperation> ops = mo.getOperations();
       log.debug(ops);
 
-      assertEquals("Ops count is 8", 8, ops.size());
+      assertEquals(mo + " has wrong number of ManagedOperations.", 11, ops.size());
       ManagedOperation getThreadInfo = ManagedOperationMatcher.findOperation(ops,
             "getThreadInfo", SimpleMetaType.LONG_PRIMITIVE, SimpleMetaType.INTEGER_PRIMITIVE);
       assertNotNull("getThreadInfo", getThreadInfo);




More information about the jboss-cvs-commits mailing list