[jboss-jira] [JBoss JIRA] Commented: (JBMAN-23) Need MutableManagedObject interface extension of ManagedObject
Scott M Stark (JIRA)
jira-events at lists.jboss.org
Thu Sep 11 13:15:21 EDT 2008
[ https://jira.jboss.org/jira/browse/JBMAN-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12429173#action_12429173 ]
Scott M Stark commented on JBMAN-23:
------------------------------------
Also we need the ability to add properties/operations when merging runtime managed object properties, operations:
ManagedObjectImpl moi = (ManagedObjectImpl) mo;
moi.setProperties(props);
moi.setOperations(ops);
> 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