Package com.sun.identity.setup
Class AMSetupServlet
- java.lang.Object
-
- jakarta.servlet.GenericServlet
-
- jakarta.servlet.http.HttpServlet
-
- com.sun.identity.setup.AMSetupServlet
-
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class AMSetupServlet extends jakarta.servlet.http.HttpServletThis 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 Summary
Constructors Constructor Description AMSetupServlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidchmodFileReadOnly(File f)Change a file to be read only for owner (eg password file on disk that we want to protect)voiddoPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)static voidenableDebug()static StringgetBaseDir()static StringgetErrorMessage()static LicenseLocatorgetLicenseLocator()static StringgetPresetConfigDir()voidinit(jakarta.servlet.ServletConfig config)static booleanisConfigured()static booleanisConfigured(jakarta.servlet.ServletContext servletctx)Invoked from the filter to decide which page needs to be displayed.static booleanisCurrentConfigurationValid()static booleanisOpenDJUpgraded()static booleanisUpgradeCompleted()static booleanprocessRequest(IHttpServletRequest request, IHttpServletResponse response)static StringreadFile(String file)static voidupgradeCompleted()-
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
-
-
-
-
Method Detail
-
init
public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException- Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.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:
doPostin classjakarta.servlet.http.HttpServlet- Throws:
IOExceptionjakarta.servlet.ServletExceptionConfiguratorException
-
processRequest
public static boolean processRequest(IHttpServletRequest request, IHttpServletResponse response)
-
getErrorMessage
public static String getErrorMessage()
-
getPresetConfigDir
public static String getPresetConfigDir() throws ConfiguratorException
- Throws:
ConfiguratorException
-
getBaseDir
public static String getBaseDir() throws ConfiguratorException
- Throws:
ConfiguratorException
-
readFile
public static String readFile(String file) throws IOException
- Throws:
IOException
-
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
-
-