AjaxPage.java revision 56ed5bbb263838f338eb8afc978091c01a4f2a2b
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: AjaxPage.java,v 1.24 2010/01/04 19:15:16 veiming Exp $
*
*/
/*
* Portions Copyrighted 2011-2012 ForgeRock AS
*/
public ActionLink checkPasswordsLink =
public ActionLink validateInputLink =
public ActionLink resetSessionAttributesLink =
new ActionLink("resetSessionAttributes", this,
"resetSessionAttributes");
public static final String OLD_RESPONSE_TEMPLATE = "{\"isValid\":${isValid}, \"errorMessage\":\"${errorMessage}\"}";
private static int MIN_PASSWORD_SIZE = 8;
private boolean rendering = false;
// localization properties
public AjaxPage() {
}
public void onInit() {
super.onInit();
addModel("page", this);
}
public boolean isRendering() {
return rendering;
}
return value;
}
return false;
}
return true;
} else {
return false;
}
}
int intValue = 0;
try {
} catch ( NumberFormatException e ) {}
}
return intValue;
}
protected void writeValid() {
writeValid( null );
}
writeJsonResponse(true, out);
}
writeJsonResponse( false, out );
}
}
}
try {
this.rendering = true;
} catch ( IOException e ) {
throw new RuntimeException( e );
}
}
public void initializeResourceBundle() {
}
} else {
if ((acceptLangHeader != null) &&
{
} else {
}
}
try {
} catch (MissingResourceException mre) {
// do nothing
}
}
}
}
}
try {
} catch (MissingResourceException mre) {
// do nothing
}
}
public String getHostName() {
}
return hostName;
}
try {
} catch (MalformedURLException mue) {
return defaultHostName;
}
}
try {
} catch (MalformedURLException mue) {
return defaultPort;
}
}
}
if (idx != -1) {
}
tmp;
}
return basedir;
}
public String getCookieDomain() {
try {
if (lastidx == -1) {
return "." + hostname;
} else {
return "";
}
} else {
}
} catch (IOException ioe) {
return "";
}
}
public boolean validateInput() {
responseString = "missing.required.field";
} else {
}
return false;
}
public boolean resetSessionAttributes() {
try {
try {
} catch (IllegalAccessException e) {
//ingore
}
}
} catch (SecurityException e) {
writeToResponse(e.getMessage());
}
return false;
}
}
}
public boolean checkPasswords() {
} else {
} else {
}
}
return false;
}
}