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

  • 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 java.lang.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
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String cleanupUrl​(java.lang.String url)
      Cleanup the url.
      <T extends org.apereo.cas.authentication.principal.Service>
      T
      createService​(java.lang.String id, java.lang.Class<T> clazz)  
      <T extends org.apereo.cas.authentication.principal.Service>
      T
      createService​(javax.servlet.http.HttpServletRequest request, java.lang.Class<T> clazz)  
      protected static java.lang.String getSourceParameter​(javax.servlet.http.HttpServletRequest request, java.lang.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 Detail

      • AbstractServiceFactory

        public AbstractServiceFactory()
    • Method Detail

      • cleanupUrl

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

        protected static java.lang.String getSourceParameter​(javax.servlet.http.HttpServletRequest request,
                                                             java.lang.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​(java.lang.String id,
                                                                                           java.lang.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​(javax.servlet.http.HttpServletRequest request,
                                                                                           java.lang.Class<T> clazz)
        Specified by:
        createService in interface org.apereo.cas.authentication.principal.ServiceFactory<T extends org.apereo.cas.authentication.principal.Service>