Utils.java revision 68b2561253b762576763edab26180edb5c839d21
/**
* 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: Utils.java,v 1.4 2008/11/10 22:57:00 veiming Exp $
*
* Portions Copyrighted 2013-2014 ForgeRock AS.
*/
/**
*/
public class Utils
{
/**
* Http POST
*/
/**
* Http GET
*/
/**
* Redirects to <code>redirectUrl</code> as a GET or a POST
* based on <code>action</code> parameter provided.
* in case of POST all params need to be specified in <code>pmap</code>
* parameter.
*
* @param hres HttpSevletResponse to be used for the redirect
* @param out the print writer for writing out presentation
* @param redirectUrl URL to redirect to.
* @param pmap http parameters to be sent as part of the redirect
* @param action http action to be executed : GET or POST
*/
throws Exception
{
// Put it all together in query part of Url
buf = new StringBuilder();
}
}
} else {
}
}
/**
* Generates a query string from the parameters in the request.
* @param request http request to pick params from.
* @return query string
*/
{
boolean priorparam = false;
while (en.hasMoreElements()) {
if (priorparam)
priorparam = true;
}
}
/**
* Generates a query string from the a <code>Map</code>.
* @param pmap params to be added to the query string.
* @return query string
*/
{
boolean priorparam = false;
if (priorparam)
priorparam = true;
}
}
/**
* Generates a html hidden form to acccomplish a auto POST from the browser
* Form is assigned an id=saeform
* @param redirectUrl URL to post teh form to.
* @param pmap parameters to be sent in the POST
* @param addAutoSubmit adds html and javascript to autosubmit form
* @return html code
*/
boolean addAutoSubmit)
{
if (addAutoSubmit) {
}
}
if (addAutoSubmit) {
}
}
}