[jboss-jira] [JBoss JIRA] Resolved: (JBMAN-82) Add ManagedProperty.getAdminViewUses
Scott M Stark (JIRA)
jira-events at lists.jboss.org
Wed May 20 11:44:10 EDT 2009
[ https://jira.jboss.org/jira/browse/JBMAN-82?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott M Stark resolved JBMAN-82.
--------------------------------
Resolution: Done
Example usage:
@ManagementObject
public class PortAdminViewBean
implements Serializable
{
private static final long serialVersionUID = 1;
@ManagementProperty(adminViews={"Port"})
public String getPort()
{
return null;
}
@ManagementProperty(adminViews={"Port", "Bootstrap"})
public String getBootstrapPort()
{
return null;
}
@ManagementProperty(adminViews={"Interface"})
public String getListeningInterface()
{
return null;
}
}
...
ManagedObject portBeanMO = createAndCheckDefaultManagedObject(PortAdminViewBean.class);
log.info("ServerBean: "+serverBeanMO.getPropertyNames());
Map<String, Set<String>> serverAdminViews = new HashMap<String, Set<String>>();
for(ManagedProperty mp : serverBeanMO.getProperties().values())
{
String name = mp.getName();
Set<String> views = serverAdminViews.get(name);
if(views == null)
{
views = new HashSet<String>();
serverAdminViews.put(name, views);
}
Collection<String> adminViews = mp.getAdminViewUses();
log.info(mp+" uses: "+adminViews);
for(String view : adminViews)
views.add(view);
}
// Validate the expected admin views
assertEquals("property1", collection("Port"), serverAdminViews.get("property1"));
assertEquals("property2", collection("Port", "Bootstrap"), serverAdminViews.get("property2"));
assertEquals("property3", collection("Interface"), serverAdminViews.get("property3"));
assertEquals("securityDomain", collection("Security"), serverAdminViews.get("securityDomain"));
> Add ManagedProperty.getAdminViewUses
> ------------------------------------
>
> Key: JBMAN-82
> URL: https://jira.jboss.org/jira/browse/JBMAN-82
> Project: JBoss Managed
> Issue Type: Feature Request
> Components: managedobject
> Affects Versions: JBossMan.2.1.0.CR8
> Reporter: Scott M Stark
> Assignee: Scott M Stark
> Fix For: JBossMan.2.1.0.GA
>
>
> /**
> * Return the admin view names associated with the property
> * @return the potentially empty admin view names associated with the property
> */
> Collection<String> getAdminViewUses();
--
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