use of org.opennms.features.vaadin.jmxconfiggenerator.ui.mbeans.SelectionManager in project opennms by OpenNMS.
the class UniqueAttributeNameValidatorTest method before.
@Before
public void before() {
final Mbean mbean = TestHelper.createMbean("MBean1");
mbean.getAttrib().add(TestHelper.createAttrib("attribute1", "attrib1"));
mbean.getCompAttrib().add(TestHelper.createCompAttrib("compAttribute1", TestHelper.createCompMember("compMember1", "compMem1"), TestHelper.createCompMember("compMember2", "compMem2")));
selectionManager = new SelectionManager() {
@Override
public Collection<Attrib> getSelectedAttributes(Mbean otherMbean) {
return mbean.getAttrib();
}
@Override
public Collection<CompMember> getSelectedCompositeMembers(CompAttrib compAttrib) {
return mbean.getCompAttrib().get(0).getCompMember();
}
@Override
public Collection<CompAttrib> getSelectedCompositeAttributes(Mbean otherMbean) {
return mbean.getCompAttrib();
}
@Override
public Collection<Mbean> getSelectedMbeans() {
return Arrays.asList(new Mbean[] { mbean });
}
};
}
Aggregations