Class LocalRouteRepository

    • Constructor Detail

      • LocalRouteRepository

        public LocalRouteRepository()
        Creates a new instance of a local in-memory HookRouteRepository.
    • Method Detail

      • addRoute

        public void addRoute​(String urlPattern,
                             Route route)
        Description copied from interface: RouteRepository
        Adds a route for the given url pattern.
        Specified by:
        addRoute in interface RouteRepository
        Parameters:
        urlPattern - - is used as a key.
        route - route
      • removeRoute

        public void removeRoute​(String urlPattern)
        Description copied from interface: RouteRepository
        Removes the route for the url pattern.
        Specified by:
        removeRoute in interface RouteRepository
        Parameters:
        urlPattern - urlPattern
      • getRoute

        public Route getRoute​(String url)
        Description copied from interface: RouteRepository
        Returns the route which is foreseen for the given url. The repository checks if a url pattern is present for this url and then returns the corresponding route. If nothing is found, null is returned.
        Specified by:
        getRoute in interface RouteRepository
        Parameters:
        url - url
        Returns:
        a route or null if no route is found
      • getCollections

        public Set<String> getCollections​(String parentUri)
        Description copied from interface: RouteRepository
        Returns a set with collections (routes) contained in the given parent. Only routes (collections) directly resided in the given parent will be returned. If no route could be found an empty set will be returned.
        Specified by:
        getCollections in interface RouteRepository
        Parameters:
        parentUri - the parent of which the routes should be listed
        Returns:
        a set with routes