[jboss-jira] [JBoss JIRA] Created: (JBMAN-23) Need MutableManagedObject interface extension of ManagedObject

Scott M Stark (JIRA) jira-events at lists.jboss.org
Thu Sep 11 13:07:22 EDT 2008


Need MutableManagedObject interface extension of ManagedObject
--------------------------------------------------------------

                 Key: JBMAN-23
                 URL: https://jira.jboss.org/jira/browse/JBMAN-23
             Project: JBoss Managed
          Issue Type: Feature Request
            Reporter: Scott M Stark
            Assignee: Scott M Stark
             Fix For: JBossMan.2.0.0.GA


We need an extension of the ManagedObject interface that allows for updating the managed object name. When one creates a ManagedObject from a template, a property with a ManagementObjectID is used to set the ManagedObject name. Currently this has to look to the ManagedObjectImpl:

            ManagementObjectID id = (ManagementObjectID) pannotations.get(ManagementObjectID.class.getName());
            if (id != null)
            {
               Object refName = getRefName(prop.getValue());
               if (refName == null)
                  refName = id.name();
               String name = "" + refName;
               log.debug("Updating template ManagedObject name to:"+name+" from property: "+prop);
               ManagedObject mo = prop.getManagedObject();
               if(mo instanceof ManagedObjectImpl)
               {
                  // TODO: need a MutableManagedObject type
                  ManagedObjectImpl moi = (ManagedObjectImpl) mo;
                  moi.setName(name);
               }
               else
               {
                  formatter.applyPattern(i18n.getString("ManagementView.InvalidTemplatePropertyMO")); //$NON-NLS-1$
                  Object[] args = {prop.getName()};
                  String msg = formatter.format(args);
                  throw new IllegalArgumentException(msg);
               }
            }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list