Class CoreRestServicesModule

java.lang.Object
com.google.inject.AbstractModule
com.peterphi.std.guice.web.rest.CoreRestServicesModule
All Implemented Interfaces:
com.google.inject.Module

public class CoreRestServicesModule extends com.google.inject.AbstractModule
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Servlet context value to read for the resteasy prefix
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    Return the base path for this webapp
    getRestServicesEndpoint(URI webappUri, String restPrefix, javax.servlet.ServletContext context)
    Return the base path for all REST services in this webapp
    getRestServicesPrefix(javax.servlet.ServletContext context)
    Retrieves the RESTeasy mapping prefix - this is the path under the webapp root where RESTeasy services are mapped.

    Methods inherited from class com.google.inject.AbstractModule

    addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • RESTEASY_MAPPING_PREFIX

      public static final String RESTEASY_MAPPING_PREFIX
      Servlet context value to read for the resteasy prefix
      See Also:
  • Constructor Details

    • CoreRestServicesModule

      public CoreRestServicesModule()
  • Method Details

    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule
    • getRestServicesPrefix

      @Provides public String getRestServicesPrefix(javax.servlet.ServletContext context)
      Retrieves the RESTeasy mapping prefix - this is the path under the webapp root where RESTeasy services are mapped.
      Parameters:
      context -
      Returns:
    • getRestServicesEndpoint

      @Provides public URI getRestServicesEndpoint(URI webappUri, String restPrefix, javax.servlet.ServletContext context)
      Return the base path for all REST services in this webapp
      Parameters:
      webappUri -
      restPrefix - the prefix for rest services (added after the webapp endpoint to form the base path for the JAX-RS container)
      context -
      Returns:
    • getRestServicesEndpoint

      @Provides public URI getRestServicesEndpoint(LocalEndpointDiscovery localEndpointDiscovery)
      Return the base path for this webapp
      Parameters:
      localEndpointDiscovery -
      Returns: