SetupClientWARSamples.java revision 4a2f0f0be43dfd4c1b490cbf3cc48b6ba6084b1c
/**
* 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: SetupClientWARSamples.java,v 1.13 2008/11/12 22:16:07 veiming Exp $
*
*/
/**
* This setup the OpenSSO client WAR samples.
*/
public class SetupClientWARSamples {
private static final String TRUST_ALL_CERTS =
"com.iplanet.am.jssproxy.trustAllServerCerts=true\n";
/**
* Constructor
*/
}
/**
* Creates AMConfig.properties file
* @param configFile Absolute path to the AMConfig.properties to be created.
* @param templateFile Template file for AMConfig.properties
* @param properties Properties to be swapped in the template
*/
// Due with extra / before deployment URI
}
}
}
}
// Setup default client keystore path.
}
"\n";
}
"com.iplanet.am.sdk.ldap");
}
// create parent directory if does not exists
}
}
}
throws IOException
{
}
}
}
/**
* Sets properties from AMConfig.properties
* @param configFile path to the AMConfig.properties file
* @throws ServletException when error occurs
*/
throws ServletException {
try {
ClientConfiguratorFilter.isConfigured = true;
} else {
}
} catch (FileNotFoundException fexp) {
} catch (IOException ioexp) {
} finally {
try {
} catch (IOException ioe) {
}
}
}
}
/**
* Create and copy the keystore file.
*
* @throws IOException if keystore file cannot be written.
*/
private void createKeystoreFile() throws IOException
{
byte[] b = new byte[2007];
}
/**
* Returns normalized path for the web application as string.
* The normalized path of a web application is obtained by replacing the
* file separator (e.g. "/") with "_" in the absolute file path where
* the web application is deployed.
* For example, if the OpenSSO WAR is deployed on
* "_opt_tomcat_webapps_opensso_".
* @param servletCtx ServletContext of the web application
* @return normalized path as string.
* @throws ServletException if failed to get the path
*/
throws ServletException {
if (servletCtx != null) {
} else {
}
if (idx != -1) {
}
}
}
return path;
}
/**
* Returns URL of the default resource.
*
* @param servletCtx ServletContext of the web application
* @return URL of the default resource. Returns null if servlet context is
* null.
* @throws ServletException if failed to get the default source.
*/
throws ServletException {
if (servletCtx != null) {
try {
} catch (MalformedURLException mue) {
}
}
return null;
}
}