Class AMSetupServlet

  • All Implemented Interfaces:
    jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

    public class AMSetupServlet
    extends jakarta.servlet.http.HttpServlet
    This class is the first class to get loaded by the Servlet container. It has helper methods to determine the status of OpenAM configuration when deployed as a single web-application. If OpenAM is not deployed as single web-application then the configured status returned is always true.
    See Also:
    Serialized Form
    • Constructor Detail

      • AMSetupServlet

        public AMSetupServlet()
    • Method Detail

      • init

        public void init​(jakarta.servlet.ServletConfig config)
                  throws jakarta.servlet.ServletException
        Specified by:
        init in interface jakarta.servlet.Servlet
        Overrides:
        init in class jakarta.servlet.GenericServlet
        Throws:
        jakarta.servlet.ServletException
      • getLicenseLocator

        public static LicenseLocator getLicenseLocator()
      • isCurrentConfigurationValid

        public static boolean isCurrentConfigurationValid()
      • isConfigured

        public static boolean isConfigured()
      • upgradeCompleted

        public static void upgradeCompleted()
      • isUpgradeCompleted

        public static boolean isUpgradeCompleted()
      • isOpenDJUpgraded

        public static boolean isOpenDJUpgraded()
      • enableDebug

        public static void enableDebug()
      • isConfigured

        public static boolean isConfigured​(jakarta.servlet.ServletContext servletctx)
        Invoked from the filter to decide which page needs to be displayed.
        Parameters:
        servletctx - is the Servlet Context
        Returns:
        true if AM is already configured, false otherwise
      • doPost

        public void doPost​(jakarta.servlet.http.HttpServletRequest request,
                           jakarta.servlet.http.HttpServletResponse response)
                    throws IOException,
                           jakarta.servlet.ServletException,
                           ConfiguratorException
        Overrides:
        doPost in class jakarta.servlet.http.HttpServlet
        Throws:
        IOException
        jakarta.servlet.ServletException
        ConfiguratorException
      • getErrorMessage

        public static String getErrorMessage()
      • chmodFileReadOnly

        public static void chmodFileReadOnly​(File f)
                                      throws IOException
        Change a file to be read only for owner (eg password file on disk that we want to protect)
        Parameters:
        f - - the File handle to the file
        Throws:
        IOException - if the file does not exist or permissions can not be changed