Class AbstractServiceFactory<T extends org.apereo.cas.authentication.principal.Service>

java.lang.Object
org.apereo.cas.authentication.principal.AbstractServiceFactory<T>
All Implemented Interfaces:
org.apereo.cas.authentication.principal.ServiceFactory<T>, org.springframework.core.Ordered
Direct Known Subclasses:
WebApplicationServiceFactory

public abstract class AbstractServiceFactory<T extends org.apereo.cas.authentication.principal.Service> extends Object implements org.apereo.cas.authentication.principal.ServiceFactory<T>
The AbstractServiceFactory is the parent class providing convenience methods for creating service objects.
Since:
4.2.0
  • Field Summary

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static String
    Cleanup the url.
    <T extends org.apereo.cas.authentication.principal.Service>
    T
    createService(jakarta.servlet.http.HttpServletRequest request, Class<T> clazz)
     
    <T extends org.apereo.cas.authentication.principal.Service>
    T
    createService(String id, Class<T> clazz)
     
    protected static String
    getSourceParameter(jakarta.servlet.http.HttpServletRequest request, String... paramNames)
    Gets source parameter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.core.Ordered

    getOrder

    Methods inherited from interface org.apereo.cas.authentication.principal.ServiceFactory

    createService, createService
  • Constructor Details

    • AbstractServiceFactory

      public AbstractServiceFactory()
  • Method Details

    • cleanupUrl

      protected static String cleanupUrl(String url)
      Cleanup the url. Removes jsession ids and query strings.
      Parameters:
      url - the url
      Returns:
      sanitized url.
    • getSourceParameter

      protected static String getSourceParameter(jakarta.servlet.http.HttpServletRequest request, String... paramNames)
      Gets source parameter.
      Parameters:
      request - the request
      paramNames - the param names
      Returns:
      the source parameter
    • createService

      public <T extends org.apereo.cas.authentication.principal.Service> T createService(String id, Class<T> clazz)
      Specified by:
      createService in interface org.apereo.cas.authentication.principal.ServiceFactory<T extends org.apereo.cas.authentication.principal.Service>
    • createService

      public <T extends org.apereo.cas.authentication.principal.Service> T createService(jakarta.servlet.http.HttpServletRequest request, Class<T> clazz)
      Specified by:
      createService in interface org.apereo.cas.authentication.principal.ServiceFactory<T extends org.apereo.cas.authentication.principal.Service>