protected UrlConfig getUrlConfigForTarget ( Adaptable adaptable , Resource targetResource ) { UrlConfig config = null ; if ( targetResource != null ) { config = new UrlConfig ( targetResource ) ; } if ( config == null || ! config . isValid ( ) ) { config = new UrlConfig ( adaptable ) ; } return config ; }
Get URL configuration for target resource . If this is invalid or not available get it from adaptable .