[jboss-cvs] JBossAS SVN: r65379 - projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 13 15:02:34 EDT 2007


Author: alesj
Date: 2007-09-13 15:02:34 -0400 (Thu, 13 Sep 2007)
New Revision: 65379

Modified:
   projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/ManagedObjectImpl.java
Log:
Setting unused fields - nameType, attachmentName.

Modified: projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/ManagedObjectImpl.java
===================================================================
--- projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/ManagedObjectImpl.java	2007-09-13 18:32:47 UTC (rev 65378)
+++ projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/ManagedObjectImpl.java	2007-09-13 19:02:34 UTC (rev 65379)
@@ -105,25 +105,36 @@
     * @param operations the operations
     * @param attachment the attachment
     */
-   public ManagedObjectImpl(String name, String nameType,
+   public ManagedObjectImpl(
+         String name,
+         String nameType,
          String attachmentName,
          Set<ManagedProperty> properties,
-         HashSet<ManagedOperation> operations, Serializable attachment)
+         HashSet<ManagedOperation> operations,
+         Serializable attachment
+   )
    {
-      if (name == null)
-         throw new IllegalArgumentException("Null name");
-      if (properties == null)
-         throw new IllegalArgumentException("Null properties");
-      
-      this.name = name;
-      this.properties = toMap(properties);
-      this.operations = operations;
-      setAttachment(attachment);
+      this(name, nameType, attachmentName, toMap(properties), operations, attachment);
    }
-   public ManagedObjectImpl(String name, String nameType,
+
+   /**
+    * Create a new ManagedObjectImpl
+    *
+    * @param name - The object name used for ManagementRef resolution
+    * @param nameType - The name type/qualifier used for ManagementRef resolution
+    * @param attachmentName the attachment name
+    * @param properties the properties
+    * @param operations the operations
+    * @param attachment the attachment
+    */
+   public ManagedObjectImpl(
+         String name,
+         String nameType,
          String attachmentName,
          Map<String, ManagedProperty> properties,
-         HashSet<ManagedOperation> operations, Serializable attachment)
+         HashSet<ManagedOperation> operations,
+         Serializable attachment
+   )
    {
       if (name == null)
          throw new IllegalArgumentException("Null name");
@@ -131,6 +142,9 @@
          throw new IllegalArgumentException("Null properties");
       
       this.name = name;
+      // todo - check for null?
+      this.nameType = nameType;
+      this.attachmentName = attachmentName;
       this.properties = properties;
       this.operations = operations;
       setAttachment(attachment);
@@ -140,6 +154,7 @@
    {
       return name;
    }
+
    public void setName(String name)
    {
       this.name = name;
@@ -149,6 +164,7 @@
    {
       return nameType;
    }
+
    public void setNameType(String nameType)
    {
       this.nameType = nameType;
@@ -158,6 +174,7 @@
    {
       return attachmentName;
    }
+
    public void setAttachmentName(String attachmentName)
    {
       this.attachmentName = attachmentName;
@@ -171,11 +188,13 @@
    {
       return annotations;
    }
+
    public void setAnnotations(Map<String, Annotation> annotations)
    {
       if (this.annotations.isEmpty())
          this.annotations = new HashMap<String, Annotation>();
-      this.annotations.clear();
+      else
+         this.annotations.clear();
       this.annotations.putAll(annotations);
    }
 
@@ -196,6 +215,7 @@
    {
       return properties;
    }
+
    public void setProperties(Map<String, ManagedProperty> properties)
    {
       this.properties = properties;
@@ -218,12 +238,13 @@
 
    /**
     * get the ManagedOperations
-    * @return 
+    * @return set of managed operations
     */
    public Set<ManagedOperation> getOperations()
    {
       return operations;
    }
+
    public void setOperations(Set<ManagedOperation> operations)
    {
       this.operations = operations;




More information about the jboss-cvs-commits mailing list