Package com.sun.identity.config.util
Class AjaxPage
- java.lang.Object
-
- org.openidentityplatform.openam.click.Page
-
- com.sun.identity.config.util.AjaxPage
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ProtectedPage,TemplatedPage,Upgrade
public abstract class AjaxPage extends org.openidentityplatform.openam.click.Page- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description ActionLinkcheckPasswordsLinkprotected LocaleconfigLocalestatic Debugdebugstatic StringOLD_RESPONSE_TEMPLATEprotected ResourceBundlerbprotected static StringRB_NAMEActionLinkresetSessionAttributesLinkstatic StringRESPONSE_TEMPLATEStringresponseStringActionLinkvalidateInputLink
-
Constructor Summary
Constructors Constructor Description AjaxPage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckPasswords()StringgetAttribute(String attr, String defaultValue)StringgetAvailablePort(int portNumber)StringgetBaseDir(jakarta.servlet.http.HttpServletRequest req)protected org.forgerock.opendj.ldap.ConnectiongetConnection(String host, int port, String bindDN, char[] bindPwd, int timeout, boolean isSSl)StringgetCookieDomain()StringgetHostName()StringgetHostName(String serverUrl, String defaultHostName)StringgetLocalizedString(String i18nKey)StringgetQuoteEscapedLocalizedString(String i18nKey)intgetServerPort(String serverUrl, int defaultPort)voidinitializeResourceBundle()booleanisRendering()voidonInit()The on Initialization event handler.booleanresetSessionAttributes()protected booleantoBoolean(String paramName)protected inttoInt(String paramName)protected StringtoString(String paramName)booleanvalidateInput()protected booleanwriteErrorToResponse(org.forgerock.opendj.ldap.ResultCode resultCode)protected voidwriteInvalid(String message)protected voidwriteJsonResponse(boolean valid, String responseBody)protected voidwriteJsonResponse(String valid, String responseBody)protected voidwriteToResponse(String text)protected voidwriteValid()protected voidwriteValid(String message)-
Methods inherited from class org.openidentityplatform.openam.click.Page
addControl, addModel, getContentType, getContext, getControls, getFormat, getForward, getHeadElements, getHeaders, getHtmlImports, getMessage, getMessage, getMessages, getModel, getPageImports, getPath, getRedirect, getTemplate, hasControls, hasHeaders, isIncludeControlHeadElements, isStateful, onDestroy, onGet, onPost, onRender, onSecurityCheck, removeControl, setFormat, setForward, setForward, setForward, setHeader, setHeaders, setIncludeControlHeadElements, setPageImports, setPath, setRedirect, setRedirect, setRedirect, setRedirect, setStateful, setTemplate
-
-
-
-
Field Detail
-
checkPasswordsLink
public ActionLink checkPasswordsLink
-
validateInputLink
public ActionLink validateInputLink
-
resetSessionAttributesLink
public ActionLink resetSessionAttributesLink
-
RESPONSE_TEMPLATE
public static final String RESPONSE_TEMPLATE
- See Also:
- Constant Field Values
-
OLD_RESPONSE_TEMPLATE
public static final String OLD_RESPONSE_TEMPLATE
- See Also:
- Constant Field Values
-
configLocale
protected Locale configLocale
-
rb
protected ResourceBundle rb
-
RB_NAME
protected static final String RB_NAME
- See Also:
- Constant Field Values
-
responseString
public String responseString
-
debug
public static Debug debug
-
-
Method Detail
-
onInit
public void onInit()
Description copied from class:org.openidentityplatform.openam.click.PageThe on Initialization event handler. This event handler is invoked after thePage.onInit()method has been called. Subclasses should place any initialization code which has dependencies on the context or other properties in this method. Generally light weight initialization code should be placed in the Pages constructor. Time consuming operations such as fetching the results of a database query should not be placed in this method. These operations should be performed in thePage.onRender(),Page.onGet()orPage.onPost()methods so that other event handlers may take alternative execution paths without performing these expensive operations. Please Note however the qualifier for the previous statement is that all form and field controls must be fully initialized before they are processed, which is after the onInit() method has completed. After this point their onProcess() methods will be invoked by the ClickServlet. Select controls in particular must have their option list values populated before the form is processed otherwise field validations cannot be performed. For initializing page controls the best practice is to place all the control creation code in the pages constructor, and only place any initialization code in the onInit() method which has an external dependency to the context or some other object. By following this practice it is easy to see what code is "design time" initialization code and what is "runtime initialization code". When subclassing pages which also use the onInit() method is is critical you call the super.onInit() method first, for example:public void onInit() { super.onInit(); // Initialization code .. }
- Overrides:
onInitin classorg.openidentityplatform.openam.click.Page
-
isRendering
public boolean isRendering()
-
toBoolean
protected boolean toBoolean(String paramName)
-
toInt
protected int toInt(String paramName)
-
writeValid
protected void writeValid()
-
writeValid
protected void writeValid(String message)
-
writeInvalid
protected void writeInvalid(String message)
-
writeJsonResponse
protected void writeJsonResponse(boolean valid, String responseBody)
-
getConnection
protected org.forgerock.opendj.ldap.Connection getConnection(String host, int port, String bindDN, char[] bindPwd, int timeout, boolean isSSl) throws GeneralSecurityException, org.forgerock.opendj.ldap.LdapException
- Throws:
GeneralSecurityExceptionorg.forgerock.opendj.ldap.LdapException
-
writeErrorToResponse
protected boolean writeErrorToResponse(org.forgerock.opendj.ldap.ResultCode resultCode)
-
writeToResponse
protected void writeToResponse(String text)
-
initializeResourceBundle
public void initializeResourceBundle()
-
getHostName
public String getHostName()
-
getServerPort
public int getServerPort(String serverUrl, int defaultPort)
-
getBaseDir
public String getBaseDir(jakarta.servlet.http.HttpServletRequest req)
-
getCookieDomain
public String getCookieDomain()
-
validateInput
public boolean validateInput()
-
resetSessionAttributes
public boolean resetSessionAttributes()
-
getAvailablePort
public String getAvailablePort(int portNumber)
-
checkPasswords
public boolean checkPasswords()
-
-