@Test (expected = UnsupportedOperationException.class) public void testGetResourceNames() { ResourceIdentifier notMeResourceIdentifier = new ResourceIdentifier.Builder().setResourceName("what-group-level-web-server").setGroupName("not-a-web-server").build(); groupLevelWebServerResourceHandler.getResourceNames(notMeResourceIdentifier); verify(mockSuccessor).getResourceNames(notMeResourceIdentifier); groupLevelWebServerResourceHandler.getResourceNames(resourceIdentifier); }
@Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ throw new UnsupportedOperationException(); } else { return successor.getResourceNames(resourceIdentifier); } }
GroupLevelWebServerResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ throw new UnsupportedOperationException(); } else { return successor.getResourceNames(resourceIdentifier); } } }
GroupLevelWebServerResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ throw new UnsupportedOperationException(); } else { return successor.getResourceNames(resourceIdentifier); } } GroupLevelWebServerResourceHandler(final ResourceDao resourceDao,
                                              final GroupPersistenceService groupPersistenceService,
                                              final WebServerPersistenceService webServerPersistenceService,
                                              final ResourceContentGeneratorService resourceContentGeneratorService,
                                              final ResourceHandler successor); }
GroupLevelWebServerResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ throw new UnsupportedOperationException(); } else { return successor.getResourceNames(resourceIdentifier); } } GroupLevelWebServerResourceHandler(final ResourceDao resourceDao,
                                              final GroupPersistenceService groupPersistenceService,
                                              final WebServerPersistenceService webServerPersistenceService,
                                              final ResourceContentGeneratorService resourceContentGeneratorService,
                                              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); }
GroupLevelWebServerResourceHandler extends ResourceHandler { @Override public List<String> getResourceNames(ResourceIdentifier resourceIdentifier) { if (canHandle(resourceIdentifier)){ throw new UnsupportedOperationException(); } else { return successor.getResourceNames(resourceIdentifier); } } GroupLevelWebServerResourceHandler(final ResourceDao resourceDao,
                                              final GroupPersistenceService groupPersistenceService,
                                              final WebServerPersistenceService webServerPersistenceService,
                                              final ResourceContentGeneratorService resourceContentGeneratorService,
                                              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);  }