[
https://jira.jboss.org/jira/browse/JBMAN-23?page=com.atlassian.jira.plugi...
]
Scott M Stark updated JBMAN-23:
-------------------------------
Component/s: managedobject
Fix Version/s: JBossMan.2.0.0.CR2
(was: JBossMan.2.0.0.GA)
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
Components: managedobject
Reporter: Scott M Stark
Assignee: Scott M Stark
Fix For: JBossMan.2.0.0.CR2
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