@Test public void testGetResourceNames() { appResourceHandler.getResourceNames(resourceIdentifier); verify(mockAppPersistence).getResourceTemplateNames(anyString(), anyString()); ResourceIdentifier notMeResourceIdentifier = new ResourceIdentifier.Builder().setResourceName("whats-app-amiright").setGroupName("not-a-web-app").build(); appResourceHandler.getResourceNames(notMeResourceIdentifier); verify(mockSuccessor).getResourceNames(notMeResourceIdentifier); }
@Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)) { return applicationPersistenceService.getResourceTemplateNames(resourceIdentifier.webAppName, resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } }
AppResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)) { return applicationPersistenceService.getResourceTemplateNames(resourceIdentifier.webAppName, resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } } }
AppResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)) { return applicationPersistenceService.getResourceTemplateNames(resourceIdentifier.webAppName, resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } } AppResourceHandler(final ResourceDao resourceDao, final JvmPersistenceService jvmPersistenceService,
                              final ApplicationPersistenceService applicationPersistenceService,
                              final ResourceHandler successor); }
AppResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)) { return applicationPersistenceService.getResourceTemplateNames(resourceIdentifier.webAppName, resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } } AppResourceHandler(final ResourceDao resourceDao, final JvmPersistenceService jvmPersistenceService,
                              final ApplicationPersistenceService applicationPersistenceService,
                              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); }
AppResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)) { return applicationPersistenceService.getResourceTemplateNames(resourceIdentifier.webAppName, resourceIdentifier.jvmName); } else { return successor.getResourceNames(resourceIdentifier); } } AppResourceHandler(final ResourceDao resourceDao, final JvmPersistenceService jvmPersistenceService,
                              final ApplicationPersistenceService applicationPersistenceService,
                              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);  }