Class PlatformHooks

  • Direct Known Subclasses:
    ScriptedPlatformHooks

    public class PlatformHooks
    extends com.simplicite.util.engine.PlatformHooksInterface
    Platform hooks wrapper to manage one singleton per class-loader
    • Constructor Summary

      Constructors 
      Constructor Description
      PlatformHooks()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void clearCache()
      Clear singleton.
      java.lang.String customAuth​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Custom authentication default implementation:
      Try to get login from an authentication header (denoted by the AUTH_HEADER system parameter)
      Then try to get login from an authentication cookie (denoted by the AUTH_COOKIE system parameter)
      Then optionally check authentication origin (denoted by the AUTH_ORIGIN system parameter)
      Note: login processing itself is then supposed to be done in the parseAuth hook
      void customAuthPage​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String error)
      This method is called to generate a custom authentication page response.
      void customStartPage​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Custom start page.
      static ScriptedPlatformHooks getInstance()
      Get singleton instance.
      static void init()
      Init singleton.
      • Methods inherited from class com.simplicite.util.engine.PlatformHooksInterface

        canPreviewDocument, changeScope, checkMFA, downloadDocument, event, generatePassword, getAuthTokenInfo, init, initMFA, isMenuEnable, logout, parseAuth, postAuth, postAuth, postClearCache, postLoadGrant, postLoadHome, postLoadLogEvents, postLoadMenu, postLoadProfile, postLoadResponsibilities, postLoadScope, postLoadSystemParams, postPlatformInit, postSearchIndex, postSearchIndex, preAuth, preAuth, preClearCache, preLoadGrant, preLoadHome, preLoadLogEvents, preLoadMenu, preLoadProfile, preLoadResponsibilities, preLoadSystemParams, preSearchIndex, preSearchIndex, sendSMS, socialPost, socialPost, unitTests, validatePassword
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlatformHooks

        public PlatformHooks()
    • Method Detail

      • init

        public static final void init()
        Init singleton.
      • clearCache

        public static final void clearCache()
        Clear singleton.
      • getInstance

        public static final ScriptedPlatformHooks getInstance()
        Get singleton instance.
        Returns:
        Singleton instance
      • customStartPage

        public void customStartPage​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
        Custom start page.
        Overrides:
        customStartPage in class com.simplicite.util.engine.PlatformHooksInterface
        Parameters:
        request - Request
        response - Response
      • customAuthPage

        public void customAuthPage​(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response,
                                   java.lang.String error)
                            throws java.lang.Exception
        This method is called to generate a custom authentication page response.
        Overrides:
        customAuthPage in class com.simplicite.util.engine.PlatformHooksInterface
        Parameters:
        request - HTTP request
        response - HTTP response
        error - Optional error message
        Throws:
        java.lang.Exception
      • customAuth

        public java.lang.String customAuth​(javax.servlet.http.HttpServletRequest request,
                                           javax.servlet.http.HttpServletResponse response)
                                    throws java.lang.Exception
        Custom authentication default implementation:
        Try to get login from an authentication header (denoted by the AUTH_HEADER system parameter)
        Then try to get login from an authentication cookie (denoted by the AUTH_COOKIE system parameter)
        Then optionally check authentication origin (denoted by the AUTH_ORIGIN system parameter)
        Note: login processing itself is then supposed to be done in the parseAuth hook
        Overrides:
        customAuth in class com.simplicite.util.engine.PlatformHooksInterface
        Parameters:
        request - Request
        response - Response
        Returns:
        Login or null
        Throws:
        java.lang.Exception