@Test public void testGetResourceNames() { jvmResourceHandler.getResourceNames(resourceIdentifier); verify(mockJvmPersistence).getResourceTemplateNames(anyString()); ResourceIdentifier notMeResourceIdentifier = new ResourceIdentifier.Builder().setResourceName("what-jvm").setGroupName("not-a-jvm").build(); jvmResourceHandler.getResourceNames(notMeResourceIdentifier); verify(mockSuccessor).getResourceNames(notMeResourceIdentifier); }
@Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ return jvmPersistenceService.getResourceTemplateNames(resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } }
JvmResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ return jvmPersistenceService.getResourceTemplateNames(resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } } }
JvmResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ return jvmPersistenceService.getResourceTemplateNames(resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } } JvmResourceHandler(final ResourceDao resourceDao, final GroupPersistenceService groupPersistenceService,
                              final JvmPersistenceService jvmPersistenceService, final ResourceHandler successor); }
JvmResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ return jvmPersistenceService.getResourceTemplateNames(resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } } JvmResourceHandler(final ResourceDao resourceDao, final GroupPersistenceService groupPersistenceService,
                              final JvmPersistenceService jvmPersistenceService, final ResourceHandler successor); @Override ConfigTemplate fetchResource(final ResourceIdentifier resourceIdentifier); @Override CreateResourceResponseWrapper createResource(final ResourceIdentifier resourceIdentifier,
                                                        final ResourceTemplateMetaData metaData,
                                                        final String templateContent); @Override void deleteResource(final ResourceIdentifier resourceIdentifier); @Override String updateResourceMetaData(ResourceIdentifier resourceIdentifier, String resourceName, String metaData); @Override Object getSelectedValue(ResourceIdentifier resourceIdentifier); @Override List<String> getResourceNames(ResourceIdentifier resourceIdentifier); }
JvmResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ return jvmPersistenceService.getResourceTemplateNames(resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } } JvmResourceHandler(final ResourceDao resourceDao, final GroupPersistenceService groupPersistenceService,
                              final JvmPersistenceService jvmPersistenceService, final ResourceHandler successor); @Override ConfigTemplate fetchResource(final ResourceIdentifier resourceIdentifier); @Override CreateResourceResponseWrapper createResource(final ResourceIdentifier resourceIdentifier,
                                                        final ResourceTemplateMetaData metaData,
                                                        final String templateContent); @Override void deleteResource(final ResourceIdentifier resourceIdentifier); @Override String updateResourceMetaData(ResourceIdentifier resourceIdentifier, String resourceName, String metaData); @Override Object getSelectedValue(ResourceIdentifier resourceIdentifier); @Override List<String> getResourceNames(ResourceIdentifier resourceIdentifier);  }