Class MyLuteceApp

  • All Implemented Interfaces:
    fr.paris.lutece.portal.web.xpages.XPageApplication, java.io.Serializable

    public class MyLuteceApp
    extends java.lang.Object
    implements fr.paris.lutece.portal.web.xpages.XPageApplication
    This class provides the XPageApp that manage personalization features for Lutece : login, account management, ...
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      MyLuteceApp()
      Constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String doLogin​(javax.servlet.http.HttpServletRequest request)
      This method is call by the JSP named DoMyLuteceLogin.jsp
      java.lang.String doLogout​(javax.servlet.http.HttpServletRequest request)
      This method is call by the JSP named DoMyLuteceLogout.jsp
      java.lang.String doResetConnectionLog​(javax.servlet.http.HttpServletRequest request)
      Reset the connection log of an IP.
      static java.lang.String getAccessControledTemplate()
      Returns the template for access controled
      static java.lang.String getAccessDeniedTemplate()
      Returns the template for access denied
      static java.lang.String getCurrentUrl​(javax.servlet.http.HttpServletRequest request)
      Returns the current url
      static java.lang.String getDefaultRedirectUrl()
      Returns the Default redirect URL of the Authentication Service
      static java.lang.String getDoLoginUrl()
      Returns the DoLogin URL of the Authentication Service
      static java.lang.String getDoLogoutUrl()
      Returns the DoLogout URL of the Authentication Service
      static java.lang.String getLoginPageUrl()
      Returns the Login page URL of the Authentication Service
      static java.lang.String getLostLoginUrl()
      Returns the Lost login URL of the Authentication Service
      static java.lang.String getLostPasswordUrl()
      Returns the Lost Password URL of the Authentication Service
      static java.lang.String getNewAccountUrl()
      Returns the NewAccount URL of the Authentication Service
      fr.paris.lutece.portal.web.xpages.XPage getPage​(javax.servlet.http.HttpServletRequest request, int nMode, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      This method builds a XPage object corresponding to the request
      static java.lang.String getResetPasswordUrl​(javax.servlet.http.HttpServletRequest request)
      Returns the Reset Password URL of the Authentication Service
      static java.lang.String getViewAccountUrl()
      Returns the ViewAccount URL of the Authentication Service
      java.lang.String isUserAuthenticated​(javax.servlet.http.HttpServletRequest request)
      Check if the current user is authenticated
      static void setCurrentUrl​(javax.servlet.http.HttpServletRequest request)
      Set the current url
      • Methods inherited from class java.lang.Object

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

      • MyLuteceApp

        public MyLuteceApp()
        Constructor
    • Method Detail

      • getPage

        public fr.paris.lutece.portal.web.xpages.XPage getPage​(javax.servlet.http.HttpServletRequest request,
                                                               int nMode,
                                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        This method builds a XPage object corresponding to the request
        Specified by:
        getPage in interface fr.paris.lutece.portal.web.xpages.XPageApplication
        Parameters:
        request - The HTTP request
        nMode - The mode
        plugin - The plugin object which belongs the App
        Returns:
        The XPage object containing the page content
      • doLogin

        public java.lang.String doLogin​(javax.servlet.http.HttpServletRequest request)
                                 throws java.io.UnsupportedEncodingException
        This method is call by the JSP named DoMyLuteceLogin.jsp
        Parameters:
        request - The HTTP request
        Returns:
        The URL to forward depending of the result of the login.
        Throws:
        java.io.UnsupportedEncodingException
      • isUserAuthenticated

        public java.lang.String isUserAuthenticated​(javax.servlet.http.HttpServletRequest request)
        Check if the current user is authenticated
        Parameters:
        request - The request
        Returns:
        A JSON string containing true in the field result if the user is authenticated
      • getLoginPageUrl

        public static java.lang.String getLoginPageUrl()
        Returns the Login page URL of the Authentication Service
        Returns:
        The URL
      • getDoLoginUrl

        public static java.lang.String getDoLoginUrl()
        Returns the DoLogin URL of the Authentication Service
        Returns:
        The URL
      • getDoLogoutUrl

        public static java.lang.String getDoLogoutUrl()
        Returns the DoLogout URL of the Authentication Service
        Returns:
        The URL
      • getNewAccountUrl

        public static java.lang.String getNewAccountUrl()
        Returns the NewAccount URL of the Authentication Service
        Returns:
        The URL
      • getViewAccountUrl

        public static java.lang.String getViewAccountUrl()
        Returns the ViewAccount URL of the Authentication Service
        Returns:
        The URL
      • getLostPasswordUrl

        public static java.lang.String getLostPasswordUrl()
        Returns the Lost Password URL of the Authentication Service
        Returns:
        The URL
      • getLostLoginUrl

        public static java.lang.String getLostLoginUrl()
        Returns the Lost login URL of the Authentication Service
        Returns:
        The URL
      • getResetPasswordUrl

        public static java.lang.String getResetPasswordUrl​(javax.servlet.http.HttpServletRequest request)
        Returns the Reset Password URL of the Authentication Service
        Parameters:
        request - The request
        Returns:
        The URL
      • getDefaultRedirectUrl

        public static java.lang.String getDefaultRedirectUrl()
        Returns the Default redirect URL of the Authentication Service
        Returns:
        The URL
      • doLogout

        public java.lang.String doLogout​(javax.servlet.http.HttpServletRequest request)
        This method is call by the JSP named DoMyLuteceLogout.jsp
        Parameters:
        request - The HTTP request
        Returns:
        The URL to forward depending of the result of the login.
      • getAccessDeniedTemplate

        public static java.lang.String getAccessDeniedTemplate()
        Returns the template for access denied
        Returns:
        The template path
      • getAccessControledTemplate

        public static java.lang.String getAccessControledTemplate()
        Returns the template for access controled
        Returns:
        The template path
      • doResetConnectionLog

        public java.lang.String doResetConnectionLog​(javax.servlet.http.HttpServletRequest request)
        Reset the connection log of an IP.
        Parameters:
        request - The request
        Returns:
        The URL of the next page to display
      • getCurrentUrl

        public static java.lang.String getCurrentUrl​(javax.servlet.http.HttpServletRequest request)
        Returns the current url
        Parameters:
        request - The Http request
        Returns:
        The current url
      • setCurrentUrl

        public static void setCurrentUrl​(javax.servlet.http.HttpServletRequest request)
        Set the current url
        Parameters:
        request - The Http request