Package org.resthub.web.springmvc.router.exceptions

Examples of org.resthub.web.springmvc.router.exceptions.RouteFileParsingException


                fileResources.addAll(Arrays.asList(getApplicationContext().getResources(fileName)));
            }
           
            Router.detectChanges(fileResources);
        } catch (IOException ex) {
            throw new RouteFileParsingException(
                    "Could not read route configuration files", ex);
        }
    }
View Full Code Here


                fileResources.addAll(Arrays.asList(getApplicationContext().getResources(fileName)));
            }
            Router.load(fileResources);

        } catch (IOException e) {
            throw new RouteFileParsingException(
                    "Could not read route configuration files", e);
        }
    }
View Full Code Here

                                    @SuppressWarnings("unchecked")
                                    List<Object> vals = (List<Object>) value;
                                    try {
                                        path = path.replaceAll("\\{(<[^>]+>)?" + key + "\\}", URLEncoder.encode(vals.get(0).toString().replace("$", "\\$"), "utf-8"));
                                    } catch (UnsupportedEncodingException e) {
                                        throw new RouteFileParsingException("RouteFile encoding exception", e);
                                    }
                                } else {
                                    try {
                                        path = path.replaceAll("\\{(<[^>]+>)?" + key + "\\}", URLEncoder.encode(value.toString().replace("$", "\\$"), "utf-8"));
                                        host = host.replaceAll("\\{(<[^>]+>)?" + key + "\\}", URLEncoder.encode(value.toString().replace("$", "\\$"), "utf-8"));
                                    } catch (UnsupportedEncodingException e) {
                                        throw new RouteFileParsingException("RouteFile encoding exception", e);
                                    }
                                }
                            } else if (route.staticArgs.containsKey(key)) {
                                // Do nothing -> The key is static
                            } else if (value != null) {
View Full Code Here

TOP

Related Classes of org.resthub.web.springmvc.router.exceptions.RouteFileParsingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.