Class PrefixingPathRegistry

java.lang.Object
com.foreach.across.modules.web.context.PrefixingPathRegistry
All Implemented Interfaces:
WebAppPathResolver

public class PrefixingPathRegistry extends Object implements WebAppPathResolver
Author:
Arne Vandamme
  • Field Details

  • Constructor Details

    • PrefixingPathRegistry

      public PrefixingPathRegistry()
  • Method Details

    • add

      public void add(@NonNull @NonNull String name, @NonNull @NonNull PrefixingPathContext context)
      Adds a PrefixingPathContext to this registry. This will set the registry as namedDescriptorMap on the context by calling PrefixingPathContext.setNamedPrefixMap(java.util.Map).
      Parameters:
      name - name that can be used to refer to this context
      context - implementation
    • get

      public PrefixingPathContext get(String name)
    • remove

      public void remove(String name)
    • path

      public String path(String path)
      Description copied from interface: WebAppPathResolver
      Resolves the requested path in the relative context of the web application. Note that this does not take the actual web application context of the container into account.
      Specified by:
      path in interface WebAppPathResolver
      Parameters:
      path - Original path to be resolved.
      Returns:
      Resolved path - might be modified.
    • redirect

      public String redirect(String path)
      Description copied from interface: WebAppPathResolver
      Creates a Spring MVC redirect for the requested path. This will usually apply the regular path resolving and prepend redirect: if necessary.
      Specified by:
      redirect in interface WebAppPathResolver
      Parameters:
      path - Original path for which to create a redirect.
      Returns:
      Redirect path.