XMLRepositoryManager xmlRepositoryMgr = new XMLRepositoryManager();
xmlRepositoryMgr.executeWith(new XMLRepositoryManager.RepositoryCommand() {
public void execute(RepositoryConnection repositoryConnection,
XMLRepository repository,
String repositoryDir) throws Exception {
ButtonImageComponent ic =
new ButtonImageComponent("/testRemoveButtonImageComponent.mbtn");
ic.setUpImageComponentName("/up.mimg");
ic.setOverImageComponentName("/over.mimg");
ic.setDownImageComponentName("/down.mimg");
ImageRepositoryManager manager =
new ImageRepositoryManager(repository);
manager.addButtonImageComponent(repositoryConnection, ic);
containerExists(ic.getName(), false, repositoryConnection,
repository);
manager.removeButtonImageComponent(repositoryConnection,
ic.getName());
containerExists(ic.getName(), true, repositoryConnection,
repository);
}
});
}