@Test public void testCanHandle() { ResourceIdentifier.Builder resourceIdentifier = new ResourceIdentifier.Builder(); resourceIdentifier.setGroupName(null); resourceIdentifier.setWebAppName(null); resourceIdentifier.setJvmName(null); resourceIdentifier.setWebServerName(null); resourceIdentifier.setResourceName("external.properties"); assertTrue(externalPropertiesResourceHandler.canHandle(resourceIdentifier.build())); }
@Override protected boolean canHandle(ResourceIdentifier resourceIdentifier) { return StringUtils.isNotEmpty(resourceIdentifier.resourceName) && StringUtils.isEmpty(resourceIdentifier.webAppName) && StringUtils.isEmpty(resourceIdentifier.jvmName) && StringUtils.isEmpty(resourceIdentifier.groupName) && StringUtils.isEmpty(resourceIdentifier.webServerName); }
ExternalPropertiesResourceHandler extends ResourceHandler { @Override protected boolean canHandle(ResourceIdentifier resourceIdentifier) { return StringUtils.isNotEmpty(resourceIdentifier.resourceName) && StringUtils.isEmpty(resourceIdentifier.webAppName) && StringUtils.isEmpty(resourceIdentifier.jvmName) && StringUtils.isEmpty(resourceIdentifier.groupName) && StringUtils.isEmpty(resourceIdentifier.webServerName); } }
ExternalPropertiesResourceHandler extends ResourceHandler { @Override protected boolean canHandle(ResourceIdentifier resourceIdentifier) { return StringUtils.isNotEmpty(resourceIdentifier.resourceName) && StringUtils.isEmpty(resourceIdentifier.webAppName) && StringUtils.isEmpty(resourceIdentifier.jvmName) && StringUtils.isEmpty(resourceIdentifier.groupName) && StringUtils.isEmpty(resourceIdentifier.webServerName); } ExternalPropertiesResourceHandler(final ResourceDao resourceDao, final ResourceHandler successor); }
ExternalPropertiesResourceHandler extends ResourceHandler { @Override protected boolean canHandle(ResourceIdentifier resourceIdentifier) { return StringUtils.isNotEmpty(resourceIdentifier.resourceName) && StringUtils.isEmpty(resourceIdentifier.webAppName) && StringUtils.isEmpty(resourceIdentifier.jvmName) && StringUtils.isEmpty(resourceIdentifier.groupName) && StringUtils.isEmpty(resourceIdentifier.webServerName); } ExternalPropertiesResourceHandler(final ResourceDao resourceDao, final ResourceHandler successor); @Override ConfigTemplate fetchResource(ResourceIdentifier resourceIdentifier); @Override CreateResourceResponseWrapper createResource(final ResourceIdentifier resourceIdentifier,
                                                        final ResourceTemplateMetaData metaData,
                                                        final String templateContent); @Override void deleteResource(ResourceIdentifier resourceIdentifier); @Override String updateResourceMetaData(ResourceIdentifier resourceIdentifier, String resourceName, String metaData); @Override Object getSelectedValue(ResourceIdentifier resourceIdentifier); @Override List<String> getResourceNames(ResourceIdentifier resourceIdentifier); }
ExternalPropertiesResourceHandler extends ResourceHandler { @Override protected boolean canHandle(ResourceIdentifier resourceIdentifier) { return StringUtils.isNotEmpty(resourceIdentifier.resourceName) && StringUtils.isEmpty(resourceIdentifier.webAppName) && StringUtils.isEmpty(resourceIdentifier.jvmName) && StringUtils.isEmpty(resourceIdentifier.groupName) && StringUtils.isEmpty(resourceIdentifier.webServerName); } ExternalPropertiesResourceHandler(final ResourceDao resourceDao, final ResourceHandler successor); @Override ConfigTemplate fetchResource(ResourceIdentifier resourceIdentifier); @Override CreateResourceResponseWrapper createResource(final ResourceIdentifier resourceIdentifier,
                                                        final ResourceTemplateMetaData metaData,
                                                        final String templateContent); @Override void deleteResource(ResourceIdentifier resourceIdentifier); @Override String updateResourceMetaData(ResourceIdentifier resourceIdentifier, String resourceName, String metaData); @Override Object getSelectedValue(ResourceIdentifier resourceIdentifier); @Override List<String> getResourceNames(ResourceIdentifier resourceIdentifier);  }